Merge branch 'QA_5_1'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
commit
2a4b170a34
@ -138,6 +138,8 @@ phpMyAdmin - ChangeLog
|
||||
- issue #17198 Fix the database selection when the navigation tree is disabled
|
||||
- issue #17228 Fixed copy to clipboard with NULL values gives non usable text
|
||||
- issue #16746 Replace samyoul/u2f-php-server by code-lts/u2f-php-server
|
||||
- issue #16005 Performance improvement on the Import and Export pages
|
||||
- issue #17247 Fix triple HTML encoding
|
||||
|
||||
5.1.1 (2021-06-04)
|
||||
- issue #13325 Fixed created procedure shows up in triggers and events and vice-versa
|
||||
|
||||
@ -641,11 +641,9 @@ AJAX.registerOnload('indexes.js', function () {
|
||||
$rowsToHide = $rowsToHide.add($lastRow);
|
||||
}
|
||||
|
||||
var question = Functions.escapeHtml(
|
||||
$currRow.children('td')
|
||||
.children('.drop_primary_key_index_msg')
|
||||
.val()
|
||||
);
|
||||
var question = $currRow.children('td')
|
||||
.children('.drop_primary_key_index_msg')
|
||||
.val();
|
||||
|
||||
Functions.confirmPreviewSql(question, $anchor.attr('href'), function (url) {
|
||||
var $msg = Functions.ajaxShowMessage(Messages.strDroppingPrimaryKeyIndex, false);
|
||||
|
||||
@ -193,7 +193,7 @@ AJAX.registerOnload('table/structure.js', function () {
|
||||
/**
|
||||
* @var question String containing the question to be asked for confirmation
|
||||
*/
|
||||
var question = Functions.sprintf(Messages.strDoYouReally, 'ALTER TABLE `' + Functions.escapeHtml(currTableName) + '` DROP `' + Functions.escapeHtml(currColumnName) + '`;');
|
||||
var question = Functions.sprintf(Messages.strDoYouReally, 'ALTER TABLE `' + currTableName + '` DROP `' + currColumnName + '`;');
|
||||
var $thisAnchor = $(this);
|
||||
$thisAnchor.confirm(question, $thisAnchor.attr('href'), function (url) {
|
||||
var $msg = Functions.ajaxShowMessage(Messages.strDroppingColumn, false);
|
||||
|
||||
@ -20,7 +20,6 @@ use function __;
|
||||
use function array_key_exists;
|
||||
use function array_keys;
|
||||
use function array_values;
|
||||
use function htmlspecialchars;
|
||||
use function mb_strtoupper;
|
||||
use function md5;
|
||||
use function strtoupper;
|
||||
@ -295,17 +294,11 @@ final class RelationController extends AbstractController
|
||||
} else {
|
||||
$columnList = $table_obj->getIndexedColumns(false, false);
|
||||
}
|
||||
|
||||
$columns = [];
|
||||
foreach ($columnList as $column) {
|
||||
$columns[] = htmlspecialchars($column);
|
||||
}
|
||||
|
||||
if ($GLOBALS['cfg']['NaturalOrder']) {
|
||||
usort($columns, 'strnatcasecmp');
|
||||
usort($columnList, 'strnatcasecmp');
|
||||
}
|
||||
|
||||
$this->response->addJSON('columns', $columns);
|
||||
$this->response->addJSON('columns', $columnList);
|
||||
|
||||
// @todo should be: $server->db($db)->table($table)->primary()
|
||||
$primary = Index::getPrimary($foreignTable, $_POST['foreignDb']);
|
||||
@ -336,14 +329,14 @@ final class RelationController extends AbstractController
|
||||
continue;
|
||||
}
|
||||
|
||||
$tables[] = htmlspecialchars($row['Name']);
|
||||
$tables[] = $row['Name'];
|
||||
}
|
||||
} else {
|
||||
$query = 'SHOW TABLES FROM '
|
||||
. Util::backquote($_POST['foreignDb']);
|
||||
$tables_rs = $this->dbi->query($query, DatabaseInterface::CONNECT_USER, DatabaseInterface::QUERY_STORE);
|
||||
while ($row = $this->dbi->fetchArray($tables_rs)) {
|
||||
$tables[] = htmlspecialchars($row[0]);
|
||||
$tables[] = $row[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3154,8 +3154,8 @@ class Results
|
||||
];
|
||||
$deleteUrl = Url::getFromRoute('/sql', $urlParams);
|
||||
|
||||
$jsConf = 'DELETE FROM ' . Sanitize::jsFormat($this->properties['table'])
|
||||
. ' WHERE ' . Sanitize::jsFormat($whereClause, false)
|
||||
$jsConf = 'DELETE FROM ' . $this->properties['table']
|
||||
. ' WHERE ' . $whereClause
|
||||
. ($clauseIsUnique ? '' : ' LIMIT 1');
|
||||
|
||||
$deleteString = $this->getActionLinkContent('b_drop', __('Delete'));
|
||||
|
||||
@ -2331,6 +2331,11 @@ class ExportSql extends ExportPlugin
|
||||
$separator = ';';
|
||||
}
|
||||
|
||||
$isBinaryField = [];
|
||||
for ($j = 0; $j < $fields_cnt; $j++) {
|
||||
$isBinaryField[$j] = stripos($field_flags[$j], 'BINARY') !== false;
|
||||
}
|
||||
|
||||
while ($row = $dbi->fetchRow($result)) {
|
||||
if ($current_row == 0) {
|
||||
$head = $this->possibleCRLF()
|
||||
@ -2382,7 +2387,7 @@ class ExportSql extends ExportPlugin
|
||||
// timestamp is numeric on some MySQL 4.1, BLOBs are
|
||||
// sometimes numeric
|
||||
$values[] = $row[$j];
|
||||
} elseif ($fieldsMeta[$j]->isBinary && isset($GLOBALS['sql_hex_for_binary'])) {
|
||||
} elseif ($isBinaryField[$j] && isset($GLOBALS['sql_hex_for_binary'])) {
|
||||
// a true BLOB
|
||||
// - mysqldump only generates hex data when the --hex-blob
|
||||
// option is used, for fields having the binary attribute
|
||||
|
||||
@ -830,9 +830,6 @@ class Tracker
|
||||
$query .= ";\n";
|
||||
}
|
||||
|
||||
// Get some information about query
|
||||
$result = self::parseQuery($query);
|
||||
|
||||
// Get database name
|
||||
$dbname = trim($GLOBALS['db'] ?? '', '`');
|
||||
// $dbname can be empty, for example when coming from Synchronize
|
||||
@ -841,6 +838,9 @@ class Tracker
|
||||
return;
|
||||
}
|
||||
|
||||
// Get some information about query
|
||||
$result = self::parseQuery($query);
|
||||
|
||||
// If we found a valid statement
|
||||
if (! isset($result['identifier'])) {
|
||||
return;
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
} %}
|
||||
{% endif %}
|
||||
|
||||
<input type="hidden" class="drop_primary_key_index_msg" value="{{ index_params.sql_query|js_format(false) }}">
|
||||
<input type="hidden" class="drop_primary_key_index_msg" value="{{ index_params.sql_query }}">
|
||||
{{ link_or_button(
|
||||
url('/sql', url_params|merge(index_params)),
|
||||
get_icon('b_drop', 'Drop'|trans),
|
||||
|
||||
@ -235,7 +235,7 @@
|
||||
|
||||
<td class="tool">
|
||||
<a class="server_databases" data="
|
||||
{{- database.name|js_format }}" href="{{ url('/server/privileges', {
|
||||
{{- database.name }}" href="{{ url('/server/privileges', {
|
||||
'db': database.name,
|
||||
'checkprivsdb': database.name
|
||||
}) }}" title="
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
one_key['constraint']
|
||||
)
|
||||
} %}
|
||||
{% set js_msg = 'ALTER TABLE ' ~ db ~ '.' ~ table ~ ' DROP FOREIGN KEY ' ~ one_key['constraint'] ~ ';'|js_format %}
|
||||
{% set js_msg = 'ALTER TABLE ' ~ db ~ '.' ~ table ~ ' DROP FOREIGN KEY ' ~ one_key['constraint'] ~ ';' %}
|
||||
{% endif %}
|
||||
{% if one_key['constraint'] is defined %}
|
||||
<input type="hidden" class="drop_foreign_key_msg" value="
|
||||
|
||||
@ -501,7 +501,7 @@
|
||||
} %}
|
||||
{% endif %}
|
||||
|
||||
<input type="hidden" class="drop_primary_key_index_msg" value="{{ index_params.sql_query|js_format(false) }}">
|
||||
<input type="hidden" class="drop_primary_key_index_msg" value="{{ index_params.sql_query }}">
|
||||
{{ link_or_button(
|
||||
url('/sql', index_params|merge({'db': db, 'table': table})),
|
||||
get_icon('b_drop', 'Drop'|trans),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user