From 1a9015080ee0ba9694150e1aac7da5e47e77a120 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 3 Mar 2015 15:27:06 -0500 Subject: [PATCH] Changelog entry; fix coding style Signed-off-by: Marc Delisle --- ChangeLog | 1 + libraries/DisplayResults.class.php | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7fbb351cce..5efcebb00d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ phpMyAdmin - ChangeLog ====================== 4.3.12.0 (not yet released) +- bug #4746 Right-aligned columns have left-aligned header 4.3.11.0 (2015-03-02) - bug #4774 SQL links are completely wrong diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index f8e37a4d12..48035a2546 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -2258,16 +2258,22 @@ class PMA_DisplayResults } // end of the '_getSortOrderLink()' function /** - * Check if the column contains numeric data . If yes, then set the column header's alignment right + * Check if the column contains numeric data. If yes, then set the + * column header's alignment right * - * @param $fields_meta set of field properties + * @param array $fields_meta set of field properties + * @param array &$th_class array containing classes + * + * @return void * - * @return string $value class that has to be added to th_class * @see _getDraggableClassForSortableColumns() */ - private function getClassForNumericColumnType($fields_meta,&$th_class){ - - if(preg_match('@int|decimal|float|double|real|bit|boolean|serial@i',$fields_meta->type)){ + private function _getClassForNumericColumnType($fields_meta,&$th_class) + { + if (preg_match( + '@int|decimal|float|double|real|bit|boolean|serial@i', + $fields_meta->type + )) { $th_class[] = 'right'; } } @@ -2297,7 +2303,7 @@ class PMA_DisplayResults $draggable_html = 'getClassForNumericColumnType($fields_meta,$th_class); + $this->_getClassForNumericColumnType($fields_meta, $th_class); if ($col_visib && !$col_visib_j) { $th_class[] = 'hide'; } @@ -2350,7 +2356,7 @@ class PMA_DisplayResults $draggable_html = 'getClassForNumericColumnType($fields_meta,$th_class); + $this->_getClassForNumericColumnType($fields_meta, $th_class); if ($col_visib && !$col_visib_j) { $th_class[] = 'hide'; }