mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-09-08 02:50:59 +00:00
add new config var suggestTerms
This commit is contained in:
parent
3d4a63f335
commit
66ecc57780
|
@ -132,6 +132,8 @@ class Settings { /* {{{ */
|
||||||
var $_fullSearchEngine = 'lucene';
|
var $_fullSearchEngine = 'lucene';
|
||||||
// default search method
|
// default search method
|
||||||
var $_defaultSearchMethod = 'database'; // or 'fulltext'
|
var $_defaultSearchMethod = 'database'; // or 'fulltext'
|
||||||
|
// suggest search term
|
||||||
|
var $_suggestTerms = array(); // or 'all', 'title'
|
||||||
// jump straight to the document if it is the only hit of a search
|
// jump straight to the document if it is the only hit of a search
|
||||||
var $_showSingleSearchHit = true;
|
var $_showSingleSearchHit = true;
|
||||||
// contentOffsetDirTo
|
// contentOffsetDirTo
|
||||||
|
@ -532,6 +534,8 @@ class Settings { /* {{{ */
|
||||||
$this->_maxSizeForFullText = intval($tab["maxSizeForFullText"]);
|
$this->_maxSizeForFullText = intval($tab["maxSizeForFullText"]);
|
||||||
$this->_fullSearchEngine = strval($tab["fullSearchEngine"]);
|
$this->_fullSearchEngine = strval($tab["fullSearchEngine"]);
|
||||||
$this->_defaultSearchMethod = strval($tab["defaultSearchMethod"]);
|
$this->_defaultSearchMethod = strval($tab["defaultSearchMethod"]);
|
||||||
|
if(trim(strval($tab["suggestTerms"])))
|
||||||
|
$this->_suggestTerms = explode(',',strval($tab["suggestTerms"]));
|
||||||
$this->_showSingleSearchHit = Settings::boolVal($tab["showSingleSearchHit"]);
|
$this->_showSingleSearchHit = Settings::boolVal($tab["showSingleSearchHit"]);
|
||||||
$this->_stopWordsFile = strval($tab["stopWordsFile"]);
|
$this->_stopWordsFile = strval($tab["stopWordsFile"]);
|
||||||
$this->_sortUsersInList = strval($tab["sortUsersInList"]);
|
$this->_sortUsersInList = strval($tab["sortUsersInList"]);
|
||||||
|
@ -914,6 +918,7 @@ class Settings { /* {{{ */
|
||||||
$this->setXMLAttributValue($node, "maxSizeForFullText", $this->_maxSizeForFullText);
|
$this->setXMLAttributValue($node, "maxSizeForFullText", $this->_maxSizeForFullText);
|
||||||
$this->setXMLAttributValue($node, "fullSearchEngine", $this->_fullSearchEngine);
|
$this->setXMLAttributValue($node, "fullSearchEngine", $this->_fullSearchEngine);
|
||||||
$this->setXMLAttributValue($node, "defaultSearchMethod", $this->_defaultSearchMethod);
|
$this->setXMLAttributValue($node, "defaultSearchMethod", $this->_defaultSearchMethod);
|
||||||
|
$this->setXMLAttributValue($node, "suggestTerms", implode(',', $this->_suggestTerms));
|
||||||
$this->setXMLAttributValue($node, "showSingleSearchHit", $this->_showSingleSearchHit);
|
$this->setXMLAttributValue($node, "showSingleSearchHit", $this->_showSingleSearchHit);
|
||||||
$this->setXMLAttributValue($node, "expandFolderTree", $this->_expandFolderTree);
|
$this->setXMLAttributValue($node, "expandFolderTree", $this->_expandFolderTree);
|
||||||
$this->setXMLAttributValue($node, "stopWordsFile", $this->_stopWordsFile);
|
$this->setXMLAttributValue($node, "stopWordsFile", $this->_stopWordsFile);
|
||||||
|
|
|
@ -133,6 +133,7 @@ if ($action == "saveSettings")
|
||||||
setIntValue('maxSizeForFullText');
|
setIntValue('maxSizeForFullText');
|
||||||
setStrValue('fullSearchEngine');
|
setStrValue('fullSearchEngine');
|
||||||
setStrValue('defaultSearchMethod');
|
setStrValue('defaultSearchMethod');
|
||||||
|
setStrValue('suggestTerms');
|
||||||
setBoolValue("showSingleSearchHit");
|
setBoolValue("showSingleSearchHit");
|
||||||
setBoolValue("enableSessionList");
|
setBoolValue("enableSessionList");
|
||||||
setBoolValue("enableClipboard");
|
setBoolValue("enableClipboard");
|
||||||
|
|
|
@ -358,6 +358,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
<?php $this->showConfigOption('settings_fullSearchEngine', 'fullSearchEngine', $fullsearchengines, false, true); ?>
|
<?php $this->showConfigOption('settings_fullSearchEngine', 'fullSearchEngine', $fullsearchengines, false, true); ?>
|
||||||
<?php $this->showConfigOption('settings_defaultSearchMethod', 'defaultSearchMethod', array('database'=>'settings_defaultSearchMethod_valdatabase', 'fulltext'=>'settings_defaultSearchMethod_valfulltext'), false, true); ?>
|
<?php $this->showConfigOption('settings_defaultSearchMethod', 'defaultSearchMethod', array('database'=>'settings_defaultSearchMethod_valdatabase', 'fulltext'=>'settings_defaultSearchMethod_valfulltext'), false, true); ?>
|
||||||
<?php $this->showConfigCheckbox('settings_showSingleSearchHit', 'showSingleSearchHit'); ?>
|
<?php $this->showConfigCheckbox('settings_showSingleSearchHit', 'showSingleSearchHit'); ?>
|
||||||
|
<?php $this->showConfigOption('settings_suggestTerms', 'suggestTerms', array('title','comment', 'keywords'), true, true); ?>
|
||||||
<?php $this->showConfigText('settings_stopWordsFile', 'stopWordsFile'); ?>
|
<?php $this->showConfigText('settings_stopWordsFile', 'stopWordsFile'); ?>
|
||||||
<?php $this->showConfigCheckbox('settings_enableClipboard', 'enableClipboard'); ?>
|
<?php $this->showConfigCheckbox('settings_enableClipboard', 'enableClipboard'); ?>
|
||||||
<?php $this->showConfigCheckbox('settings_enableMenuTasks', 'enableMenuTasks'); ?>
|
<?php $this->showConfigCheckbox('settings_enableMenuTasks', 'enableMenuTasks'); ?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user