mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-14 09:09:18 +00:00
intialize $index even if action != show
This commit is contained in:
parent
b5fad8ddec
commit
b4bcb94b6c
|
@ -37,24 +37,27 @@ if(!$settings->_enableFullSearch) {
|
||||||
UI::exitError(getMLText("admin_tools"),getMLText("fulltextsearch_disabled"));
|
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['create']) && $_GET['create'] == 1) {
|
||||||
if(isset($_GET['confirm']) && $_GET['confirm'] == 1) {
|
if(isset($_GET['confirm']) && $_GET['confirm'] == 1) {
|
||||||
$index = $indexconf['Indexer']::create($settings->_luceneDir);
|
$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) {
|
if(!$index) {
|
||||||
UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex"));
|
UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex"));
|
||||||
}
|
}
|
||||||
$indexconf['Indexer']::init($settings->_stopWordsFile);
|
$indexconf['Indexer']::init($settings->_stopWordsFile);
|
||||||
} else {
|
|
||||||
header('Location: out.CreateIndex.php');
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$index = $indexconf['Indexer']::open($settings->_luceneDir);
|
$index = null;
|
||||||
if(!$index) {
|
|
||||||
UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex"));
|
|
||||||
}
|
|
||||||
$indexconf['Indexer']::init($settings->_stopWordsFile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
|
if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user