mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 16:35:38 +00:00
limit can be passed by url parameter, add '*' to query in typeahead mode
This commit is contained in:
parent
1ec7715b26
commit
30ab2f9ef7
|
@ -66,11 +66,14 @@ if (isset($_GET["removecategory"]) && is_numeric($_GET["removecategory"]) && $_G
|
|||
$removecategory = (int) $_GET['removecategory'];
|
||||
}
|
||||
|
||||
$limit = (isset($_GET["limit"]) && is_numeric($_GET["limit"])) ? (int) $_GET['limit'] : 20;
|
||||
$fullsearch = ((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext') || !empty($_GET["fullsearch"])) && $settings->_enableFullSearch;
|
||||
if($fullsearch) {
|
||||
// Search in Fulltext {{{
|
||||
if (isset($_GET["query"]) && is_string($_GET["query"])) {
|
||||
$query = $_GET["query"];
|
||||
if($_GET['action'] == 'typeahead')
|
||||
$query .= '*';
|
||||
}
|
||||
else {
|
||||
$query = "";
|
||||
|
@ -183,7 +186,7 @@ if($fullsearch) {
|
|||
$searchTime = 0;
|
||||
} else {
|
||||
$startTime = getTime();
|
||||
$limit = 20;
|
||||
// $limit = 20;
|
||||
$total = 0;
|
||||
$index = $fulltextservice->Indexer();
|
||||
if($index) {
|
||||
|
@ -471,7 +474,7 @@ if($fullsearch) {
|
|||
//
|
||||
// Default page to display is always one.
|
||||
$pageNumber=1;
|
||||
$limit = 15;
|
||||
// $limit = 15;
|
||||
if (isset($_GET["pg"])) {
|
||||
if (is_numeric($_GET["pg"]) && $_GET["pg"]>0) {
|
||||
$pageNumber = (int) $_GET["pg"];
|
||||
|
|
Loading…
Reference in New Issue
Block a user