intialize $index even if action != show

This commit is contained in:
Uwe Steinmann 2017-09-11 08:30:35 +02:00
parent b5fad8ddec
commit b4bcb94b6c

View File

@ -37,7 +37,7 @@ if(!$settings->_enableFullSearch) {
UI::exitError(getMLText("admin_tools"),getMLText("fulltextsearch_disabled"));
}
if(!isset($_GET['action']) || $_GET['action'] == 'show')
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);
@ -56,6 +56,9 @@ if(isset($_GET['create']) && $_GET['create'] == 1) {
}
$indexconf['Indexer']::init($settings->_stopWordsFile);
}
} else {
$index = null;
}
if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
$folderid = $settings->_rootFolderID;