/** * @return boolean */ protected function update() { if ($this->controls['state']->getValue() == AM_Model_Db_State::STATE_PUBLISHED) { $aBind = array('state' => AM_Model_Db_State::STATE_ARCHIVED, 'updated' => new Zend_Db_Expr('NOW()')); $aWhere = array($this->db->quoteInto('issue = ?', $this->controls['issue']->getValue()), $this->db->quoteInto('state = ?', AM_Model_Db_State::STATE_PUBLISHED)); $this->db->update('revision', $aBind, $aWhere); } if (!parent::update()) { return false; } // Update issue $this->db->update('issue', array('updated' => new Zend_Db_Expr('NOW()')), $this->db->quoteInto('id = ?', $this->controls['issue']->getValue())); return true; }
/** * @return boolean */ protected function update() { return parent::update(); }