Fix for "#foo !foo" in same notice failing during save, causing failout before distribution. Move saveGroups after saveTags when saving notices; groups may save additional tags, so need to be moved after so the check for duplicates actually works.

This commit is contained in:
Brion Vibber 2010-04-14 11:11:02 +02:00
parent d445b977fc
commit a21a172639
1 changed files with 8 additions and 6 deletions

View 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 {