Merged in bugfix/HOR-4888 (pull request #6637)

HOR-4888

Approved-by: Dante Loayza <dante.loayza@colosa.com>
Approved-by: Paula Quispe <paula.quispe@processmaker.com>
This commit is contained in:
Paula Quispe
2018-10-04 13:58:21 +00:00

View File

@@ -152,6 +152,7 @@ class Applications
if ($columnSearch === 'APP_NUMBER' || $columnSearch === 'APP_TITLE') { if ($columnSearch === 'APP_NUMBER' || $columnSearch === 'APP_TITLE') {
$sqlSearch = "SELECT APPLICATION.APP_NUMBER FROM APPLICATION"; $sqlSearch = "SELECT APPLICATION.APP_NUMBER FROM APPLICATION";
$sqlSearch .= " WHERE APPLICATION.{$columnSearch} LIKE '%{$search}%'"; $sqlSearch .= " WHERE APPLICATION.{$columnSearch} LIKE '%{$search}%'";
$orderByColumnSearch = " ORDER BY APPLICATION.{$columnSearch} " . $dir;
switch ($columnSearch) { switch ($columnSearch) {
case 'APP_TITLE': case 'APP_TITLE':
break; break;
@@ -166,6 +167,7 @@ class Applications
} }
break; break;
} }
$sqlSearch .= $orderByColumnSearch;
if (!empty($start)) { if (!empty($start)) {
$sqlSearch .= " LIMIT $start, " . $limit; $sqlSearch .= " LIMIT $start, " . $limit;
} else { } else {