]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showgroup.php
start using stream mode prefs instead of separate parameter
[quix0rs-gnu-social.git] / actions / showgroup.php
index 5e1012e9d8ad88d0219cd30be5be4a2ae10c17a8..423551907ebe5d39296d02ba09f4a4f4b53b0c58 100644 (file)
@@ -50,7 +50,6 @@ class ShowgroupAction extends GroupAction
     var $page = null;
     var $userProfile = null;
     var $notice = null;
-    var $mode = 'conversation';
 
     /**
      * Is this page read-only?
@@ -98,11 +97,11 @@ class ShowgroupAction extends GroupAction
 
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
 
-        $this->mode = $this->trimmed('mode', 'conversation');
-
         $this->userProfile = Profile::current();
 
-        if ($this->mode == 'stream') {
+        $user = common_current_user();
+
+        if (!empty($user) && $user->useStreamMode()) {
             $stream = new GroupNoticeStream($this->group, $this->userProfile);
         } else {
             $stream = new ThreadingGroupNoticeStream($this->group, $this->userProfile);
@@ -146,7 +145,9 @@ class ShowgroupAction extends GroupAction
      */
     function showGroupNotices()
     {
-        if ($this->mode == 'stream') {
+        $user = common_current_user();
+
+        if (!empty($user) && $user->useStreamMode()) {
             $nl = new NoticeList($this->notice, $this);
         } else {
             $nl = new ThreadedNoticeList($this->notice, $this, $this->userProfile);