public function directoryAction($path) { $this->setPath($path); $dbfile = new DocBookFile($this->getpath()); $readme_content = $dir_content = ''; $index = $dbfile->findIndex(); if (file_exists($index)) { return $this->fileAction($index); } $tpl_params = array('page' => $dbfile->getDocBookFullStack(), 'dirscan' => $dbfile->getDocBookScanStack(), 'breadcrumbs' => Helper::getBreadcrumbs($this->getPath())); /*/ var_dump($dbfile); var_dump($tpl_params); exit('yo'); //*/ $readme = $dbfile->findReadme(); if (file_exists($readme)) { $this->docbook->setInputFile($readme); $readme_dbfile = new DocBookFile($readme); $readme_content = $readme_dbfile->viewFileInfos(); } $tpl_params['inpage_menu'] = !empty($readme_content) ? 'true' : 'false'; $tpl_params['title'] = Helper::buildPageTitle($this->getPath()); if (empty($tpl_params['title'])) { if (!empty($tpl_params['breadcrumbs'])) { $tpl_params['title'] = Helper::buildPageTitle(end($tpl_params['breadcrumbs'])); } else { $tpl_params['title'] = _T('Home'); } } $dir_content = $this->docbook->display('', 'dirindex', $tpl_params); return array('default', $dir_content . $readme_content, $tpl_params); }