]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/editpeopletag.php
The overloaded DB_DataObject function staticGet is now called getKV
[quix0rs-gnu-social.git] / actions / editpeopletag.php
index 92ef50a9f944a707706e4e01ce3fc973a63b9e70..72dcc0df723cca9ff664797551ef0be0045ea487 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
  * @link     http://status.net/
  */
 
-class EditpeopletagAction extends OwnerDesignAction
+class EditpeopletagAction extends Action
 {
     var $msg, $confirm, $confirm_args=array();
 
@@ -71,7 +71,11 @@ class EditpeopletagAction extends OwnerDesignAction
         }
 
         $id = $this->arg('id');
-        $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);
@@ -89,9 +93,9 @@ class EditpeopletagAction extends OwnerDesignAction
 
         $user = null;
         if ($id) {
-            $this->peopletag = Profile_list::staticGet('id', $id);
+            $this->peopletag = Profile_list::getKV('id', $id);
             if (!empty($this->peopletag)) {
-                $user = User::staticGet('id', $this->peopletag->tagger);
+                $user = User::getKV('id', $this->peopletag->tagger);
             }
         } else {
             if (!$tagger) {
@@ -100,12 +104,12 @@ class EditpeopletagAction extends OwnerDesignAction
                 return false;
             }
 
-            $user = User::staticGet('nickname', $tagger);
+            $user = User::getKV('nickname', $tagger);
             $this->peopletag = Profile_list::pkeyGet(array('tagger' => $user->id, 'tag' => $tag));
         }
 
         if (!$this->peopletag) {
-            // TRANS: Client error displayed when referring to a non-exsting list.
+            // TRANS: Client error displayed when referring to a non-existing list.
             $this->clientError(_('No such list.'), 404);
             return false;
         }
@@ -260,7 +264,7 @@ class EditpeopletagAction extends OwnerDesignAction
             return;
         } else if (Profile_list::descriptionTooLong($description)) {
             $this->showForm(sprintf(
-                    // TRANS: Client error shown when providing too long a description when editing a people tag.
+                    // TRANS: Client error shown when providing too long a description when editing a list.
                     // TRANS: %d is the maximum number of allowed characters.
                     _m('Description is too long (maximum %d character).',
                       'Description is too long (maximum %d characters).',
@@ -293,7 +297,7 @@ class EditpeopletagAction extends OwnerDesignAction
 
         if (!$result) {
             common_log_db_error($this->group, 'UPDATE', __FILE__);
-            // TRANS: TRANS: Server error displayed when updating a list fails.
+            // TRANS: Server error displayed when updating a list fails.
             $this->serverError(_('Could not update list.'));
         }
 
@@ -318,7 +322,7 @@ class EditpeopletagAction extends OwnerDesignAction
                                                    'tag'    => $tag)),
                             303);
         } else {
-            // TRANS: Edit people tag form success message.
+            // TRANS: Edit list form success message.
             $this->showForm(_('Options saved.'));
         }
     }