summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-04 11:56:07 -0800
committerBrion Vibber <brion@pobox.com>2010-02-04 11:56:07 -0800
commita020e230860358fc8b63cd56872bbad0446016e0 (patch)
treeca2788c034526d53424079004ba6a726485a1e25 /classes/Notice.php
parent5bdc6fa5d456c3f520d8124950684220d8f440a3 (diff)
parent5a1cbdc6f1e32be7b8430924a1125422d8457584 (diff)
Merge branch 'master' of gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 42878d94f..f9f386357 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -1468,4 +1468,25 @@ class Notice extends Memcached_DataObject
$handler->handle($this);
}
}
+
+ function insert()
+ {
+ $result = parent::insert();
+
+ if ($result) {
+ // Profile::hasRepeated() abuses pkeyGet(), so we
+ // have to clear manually
+ if (!empty($this->repeat_of)) {
+ $c = self::memcache();
+ if (!empty($c)) {
+ $ck = self::multicacheKey('Notice',
+ array('profile_id' => $this->profile_id,
+ 'repeat_of' => $this->repeat_of));
+ $c->delete($ck);
+ }
+ }
+ }
+
+ return $result;
+ }
}