public function archiveAction() { if ($this->has('id')) { $doc = new Wsm_Document(); $doc->setId($this->get('id')); $dbService = new Wsm_Db_Documents(); try { $dbService->archive($doc); $this->redirect($this->getBaseUrl() . '&msg=saved', true); } catch (Exception $e) { } } $this->redirect($this->getBaseUrl() . '&msg=save_error', true); }