]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/peopletagsubscribers.php
Merge branch 'configure-docs' into 'nightly'
[quix0rs-gnu-social.git] / actions / peopletagsubscribers.php
index ebc3a9f494e5b40838fbd75b5c5779dc2d801839..589d49caa3be8469eddc6c3b7ba456039bf482c8 100644 (file)
@@ -22,7 +22,7 @@
  * @category  Group
  * @package   StatusNet
  * @author    Evan Prodromou <evan@status.net>
- * @copyright 2008-2009 StatusNet, Inc.
+ * @copyright 2008-2011 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link      http://status.net/
  */
@@ -42,7 +42,7 @@ require_once(INSTALLDIR.'/lib/profilelist.php');
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-class PeopletagsubscribersAction extends OwnerDesignAction
+class PeopletagsubscribersAction extends Action
 {
     var $page = null;
     var $peopletag = null;
@@ -58,7 +58,12 @@ class PeopletagsubscribersAction extends OwnerDesignAction
         parent::prepare($args);
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
 
-        $tagger_arg = $this->arg('tagger');
+        if (common_config('singleuser', 'enabled')) {
+            $tagger_arg = User::singleUserNickname();
+        } else {
+            $tagger_arg = $this->arg('tagger');
+        }
+
         $tag_arg = $this->arg('tag');
         $tagger = common_canonical_nickname($tagger_arg);
         $tag = common_canonical_tag($tag_arg);
@@ -71,21 +76,18 @@ class PeopletagsubscribersAction extends OwnerDesignAction
                 $args['page'] = $this->page;
             }
             common_redirect(common_local_url('peopletagged', $args), 301);
-            return false;
         }
 
         if (!$tagger) {
             // TRANS: Client error displayed when a tagger is expected but not provided.
             $this->clientError(_('No tagger.'), 404);
-            return false;
         }
 
-        $user = User::staticGet('nickname', $tagger);
+        $user = User::getKV('nickname', $tagger);
 
         if (!$user) {
             // TRANS: Client error displayed trying to perform an action related to a non-existing user.
             $this->clientError(_('No such user.'), 404);
-            return false;
         }
 
         $this->tagger = $user->getProfile();
@@ -94,7 +96,6 @@ class PeopletagsubscribersAction extends OwnerDesignAction
         if (!$this->peopletag) {
             // TRANS: Client error displayed trying to reference a non-existing list.
             $this->clientError(_('No such list.'), 404);
-            return false;
         }
 
         return true;