Ejemplo n.º 1
0
 public function executeDeleteVideo()
 {
     $cat_video = CatalogVideoPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($cat_video);
     $tmp_dir = sfConfig::get('sf_root_dir') . DIRECTORY_SEPARATOR . 'muslim' . DIRECTORY_SEPARATOR . 'video' . DIRECTORY_SEPARATOR;
     unlink($tmp_dir . DIRECTORY_SEPARATOR . $cat_video->getVideo());
     $cat_video->delete();
     return $this->redirect('collection/edit?id=' . $this->getRequestParameter('catalog_id'));
 }