/** * Wrapper for record insertion to update related caches */ function insert() { $result = parent::insert(); if ($result) { self::blow('reply:stream:%d', $this->profile_id); } return $result; }
/** * Wrapper for record insertion to update related caches */ function insert() { $result = parent::insert(); if ($result) { self::blow('qvitternotification:stream:%d', $this->to_profile_id); } return $result; }
public function insert() { if (parent::insert() === false) { common_log_db_error($this, 'INSERT', __FILE__); throw new ServerException(sprintf(_m('Could not store new object of type %s'), get_called_class())); } self::blowCacheForProfileId($this->user_id); self::blowCacheForNoticeId($this->notice_id); return $this; }
public function insert() { $result = parent::insert(); if ($result === false) { common_log_db_error($this, 'INSERT', __FILE__); throw new ServerException(_('Failed to insert Conversation into database')); } return $result; }
function insert() { $result = parent::insert(); if ($result) { self::blow('profile_list:subscriber_count:%d', $this->profile_tag_id); } return $result; }
function insert() { $result = parent::insert(); if ($result === false) { common_log_db_error($this, 'INSERT', __FILE__); // TRANS: Server exception thrown when a stored object entry cannot be saved. throw new ServerException('Could not save Notice'); } // 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); } } // Update possibly ID-dependent columns: URI, conversation // (now that INSERT has added the notice's local id) $orig = clone $this; $changed = false; // We can only get here if it's a local notice, since remote notices // should've bailed out earlier due to lacking a URI. if (empty($this->uri)) { $this->uri = sprintf('%s%s=%d:%s=%s', TagURI::mint(), 'noticeId', $this->id, 'objectType', $this->getObjectType(true)); $changed = true; } if ($changed && $this->update($orig) === false) { common_log_db_error($notice, 'UPDATE', __FILE__); // TRANS: Server exception thrown when a notice cannot be updated. throw new ServerException(_('Problem saving notice.')); } $this->blowOnInsert(); return $result; }
function insert() { $result = parent::insert(); if ($result) { self::blow('profile:lists:%d', $this->tagger); } return $result; }
function insert() { $result = parent::insert(); if ($result) { Config::_blowSettingsCache(); } return $result; }
/** * Save this keypair into the database. * * Overloads default insert behavior to encode the live key objects * as a flat string for storage. * * @return mixed */ function insert() { $this->keypair = $this->toString(true); return parent::insert(); }
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; }
function insert() { $result = parent::insert(); if ($result) { self::blow('profile_list:tagged_count:%d:%s', $this->tagger, $this->tag); } return $result; }
/** * Insert wrapper; transparently set the hash key from topic and callback columns. * @return mixed success */ function insert() { $this->hashkey = self::hashkey($this->topic, $this->callback); $this->created = common_sql_now(); $this->modified = common_sql_now(); return parent::insert(); }
function insert() { $result = parent::insert(); if ($result === false) { common_log_db_error($this, 'INSERT', __FILE__); // TRANS: Server exception thrown when a stored object entry cannot be saved. throw new ServerException('Could not save Deleted_notice'); } }