forked from Public/pics
Management controllers: move table queries into models
This commit is contained in:
@@ -105,20 +105,7 @@ class ManageErrors extends HTMLController
|
||||
'index_class' => 'col-md-6',
|
||||
'base_url' => BASEURL . '/manageerrors/',
|
||||
'get_count' => 'ErrorLog::getCount',
|
||||
'get_data' => function($offset, $limit, $order, $direction) {
|
||||
assert(in_array($order, ['id_entry', 'file', 'line', 'time', 'ipaddress', 'id_user']));
|
||||
|
||||
return Registry::get('db')->queryAssocs('
|
||||
SELECT *
|
||||
FROM log_errors
|
||||
ORDER BY {raw:order}
|
||||
LIMIT {int:offset}, {int:limit}',
|
||||
[
|
||||
'order' => $order . ($direction === 'up' ? ' ASC' : ' DESC'),
|
||||
'offset' => $offset,
|
||||
'limit' => $limit,
|
||||
]);
|
||||
},
|
||||
'get_data' => 'ErrorLog::getOffset',
|
||||
];
|
||||
|
||||
$error_log = new GenericTable($options);
|
||||
|
||||
Reference in New Issue
Block a user