mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-30 20:51:22 +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']; | 	$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; | $fullsearch = ((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext') || !empty($_GET["fullsearch"])) && $settings->_enableFullSearch; | ||||||
| if($fullsearch) { | if($fullsearch) { | ||||||
| // Search in Fulltext {{{
 | // Search in Fulltext {{{
 | ||||||
| 	if (isset($_GET["query"]) && is_string($_GET["query"])) { | 	if (isset($_GET["query"]) && is_string($_GET["query"])) { | ||||||
| 		$query = $_GET["query"]; | 		$query = $_GET["query"]; | ||||||
|  | 		if($_GET['action'] == 'typeahead') | ||||||
|  | 			$query .= '*'; | ||||||
| 	} | 	} | ||||||
| 	else { | 	else { | ||||||
| 		$query = ""; | 		$query = ""; | ||||||
|  | @ -183,7 +186,7 @@ if($fullsearch) { | ||||||
| 		$searchTime = 0; | 		$searchTime = 0; | ||||||
| 	} else { | 	} else { | ||||||
| 		$startTime = getTime(); | 		$startTime = getTime(); | ||||||
| 		$limit = 20; | //		$limit = 20;
 | ||||||
| 		$total = 0; | 		$total = 0; | ||||||
| 		$index = $fulltextservice->Indexer(); | 		$index = $fulltextservice->Indexer(); | ||||||
| 		if($index) { | 		if($index) { | ||||||
|  | @ -471,7 +474,7 @@ if($fullsearch) { | ||||||
| 	//
 | 	//
 | ||||||
| 	// Default page to display is always one.
 | 	// Default page to display is always one.
 | ||||||
| 	$pageNumber=1; | 	$pageNumber=1; | ||||||
| 	$limit = 15; | //	$limit = 15;
 | ||||||
| 	if (isset($_GET["pg"])) { | 	if (isset($_GET["pg"])) { | ||||||
| 		if (is_numeric($_GET["pg"]) && $_GET["pg"]>0) { | 		if (is_numeric($_GET["pg"]) && $_GET["pg"]>0) { | ||||||
| 			$pageNumber = (int) $_GET["pg"]; | 			$pageNumber = (int) $_GET["pg"]; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann