diff options
author | Zach Copley <zach@status.net> | 2010-02-05 02:08:37 +0000 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-02-05 02:08:37 +0000 |
commit | 8d320d7cc2998a4977c5de4ba571ea4f95b21dce (patch) | |
tree | eb8903c9a07126b88e4112de5d83a22dba2a1073 /classes/Notice.php | |
parent | 10dfcde0b2099a169ccd3af0ecfbf2de9da551d6 (diff) | |
parent | 509c8fc51589a4cc6a3281e012ce759ab9bed532 (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 21 |
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; + } } |