diff --git a/ChangeLog b/ChangeLog index 04f0a44baf..f44bf0b665 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,7 @@ phpMyAdmin - ChangeLog 4.7.3 (not yet released) - issue #13447 Large multi-line query removes Export operation and blanks query box options +- issue #13445 Fixed rendering of query results 4.7.2 (2017-06-29) - issue #13314 Make theme selection keep current server diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php index 4a8e71afc8..b4dee7f69f 100644 --- a/libraries/classes/Util.php +++ b/libraries/classes/Util.php @@ -1066,18 +1066,18 @@ class Util $explain_params = $url_params; if ($is_select) { $explain_params['sql_query'] = 'EXPLAIN ' . $sql_query; - $explain_link = ' [' + $explain_link = ' [ ' . self::linkOrButton( 'import.php' . Url::getCommon($explain_params), __('Explain SQL') - ) . ']'; + ) . ' ]'; } elseif (preg_match( '@^EXPLAIN[[:space:]]+SELECT[[:space:]]+@i', $sql_query )) { $explain_params['sql_query'] = mb_substr($sql_query, 8); - $explain_link = ' [' + $explain_link = ' [ ' . self::linkOrButton( 'import.php' . Url::getCommon($explain_params), __('Skip Explain SQL') @@ -1093,7 +1093,7 @@ class Util true, false, '_blank' - ) . ']'; + ) . ' ]'; } } //show explain @@ -1106,9 +1106,9 @@ class Util && empty($GLOBALS['show_as_php']) ) { $edit_link .= Url::getCommon($url_params) . '#querybox'; - $edit_link = ' [' + $edit_link = ' [ ' . self::linkOrButton($edit_link, __('Edit')) - . ']'; + . ' ]'; } else { $edit_link = ''; } @@ -1118,7 +1118,7 @@ class Util if (! empty($cfg['SQLQuery']['ShowAsPHP']) && ! $query_too_big) { if (! empty($GLOBALS['show_as_php'])) { - $php_link = ' [' + $php_link = ' [ ' . self::linkOrButton( 'import.php' . Url::getCommon($url_params), __('Without PHP code'), @@ -1128,9 +1128,9 @@ class Util '', true ) - . ']'; + . ' ]'; - $php_link .= ' [' + $php_link .= ' [ ' . self::linkOrButton( 'import.php' . Url::getCommon($url_params), __('Submit query'), @@ -1140,17 +1140,17 @@ class Util '', true ) - . ']'; + . ' ]'; } else { $php_params = $url_params; $php_params['show_as_php'] = 1; $_message = __('Create PHP code'); - $php_link = ' [' + $php_link = ' [ ' . self::linkOrButton( 'import.php' . Url::getCommon($php_params), $_message ) - . ']'; + . ' ]'; } } else { $php_link = ''; @@ -1162,7 +1162,7 @@ class Util && preg_match('@^(SELECT|SHOW)[[:space:]]+@i', $sql_query) ) { $refresh_link = 'import.php' . Url::getCommon($url_params); - $refresh_link = ' [' + $refresh_link = ' [ ' . self::linkOrButton($refresh_link, __('Refresh')) . ']'; } else { $refresh_link = ''; @@ -1824,9 +1824,9 @@ class Util } // no whitespace within an else Safari will make it part of the link - $ret = ' ' - . $message . $displayed_message . ' '; + . $message . $displayed_message . ''; } else { // no spaces (line breaks) at all // or after the hidden fields diff --git a/test/classes/DisplayResultsTest.php b/test/classes/DisplayResultsTest.php index e099cae788..29b00f4bdd 100644 --- a/test/classes/DisplayResultsTest.php +++ b/test/classes/DisplayResultsTest.php @@ -435,13 +435,13 @@ class DisplayResultsTest extends PMATestCase '`customer`.`id` = 1', '%60customer%60.%60id%60+%3D+1', '' - . ' ' + . '' . ' Edit ' + . 'alt="Edit" class="icon ic_b_edit" /> Edit' . '' ) @@ -498,13 +498,13 @@ class DisplayResultsTest extends PMATestCase '%60customer%60.%60id%60+%3D+1', 'klass', ' ' + . '"nowrap">' . ' Copy ' + . 'alt="Copy" class="icon ic_b_insrow" /> Copy' . '' ) @@ -561,7 +561,7 @@ class DisplayResultsTest extends PMATestCase . 'alt="Delete" class="icon ic_b_drop" /> Delete', 'DELETE FROM `Data`.`customer` WHERE `customer`.`id` = 1', 'klass', - ' ' + '' . 'Delete ' - . 'Delete ' + . 'Delete' . '
DELETE FROM `Data`.`customer` WHERE ' . '`customer`.`id` = 1
' ) @@ -657,24 +657,24 @@ class DisplayResultsTest extends PMATestCase . 'value="%60new%60.%60id%60+%3D+1" />  ' + . '"nowrap">' . '' . ' Edit ' + . 'alt="Edit" class="icon ic_b_edit" /> Edit' . ' ' + . '="nowrap">' . 'Copy Copy ' + . 'class="icon ic_b_insrow" /> Copy' . ' ' + . '%60+%3D+1" />' . 'Delete ' - . 'Delete ' + . 'Delete' . '
DELETE FROM `data`.`new` WHERE `new`.`id` = 1' . '
' ), @@ -724,7 +724,7 @@ class DisplayResultsTest extends PMATestCase ' Delete', 'DELETE FROM `data`.`new` WHERE `new`.`id` = 1', - ' ' + '' . 'Delete Delete' - . ' 
DELETE FROM `data`.`new` WHERE `new`.' + . '
DELETE FROM `data`.`new` WHERE `new`.' . '`id` = 1
' - . ' Copy Copy ' + . 'class="icon ic_b_insrow" /> Copy' . '' - . ' ' + . '' . 'Edit Edit ' + . '="icon ic_b_edit" /> Edit' . '