]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/all.php
better output for registration confirmation
[quix0rs-gnu-social.git] / actions / all.php
index 74a0059346b57d497867bb00e98a7037fa398b1f..96f688f72083dbf9a94b9ee95f27647458a42fe7 100644 (file)
@@ -56,7 +56,7 @@ class AllAction extends ProfileAction
     {
         parent::prepare($args);
 
-        $stream = new InboxNoticeStream($this->user);
+        $stream = new ThreadingInboxNoticeStream($this->user, Profile::current());
 
         $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE,
                                             NOTICES_PER_PAGE + 1,
@@ -157,7 +157,16 @@ class AllAction extends ProfileAction
     function showContent()
     {
         if (Event::handle('StartShowAllContent', array($this))) {
-            $nl = new ThreadedNoticeList($this->notice, $this);
+
+            $profile = null;
+
+            $current_user = common_current_user();
+
+            if (!empty($current_user)) {
+                $profile = $current_user->getProfile();
+            }
+
+            $nl = new ThreadedNoticeList($this->notice, $this, $profile);
 
             $cnt = $nl->show();
 
@@ -174,6 +183,16 @@ class AllAction extends ProfileAction
         }
     }
 
+    function showSections()
+    {
+        $ibs = new InviteButtonSection($this);
+        $ibs->show();
+        $this->showSubscriptions();
+        $this->showSubscribers();
+        $this->showGroups();
+        $this->showLists();
+    }
+
     function showPageTitle()
     {
         $user = common_current_user();
@@ -186,3 +205,11 @@ class AllAction extends ProfileAction
         }
     }
 }
+
+class ThreadingInboxNoticeStream extends ThreadingNoticeStream
+{
+    function __construct($user, $profile)
+    {
+        parent::__construct(new InboxNoticeStream($user, $profile));
+    }
+}