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();
 }
Esempio n. 2
0
 /**
  * Вывод списка последних альбомов.
  * Кол-во для вывода берется из конфиг параметров: параметр last_per_page
  */
 public function LastListAction()
 {
     $info = array();
     if ((int) Project::getUser()->getShowedUser()->id <= 0) {
         $info['left_panel'] = false;
         $tabs = TabController::getMainAlbumTabs(true);
     } else {
         //	$tabs = TabController::getOwnTabs(false, true);
         $tabs = TabController::getOwnTabs(false, false, true);
     }
     $info['tab_list'] = $tabs;
     $this->_list($info, "creation_date", "DESC", $this->getParam('album_per_page', $this->DEFAULT_ALBUM_PER_PAGE), 'LastList');
     $this->_view->AlbumList($info);
     $this->_view->parse();
 }