2012-03-08 18:30:56 +01:00
|
|
|
<?php
|
|
|
|
|
2012-07-16 03:17:13 +02:00
|
|
|
class Application_Model_Datatables
|
|
|
|
{
|
2012-08-23 16:41:40 +02:00
|
|
|
private static function buildWhereClauseForAdvancedSearch($dbname2searchTerm)
|
|
|
|
{
|
2021-10-11 16:10:47 +02:00
|
|
|
$where = [];
|
|
|
|
$where['clause'] = [];
|
|
|
|
$where['params'] = [];
|
|
|
|
foreach ($dbname2searchTerm as $dbname => $term) {
|
2012-08-23 16:41:40 +02:00
|
|
|
$isRange = false;
|
|
|
|
if (strstr($term, '~')) {
|
|
|
|
$info = explode('~', $term);
|
2013-12-11 21:20:19 +01:00
|
|
|
if ($dbname == 'utime' || $dbname == 'mtime' || $dbname == 'lptime') {
|
2015-10-20 17:45:26 +02:00
|
|
|
try {
|
2021-10-11 16:10:47 +02:00
|
|
|
$input1 = ($info[0] != '') ? Application_Common_DateHelper::UserTimezoneStringToUTCString($info[0]) : null;
|
|
|
|
$input2 = ($info[1] != '') ? Application_Common_DateHelper::UserTimezoneStringToUTCString($info[1]) : null;
|
2015-10-20 17:45:26 +02:00
|
|
|
} catch (Exception $e) {
|
|
|
|
$input1 = null;
|
|
|
|
$input2 = null;
|
|
|
|
}
|
2021-10-11 16:10:47 +02:00
|
|
|
} elseif ($dbname == 'bit_rate' || $dbname == 'sample_rate') {
|
Feature: Support php7.4 (#1354)
* Run CI tests against php 7.4
* Sort composer dependencies
* Remove unused Aws S3 php library
* Pin simplepie dependency to ^1.5
* Pin getid3 dependency to ^1.9
* Pin composer semver to ^3.2
* Pin php-amqplib to ^2.12
* Drop sentry logging support
* Update composer dependencies
* Move propel regenerate to Makefile
* Regenerate propel files with v1.7.0
* Pin propel orm to ^1.7
* Regenerate propel files with v1.7.2
* fix: generator_version in airtime-conf-production.php
* Replace propel/propel1 with jooola/propel1
* Regenerate propel files with v1.7.3-dev
* Fix php7.4 compatibility
Using php-cs-fixer:
'@PhpCsFixer' => true,
'concat_space' => ['spacing' => 'one'],
'ordered_class_elements' => false,
'yoda_style' => false,
'@PHP74Migration' => true,
'assign_null_coalescing_to_coalesce_equal' => false,
'ternary_to_null_coalescing' => false,
'heredoc_indentation' => false,
'@PHP74Migration:risky' => true,
'declare_strict_types' => false,
'void_return' => false,
'use_arrow_functions' => false,
* Fix pre-commit
2021-10-17 17:19:53 +02:00
|
|
|
$input1 = isset($info[0]) ? floatval($info[0]) * 1000 : null;
|
|
|
|
$input2 = isset($info[1]) ? floatval($info[1]) * 1000 : null;
|
2012-09-04 16:03:24 +02:00
|
|
|
} else {
|
2021-10-11 16:10:47 +02:00
|
|
|
$input1 = isset($info[0]) ? $info[0] : null;
|
|
|
|
$input2 = isset($info[1]) ? $info[1] : null;
|
2012-09-04 16:03:24 +02:00
|
|
|
}
|
2012-08-23 16:41:40 +02:00
|
|
|
$isRange = true;
|
|
|
|
} else {
|
|
|
|
$input1 = $term;
|
|
|
|
}
|
2012-08-29 16:58:03 +02:00
|
|
|
|
2012-08-23 16:41:40 +02:00
|
|
|
if ($isRange) {
|
2021-10-11 16:10:47 +02:00
|
|
|
$sub = [];
|
2012-08-23 16:41:40 +02:00
|
|
|
if ($input1 != null) {
|
2021-10-11 16:10:47 +02:00
|
|
|
$sub[] = $dbname . ' >= :' . $dbname . '1';
|
2012-08-23 16:41:40 +02:00
|
|
|
}
|
|
|
|
if ($input2 != null) {
|
2021-10-11 16:10:47 +02:00
|
|
|
$sub[] = $dbname . ' <= :' . $dbname . '2';
|
2012-08-23 16:41:40 +02:00
|
|
|
}
|
|
|
|
if (!empty($sub)) {
|
2021-10-11 16:10:47 +02:00
|
|
|
$where['clause'][$dbname] = '(' . implode(' AND ', $sub) . ')';
|
2012-09-10 20:16:36 +02:00
|
|
|
if ($input1 != null) {
|
2021-10-11 16:10:47 +02:00
|
|
|
$where['params'][$dbname . '1'] = $input1;
|
2012-09-10 20:16:36 +02:00
|
|
|
}
|
2012-09-05 20:50:26 +02:00
|
|
|
if ($input2 != null) {
|
2021-10-11 16:10:47 +02:00
|
|
|
$where['params'][$dbname . '2'] = $input2;
|
2012-09-05 20:50:26 +02:00
|
|
|
}
|
2012-08-23 16:41:40 +02:00
|
|
|
}
|
|
|
|
} else {
|
2021-10-11 16:10:47 +02:00
|
|
|
if (trim($input1) !== '') {
|
2023-01-08 17:44:15 +01:00
|
|
|
if ($dbname == 'track_type_id') {
|
|
|
|
$where['clause'][$dbname] = $dbname . ' = :' . $dbname . '1';
|
|
|
|
$where['params'][$dbname . '1'] = $input1;
|
|
|
|
} else {
|
|
|
|
$where['clause'][$dbname] = $dbname . ' ILIKE :' . $dbname . '1';
|
|
|
|
$where['params'][$dbname . '1'] = '%' . $input1 . '%';
|
|
|
|
}
|
2012-08-23 16:41:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-12-11 23:35:31 +01:00
|
|
|
|
2012-09-05 20:50:26 +02:00
|
|
|
return $where;
|
2012-08-23 16:41:40 +02:00
|
|
|
}
|
2012-08-29 16:58:03 +02:00
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
// query used to return data for a paginated/searchable datatable.
|
|
|
|
public static function findEntries(
|
|
|
|
$con,
|
|
|
|
$displayColumns,
|
|
|
|
$fromTable,
|
|
|
|
$data,
|
|
|
|
$dataProp = 'aaData'
|
|
|
|
) {
|
|
|
|
$where = [];
|
2012-09-19 22:34:46 +02:00
|
|
|
/* Holds the parameters for binding after the statement has been
|
|
|
|
prepared */
|
2021-10-11 16:10:47 +02:00
|
|
|
$params = [];
|
2012-08-29 16:58:03 +02:00
|
|
|
|
2012-09-19 23:05:20 +02:00
|
|
|
if (isset($data['advSearch']) && $data['advSearch'] === 'true') {
|
2015-09-03 00:17:11 +02:00
|
|
|
$librarySetting = Application_Model_Preference::getCurrentLibraryTableColumnMap();
|
2022-03-14 11:15:04 +01:00
|
|
|
// $displayColumns[] = 'owner';
|
2013-07-18 07:37:39 +02:00
|
|
|
|
|
|
|
// map that maps original column position to db name
|
2021-10-11 16:10:47 +02:00
|
|
|
$current2dbname = [];
|
2013-07-18 07:37:39 +02:00
|
|
|
// array of search terms
|
2021-10-11 16:10:47 +02:00
|
|
|
$orig2searchTerm = [];
|
2013-07-18 07:37:39 +02:00
|
|
|
foreach ($data as $key => $d) {
|
2021-10-11 16:10:47 +02:00
|
|
|
if (strstr($key, 'mDataProp_')) {
|
Feature: Support php7.4 (#1354)
* Run CI tests against php 7.4
* Sort composer dependencies
* Remove unused Aws S3 php library
* Pin simplepie dependency to ^1.5
* Pin getid3 dependency to ^1.9
* Pin composer semver to ^3.2
* Pin php-amqplib to ^2.12
* Drop sentry logging support
* Update composer dependencies
* Move propel regenerate to Makefile
* Regenerate propel files with v1.7.0
* Pin propel orm to ^1.7
* Regenerate propel files with v1.7.2
* fix: generator_version in airtime-conf-production.php
* Replace propel/propel1 with jooola/propel1
* Regenerate propel files with v1.7.3-dev
* Fix php7.4 compatibility
Using php-cs-fixer:
'@PhpCsFixer' => true,
'concat_space' => ['spacing' => 'one'],
'ordered_class_elements' => false,
'yoda_style' => false,
'@PHP74Migration' => true,
'assign_null_coalescing_to_coalesce_equal' => false,
'ternary_to_null_coalescing' => false,
'heredoc_indentation' => false,
'@PHP74Migration:risky' => true,
'declare_strict_types' => false,
'void_return' => false,
'use_arrow_functions' => false,
* Fix pre-commit
2021-10-17 17:19:53 +02:00
|
|
|
[$dump, $index] = explode('_', $key);
|
2013-07-18 07:37:39 +02:00
|
|
|
$current2dbname[$index] = $d;
|
2021-10-11 16:10:47 +02:00
|
|
|
} elseif (strstr($key, 'sSearch_')) {
|
Feature: Support php7.4 (#1354)
* Run CI tests against php 7.4
* Sort composer dependencies
* Remove unused Aws S3 php library
* Pin simplepie dependency to ^1.5
* Pin getid3 dependency to ^1.9
* Pin composer semver to ^3.2
* Pin php-amqplib to ^2.12
* Drop sentry logging support
* Update composer dependencies
* Move propel regenerate to Makefile
* Regenerate propel files with v1.7.0
* Pin propel orm to ^1.7
* Regenerate propel files with v1.7.2
* fix: generator_version in airtime-conf-production.php
* Replace propel/propel1 with jooola/propel1
* Regenerate propel files with v1.7.3-dev
* Fix php7.4 compatibility
Using php-cs-fixer:
'@PhpCsFixer' => true,
'concat_space' => ['spacing' => 'one'],
'ordered_class_elements' => false,
'yoda_style' => false,
'@PHP74Migration' => true,
'assign_null_coalescing_to_coalesce_equal' => false,
'ternary_to_null_coalescing' => false,
'heredoc_indentation' => false,
'@PHP74Migration:risky' => true,
'declare_strict_types' => false,
'void_return' => false,
'use_arrow_functions' => false,
* Fix pre-commit
2021-10-17 17:19:53 +02:00
|
|
|
[$dump, $index] = explode('_', $key);
|
2013-07-18 07:37:39 +02:00
|
|
|
$orig2searchTerm[$index] = $d;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// map that maps dbname to searchTerm
|
2021-10-11 16:10:47 +02:00
|
|
|
$dbname2searchTerm = [];
|
2013-07-18 07:37:39 +02:00
|
|
|
foreach ($current2dbname as $currentPos => $dbname) {
|
|
|
|
$new_index = $librarySetting($currentPos);
|
|
|
|
// TODO : Fix this retarded hack later. Just a band aid for
|
|
|
|
// now at least we print some warnings so that we don't
|
|
|
|
// forget about this -- cc-4462
|
2021-10-11 16:10:47 +02:00
|
|
|
if (array_key_exists($new_index, $orig2searchTerm)) {
|
2013-07-18 07:37:39 +02:00
|
|
|
$dbname2searchTerm[$dbname] = $orig2searchTerm[$new_index];
|
|
|
|
} else {
|
2021-10-11 16:10:47 +02:00
|
|
|
Logging::warn('Trying to reorder to unknown index
|
|
|
|
printing as much debugging as possible...');
|
|
|
|
$debug = [
|
|
|
|
'$new_index' => $new_index,
|
|
|
|
'$currentPos' => $currentPos,
|
2022-07-07 20:01:15 +02:00
|
|
|
'$orig2searchTerm' => $orig2searchTerm,
|
|
|
|
];
|
2013-07-18 07:37:39 +02:00
|
|
|
Logging::warn($debug);
|
|
|
|
}
|
2013-07-18 07:31:20 +02:00
|
|
|
}
|
|
|
|
|
2012-09-19 22:39:56 +02:00
|
|
|
$advancedWhere = self::buildWhereClauseForAdvancedSearch($dbname2searchTerm);
|
|
|
|
if (!empty($advancedWhere['clause'])) {
|
Feature: Support php7.4 (#1354)
* Run CI tests against php 7.4
* Sort composer dependencies
* Remove unused Aws S3 php library
* Pin simplepie dependency to ^1.5
* Pin getid3 dependency to ^1.9
* Pin composer semver to ^3.2
* Pin php-amqplib to ^2.12
* Drop sentry logging support
* Update composer dependencies
* Move propel regenerate to Makefile
* Regenerate propel files with v1.7.0
* Pin propel orm to ^1.7
* Regenerate propel files with v1.7.2
* fix: generator_version in airtime-conf-production.php
* Replace propel/propel1 with jooola/propel1
* Regenerate propel files with v1.7.3-dev
* Fix php7.4 compatibility
Using php-cs-fixer:
'@PhpCsFixer' => true,
'concat_space' => ['spacing' => 'one'],
'ordered_class_elements' => false,
'yoda_style' => false,
'@PHP74Migration' => true,
'assign_null_coalescing_to_coalesce_equal' => false,
'ternary_to_null_coalescing' => false,
'heredoc_indentation' => false,
'@PHP74Migration:risky' => true,
'declare_strict_types' => false,
'void_return' => false,
'use_arrow_functions' => false,
* Fix pre-commit
2021-10-17 17:19:53 +02:00
|
|
|
$where[] = implode(' AND ', $advancedWhere['clause']);
|
2012-09-19 22:39:56 +02:00
|
|
|
$params = $advancedWhere['params'];
|
|
|
|
}
|
2012-08-23 16:41:40 +02:00
|
|
|
}
|
2012-07-11 00:51:32 +02:00
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
if ($data['sSearch'] !== '') {
|
|
|
|
$searchTerms = explode(' ', $data['sSearch']);
|
2012-07-11 00:51:32 +02:00
|
|
|
}
|
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
$selectorCount = 'SELECT COUNT(*) ';
|
Feature: Support php7.4 (#1354)
* Run CI tests against php 7.4
* Sort composer dependencies
* Remove unused Aws S3 php library
* Pin simplepie dependency to ^1.5
* Pin getid3 dependency to ^1.9
* Pin composer semver to ^3.2
* Pin php-amqplib to ^2.12
* Drop sentry logging support
* Update composer dependencies
* Move propel regenerate to Makefile
* Regenerate propel files with v1.7.0
* Pin propel orm to ^1.7
* Regenerate propel files with v1.7.2
* fix: generator_version in airtime-conf-production.php
* Replace propel/propel1 with jooola/propel1
* Regenerate propel files with v1.7.3-dev
* Fix php7.4 compatibility
Using php-cs-fixer:
'@PhpCsFixer' => true,
'concat_space' => ['spacing' => 'one'],
'ordered_class_elements' => false,
'yoda_style' => false,
'@PHP74Migration' => true,
'assign_null_coalescing_to_coalesce_equal' => false,
'ternary_to_null_coalescing' => false,
'heredoc_indentation' => false,
'@PHP74Migration:risky' => true,
'declare_strict_types' => false,
'void_return' => false,
'use_arrow_functions' => false,
* Fix pre-commit
2021-10-17 17:19:53 +02:00
|
|
|
$selectorRows = 'SELECT ' . implode(',', $displayColumns) . ' ';
|
2012-07-11 00:51:32 +02:00
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
$sql = $selectorCount . ' FROM ' . $fromTable;
|
2012-07-11 00:51:32 +02:00
|
|
|
$sqlTotalRows = $sql;
|
|
|
|
|
|
|
|
if (isset($searchTerms)) {
|
2021-10-11 16:10:47 +02:00
|
|
|
$searchCols = [];
|
|
|
|
for ($i = 0; $i < $data['iColumns']; ++$i) {
|
|
|
|
if ($data['bSearchable_' . $i] == 'true') {
|
2012-07-11 00:51:32 +02:00
|
|
|
$searchCols[] = $data["mDataProp_{$i}"];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
$outerCond = [];
|
|
|
|
$simpleWhere = [];
|
2012-07-11 00:51:32 +02:00
|
|
|
|
|
|
|
foreach ($searchTerms as $term) {
|
|
|
|
foreach ($searchCols as $col) {
|
2021-10-11 16:10:47 +02:00
|
|
|
$simpleWhere['clause']['simple_' . $col] = "{$col}::text ILIKE :simple_" . $col;
|
|
|
|
$simpleWhere['params']['simple_' . $col] = '%' . $term . '%';
|
2012-07-11 00:51:32 +02:00
|
|
|
}
|
2021-10-11 16:10:47 +02:00
|
|
|
$outerCond[] = '(' . implode(' OR ', $simpleWhere['clause']) . ')';
|
2012-07-11 00:51:32 +02:00
|
|
|
}
|
2021-10-11 16:10:47 +02:00
|
|
|
$where[] = '(' . implode(' AND ', $outerCond) . ')';
|
2012-09-05 20:50:26 +02:00
|
|
|
$params = array_merge($params, $simpleWhere['params']);
|
2012-07-11 00:51:32 +02:00
|
|
|
}
|
|
|
|
// End Where clause
|
|
|
|
|
|
|
|
// Order By clause
|
2021-10-11 16:10:47 +02:00
|
|
|
$orderby = [];
|
|
|
|
for ($i = 0; $i < $data['iSortingCols']; ++$i) {
|
|
|
|
$num = $data['iSortCol_' . $i];
|
|
|
|
$orderby[] = $data["mDataProp_{$num}"] . ' ' . $data['sSortDir_' . $i];
|
2012-07-11 00:51:32 +02:00
|
|
|
}
|
2021-10-11 16:10:47 +02:00
|
|
|
$orderby[] = 'id';
|
Feature: Support php7.4 (#1354)
* Run CI tests against php 7.4
* Sort composer dependencies
* Remove unused Aws S3 php library
* Pin simplepie dependency to ^1.5
* Pin getid3 dependency to ^1.9
* Pin composer semver to ^3.2
* Pin php-amqplib to ^2.12
* Drop sentry logging support
* Update composer dependencies
* Move propel regenerate to Makefile
* Regenerate propel files with v1.7.0
* Pin propel orm to ^1.7
* Regenerate propel files with v1.7.2
* fix: generator_version in airtime-conf-production.php
* Replace propel/propel1 with jooola/propel1
* Regenerate propel files with v1.7.3-dev
* Fix php7.4 compatibility
Using php-cs-fixer:
'@PhpCsFixer' => true,
'concat_space' => ['spacing' => 'one'],
'ordered_class_elements' => false,
'yoda_style' => false,
'@PHP74Migration' => true,
'assign_null_coalescing_to_coalesce_equal' => false,
'ternary_to_null_coalescing' => false,
'heredoc_indentation' => false,
'@PHP74Migration:risky' => true,
'declare_strict_types' => false,
'void_return' => false,
'use_arrow_functions' => false,
* Fix pre-commit
2021-10-17 17:19:53 +02:00
|
|
|
$orderby = implode(',', $orderby);
|
2012-07-11 00:51:32 +02:00
|
|
|
// End Order By clause
|
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
$displayLength = intval($data['iDisplayLength']);
|
2012-09-05 20:50:26 +02:00
|
|
|
$needToBind = false;
|
2012-07-11 00:51:32 +02:00
|
|
|
if (count($where) > 0) {
|
2012-09-05 20:50:26 +02:00
|
|
|
$needToBind = true;
|
Feature: Support php7.4 (#1354)
* Run CI tests against php 7.4
* Sort composer dependencies
* Remove unused Aws S3 php library
* Pin simplepie dependency to ^1.5
* Pin getid3 dependency to ^1.9
* Pin composer semver to ^3.2
* Pin php-amqplib to ^2.12
* Drop sentry logging support
* Update composer dependencies
* Move propel regenerate to Makefile
* Regenerate propel files with v1.7.0
* Pin propel orm to ^1.7
* Regenerate propel files with v1.7.2
* fix: generator_version in airtime-conf-production.php
* Replace propel/propel1 with jooola/propel1
* Regenerate propel files with v1.7.3-dev
* Fix php7.4 compatibility
Using php-cs-fixer:
'@PhpCsFixer' => true,
'concat_space' => ['spacing' => 'one'],
'ordered_class_elements' => false,
'yoda_style' => false,
'@PHP74Migration' => true,
'assign_null_coalescing_to_coalesce_equal' => false,
'ternary_to_null_coalescing' => false,
'heredoc_indentation' => false,
'@PHP74Migration:risky' => true,
'declare_strict_types' => false,
'void_return' => false,
'use_arrow_functions' => false,
* Fix pre-commit
2021-10-17 17:19:53 +02:00
|
|
|
$where = implode(' OR ', $where);
|
2021-10-11 16:10:47 +02:00
|
|
|
$sql = $selectorCount . ' FROM ' . $fromTable . ' WHERE ' . $where;
|
2012-07-11 00:51:32 +02:00
|
|
|
$sqlTotalDisplayRows = $sql;
|
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
$sql = $selectorRows . ' FROM ' . $fromTable . ' WHERE ' . $where . ' ORDER BY ' . $orderby;
|
|
|
|
} else {
|
|
|
|
$sql = $selectorRows . ' FROM ' . $fromTable . ' ORDER BY ' . $orderby;
|
2013-07-18 07:31:20 +02:00
|
|
|
}
|
2012-07-11 00:51:32 +02:00
|
|
|
|
2022-03-14 11:15:04 +01:00
|
|
|
// limit the results returned.
|
2013-07-18 07:37:39 +02:00
|
|
|
if ($displayLength !== -1) {
|
2021-10-11 16:10:47 +02:00
|
|
|
$sql .= ' OFFSET ' . $data['iDisplayStart'] . ' LIMIT ' . $displayLength;
|
2012-07-11 00:51:32 +02:00
|
|
|
}
|
2013-07-18 07:31:20 +02:00
|
|
|
|
2012-07-11 00:51:32 +02:00
|
|
|
try {
|
2022-03-14 11:15:04 +01:00
|
|
|
// Logging::info($sqlTotalRows);
|
2013-07-18 07:31:20 +02:00
|
|
|
|
2012-07-11 00:51:32 +02:00
|
|
|
$r = $con->query($sqlTotalRows);
|
|
|
|
$totalRows = $r->fetchColumn(0);
|
|
|
|
|
|
|
|
if (isset($sqlTotalDisplayRows)) {
|
2022-03-14 11:15:04 +01:00
|
|
|
// Logging::info("sql is set");
|
|
|
|
// Logging::info($sqlTotalDisplayRows);
|
2012-09-06 17:21:36 +02:00
|
|
|
$totalDisplayRows = Application_Common_Database::prepareAndExecute($sqlTotalDisplayRows, $params, 'column');
|
2021-10-11 16:10:47 +02:00
|
|
|
} else {
|
2022-03-14 11:15:04 +01:00
|
|
|
// Logging::info("sql is not set.");
|
2012-07-11 00:51:32 +02:00
|
|
|
$totalDisplayRows = $totalRows;
|
|
|
|
}
|
|
|
|
|
2022-03-14 11:15:04 +01:00
|
|
|
// TODO
|
2012-09-05 20:50:26 +02:00
|
|
|
if ($needToBind) {
|
2012-09-06 17:21:36 +02:00
|
|
|
$results = Application_Common_Database::prepareAndExecute($sql, $params);
|
2021-10-11 16:10:47 +02:00
|
|
|
} else {
|
2012-09-05 20:50:26 +02:00
|
|
|
$stmt = $con->query($sql);
|
|
|
|
$stmt->setFetchMode(PDO::FETCH_ASSOC);
|
|
|
|
$results = $stmt->fetchAll();
|
|
|
|
}
|
2021-10-11 16:10:47 +02:00
|
|
|
} catch (Exception $e) {
|
2013-07-18 07:31:20 +02:00
|
|
|
Logging::info($e->getMessage());
|
|
|
|
}
|
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
return [
|
|
|
|
'sEcho' => intval($data['sEcho']),
|
|
|
|
'iTotalDisplayRecords' => intval($totalDisplayRows),
|
|
|
|
'iTotalRecords' => intval($totalRows),
|
|
|
|
$dataProp => $results,
|
|
|
|
];
|
2012-07-11 00:51:32 +02:00
|
|
|
}
|
2012-04-10 14:45:48 +02:00
|
|
|
}
|