Prepare changelog for next version.
[platal.git] / include / wiki.engine.inc.php
index c1cbcba..fe72475 100644 (file)
@@ -77,7 +77,7 @@ if (Env::v('action') || !$cache_exists) {
 $wiki_exists = file_exists($wp->filename());
 
 $page =& Platal::page();
-$page->changeTpl('core/wiki.tpl');
+$page->coreTpl('wiki.tpl');
 
 if ($feed) {
     $wikiAll = str_replace('dc:contributor', 'author', $wikiAll);
@@ -99,7 +99,8 @@ if ($feed) {
         $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->changeTpl('core/404.tpl');
+        global $platal;
+        $platal->error404();
     }
 }
 
@@ -124,7 +125,12 @@ $page->addJsLink('wiki.js');
 if (!Env::v('action')) {
     $url = '/' . str_replace('.', '/', $n) . '?action=rss';
     if (S::logged()) {
-        $url .= '&user=' . S::v('forlife') . '&hash=' . S::v('core_rss_hash');
+        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');
+        }
     }
     $page->setRssLink($n, $url);
 }