Ejemplo n.º 1
0
 function defaultMaps($path = '')
 {
     $this->request->registerReferer();
     $excludePath = array('$uploaded/' . $this->session->login . '/');
     $connection = $this->getServerConnection();
     $mapPath = $connection->getMapsDirectory();
     $fileService = new \ManiaHost\Services\MapService($mapPath);
     $count = $fileService->getCount($path, $excludePath, null, null, null, null, true);
     $multipage = new \ManiaLib\Utils\MultipageList();
     $multipage->setPerPage(12);
     $multipage->setSize($count);
     list($offset, $length) = $multipage->getLimit();
     $files = $fileService->getList($path, $excludePath, null, null, null, null, true, $offset, $length);
     $this->chooseSelector($path, true);
     $this->response->files = $files;
     $this->response->mapCount = $count;
     $this->response->multipage = $multipage;
     $this->response->selected = $this->session->get('selected', array());
 }