mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 13:42:04 +00:00
check if index and indexconf is set
This commit is contained in:
parent
072d203379
commit
bab648b988
|
@ -40,7 +40,9 @@ if(!$settings->_enableFullSearch) {
|
||||||
UI::exitError(getMLText("admin_tools"),getMLText("fulltextsearch_disabled"));
|
UI::exitError(getMLText("admin_tools"),getMLText("fulltextsearch_disabled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$index = null;
|
||||||
if(!isset($_GET['action']) || $_GET['action'] == 'show') {
|
if(!isset($_GET['action']) || $_GET['action'] == 'show') {
|
||||||
|
if($indexconf) {
|
||||||
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);
|
||||||
|
@ -62,8 +64,7 @@ if(!isset($_GET['action']) || $_GET['action'] == 'show') {
|
||||||
}
|
}
|
||||||
$indexconf['Indexer']::init($settings->_stopWordsFile);
|
$indexconf['Indexer']::init($settings->_stopWordsFile);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
$index = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
|
if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
|
||||||
|
|
|
@ -201,6 +201,7 @@ $(document).ready( function() {
|
||||||
$this->contentStart();
|
$this->contentStart();
|
||||||
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
||||||
$this->contentHeading(getMLText("update_fulltext_index"));
|
$this->contentHeading(getMLText("update_fulltext_index"));
|
||||||
|
if($index) {
|
||||||
?>
|
?>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
li {line-height: 20px;}
|
li {line-height: 20px;}
|
||||||
|
@ -230,7 +231,9 @@ li {line-height: 20px;}
|
||||||
|
|
||||||
$index->commit();
|
$index->commit();
|
||||||
$index->optimize();
|
$index->optimize();
|
||||||
|
} else {
|
||||||
|
$this->warningMsg(getMLText('fulltextsearch_disabled'));
|
||||||
|
}
|
||||||
$this->contentEnd();
|
$this->contentEnd();
|
||||||
$this->htmlEndPage();
|
$this->htmlEndPage();
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user