]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showstream.php
Remove missing twittersettings page from subscriptions helper
[quix0rs-gnu-social.git] / actions / showstream.php
index ee8bc18e72ffeb8cc97c6e52fc33b92bcf7991db..6e5ba84511ff8c3161b25ee46fad3a39c2d7d4f6 100644 (file)
@@ -55,6 +55,25 @@ require_once INSTALLDIR.'/lib/feedlist.php';
  */
 class ShowstreamAction extends ProfileAction
 {
+    var $notice;
+
+    function prepare($args)
+    {
+        parent::prepare($args);
+
+        $p = Profile::current();
+
+        if (empty($this->tag)) {
+            $stream = new ProfileNoticeStream($this->profile, $p);
+        } else {
+            $stream = new TaggedProfileNoticeStream($this->profile, $this->tag, $p);
+        }
+
+        $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
+
+        return true;
+    }
+
     function isReadOnly($args)
     {
         return true;
@@ -224,13 +243,9 @@ class ShowstreamAction extends ProfileAction
 
     function showNotices()
     {
-        $notice = empty($this->tag)
-          ? $this->user->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1)
-            : $this->user->getTaggedNotices($this->tag, ($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1, 0, 0, null);
-
         $pnl = null;
-        if (Event::handle('ShowStreamNoticeList', array($notice, $this, &$pnl))) {
-            $pnl = new ProfileNoticeList($notice, $this);
+        if (Event::handle('ShowStreamNoticeList', array($this->notice, $this, &$pnl))) {
+            $pnl = new ProfileNoticeList($this->notice, $this);
         }
         $cnt = $pnl->show();
         if (0 == $cnt) {
@@ -270,8 +285,10 @@ class ShowstreamAction extends ProfileAction
     function showSections()
     {
         parent::showSections();
-        $cloud = new PersonalTagCloudSection($this, $this->user);
-        $cloud->show();
+        if (!common_config('performance', 'high')) {
+            $cloud = new PersonalTagCloudSection($this, $this->user);
+            $cloud->show();
+        }
     }
 
     function noticeFormOptions()