Ejemplo n.º 1
0
 public function executeGallery(sfWebRequest $request)
 {
     #Security
     if (!$this->getUser()->hasCredential(array('Administrator', 'Staff'), false)) {
         $this->getUser()->setFlash("warning", 'You don\'t have permission to access this url ' . $request->getReferer());
         $this->redirect('dashboard/index');
     }
     $this->max = $request->getParameter('max', 10);
     $this->page = $request->getParameter('page', 1);
     $this->pager = MissionPhotoPeer::getMissionPhotoGallry($this->max, $this->page);
     $this->mission_photo_gallery = $this->pager->getResults();
     $this->setTemplate('gallery');
 }