function index() { //$albumId=NULL,$photoId=NULL, $responseDTO = NULL try { $this->getNotifications(); $this->loadDashboardUser(); $view = $this->getView(); $model = $this->getModel(); $view->setArg(LAST_NAV_ITEM_SELECTED, 5); $view->uploadJS(); SessionUtils::setLastPageVisited(PHOTO_CONTROLLER); $view->setArg('userCanWrite', SessionUtils::userCanWrite()); $albumPhotoListDTO = $model->getAlbumPhotoListModel(SessionUtils::getAlbumId()); $view->setArg('albumPhotoList', $albumPhotoListDTO); if (!is_null(SessionUtils::getPhotoId()) && !is_null(SessionUtils::getAlbumId())) { SessionUtils::setPhotoId(NULL); SessionUtils::setAlbumId(NULL); } else { if (!is_null(SessionUtils::getAlbumId())) { if (!is_null(SessionUtils::getError())) { $view->setResponse(SessionUtils::getError()); SessionUtils::setError(NULL); } // if (!$view->getArg('userCanWrite')) { SessionUtils::setAlbumId(NULL); // } } } $view->loadPage(); } catch (PDOException $pdoe) { throw $pdoe; } catch (UserNotAuthenticatedExceptionDTO $authExp) { SessionUtils::logout(); header("Location:" . URL . LOGIN_CONTROLLER); } catch (Exception $e) { throw $e; } }