From 0e13997475e31e018d6962ae1397e092b96b82f2 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 15 Apr 2015 07:56:17 +0530 Subject: [PATCH 1/2] bug #4794 Server error viewing table content Signed-off-by: Madhura Jayaratne --- ChangeLog | 1 + libraries/DisplayResults.class.php | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48050996b9..65f76abbeb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ phpMyAdmin - ChangeLog - bug #4851 PHP errors in login dialogue - bug #4845 White screen (Cloudflare) - bug #4207 json_encode error due to strftime returning non utf8 chars in Windows 8.1 Chinese version +- bug #4794 Server error viewing table content 4.4.2.0 (2015-04-13) - bug #4835 PMA_hideShowConnection not called after submit_num_fields diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 6f5f586c71..c557396a56 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -2498,7 +2498,7 @@ class PMA_DisplayResults } $mime_map = $this->__get('mime_map'); - $orgFullColName = $meta->db . '.' . $meta->orgtable . '.' . $meta->orgname; + $orgFullColName = $this->__get('db') . '.' . $meta->orgtable . '.' . $meta->orgname; if ($transformation_plugin != $default_function || !empty($mime_map[$orgFullColName]['input_transformation']) ) { @@ -2744,7 +2744,7 @@ class PMA_DisplayResults ++$currentColumn) { $meta = $fields_meta[$currentColumn]; - $orgFullTableName = $meta->db . '.' . $meta->orgtable; + $orgFullTableName = $this->__get('db') . '.' . $meta->orgtable; if ($GLOBALS['cfgRelation']['commwork'] && $GLOBALS['cfgRelation']['mimework'] @@ -2753,7 +2753,7 @@ class PMA_DisplayResults && empty($added[$orgFullTableName]) ) { $mimeMap = array_merge( - $mimeMap, PMA_getMIME($meta->db, $meta->orgtable, false, true) + $mimeMap, PMA_getMIME($this->__get('db'), $meta->orgtable, false, true) ); $added[$orgFullTableName] = true; } @@ -2845,7 +2845,7 @@ class PMA_DisplayResults $meta = $fields_meta[$i]; $orgFullColName - = $meta->db . '.' . $meta->orgtable . '.' . $meta->orgname; + = $this->__get('db') . '.' . $meta->orgtable . '.' . $meta->orgname; $not_null_class = $meta->not_null ? 'not_null' : ''; $relation_class = isset($map[$meta->name]) ? 'relation' : ''; @@ -2920,7 +2920,7 @@ class PMA_DisplayResults // Check whether the field needs to display with syntax highlighting - $dbLower = /*overload*/mb_strtolower($meta->db); + $dbLower = /*overload*/mb_strtolower($this->__get('db')); $tblLower = /*overload*/mb_strtolower($meta->orgtable); $nameLower = /*overload*/mb_strtolower($meta->orgname); if (! empty($this->transformation_info[$dbLower][$tblLower][$nameLower]) @@ -2990,7 +2990,7 @@ class PMA_DisplayResults ); $transform_url_params = array( - 'db' => $meta->db, + 'db' => $this->__get('db'), 'table' => $meta->orgtable, 'where_clause' => $unique_conditions[0], 'transform_key' => $meta->orgname From 111cb8235aae9ec19aaf7cdd1f29a392bde58011 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 15 Apr 2015 08:12:07 +0530 Subject: [PATCH 2/2] $meta->decimals is not available for mysql extension Signed-off-by: Madhura Jayaratne --- libraries/DisplayResults.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index c557396a56..278d277060 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -2420,7 +2420,8 @@ class PMA_DisplayResults private function _buildNullDisplay($class, $condition_field, $meta, $align = '') { // the null class is needed for grid editing - return 'decimals . '" data-type="' + $decimals = isset($meta->decimals) ? $meta->decimals : '-1'; + $result = '