migrated autoresponder-cron to new PDO database class, beautify sql-query in paging-class, fix typos in traffic-cron (thx to Dessa), refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -316,7 +316,12 @@ class paging {
|
||||
|| ($natSorting === null && $this->natSorting == true)
|
||||
) {
|
||||
// Acts similar to php's natsort(), found in one comment at http://my.opera.com/cpr/blog/show.dml/160556
|
||||
$sortcode = 'ORDER BY CONCAT( IF( ASCII( LEFT( ' . $sortfield . ', 5 ) ) > 57, LEFT( ' . $sortfield . ', 1 ), \'0\' ), IF( ASCII( RIGHT( ' . $sortfield . ', 1 ) ) > 57, LPAD( ' . $sortfield . ', 255, \'0\' ), LPAD( CONCAT( ' . $sortfield . ', \'-\' ), 255, \'0\' ) ) ) ' . $sortorder;
|
||||
$sortcode = "ORDER BY CONCAT( IF( ASCII( LEFT( " . $sortfield . ", 5 ) ) > 57,
|
||||
LEFT( " . $sortfield . ", 1 ), 0 ),
|
||||
IF( ASCII( RIGHT( " . $sortfield . ", 1 ) ) > 57,
|
||||
LPAD( " . $sortfield . ", 255, '0' ),
|
||||
LPAD( CONCAT( " . $sortfield . ", '-' ), 255, '0' )
|
||||
)) " . $sortorder;
|
||||
} else {
|
||||
$sortcode = 'ORDER BY ' . $sortfield . ' ' . $sortorder;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user