]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile_tag.php
use notice list instead of threaded for list view
[quix0rs-gnu-social.git] / classes / Profile_tag.php
index 17f5034ff946034d45f3e6491652918665dd3c00..00585280d3153146e885c6a10b9eae5ba8a0ad5a 100644 (file)
@@ -224,7 +224,9 @@ class Profile_tag extends Memcached_DataObject
             Event::handle('EndUntagProfile', array($orig));
             if ($result) {
                 $profile_list = Profile_list::pkeyGet(array('tag' => $tag, 'tagger' => $tagger));
-                $profile_list->taggedCount(true);
+                if (!empty($profile_list)) {
+                    $profile_list->taggedCount(true);
+                }
                 self::blowCaches($tagger, $tagged);
                 return true;
             }
@@ -289,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;
+    }
 }