Merge commit '1a90150'

This commit is contained in:
Marc Delisle 2015-03-03 15:44:36 -05:00
commit cd7e50e942
2 changed files with 15 additions and 8 deletions

View File

@ -68,6 +68,7 @@ explanation
+ rfe #1441 Add regexp match when using AllowArbitraryServer
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

View File

@ -2196,16 +2196,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';
}
}
@ -2234,7 +2240,7 @@ class PMA_DisplayResults
$draggable_html = '<th';
$th_class = array();
$th_class[] = 'draggable';
$this->getClassForNumericColumnType($fields_meta,$th_class);
$this->_getClassForNumericColumnType($fields_meta, $th_class);
if ($col_visib && !$col_visib_j) {
$th_class[] = 'hide';
}
@ -2282,7 +2288,7 @@ class PMA_DisplayResults
$draggable_html = '<th';
$th_class = array();
$th_class[] = 'draggable';
$this->getClassForNumericColumnType($fields_meta,$th_class);
$this->_getClassForNumericColumnType($fields_meta, $th_class);
if ($col_visib && !$col_visib_j) {
$th_class[] = 'hide';
}