Skip to content

Commit

Permalink
UPDATE 4.4.15
Browse files Browse the repository at this point in the history
  • Loading branch information
cfoellmann committed Sep 21, 2015
1 parent 456a7d9 commit 05e6990
Show file tree
Hide file tree
Showing 86 changed files with 2,455 additions and 1,719 deletions.
28 changes: 28 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
phpMyAdmin - ChangeLog
======================

4.4.15.0 (2015-09-20)
- issue #11411 Undefined "replace" function on numeric scalar
- issue #11421 Stored-proc / routine - broken parameter parsing
- issue Missing name for configuration read_as_multibytes
- issue #11431 Incorrect "No row selected" message
- issue #11447 MySQL 5.5 and the language system variable
- issue #11452 Semantics of export and import icons are mixed up
- issue #11451 Designer-Bug in move.js on multiple server configuration
- issue #11458 Invalid UTF-8 sequence in argument
- issue #11457 Request URI too large
- issue Invalid argument supplied for foreach()
- issue #11461 Foreign key constraints for InnoDB tables with upper-case letters disabled
- issue #11487 Warning when entering Query page

4.4.14.1 (2015-09-08)
- issue [security] reCaptcha bypass

4.4.14.0 (2015-08-20)
- issue #11367 Export after search, missing WHERE clause
- issue #11380 Incomplete message after import
- issue Incorrect scalar type declaration (reported under PHP 7)
- issue #11389 ReCaptcha produces deprecated messages under PHP 7
- issue #11387 phpseclib < 2.0 produces deprecated messages on PHP 7
- issue #11404 "Switch to copied table" doesn't work
- issue #11406 Missing quotes after calling "distinct values"
- issue #11386 Cannot import database with long data in one column
- issue #11410 SPATIAL index option is not clickable

4.4.13.1 (2015-08-08)
- issue #11368 SQL error when importing phpMyAdmin dump file

Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
phpMyAdmin - Readme
===================

Version 4.4.13.1
Version 4.4.15

A set of PHP-scripts to manage MySQL over the web.

