summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@status.net>2010-08-12 12:56:23 -0700
committerBrion Vibber <brion@status.net>2010-08-12 12:56:23 -0700
commitae696728f5edf8972c68c17ce9ea21f07d44cbed (patch)
tree073ad192f38bb6be33f04534abfa314cfc64021a /classes/Notice.php
parent855f1f6623e64701796f443fc20fde164b1a1846 (diff)
parentc3475e6ebef594460ec3685a007e7298fcbd9833 (diff)
Merge branch '0.9.x' into 1.0.x
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 4646fc6ab..0eeebfadf 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -485,7 +485,7 @@ class Notice extends Memcached_DataObject
function saveKnownUrls($urls)
{
// @fixme validation?
- foreach ($urls as $url) {
+ foreach (array_unique($urls) as $url) {
File::processNew($url, $this->id);
}
}
@@ -893,7 +893,7 @@ class Notice extends Memcached_DataObject
}
$groups = array();
- foreach ($group_ids as $id) {
+ foreach (array_unique($group_ids) as $id) {
$group = User_group::staticGet('id', $id);
if ($group) {
common_log(LOG_ERR, "Local delivery to group id $id, $group->nickname");
@@ -1016,7 +1016,7 @@ class Notice extends Memcached_DataObject
}
$sender = Profile::staticGet($this->profile_id);
- foreach ($uris as $uri) {
+ foreach (array_unique($uris) as $uri) {
$user = User::staticGet('uri', $uri);
@@ -1029,6 +1029,7 @@ class Notice extends Memcached_DataObject
$reply->notice_id = $this->id;
$reply->profile_id = $user->id;
+ common_log(LOG_INFO, __METHOD__ . ": saving reply: notice $this->id to profile $user->id");
$id = $reply->insert();
}