Prepare changelog for next version.
[platal.git] / include / wiki.engine.inc.php
index b65abe0..fe72475 100644 (file)
@@ -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->coreTpl('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);
 }