public function getInbox() { if ($this->_inbox === null) { $inbox = new Default_Model_Messages(); $inbox->filter->orderBy('senton DESC'); $inbox->filter->receiverid->equals($this->id); $this->_inbox = $inbox->refresh(); } return $this->_inbox; }
public function delmsgAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $ms = new Default_Model_Messages(); $ms->filter->id->equals($_POST['msgid']); $ms->refresh()->remove(0); }