Merge remote-tracking branch 'origin/master'

This commit is contained in:
Pootle server 2011-06-21 22:40:16 +02:00
commit eeee28aff6
4 changed files with 59 additions and 43 deletions

View File

@ -42,6 +42,8 @@ phpMyAdmin - ChangeLog
- bug #3317293 [edit] Inline edit places HTML line breaks in edit area
- bug #3319466 [interface] Inline query edit does not escape special characters
- minor XSS (require a valid token)
- bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes
- bug #3323101 [parser] Invalid escape sequence in SQL parser
3.4.2.0 (2011-06-07)
- bug #3301249 [interface] Iconic table operations does not remove inline edit label

View File

@ -246,7 +246,7 @@ $(document).ready(function() {
if(data.success == true) {
// Routine created successfully
PMA_ajaxRemoveMessage($msg);
PMA_slidingMessage($('#js_query_display'), data.message);
PMA_slidingMessage(data.message);
$ajaxDialog.dialog('close');
// If we are in 'edit' mode, we must remove the reference to the old row.
if (mode == 'edit') {
@ -516,7 +516,7 @@ $(document).ready(function() {
if(data.success == true) {
// Routine executed successfully
PMA_ajaxRemoveMessage($msg);
PMA_slidingMessage($('#js_query_display'), data.message);
PMA_slidingMessage(data.message);
$ajaxDialog.dialog('close');
} else {
PMA_ajaxShowMessage(data.error);
@ -542,7 +542,7 @@ $(document).ready(function() {
$ajaxDialog.find('input[name^=params]').first().focus();
} else {
// Routine executed successfully
PMA_slidingMessage($('#js_query_display'), data.message);
PMA_slidingMessage(data.message);
}
} else {
PMA_ajaxShowMessage(data.error);

View File

@ -1300,7 +1300,7 @@ function PMA_ajaxShowMessage(message, timeout) {
* Removes the message shown for an Ajax operation when it's completed
*/
function PMA_ajaxRemoveMessage($this_msgbox) {
if ($this_msgbox != 'undefined' && $this_msgbox instanceof jQuery) {
if ($this_msgbox != undefined && $this_msgbox instanceof jQuery) {
$this_msgbox
.stop(true, true)
.fadeOut('medium');
@ -2449,55 +2449,69 @@ $(document).ready(function() {
/**
* Creates a message inside an object with a sliding effect
*
* @param msg A string containing the text to display
* @param $obj a jQuery object containing the reference
* to the element where to put the message
* @param msg A string containing the text to display
* This is optional, if no element is
* provided, one will be created below the
* navigation links at the top of the page
*
* @return bool True on success, false on failure
*/
function PMA_slidingMessage($obj, msg) {
if ($obj != 'undefined' && $obj instanceof jQuery) {
if ($obj.has('div').length > 0) {
// If there already is a message inside the
// target object, we must get rid of it
function PMA_slidingMessage(msg, $obj) {
if (msg == undefined || msg.length == 0) {
// Don't show an empty message
return false;
}
if ($obj == undefined || ! $obj instanceof jQuery) {
// If the second argument was not supplied,
// we might have to create a new DOM node.
if ($('#PMA_slidingMessage').length == 0) {
$('#topmenucontainer')
.after('<span id="PMA_slidingMessage"></span>');
}
$obj = $('#PMA_slidingMessage');
}
if ($obj.has('div').length > 0) {
// If there already is a message inside the
// target object, we must get rid of it
$obj
.find('div')
.first()
.fadeOut(function () {
$obj
.children()
.remove();
$obj
.append('<div style="display: none;">' + msg + '</div>')
.animate({
height: $obj.find('div').first().height()
})
.find('div')
.first()
.fadeOut(function () {
$(this).remove();
$obj.animate({
height: $obj.find('div').first().height()
});
.fadeIn();
});
} else {
// Object does not already have a message
// inside it, so we simply slide it down
$obj
.width('100%')
.html('<div style="display: none;">' + msg + '</div>')
.find('div')
.first()
.slideDown(function() {
// Set the height of the parent
// to the height of the child
$obj
.height(
$obj
.find('div')
.first()
.fadeIn();
});
} else {
// Object does not already have a message
// inside it, so we simply slide it down
$obj
.width('100%')
.html('<div style="display: none;">' + msg + '</div>')
.find('div')
.first()
.slideDown(function() {
// Set the height of the parent
// to the height of the child
$obj
.height(
$obj
.find('div')
.first()
.height()
);
});
}
return true;
} else {
return false;
.height()
);
});
}
return true;
} // end PMA_slidingMessage()
/**
@ -2554,7 +2568,7 @@ $(document).ready(function() {
}
// Show the query that we just executed
PMA_ajaxRemoveMessage($msg);
PMA_slidingMessage($('#js_query_display'), data.sql_query);
PMA_slidingMessage(data.sql_query);
} else {
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error);
}

View File

@ -359,7 +359,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$sql_array['raw'] = $sql;
$pos = $pos_quote_separator;
}
if (class_exists('PMA_Message')) {
if (class_exists('PMA_Message') && $GLOBALS['is_ajax_request'] != true) {
PMA_Message::notice(__('Automatically appended backtick to the end of query!'))->display();
}
} else {
@ -378,7 +378,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// Checks for MySQL escaping using a \
// And checks for ANSI escaping using the $quotetype character
if (($pos < $len) && PMA_STR_charIsEscaped($sql, $pos)) {
if (($pos < $len) && PMA_STR_charIsEscaped($sql, $pos) && $c != '`') {
$pos ++;
continue;
} elseif (($pos + 1 < $len) && ($GLOBALS['PMA_substr']($sql, $pos, 1) == $quotetype) && ($GLOBALS['PMA_substr']($sql, $pos + 1, 1) == $quotetype)) {