diff options
author | Brion Vibber <brion@pobox.com> | 2010-02-04 12:23:56 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-02-04 12:23:56 -0800 |
commit | c59eee72a8453cc43f169c62d1afb214c0c539bc (patch) | |
tree | d7fa62b31c708e9cda1dd52b032971e5f19ebdd4 /classes/Notice.php | |
parent | e89107549475ee1e824bcf6f0bd66830fb724b2f (diff) | |
parent | a020e230860358fc8b63cd56872bbad0446016e0 (diff) |
Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
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; + } } |