@@ -70,26 +70,21 @@ public function getList(array $params): array
7070 while ($ process = $ result ->fetchAssoc ()) {
7171 // Array keys need to modify due to the way it has used
7272 // to display column values
73- if (
74- (! empty ($ params ['order_by_field ' ]) && ! empty ($ params ['sort_order ' ]))
75- || ! empty ($ params ['showExecuting ' ])
76- ) {
77- foreach (array_keys ($ process ) as $ key ) {
78- $ newKey = ucfirst (mb_strtolower ($ key ));
79- if ($ newKey === $ key ) {
80- continue ;
81- }
82-
83- $ process [$ newKey ] = $ process [$ key ];
84- unset($ process [$ key ]);
73+ foreach (array_keys ($ process ) as $ key ) {
74+ $ newKey = ucfirst (mb_strtolower ($ key ));
75+ if ($ newKey === $ key ) {
76+ continue ;
8577 }
78+
79+ $ process [$ newKey ] = $ process [$ key ];
80+ unset($ process [$ key ]);
8681 }
8782
8883 $ rows [] = [
8984 'id ' => $ process ['Id ' ],
9085 'user ' => $ process ['User ' ],
9186 'host ' => $ process ['Host ' ],
92- 'db ' => ! isset ($ process ['db ' ]) || strlen ($ process ['db ' ]) === 0 ? '' : $ process ['db ' ],
87+ 'db ' => ! isset ($ process ['Db ' ]) || strlen ($ process ['Db ' ]) === 0 ? '' : $ process ['Db ' ],
9388 'command ' => $ process ['Command ' ],
9489 'time ' => $ process ['Time ' ],
9590 'state ' => ! empty ($ process ['State ' ]) ? $ process ['State ' ] : '--- ' ,
@@ -124,7 +119,7 @@ private function getSortableColumnsForProcessList(bool $showFullSql, array $para
124119 ],
125120 [
126121 'column_name ' => __ ('Database ' ),
127- 'order_by_field ' => 'db ' ,
122+ 'order_by_field ' => 'Db ' ,
128123 ],
129124 [
130125 'column_name ' => __ ('Command ' ),
@@ -138,14 +133,18 @@ private function getSortableColumnsForProcessList(bool $showFullSql, array $para
138133 'column_name ' => __ ('Status ' ),
139134 'order_by_field ' => 'State ' ,
140135 ],
141- [
136+ ];
137+
138+ if ($ this ->dbi ->isMariaDB ()) {
139+ $ sortableColumns [] = [
142140 'column_name ' => __ ('Progress ' ),
143141 'order_by_field ' => 'Progress ' ,
144- ],
145- [
146- 'column_name ' => __ ('SQL query ' ),
147- 'order_by_field ' => 'Info ' ,
148- ],
142+ ];
143+ }
144+
145+ $ sortableColumns [] = [
146+ 'column_name ' => __ ('SQL query ' ),
147+ 'order_by_field ' => 'Info ' ,
149148 ];
150149
151150 $ sortableColCount = count ($ sortableColumns );
0 commit comments