diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 97f396ed6f8f645047f69af7d7167ffd294135da..d57cf1c57d0b19888671cdc9a929bc5628aaa5f6 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -156,8 +156,8 @@ $conf['broken_iua'] = 0; //Platform with broken ignore_user_abor $conf['xsendfile'] = 0; //Use X-Sendfile (1 = lighttpd, 2 = standard) $conf['renderer_xhtml'] = 'xhtml'; //renderer to use for main page generation $conf['readdircache'] = 0; //time cache in second for the readdir operation, 0 to deactivate. -$conf['search_limit_to_first_ns'] = 0; //Option to limit the search to the current X namespaces -$conf['search_default_fragment_behaviour'] = 'exact'; // Option to specify the default fragment search behavior +$conf['search_nslimit'] = 0; //limit the search to the current X namespaces +$conf['search_fragment'] = 'exact'; //specify the default fragment search behavior /* Network Settings */ $conf['dnslookups'] = 1; //disable to disallow IP to hostname lookups diff --git a/inc/Action/Search.php b/inc/Action/Search.php index c182ca3e9412cae776e9bfe97fcb04bd38d6f179..aa19671da04ac6259fdf727858121e86e8ee1c9f 100644 --- a/inc/Action/Search.php +++ b/inc/Action/Search.php @@ -72,7 +72,7 @@ class Search extends AbstractAction { } /** - * Adjust the global query accordingly to the config search_limit_to_first_ns and search_default_fragment_behaviour + * Adjust the global query accordingly to the config search_nslimit and search_fragment * * This will only do something if the search didn't originate from the form on the searchpage itself */ @@ -88,16 +88,16 @@ class Search extends AbstractAction { $parsedQuery = ft_queryParser($Indexer, $QUERY); if (empty($parsedQuery['ns']) && empty($parsedQuery['notns'])) { - if ($conf['search_limit_to_first_ns'] > 0) { + if ($conf['search_nslimit'] > 0) { if (getNS($ID) !== false) { $nsParts = explode(':', getNS($ID)); - $ns = implode(':', array_slice($nsParts, 0, $conf['search_limit_to_first_ns'])); + $ns = implode(':', array_slice($nsParts, 0, $conf['search_nslimit'])); $QUERY .= " @$ns"; } } } - if ($conf['search_default_fragment_behaviour'] !== 'exact') { + if ($conf['search_fragment'] !== 'exact') { if (empty(array_diff($parsedQuery['words'], $parsedQuery['and']))) { if (strpos($QUERY, '*') === false) { $queryParts = explode(' ', $QUERY); @@ -117,10 +117,10 @@ class Search extends AbstractAction { global $conf; - if ($conf['search_default_fragment_behaviour'] === 'starts_with') { + if ($conf['search_fragment'] === 'starts_with') { return $part . '*'; } - if ($conf['search_default_fragment_behaviour'] === 'ends_with') { + if ($conf['search_fragment'] === 'ends_with') { return '*' . $part; } diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index cee84604cfde26e843993a83a4bf3a81084bb657..356db4e5e8ae39ca537901bc0efbdbdfcf73b56b 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -178,12 +178,12 @@ $lang['xsendfile'] = 'Use the X-Sendfile header to let the webserver deliver s $lang['renderer_xhtml'] = 'Renderer to use for main (xhtml) wiki output'; $lang['renderer__core'] = '%s (dokuwiki core)'; $lang['renderer__plugin'] = '%s (plugin)'; -$lang['search_limit_to_first_ns'] = 'Limit the search to the current X namespaces. When a search is executed from a page within a deeper namespace, the first X namespaces will be added as filter'; -$lang['search_default_fragment_behaviour'] = 'Specify the default fragment search behavior'; -$lang['search_default_fragment_behaviour_o_exact'] = 'exact'; -$lang['search_default_fragment_behaviour_o_starts_with'] = 'starts with'; -$lang['search_default_fragment_behaviour_o_ends_with'] = 'ends with'; -$lang['search_default_fragment_behaviour_o_contains'] = 'contains'; +$lang['search_nslimit'] = 'Limit the search to the current X namespaces. When a search is executed from a page within a deeper namespace, the first X namespaces will be added as filter'; +$lang['search_fragment'] = 'Specify the default fragment search behavior'; +$lang['search_fragment_o_exact'] = 'exact'; +$lang['search_fragment_o_starts_with'] = 'starts with'; +$lang['search_fragment_o_ends_with'] = 'ends with'; +$lang['search_fragment_o_contains'] = 'contains'; /* Network Options */ $lang['dnslookups'] = 'DokuWiki will lookup hostnames for remote IP addresses of users editing pages. If you have a slow or non working DNS server or don\'t want this feature, disable this option'; diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index 750245957dbd38a4fd7a67b396ceed91a6652f80..acdf93ba775dec2052276c9b7f8ad3b525296ab2 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -219,8 +219,8 @@ $meta['broken_iua'] = array('onoff'); $meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3),'_caution' => 'warning'); $meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml'),'_caution' => 'warning'); $meta['readdircache'] = array('numeric'); -$meta['search_limit_to_first_ns'] = array('numeric', '_min' => 0); -$meta['search_default_fragment_behaviour'] = array('multichoice','_choices' => array('exact', 'starts_with', 'ends_with', 'contains'),); +$meta['search_nslimit'] = array('numeric', '_min' => 0); +$meta['search_fragment'] = array('multichoice','_choices' => array('exact', 'starts_with', 'ends_with', 'contains'),); $meta['_network'] = array('fieldset'); $meta['dnslookups'] = array('onoff');