X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fwiki.engine.inc.php;h=bc481cdb30372c0168cbf33231cbffc6d0de8ecf;hb=5f6b3a28efe41c038f349fb0b281d9637f7078de;hp=ae320400c14f1c6687ba576297ffb2aa5b568483;hpb=6cc34b5041e235805e37756b146b86a62f104e2a;p=platal.git diff --git a/include/wiki.engine.inc.php b/include/wiki.engine.inc.php index ae32040..bc481cd 100644 --- a/include/wiki.engine.inc.php +++ b/include/wiki.engine.inc.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, ""); @@ -85,7 +84,6 @@ if ($feed) { $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('pl_extra_header', substr($wikiAll, 0, $i)); @@ -96,7 +94,7 @@ if ($feed) { file_put_contents($wiki_cache, $wikiAll); } elseif ($cache_exists) { $wikiAll = file_get_contents($wiki_cache); - } elseif (S::has_perms()) { + } elseif (S::admin()) { $wikiAll = "

La page de wiki $n n'existe pas. " . "Il te suffit de l'éditer

"; } else { @@ -112,7 +110,7 @@ $page->assign('perms', array($wp->readPerms(), $wp->writePerms())); $page->assign('perms_opts', PlWikiPage::permOptions()); $page->assign('canedit', $wp->canWrite()); -$page->assign('has_perms', S::has_perms()); +$page->assign('has_perms', S::admin()); $page->assign('wikipage', str_replace('.', '/', $n)); if (!$feed && $wp->writePerms() == 'admin' && !Env::v('action') && $wiki_exists) { @@ -126,12 +124,7 @@ $page->addJsLink('wiki.js'); if (!Env::v('action')) { $url = '/' . str_replace('.', '/', $n) . '?action=rss'; if (S::logged()) { - if (S::user()) { - $url .= '&user=' . S::user()->login() . '&hash=' . S::v('core_rss_hash'); - } else { - // TODO(vzanotti): trash that code when forlife support will be gone. - $url .= '&user=' . S::v('forlife') . '&hash=' . S::v('core_rss_hash'); - } + $url .= '&user=' . S::user()->login() . '&hash=' . S::v('core_rss_hash'); } $page->setRssLink($n, $url); }