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:
parent
d445b977fc
commit
a21a172639
|
@ -373,18 +373,20 @@ class Notice extends Memcached_DataObject
|
||||||
$notice->saveReplies();
|
$notice->saveReplies();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($groups)) {
|
|
||||||
$notice->saveKnownGroups($groups);
|
|
||||||
} else {
|
|
||||||
$notice->saveGroups();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($tags)) {
|
if (isset($tags)) {
|
||||||
$notice->saveKnownTags($tags);
|
$notice->saveKnownTags($tags);
|
||||||
} else {
|
} else {
|
||||||
$notice->saveTags();
|
$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)) {
|
if (isset($urls)) {
|
||||||
$notice->saveKnownUrls($urls);
|
$notice->saveKnownUrls($urls);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user