function saveMirror() { $mirror = SubMirror::getMirror($this->user, $this->profile); if (!$mirror) { $this->clientError(_m('Requested edit of missing mirror')); } if ($this->delete) { $mirror->delete(); $oprofile = Ostatus_profile::staticGet('profile_id', $this->profile->id); if ($oprofile) { $oprofile->garbageCollect(); } } else { if ($this->style != $mirror->style) { $orig = clone $mirror; $mirror->style = $this->style; $mirror->modified = common_sql_now(); $mirror->update($orig); } } }
function saveMirror() { $mirror = SubMirror::getMirror($this->user, $this->profile); if (!$mirror) { // TRANS: Client error thrown when a mirror request is made and no result is retrieved. $this->clientError(_m('Requested edit of missing mirror.')); } if ($this->delete) { $mirror->delete(); $oprofile = Ostatus_profile::staticGet('profile_id', $this->profile->id); if ($oprofile) { $oprofile->garbageCollect(); } } else { if ($this->style != $mirror->style) { $orig = clone $mirror; $mirror->style = $this->style; $mirror->modified = common_sql_now(); $mirror->update($orig); } } }