summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-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();
}