]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile_tag.php
better output for registration confirmation
[quix0rs-gnu-social.git] / classes / Profile_tag.php
index d7841bd8cace76188a8bd85f357043214ce813e9..9e475e83ec16e9db00dc58d02336157e41e61da6 100644 (file)
@@ -167,10 +167,10 @@ class Profile_tag extends Memcached_DataObject
             $profile_list = Profile_list::ensureTag($tagger, $tag, $desc, $private);
 
             if ($profile_list->taggedCount() >= common_config('peopletag', 'maxpeople')) {
-                // TRANS: Client exception thrown trying to set one tag for more people than allowed.
-                throw new ClientException(sprintf(_('You already have %1$d or more people tagged %2$s, ' .
+                // TRANS: Client exception thrown when trying to add more people than allowed to a list.
+                throw new ClientException(sprintf(_('You already have %1$d or more people in list %2$s, ' .
                                                     'which is the maximum allowed number.' .
-                                                    'Try untagging others with the same tag first.'),
+                                                    'Try unlisting others first.'),
                                                     common_config('peopletag', 'maxpeople'), $tag));
                 return false;
             }
@@ -291,4 +291,26 @@ class Profile_tag extends Memcached_DataObject
         }
         return true;
     }
+
+    function insert()
+    {
+        $result = parent::insert();
+        if ($result) {
+            self::blow('profile_list:tagged_count:%d:%s', 
+                       $this->tagger,
+                       $this->tag);
+        }
+        return $result;
+    }
+
+    function delete()
+    {
+        $result = parent::delete();
+        if ($result) {
+            self::blow('profile_list:tagged_count:%d:%s', 
+                       $this->tagger,
+                       $this->tag);
+        }
+        return $result;
+    }
 }