示例#1
0
 public function multiAction()
 {
     $this->getLayout()->setFile('modules/admin/layouts/iframe');
     $mediaMapper = new MediaMapper();
     $pagination = new \Ilch\Pagination();
     $pagination->setPage($this->getRequest()->getParam('page'));
     $lastId = $this->getRequest()->getParam('lastid');
     if ($this->getRequest()->getParam('type') === 'multi') {
         $type = $this->getConfig()->get('usergallery_filetypes');
     }
     if (empty($lastId)) {
         $pagination->setRowsPerPage('40');
         $this->getView()->set('medias', $mediaMapper->getMediaListByEnding($this->getUser()->getId(), $type, $pagination));
     } else {
         $this->getView()->set('medias', $mediaMapper->getMediaListScroll($lastId));
     }
     $this->getView()->set('usergallery_filetypes', $this->getConfig()->get('usergallery_filetypes'));
 }
示例#2
0
 public function delGalleryImageAction()
 {
     $mediaMapper = new MediaMapper();
     if ($this->getRequest()->isSecure()) {
         $mediaMapper->delMediaById($this->getRequest()->getParam('id'));
         $this->addMessage('deleteSuccess');
         $this->redirect(array('action' => 'treatgallery', 'id' => $this->getRequest()->getParam('gallery')));
     }
 }