X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fwiki%2Fengine.php;h=e7a45a98285a42300dd98b46736f1f4511fd2175;hb=842706532d5214d69a31086d78de90fff35d8153;hp=aec07bcc0e4f853874783a4db927c4d230337ab0;hpb=0f384dd35da31e9c1224f73df683b297c560b873;p=platal.git diff --git a/include/wiki/engine.php b/include/wiki/engine.php index aec07bc..e7a45a9 100644 --- a/include/wiki/engine.php +++ b/include/wiki/engine.php @@ -1,6 +1,6 @@ spoolroot.'/wiki/pmwiki.php'); $wikiAll = ob_get_clean(); + pl_clear_errors(); + // the pmwiki skin we are using (almost empty) has these keywords: $i = strpos($wikiAll, ""); $j = strpos($wikiAll, "", $i); @@ -90,6 +92,10 @@ $wiki_exists = file_exists(wiki_work_dir() . '/' . wiki_filename($n)); if ($feed) { $wikiAll = str_replace('dc:contributor', 'author', $wikiAll); $wikiAll = preg_replace('!.*?\..*?\.(\d{4})\|(.*?)!u', '$2 (X$1)', $wikiAll); + $wikiAll = str_replace('./', '' . $globals->baseurl . '/' . $platal->ns, $wikiAll); + echo $wikiAll; + pl_clear_errors(); + exit; } elseif (Env::v('action')) { $page->assign('xorg_extra_header', substr($wikiAll, 0, $i)); $wikiAll = substr($wikiAll, $j); @@ -107,12 +113,6 @@ if ($feed) { } } -if ($feed) { - echo $wikiAll; - pl_clear_errors(); - exit; -} - // Check user perms wiki_apply_perms($perms[0]); @@ -135,7 +135,7 @@ if (!Env::v('action')) { $url = '/' . str_replace('.', '/', $n) . '?action=rss'; if (S::logged()) { $url .= '&user=' . S::v('forlife') . '&hash=' . S::v('core_rss_hash'); - } + } $page->setRssLink($n, $url); }