Expand Down
2 changes: 1 addition & 1 deletion import.php
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@
if ($import_notice) {
$message->addString($import_notice);
}
if (isset($local_import_file)) {
if (! empty($local_import_file)) {
$message->addString('(' . htmlspecialchars($local_import_file) . ')');
} else {
$message->addString(
Expand Down
1 change: 1 addition & 0 deletions js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ function PMA_tooltip($elements, item, myContent, additionalOptions)
function escapeHtml(unsafe) {
if (typeof(unsafe) != 'undefined') {
return unsafe
.toString()
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
Expand Down
24 changes: 12 additions & 12 deletions js/line_counts.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,7 @@
$LINE_COUNT["codemirror/mode/sql/sql.js"] = 391;
$LINE_COUNT["codemirror/mode/xml/xml.js"] = 384;
$LINE_COUNT["cross_framing_protection.js"] = 10;
$LINE_COUNT["db_operations.js"] = 157;
$LINE_COUNT["db_search.js"] = 239;
$LINE_COUNT["db_tracking.js"] = 84;
$LINE_COUNT["doclinks.js"] = 365;
$LINE_COUNT["gis_data_editor.js"] = 396;
$LINE_COUNT["import.js"] = 167;
$LINE_COUNT["jqplot/excanvas.js"] = 1438;
$LINE_COUNT["jqplot/jquery.jqplot.js"] = 11411;
$LINE_COUNT["jqplot/plugins/jqplot.barRenderer.js"] = 800;
Expand Down Expand Up @@ -473,13 +468,9 @@
$LINE_COUNT["pmd/history.js"] = 813;
$LINE_COUNT["pmd/iecanvas.js"] = 147;
$LINE_COUNT["pmd/init.js"] = 40;
$LINE_COUNT["pmd/move.js"] = 2003;
$LINE_COUNT["server_status_advisor.js"] = 93;
$LINE_COUNT["server_status_processes.js"] = 189;
$LINE_COUNT["pmd/move.js"] = 2004;
$LINE_COUNT["server_status_queries.js"] = 34;
$LINE_COUNT["server_status_variables.js"] = 103;
$LINE_COUNT["server_user_groups.js"] = 42;
$LINE_COUNT["server_variables.js"] = 147;
$LINE_COUNT["sprintf.js"] = 211;
$LINE_COUNT["tbl_find_replace.js"] = 47;
$LINE_COUNT["tracekit/tracekit.js"] = 1114;
Expand All @@ -494,11 +485,16 @@
$LINE_COUNT["config.js"] = 798;
$LINE_COUNT["console.js"] = 1033;
$LINE_COUNT["db_central_columns.js"] = 201;
$LINE_COUNT["db_operations.js"] = 157;
$LINE_COUNT["db_qbe.js"] = 64;
$LINE_COUNT["db_search.js"] = 239;
$LINE_COUNT["db_structure.js"] = 391;
$LINE_COUNT["db_tracking.js"] = 84;
$LINE_COUNT["error_report.js"] = 340;
$LINE_COUNT["export.js"] = 401;
$LINE_COUNT["functions.js"] = 4571;
$LINE_COUNT["functions.js"] = 4572;
$LINE_COUNT["gis_data_editor.js"] = 396;
$LINE_COUNT["import.js"] = 167;
$LINE_COUNT["indexes.js"] = 697;
$LINE_COUNT["makegrid.js"] = 1962;
$LINE_COUNT["menu-resizer.js"] = 182;
Expand All @@ -509,13 +505,17 @@
$LINE_COUNT["server_databases.js"] = 137;
$LINE_COUNT["server_plugins.js"] = 30;
$LINE_COUNT["server_privileges.js"] = 451;
$LINE_COUNT["server_status_advisor.js"] = 93;
$LINE_COUNT["server_status_monitor.js"] = 2172;
$LINE_COUNT["server_status_processes.js"] = 189;
$LINE_COUNT["server_status_sorter.js"] = 89;
$LINE_COUNT["server_status_variables.js"] = 103;
$LINE_COUNT["server_variables.js"] = 147;
$LINE_COUNT["sql.js"] = 843;
$LINE_COUNT["tbl_change.js"] = 754;
$LINE_COUNT["tbl_chart.js"] = 429;
$LINE_COUNT["tbl_gis_visualization.js"] = 353;
$LINE_COUNT["tbl_operations.js"] = 240;
$LINE_COUNT["tbl_operations.js"] = 243;
$LINE_COUNT["tbl_relation.js"] = 234;
$LINE_COUNT["tbl_select.js"] = 395;
$LINE_COUNT["tbl_structure.js"] = 397;
Expand Down
11 changes: 6 additions & 5 deletions js/pmd/move.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ function Save3(callback)
};

var $form = $('<form action="db_designer.php" method="post" name="save_page" id="save_page" class="ajax"></form>')
.append('<input type="hidden" name="server" value="' + server + '" />')
.append('<input type="hidden" name="db" value="' + db + '" />')
.append('<input type="hidden" name="token" value="' + token + '" />')
.append('<input type="hidden" name="operation" value="savePage" />')
Expand Down Expand Up @@ -718,7 +719,7 @@ function Edit_pages()
};

var $msgbox = PMA_ajaxShowMessage();
var params = 'ajax_request=true&dialog=edit&token=' + token + '&db=' + db;
var params = 'ajax_request=true&dialog=edit&server=' + server + '&token=' + token + '&db=' + db;
$.get("db_designer.php", params, function (data) {
if (data.success === false) {
PMA_ajaxShowMessage(data.error, false);
Expand Down Expand Up @@ -798,7 +799,7 @@ function Delete_pages()
};

var $msgbox = PMA_ajaxShowMessage();
var params = 'ajax_request=true&dialog=delete&token=' + token + '&db=' + db;
var params = 'ajax_request=true&dialog=delete&server=' + server + '&token=' + token + '&db=' + db;
$.get("db_designer.php", params, function (data) {
if (data.success === false) {
PMA_ajaxShowMessage(data.error, false);
Expand Down Expand Up @@ -897,7 +898,7 @@ function Save_as()
};

var $msgbox = PMA_ajaxShowMessage();
var params = 'ajax_request=true&dialog=save_as&token=' + token + '&db=' + db;
var params = 'ajax_request=true&dialog=save_as&server=' + server + '&token=' + token + '&db=' + db;
$.get("db_designer.php", params, function (data) {
if (data.success === false) {
PMA_ajaxShowMessage(data.error, false);
Expand Down Expand Up @@ -974,7 +975,7 @@ function Export_pages()
$(this).dialog('close');
};
var $msgbox = PMA_ajaxShowMessage();
var params = 'ajax_request=true&dialog=export&token=' + token + '&db=' + db + '&selected_page=' + selected_page;
var params = 'ajax_request=true&dialog=export&server=' + server + '&token=' + token + '&db=' + db + '&selected_page=' + selected_page;
$.get("db_designer.php", params, function (data) {
if (data.success === false) {
PMA_ajaxShowMessage(data.error, false);
Expand Down Expand Up @@ -1015,7 +1016,7 @@ function Load_page(page) {
if (page !== null) {
param_page = '&page=' + page;
}
$('<a href="db_designer.php?db=' + db + '&token=' + token + param_page + '"></a>')
$('<a href="db_designer.php?server=' + server + '&db=' + db + '&token=' + token + param_page + '"></a>')
.appendTo($('#page_content'))
.click();
} else {
Expand Down
5 changes: 4 additions & 1 deletion js/tbl_operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ AJAX.registerOnload('tbl_operations.js', function () {
$.post($form.attr('action'), $form.serialize() + "&submit_copy=Go", function (data) {
if (typeof data !== 'undefined' && data.success === true) {
if ($form.find("input[name='switch_to_new']").prop('checked')) {
PMA_commonParams.set('db', data.db);
PMA_commonParams.set(
'db',
$form.find("select[name='target_db']").val()
);
PMA_commonParams.set(
'table',
$form.find("input[name='new_name']").val()
Expand Down
2 changes: 1 addition & 1 deletion libraries/Config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function __construct($source = null)
*/
function checkSystem()
{
$this->set('PMA_VERSION', '4.4.13.1');
$this->set('PMA_VERSION', '4.4.15');
/**
* @deprecated
*/
Expand Down
66 changes: 34 additions & 32 deletions libraries/DatabaseInterface.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,42 +228,43 @@ public function tryMultiQuery($multi_query = '', $link = null)
public function convertMessage($message)
{
// latin always last!
// @todo some values are missing,
// see https://mariadb.com/kb/en/mariadb/server-locale/

$encodings = array(
'japanese' => 'EUC-JP', //'ujis',
'japanese-sjis' => 'Shift-JIS', //'sjis',
'korean' => 'EUC-KR', //'euckr',
'russian' => 'KOI8-R', //'koi8r',
'ukrainian' => 'KOI8-U', //'koi8u',
'greek' => 'ISO-8859-7', //'greek',
'serbian' => 'CP1250', //'cp1250',
'estonian' => 'ISO-8859-13', //'latin7',
'slovak' => 'ISO-8859-2', //'latin2',
'czech' => 'ISO-8859-2', //'latin2',
'hungarian' => 'ISO-8859-2', //'latin2',
'polish' => 'ISO-8859-2', //'latin2',
'romanian' => 'ISO-8859-2', //'latin2',
'spanish' => 'CP1252', //'latin1',
'swedish' => 'CP1252', //'latin1',
'italian' => 'CP1252', //'latin1',
'norwegian-ny' => 'CP1252', //'latin1',
'norwegian' => 'CP1252', //'latin1',
'portuguese' => 'CP1252', //'latin1',
'danish' => 'CP1252', //'latin1',
'dutch' => 'CP1252', //'latin1',
'english' => 'CP1252', //'latin1',
'french' => 'CP1252', //'latin1',
'german' => 'CP1252', //'latin1',
'ja' => 'EUC-JP', //'ujis',
'ko' => 'EUC-KR', //'euckr',
'ru' => 'KOI8-R', //'koi8r',
'uk' => 'KOI8-U', //'koi8u',
'sr' => 'CP1250', //'cp1250',
'et' => 'ISO-8859-13', //'latin7',
'sk' => 'ISO-8859-2', //'latin2',
'cz' => 'ISO-8859-2', //'latin2',
'hu' => 'ISO-8859-2', //'latin2',
'pl' => 'ISO-8859-2', //'latin2',
'ro' => 'ISO-8859-2', //'latin2',
'es' => 'CP1252', //'latin1',
'sv' => 'CP1252', //'latin1',
'it' => 'CP1252', //'latin1',
'no' => 'CP1252', //'latin1',
'pt' => 'CP1252', //'latin1',
'da' => 'CP1252', //'latin1',
'nl' => 'CP1252', //'latin1',
'en' => 'CP1252', //'latin1',
'fr' => 'CP1252', //'latin1',
'de' => 'CP1252', //'latin1',
);

$server_language = $this->fetchValue(
'SHOW VARIABLES LIKE \'language\';',
'SELECT @@lc_messages;',
0,
1
0
);

if ($server_language) {
$found = array();
$match = preg_match(
'&(?:\\\|\\/)([^\\\\\/]*)(?:\\\|\\/)$&i',
'&([a-z][a-z])_&i',
$server_language,
$found
);
Expand Down Expand Up @@ -321,7 +322,8 @@ private function _getTableCondition($table, $tbl_is_group, $table_type)
)
. '%\'';
} else {
$sql_where_table = 'AND t.`TABLE_NAME` = \''
$sql_where_table = 'AND t.`TABLE_NAME` '
. PMA_Util::getCollateForIS() . ' = \''
. PMA_Util::sqlAddSlashes($table) . '\'';
}
} else {
Expand Down Expand Up @@ -423,7 +425,7 @@ private function _getSqlForTablesFull($this_databases, $sql_where_table)
`CREATE_OPTIONS` AS `Create_options`,
`TABLE_COMMENT` AS `Comment`
FROM `information_schema`.`TABLES` t
WHERE ' . (PMA_IS_WINDOWS ? '' : 'BINARY') . ' `TABLE_SCHEMA`
WHERE `TABLE_SCHEMA` ' . PMA_Util::getCollateForIS() . '
IN (\'' . implode("', '", $this_databases) . '\')
' . $sql_where_table;
}
Expand Down Expand Up @@ -1410,16 +1412,16 @@ public function getColumnsSql($database, $table, $column = null, $full = false)
* @param boolean $full whether to return full info or only column names
* @param mixed $link mysql link resource
*
* @return false|array array indexed by column names or,
* if $column is given, flat array description
* @return array array indexed by column names or,
* if $column is given, flat array description
*/
public function getColumns($database, $table, $column = null, $full = false,
$link = null
) {
$sql = $this->getColumnsSql($database, $table, $column, $full);
$fields = $this->fetchResult($sql, 'Field', null, $link);
if (! is_array($fields) || count($fields) == 0) {
return null;
return array();
}
// Check if column is a part of multiple-column index and set its 'Key'.
$indexes = PMA_Index::getFromTable($table, $database);
Expand Down
4 changes: 3 additions & 1 deletion libraries/DisplayResults.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3025,7 +3025,9 @@ private function _getRowValues(

$vertical_display = $this->__get('vertical_display');

if ($meta->numeric == 1) {
// in some situations (issue 11406), numeric returns 1
// even for a string type
if ($meta->numeric == 1 && $meta->type != 'string') {
// n u m e r i c

$vertical_display['data'][$row_no][$i]
Expand Down
15 changes: 10 additions & 5 deletions libraries/Scripts.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,17 @@ private function _includeFiles($files)
}
}
$separator = PMA_URL_getArgSeparator();
$url = 'js/get_scripts.js.php?' . implode($separator, $scripts);
$static_scripts = '';
// Using chunks of 20 files to avoid too long URLs
$script_chunks = array_chunk($scripts, 20);
foreach ($script_chunks as $script_chunk) {
$url = 'js/get_scripts.js.php?' . implode($separator, $script_chunk);

$static_scripts = sprintf(
'<script data-cfasync="false" type="text/javascript" src="%s"></script>',
htmlspecialchars($url)
);
$static_scripts .= sprintf(
'<script data-cfasync="false" type="text/javascript" src="%s"></script>',
htmlspecialchars($url)
);
}
return $first_dynamic_scripts . $static_scripts . $dynamic_scripts;
}

Expand Down
6 changes: 4 additions & 2 deletions libraries/Util.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4234,7 +4234,7 @@ public static function handleContext(array $context)
*
* @return resource curl_handle with updated options
*/
public static function configureCurl(resource $curl_handle)
public static function configureCurl($curl_handle)
{
if (/*overload*/mb_strlen($GLOBALS['cfg']['ProxyUrl'])) {
curl_setopt($curl_handle, CURLOPT_PROXY, $GLOBALS['cfg']['ProxyUrl']);
Expand Down Expand Up @@ -4517,7 +4517,9 @@ public static function getCollateForIS()
"SHOW VARIABLES LIKE 'lower_case_table_names'", 0, 1
);

if ($lowerCaseTableNames === '0') {
if ($lowerCaseTableNames === '0' // issue #10961
|| $lowerCaseTableNames === '2' // issue #11461
) {
return "COLLATE utf8_bin";
}
return "";
Expand Down
1 change: 1 addition & 0 deletions libraries/config/messages.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@
$strConfigImport_sql_compatibility_name = __('SQL compatibility mode');
$strConfigImport_sql_no_auto_value_on_zero_name
= __('Do not use AUTO_INCREMENT for zero values');
$strConfigImport_sql_read_as_multibytes_name = __('Read as multibytes');
$strConfigImport_xls_col_names_name = __('Column names in first row');
$strConfigImport_xlsx_col_names_name = __('Column names in first row');
$strConfigInitialSlidersState_name = __('Initial state for sliders');
Expand Down
Loading

0 comments on commit 05e6990

Please sign in to comment.