mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Database class integration.
This commit is contained in:
@@ -2125,7 +2125,7 @@ function number_pad($number,$n) {
|
||||
//validate and format order by clause of select statement
|
||||
if (!function_exists('order_by')) {
|
||||
function order_by($col, $dir) {
|
||||
$col = preg_replace('#[^a-zA-Z0-9-_]#', '', $col);
|
||||
$col = preg_replace('#[^a-zA-Z0-9-_.]#', '', $col);
|
||||
$dir = strtolower($dir) == 'desc' ? 'desc' : 'asc';
|
||||
if ($col != '') { return ' order by '.$col.' '.$dir.' '; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user