]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix for "#foo !foo" in same notice failing during save, causing failout before distri...
authorBrion Vibber <brion@pobox.com>
Wed, 14 Apr 2010 09:11:02 +0000 (11:11 +0200)
committerBrion Vibber <brion@pobox.com>
Wed, 14 Apr 2010 09:11:02 +0000 (11:11 +0200)
classes/Notice.php

index b0ead3c420b649bf32c004a4e789bbda742306c2..a8147e4c4d4ef534aad6a64709096b5c47fcf2d0 100644 (file)
@@ -373,18 +373,20 @@ class Notice extends Memcached_DataObject
             $notice->saveReplies();
         }
 
-        if (isset($groups)) {
-            $notice->saveKnownGroups($groups);
-        } else {
-            $notice->saveGroups();
-        }
-
         if (isset($tags)) {
             $notice->saveKnownTags($tags);
         } else {
             $notice->saveTags();
         }
 
+        // Note: groups may save tags, so must be run after tags are saved
+        // to avoid errors on duplicates.
+        if (isset($groups)) {
+            $notice->saveKnownGroups($groups);
+        } else {
+            $notice->saveGroups();
+        }
+
         if (isset($urls)) {
             $notice->saveKnownUrls($urls);
         } else {