X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fwiki%2Ffarmconfig.php;h=2faf4f940d9ccf46d27eb46a48934678083d623f;hb=a51d0d30df9f951fe83688d49a172edaba453d63;hp=081a9ed5452ef517a488043d18059b8255aef4c7;hpb=90489c0747738c9062379e810e4c72e5b222b680;p=platal.git diff --git a/include/wiki/farmconfig.php b/include/wiki/farmconfig.php index 081a9ed..2faf4f9 100644 --- a/include/wiki/farmconfig.php +++ b/include/wiki/farmconfig.php @@ -6,6 +6,7 @@ $EnableUpload = 1; $UploadMaxSize = 500000; $LinkWikiWords = 0; # disable WikiWord links $EnableIMSCaching = 1; # allow browser caching +$EnablePageListProtect = 0; # We use our own permission system. $ScriptUrl = '.'; #\ $UploadUrlFmt = './uploads'; # } works thanks to the in skin @@ -19,11 +20,16 @@ $Skin = 'empty'; @include_once("$FarmD/cookbook/e-protect.php"); include_once($FarmD.'/scripts/xlpage-utf-8.php'); - -if ($action == 'rss' || - $action == 'atom' || - $action == 'rdf' || - $action == 'dc') include_once("$FarmD/scripts/feeds.php"); +$pagename = ResolvePageName($pagename); + +if ($action == 'rss' || $action == 'atom' || $action == 'rdf' || $action == 'dc') { + $FmtPV['$MarkupExcerpt'] = '$page["text"]'; + $FeedFmt[$action]['item']['title'] = '[$Group] {$Title}'; + $FeedFmt[$action]['item']['description'] = '$LastModifiedSummary'; + $FeedFmt[$action]['feed']['title'] = 'Polytechnique.org :: Wiki :: $FullName'; + $pagelist = null; + include_once("$FarmD/scripts/feeds.php"); +} // Theme-ing {{{ @@ -44,22 +50,26 @@ $GUIButtons['ul'] = array(530, '\\n* ', '\\n', '$[Unordered list]', $GUIButtons['hr'] = array(540, '\\n----\\n', '', '', '$GUIButtonDirUrlFmt/hr.gif"$[Horizontal rule]"'); $GUIButtons['table'] = array(600, - '||border=1 width=80%\\n||!Hdr ||!Hdr ||!Hdr ||\\n|| || || ||\\n|| || || ||\\n', '', '', + '||border=1 width=80%\\n||!Hdr ||!Hdr ||!Hdr ||\\n|| || || ||\\n|| || || ||\\n', '', '', '$GUIButtonDirUrlFmt/table.gif"$[Table]"'); // set default author -$Author = $_SESSION['forlife'].'|'.$_SESSION['prenom'].' '.$_SESSION['nom']; +$Author = $_SESSION['hruid'].'|'.$_SESSION['prenom'].' '.$_SESSION['nom']; $InputTags['e_form'] = array( - ':html' => "
"
"); // set profiles to point to plat/al fiche Markup('[[~platal', '<[[~', '/\[\[~([^|\]]*)(?:\|([^\]]*))?\]\]/e', 'PreserveText("=", doPlatalLink("$1", "$2"), "")'); +// Preserve javascript +Markup('[[javascript', '<[[javascript:', '/\[\[javascript:([^\|]*)\|([^\]]*)?\]\]/e', + 'PreserveText("=", \'\', "") . "$2" . PreserveText("=", "", "")'); + // prevent restorelinks before block apply (otherwise [[Sécurité]] will give // .../Se9'>Sécurité Markup('restorelinks','<%%',"//", ''); @@ -67,9 +77,9 @@ Markup('restorelinks','<%%',"//", ''); ## [[#anchor]] in standard XHTML Markup('[[#','<[[','/(?>\\[\\[#([A-Za-z][-.:\\w]*))\\]\\]/e', "Keep(\"\",'L')"); - + Markup('tablebicol', 'fetchOneAssoc(); - $text = $row['prenom'] . ' ' . $row['nom'] . ' X' . $row['promo']; - if ($row['surnom']) { - $text .= ' (alias ' . $row['surnom'] . ')'; + if (strlen(trim($text)) == 0) { + $profile = Profile::get($link); + if (!$profile) { + return '##Utilisateur inconnu##' . $text . '##'; } + $text = $profile->fullName(); } return '' . $text . ''; }