forked from Wavyzz/dolibarr
ajax load only one page of search results
This commit is contained in:
@@ -48,6 +48,8 @@ $category = GETPOST('category', 'alphanohtml'); // Can be id of category or 'sup
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$term = GETPOST('term', 'alpha');
|
||||
$id = GETPOST('id', 'int');
|
||||
$search_start = GETPOST('search_start', 'int');
|
||||
$search_limit = GETPOST('search_limit', 'int');
|
||||
|
||||
if (empty($user->rights->takepos->run)) {
|
||||
accessforbidden();
|
||||
@@ -232,6 +234,9 @@ if ($action == 'getProducts') {
|
||||
$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
|
||||
// load only one page of products
|
||||
$sql.= ' LIMIT '. $search_start . ',' . $search_limit;
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$rows = array();
|
||||
|
||||
Reference in New Issue
Block a user