]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/public.php
Merge branch 'master' of gitorious.org:social/mainline into social-master
[quix0rs-gnu-social.git] / actions / public.php
index af2fcff842ed737e2b2c4c07b9be14fac8c8aae7..8e5da476466a93f36203917cf319e9c726ad4e31 100644 (file)
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET') && !defined('LACONICA')) {
-    exit(1);
-}
-
-require_once INSTALLDIR.'/lib/publicgroupnav.php';
-require_once INSTALLDIR.'/lib/noticelist.php';
-require_once INSTALLDIR.'/lib/feedlist.php';
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 // Farther than any human will go
 
@@ -61,7 +55,7 @@ class PublicAction extends Action
     var $notice;
     var $userProfile = null;
 
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         return true;
     }
@@ -73,7 +67,7 @@ class PublicAction extends Action
      *
      * @return boolean success value
      */
-    function prepare($args)
+    function prepare(array $args=array())
     {
         parent::prepare($args);
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
@@ -102,7 +96,6 @@ class PublicAction extends Action
         if (!$this->notice) {
             // TRANS: Server error displayed when a public timeline cannot be retrieved.
             $this->serverError(_('Could not retrieve public timeline.'));
-            return;
         }
 
         if($this->page > 1 && $this->notice->N == 0){
@@ -122,7 +115,7 @@ class PublicAction extends Action
      *
      * @return void
      */
-    function handle($args)
+    function handle(array $args=array())
     {
         parent::handle($args);
 
@@ -227,7 +220,7 @@ class PublicAction extends Action
         $user = common_current_user();
 
         if (!empty($user) && $user->streamModeOnly()) {
-            $nl = new NoticeList($this->notice, $this);
+            $nl = new PrimaryNoticeList($this->notice, $this, array('show_n'=>NOTICES_PER_PAGE));
         } else {
             $nl = new ThreadedNoticeList($this->notice, $this, $this->userProfile);
         }
@@ -262,8 +255,6 @@ class PublicAction extends Action
 
         $p = Profile::current();
 
-        $pop = new PopularNoticeSection($this, $p);
-        $pop->show();
         if (!common_config('performance', 'high')) {
             $cloud = new PublicTagCloudSection($this);
             $cloud->show();