public function handleDeletePriloha($id, $priloha) { $this->overitClanek($id); $this->opravneni = $this->opravneni(0, $id); if (!$this->opravneni['clanek_edit']) { $this->redirect('prilohy', $id); } $this->id_clanku = $id; $this->redakce->smazatPrilohu($this->id_clanku, $priloha); $this->logg("u clanku {$id} smazana priloha {$priloha}"); $this->flashMessage('Příloha byla smazána.'); if ($this->isAjax()) { $this->invalidateControl('seznamPriloh'); } else { $this->redirect('prilohy', $this->id_clanku); } }