isAdmin()) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } if(!$settings->_enableFullSearch) { UI::exitError(getMLText("admin_tools"),getMLText("fulltextsearch_disabled")); } if(!isset($_GET['action']) || $_GET['action'] == 'show') { if(isset($_GET['create']) && $_GET['create'] == 1) { if(isset($_GET['confirm']) && $_GET['confirm'] == 1) { $index = $indexconf['Indexer']::create($settings->_luceneDir); if(!$index) { UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex")); } $indexconf['Indexer']::init($settings->_stopWordsFile); } else { header('Location: out.CreateIndex.php'); exit; } } else { $index = $indexconf['Indexer']::open($settings->_luceneDir); if(!$index) { UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex")); } $indexconf['Indexer']::init($settings->_stopWordsFile); } } else { $index = null; } if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) { $folderid = $settings->_rootFolderID; } else { $folderid = intval($_GET["folderid"]); } $folder = $dms->getFolder($folderid); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('index', $index); $view->setParam('indexconf', $indexconf); $view->setParam('recreate', (isset($_GET['create']) && $_GET['create']==1)); $view->setParam('forceupdate', (isset($_GET['forceupdate']) && $_GET['forceupdate']==1)); $view->setParam('folder', $folder); $view->setParam('converters', $settings->_converters['fulltext']); $view->setParam('timeout', $settings->_cmdTimeout); $view($_GET); exit; } ?>