]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/public.php
Add top posters section to public page
[quix0rs-gnu-social.git] / actions / public.php
index b13678bf0cbb9b89423d395368468b3525de7da4..880b651e15bf3b39c198092132a22a9869db7219 100644 (file)
@@ -32,6 +32,8 @@ if (!defined('LACONICA')) {
 }
 
 require_once INSTALLDIR.'/lib/publicgroupnav.php';
+require_once INSTALLDIR.'/lib/noticelist.php';
+require_once INSTALLDIR.'/lib/feedlist.php';
 
 /**
  * Action for displaying the public stream
@@ -163,11 +165,11 @@ class PublicAction extends Action
                                        NOTICES_PER_PAGE + 1);
 
         if (!$notice) {
-            $this->server_error(_('Could not retrieve public stream.'));
+            $this->serverError(_('Could not retrieve public stream.'));
             return;
         }
 
-        $nl = new NoticeList($notice);
+        $nl = new NoticeList($notice, $this);
 
         $cnt = $nl->show();
 
@@ -195,4 +197,10 @@ class PublicAction extends Action
                                    'version' => 'Atom 1.0',
                                    'item' => 'publicatom')));
     }
+
+    function showSections()
+    {
+        $top = new TopPostersSection($this);
+        $top->show();
+    }
 }