Esempio n. 1
0
 function LastListAction($info = array())
 {
     $this->BaseSiteData();
     $info['tab_list'] = TabController::getMainAlbumTabs(false, true, false);
     $request_user_id = (int) Project::getUser()->getShowedUser()->id;
     $user_id = (int) Project::getUser()->getDbUser()->id;
     $album_id = isset($album_id) && (int) $album_id > 0 ? $album_id : (int) Project::getRequest()->getKeyByNumber(0);
     $this->BaseAlbumData($info, $album_id);
     $photo_model = new PhotoModel();
     $pager = new DbPager(Project::getRequest()->getValueByNumber(1), $this->getParam('last_photo_per_page', self::DEFAULT_PHOTO_PER_PAGE));
     $photo_model->setPager($pager);
     $list = $photo_model->loadAll($request_user_id, $album_id);
     $this->checkImages($list);
     $info['photo_list'] = $list;
     $info['list_pager'] = $photo_model->getPager();
     $info['list_controller'] = 'Photo';
     $info['list_action'] = 'Album';
     $info['list_user'] = null;
     $this->_view->LastList($info);
     $this->_view->parse();
 }