<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2011 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
require_once($globals->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, "<!--/HeaderText-->");
$wikiAll = preg_replace('!<author>.*?\..*?\.(\d{4})\|(.*?)</author>!u', '<author>$2 (X$1)</author>', $wikiAll);
$wikiAll = str_replace('<link>./', '<link>' . $globals->baseurl . '/' . $platal->ns, $wikiAll);
echo $wikiAll;
- pl_clear_errors();
exit;
} elseif (Env::v('action')) {
$page->assign('pl_extra_header', substr($wikiAll, 0, $i));
file_put_contents($wiki_cache, $wikiAll);
} elseif ($cache_exists) {
$wikiAll = file_get_contents($wiki_cache);
- } elseif (S::has_perms()) {
+ } elseif (S::admin()) {
$wikiAll = "<p>La page de wiki $n n'existe pas. "
. "Il te suffit de <a href='" . str_replace('.', '/', $n) . "?action=edit'>l'éditer</a></p>";
} else {
$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) {
$page->run();
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
?>