Merge branch 'master' into testing
This commit is contained in:
commit
3da50c19df
@ -148,11 +148,11 @@ class Notice extends Memcached_DataObject
|
|||||||
//turn each into their canonical tag
|
//turn each into their canonical tag
|
||||||
//this is needed to remove dupes before saving e.g. #hash.tag = #hashtag
|
//this is needed to remove dupes before saving e.g. #hash.tag = #hashtag
|
||||||
for($i=0; $i<count($hashtags); $i++) {
|
for($i=0; $i<count($hashtags); $i++) {
|
||||||
|
/* elide characters we don't want in the tag */
|
||||||
$hashtags[$i] = common_canonical_tag($hashtags[$i]);
|
$hashtags[$i] = common_canonical_tag($hashtags[$i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(array_unique($hashtags) as $hashtag) {
|
foreach(array_unique($hashtags) as $hashtag) {
|
||||||
/* elide characters we don't want in the tag */
|
|
||||||
$this->saveTag($hashtag);
|
$this->saveTag($hashtag);
|
||||||
self::blow('profile:notice_ids_tagged:%d:%s', $this->profile_id, $hashtag);
|
self::blow('profile:notice_ids_tagged:%d:%s', $this->profile_id, $hashtag);
|
||||||
}
|
}
|
||||||
@ -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…
x
Reference in New Issue
Block a user