Ejemplo n.º 1
0
 /**
  * Update wrapper; transparently update modified column.
  * @return boolean success
  */
 function update($old = null)
 {
     $this->modified = common_sql_now();
     return parent::update($old);
 }
Ejemplo n.º 2
0
 /**
  * Flush cached subscriptions when subscription is updated
  *
  * Because we cache subscriptions, it's useful to flush them
  * here.
  *
  * @param mixed $orig Original version of object
  *
  * @return boolean success flag.
  */
 function update($orig = null)
 {
     $result = parent::update($orig);
     self::blow('subscription:by-subscriber:' . $this->subscriber);
     self::blow('subscription:by-subscribed:' . $this->subscribed);
     return $result;
 }
Ejemplo n.º 3
0
 function update($orig = null)
 {
     $result = parent::update($orig);
     if ($result) {
         Config::_blowSettingsCache();
     }
     return $result;
 }
Ejemplo n.º 4
0
 /**
  * Update a people tag gracefully
  * also change "tag" fields in profile_tag table
  *
  * @param Profile_list $orig    Object's original form
  *
  * @return boolean success
  */
 function update($orig = null)
 {
     $result = true;
     if (!is_object($orig) && !$orig instanceof Profile_list) {
         parent::update($orig);
     }
     // if original tag was different
     // check to see if the new tag already exists
     // if not, rename the tag correctly
     if ($orig->tag != $this->tag || $orig->tagger != $this->tagger) {
         $existing = Profile_list::getByTaggerAndTag($this->tagger, $this->tag);
         if (!empty($existing)) {
             // TRANS: Server exception.
             throw new ServerException(_('The tag you are trying to rename ' . 'to already exists.'));
         }
         // move the tag
         // XXX: allow OStatus plugin to send out profile tag
         $result = Profile_tag::moveTag($orig, $this);
     }
     parent::update($orig);
     return $result;
 }