mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
fix setting default search method
the search form in the main menu will just set 'fulltext=1' if fulltext is the default method. out/out.Search.php will not check for the defaultSearchMethod
This commit is contained in:
parent
43e6583db9
commit
2317c092d6
|
@ -59,7 +59,7 @@ if (isset($_GET["navBar"])) {
|
|||
*/
|
||||
}
|
||||
|
||||
if((isset($_GET["fullsearch"]) && $_GET["fullsearch"] || $settings->_defaultSearchMethod == 'fulltext') && $settings->_enableFullSearch) {
|
||||
if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSearch) {
|
||||
// Search in Fulltext {{{
|
||||
if (isset($_GET["query"]) && is_string($_GET["query"])) {
|
||||
$query = $_GET["query"];
|
||||
|
@ -407,8 +407,9 @@ if(count($entries) == 1) {
|
|||
if($view) {
|
||||
$view->setParam('totaldocs', $dcount /*resArr['totalDocs']*/);
|
||||
$view->setParam('totalfolders', $fcount /*resArr['totalFolders']*/);
|
||||
$view->setParam('fullsearch', ((isset($_GET["fullsearch"]) && $_GET["fullsearch"] || $settings->_defaultSearchMethod == 'fulltext') && $settings->_enableFullSearch) ? true : false);
|
||||
$view->setParam('fullsearch', (isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSearch) ? true : false);
|
||||
$view->setParam('mode', isset($mode) ? $mode : '');
|
||||
$view->setParam('defaultsearchmethod', $settings->_defaultSearchMethod);
|
||||
$view->setParam('resultmode', isset($resultmode) ? $resultmode : '');
|
||||
$view->setParam('searchin', isset($searchin) ? $searchin : array());
|
||||
$view->setParam('startfolder', isset($startFolder) ? $startFolder : null);
|
||||
|
|
|
@ -308,6 +308,8 @@ $(document).ready(function () {
|
|||
echo " <input type=\"hidden\" name=\"searchin[]\" value=\"3\" />";
|
||||
echo " <input type=\"hidden\" name=\"searchin[]\" value=\"4\" />";
|
||||
echo " <input name=\"query\" class=\"search-query\" id=\"searchfield\" data-provide=\"typeahead\" type=\"text\" style=\"width: 150px;\" placeholder=\"".getMLText("search")."\"/>";
|
||||
if($this->params['defaultsearchmethod'] == 'fulltext')
|
||||
echo " <input type=\"hidden\" name=\"fullsearch\" value=\"1\" />";
|
||||
// if($this->params['enablefullsearch']) {
|
||||
// echo " <label class=\"checkbox\" style=\"color: #999999;\"><input type=\"checkbox\" name=\"fullsearch\" value=\"1\" title=\"".getMLText('fullsearch_hint')."\"/> ".getMLText('fullsearch')."</label>";
|
||||
// }
|
||||
|
|
Loading…
Reference in New Issue
Block a user