@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | } else { |
29 | 29 | $filterBy = self::$cols[$filterBy][1]; |
30 | 30 | } |
31 | - $filterBy = 'CONCAT(" ",'.$filterBy.', " ")'; |
|
31 | + $filterBy = 'CONCAT(" ",' . $filterBy . ', " ")'; |
|
32 | 32 | if (self::config('FILTER_CASE_SENSITIVE') !== true) { |
33 | - $filterBy .= ' COLLATE '.self::config('DB_COLLATION_CI'); |
|
33 | + $filterBy .= ' COLLATE ' . self::config('DB_COLLATION_CI'); |
|
34 | 34 | } |
35 | - $filter = $filterBy.' LIKE '.'"%'.$filter.'%"'; |
|
35 | + $filter = $filterBy . ' LIKE ' . '"%' . $filter . '%"'; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | return $filter; |
@@ -45,18 +45,17 @@ discard block |
||
45 | 45 | if (isset($v[2]['sort']) && $v[2]['sort'] === false) { |
46 | 46 | continue; |
47 | 47 | } |
48 | - $all[] = 'IFNULL('.$v[1].', "")'; |
|
48 | + $all[] = 'IFNULL(' . $v[1] . ', "")'; |
|
49 | 49 | } |
50 | 50 | |
51 | - return 'CONCAT('.implode(',', $all).')'; |
|
51 | + return 'CONCAT(' . implode(',', $all) . ')'; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | private static function orderCol() |
55 | 55 | { |
56 | 56 | if (($col = filter_input(INPUT_GET, 'col', FILTER_VALIDATE_INT))) { |
57 | 57 | return isset(self::$cols[$col][2]['sort']) ? |
58 | - self::$cols[$col][2]['sort'] : |
|
59 | - self::$cols[$col][1]; |
|
58 | + self::$cols[$col][2]['sort'] : self::$cols[$col][1]; |
|
60 | 59 | } |
61 | 60 | |
62 | 61 | return self::$t['order']['col']; |
@@ -67,8 +66,7 @@ discard block |
||
67 | 66 | $reset = filter_has_var(INPUT_GET, 'col') ? 'asc' : null; |
68 | 67 | |
69 | 68 | return in_array(filter_input(INPUT_GET, 'ord'), ['asc', 'desc']) ? |
70 | - filter_input(INPUT_GET, 'ord') : |
|
71 | - ($reset ?: self::$t['order']['dir']); |
|
69 | + filter_input(INPUT_GET, 'ord') : ($reset ?: self::$t['order']['dir']); |
|
72 | 70 | } |
73 | 71 | |
74 | 72 | private static function setExport() |
@@ -81,7 +79,6 @@ discard block |
||
81 | 79 | private static function page() |
82 | 80 | { |
83 | 81 | return filter_has_var(INPUT_GET, 'pg') && self::$export == false ? |
84 | - (int) filter_input(INPUT_GET, 'pg', FILTER_SANITIZE_NUMBER_INT) : |
|
85 | - self::$t['page']; |
|
82 | + (int) filter_input(INPUT_GET, 'pg', FILTER_SANITIZE_NUMBER_INT) : self::$t['page']; |
|
86 | 83 | } |
87 | 84 | } |