Skip to content

Commit

Permalink
Merge branch 'MAINT_4_0_8' into STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
lem9 committed Oct 6, 2013
2 parents aea2470 + 52b6cfd commit f3fc646
Show file tree
Hide file tree
Showing 28 changed files with 173 additions and 107 deletions.
18 changes: 18 additions & 0 deletions ChangeLog
@@ -1,6 +1,24 @@
phpMyAdmin - ChangeLog
======================

4.0.8.0 (2013-10-06)
- bug #3988 Rename view is not working
- bug #4041 Interaction between linkified fields and grid editing
- bug #3975 Table grouping isn't implemented properly
- bug #4060 Browser tries to remember wrong password when creating new user
- bug #4002 Edit Index on big table doesn't show "Loading" or any message
- bug #4098 Default table tab is ignored
- bug #4099 Server/library difference warning: setting is ignored
- bug #4100 table tree group strategy
- bug #4102 ALTER TABLE ORDER BY and InnoDB
- bug #4103 Tracking report: cannot delete a statement
- bug #3996 Drizzle navigation doesn't expand
- bug #4074 GIS column editor: point not displayed
- bug #4109 Drizzle tables in navigation are shown as views
- bug #4095 NUL symbols added to the end of database dump file
- bug #4105 More disappears in table Structure
- bug #3992 Multi-row edit doesn't clear values when checking NULL

4.0.7.0 (2013-09-23)
- bug #3993 Sorting in database overview with statistics doesn't work
- bug Handle the situation where PHP_SELF is not set
Expand Down
2 changes: 1 addition & 1 deletion README
@@ -1,7 +1,7 @@
phpMyAdmin - Readme
===================

Version 4.0.7
Version 4.0.8

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

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Expand Up @@ -49,7 +49,7 @@
# built documents.
#
# The short X.Y version.
version = '4.0.7'
version = '4.0.8'
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
1 change: 0 additions & 1 deletion export.php
Expand Up @@ -953,7 +953,6 @@ function PMA_exportOutputHandler($line)
}
exit();
} else {
PMA_Response::getInstance()->disable();
echo $dump_buffer;
}
} else {
Expand Down
5 changes: 4 additions & 1 deletion index.php
Expand Up @@ -493,7 +493,10 @@
* Drizzle can speak MySQL protocol, so don't warn about version mismatch for
* Drizzle servers.
*/
if (function_exists('PMA_DBI_get_client_info') && !PMA_DRIZZLE) {
if (function_exists('PMA_DBI_get_client_info')
&& !PMA_DRIZZLE
&& $cfg['ServerLibraryDifference_DisableWarning'] == false
) {
$_client_info = PMA_DBI_get_client_info();
if ($server > 0
&& strpos($_client_info, 'mysqlnd') === false
Expand Down
4 changes: 2 additions & 2 deletions js/ajax.js
Expand Up @@ -128,7 +128,7 @@ var AJAX = {
// leave the browser deal with it natively (e.g: file download)
// or leave an existing ajax event handler present elsewhere deal with it
var href = $(this).attr('href');
if (event.shiftKey || event.ctrlKey) {
if (typeof event != 'undefined' && (event.shiftKey || event.ctrlKey)) {
return true;
} else if ($(this).attr('target')) {
return true;
Expand All @@ -138,7 +138,7 @@ var AJAX = {
return true;
} else if (href && href.match(/^mailto/)) {
return true;
} else if ($(this).hasClass('ui-datepicker-next') ||
} else if ($(this).hasClass('ui-datepicker-next') ||
$(this).hasClass('ui-datepicker-prev')
) {
return true;
Expand Down
1 change: 1 addition & 0 deletions js/functions.js
Expand Up @@ -2795,6 +2795,7 @@ function indexEditorDialog(url, title, callback_success, callback_failure)
* @var the_form object referring to the export form
*/
var $form = $("#index_frm");
var $msgbox = PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
PMA_prepareForAjaxRequest($form);
//User wants to submit the form
$.post($form.attr('action'), $form.serialize()+"&do_save_data=1", function(data) {
Expand Down
27 changes: 11 additions & 16 deletions js/makegrid.js
Expand Up @@ -361,7 +361,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
* Send column preferences (column order and visibility) to the server.
*/
sendColPrefs: function() {
if ($(g.t).is('.ajax')) { // only send preferences if ajax class
if ($(g.t).is('.ajax')) { // only send preferences if ajax class
var post_params = {
ajax_request: true,
db: g.db,
Expand Down Expand Up @@ -716,12 +716,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
if ($td.find('a').length > 0) {
var gotoLink = document.createElement('div');
gotoLink.className = 'goto_link';
$(gotoLink).append(g.gotoLinkText + ': ')
.append($td.find('a').clone().click(
function (event) {
event.preventDefault();
window.open(this.href);
}));
$(gotoLink).append(g.gotoLinkText + ': ').append($td.find('a').clone());
$editArea.append(gotoLink);
}

Expand Down Expand Up @@ -983,13 +978,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi

// force to restore modified $input_field value after adding datepicker
// (after adding a datepicker, the input field doesn't display the time anymore, only the date)
if (is_null
|| current_datetime_value == '0000-00-00'
if (is_null
|| current_datetime_value == '0000-00-00'
|| current_datetime_value == '0000-00-00 00:00:00'
) {
$input_field.val(current_datetime_value);
} else {
$editArea.datetimepicker('setDate', current_datetime_value);
$editArea.datetimepicker('setDate', current_datetime_value);
}
$editArea.append('<div class="cell_edit_hint">' + g.cellEditHint + '</div>');

Expand Down Expand Up @@ -1212,7 +1207,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
}
if (data.success == true) {
PMA_ajaxShowMessage(data.message);

// update where_clause related data in each edited row
$('td.to_be_saved').parents('tr').each(function() {
var new_clause = $(this).data('new_clause');
Expand Down Expand Up @@ -1589,7 +1584,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi

function startGridEditing(e, cell) {
if (g.isCellEditActive) {
g.saveOrPostEditedCell();
g.saveOrPostEditedCell();
} else {
g.showEditCell(cell);
}
Expand Down Expand Up @@ -1627,7 +1622,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
$(t).find('td.data.click2')
.click(function(e) {
$cell = $(this);
// In the case of relational link, We want single click on the link
// In the case of relational link, We want single click on the link
// to goto the link and double click to start grid-editing.
var $link = $(e.target);
if ($link.is('.grid_edit.relation a')) {
Expand All @@ -1637,7 +1632,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
clicks = (clicks == null) ? 1 : clicks + 1;

if (clicks == 1) {
// if there are no previous clicks,
// if there are no previous clicks,
// start the single click timer
timer = setTimeout(function() {
// temporarily remove ajax class so the page loader will not handle it,
Expand Down Expand Up @@ -1807,13 +1802,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
g.showSortHint = true;
$(t).find("th.draggable").tooltip("option", {
content: g.updateHint()
});
});
})
.mouseleave(function(e) {
g.showSortHint = false;
$(t).find("th.draggable").tooltip("option", {
content: g.updateHint()
});
});
});

// register events for dragging-related feature
Expand Down
4 changes: 2 additions & 2 deletions js/tbl_change.js
Expand Up @@ -223,7 +223,7 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType)
AJAX.registerTeardown('tbl_change.js', function() {
$('span.open_gis_editor').die('click');
$("input[name='gis_data[save]']").die('click');
$('input.checkbox_null').unbind('click');
$('input.checkbox_null').die('click');
$('select[name="submit_type"]').unbind('change');
$("#insert_rows").die('change');
});
Expand Down Expand Up @@ -276,7 +276,7 @@ AJAX.registerOnload('tbl_change.js', function() {
* "Continue insertion" are handled in the "Continue insertion" code
*
*/
$('input.checkbox_null').bind('click', function(e) {
$('input.checkbox_null').live('click', function(e) {
nullify(
// use hidden fields populated by tbl_change.php
$(this).siblings('.nullify_code').val(),
Expand Down
2 changes: 1 addition & 1 deletion js/tbl_gis_visualization.js
Expand Up @@ -16,7 +16,7 @@ var defaultY = 0;
// Variables
var x;
var y;
var scale;
var scale = 1;

var svg;

Expand Down
6 changes: 2 additions & 4 deletions js/tbl_structure.js
Expand Up @@ -67,6 +67,7 @@ AJAX.registerOnload('tbl_structure.js', function() {
.append(data.sql_query)
.show();
$("#result_query .notice").remove();
reloadFieldForm();
$form.remove();
PMA_ajaxRemoveMessage($msg);
PMA_reloadNavigation();
Expand Down Expand Up @@ -353,7 +354,7 @@ AJAX.registerOnload('tbl_structure.js', function() {
/**
* Reload fields table
*/
function reloadFieldForm(message) {
function reloadFieldForm() {
$.post($("#fieldsForm").attr('action'), $("#fieldsForm").serialize()+"&ajax_request=true", function(form_data) {
var $temp_div = $("<div id='temp_div'><div>").append(form_data.message);
$("#fieldsForm").replaceWith($temp_div.find("#fieldsForm"));
Expand All @@ -362,9 +363,6 @@ function reloadFieldForm(message) {
$("#moveColumns").removeClass("move-active");
/* reinitialise the more options in table */
$('#fieldsForm ul.table-structure-actions').menuResizer(PMA_tbl_structure_menu_resizer_callback);
setTimeout(function() {
PMA_ajaxShowMessage(message);
}, 500);
});
$('#page_content').show();
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/Config.class.php
Expand Up @@ -102,7 +102,7 @@ function __construct($source = null)
*/
function checkSystem()
{
$this->set('PMA_VERSION', '4.0.7');
$this->set('PMA_VERSION', '4.0.8');
/**
* @deprecated
*/
Expand Down
12 changes: 6 additions & 6 deletions libraries/db_info.inc.php
Expand Up @@ -53,9 +53,9 @@

// When used in Nested table group mode,
// only show tables matching the given groupname
if (PMA_isValid($tbl_group)) {
if (PMA_isValid($_REQUEST['tbl_group'])) {
$tbl_group_sql = ' LIKE "'
. PMA_Util::escapeMysqlWildcards($tbl_group)
. PMA_Util::escapeMysqlWildcards($_REQUEST['tbl_group'])
. '%"';
} else {
$tbl_group_sql = '';
Expand Down Expand Up @@ -100,8 +100,8 @@
$sts_tmp['Type'] =& $sts_tmp['Engine'];
}

if (! empty($tbl_group)
&& ! preg_match('@' . preg_quote($tbl_group, '@') . '@i', $sts_tmp['Comment'])
if (! empty($_REQUEST['tbl_group'])
&& ! preg_match('@' . preg_quote($_REQUEST['tbl_group'], '@') . '@i', $sts_tmp['Comment'])
) {
continue;
}
Expand Down Expand Up @@ -155,10 +155,10 @@
}
}

if (! empty($tbl_group)) {
if (! empty($_REQUEST['tbl_group'])) {
// only tables for selected group
$tables = PMA_DBI_get_tables_full(
$db, $tbl_group, true, null, 0, false, $sort, $sort_order
$db, $_REQUEST['tbl_group'], true, null, 0, false, $sort, $sort_order
);
} else {
// all tables in db
Expand Down
11 changes: 10 additions & 1 deletion libraries/navigation/NavigationTree.class.php
Expand Up @@ -587,14 +587,23 @@ public function groupNode($node)
}
$groups[$key]->pos2 = $node->pos2;
$groups[$key]->pos3 = $node->pos3;
if ($node instanceof Node_Table_Container) {
$tblGroup = '&amp;tbl_group='
. urlencode($key . $node->separator);
$groups[$key]->links = array(
'text' => $node->links['text'] . $tblGroup,
'icon' => $node->links['icon'] . $tblGroup
);
}
$node->addChild($groups[$key]);
foreach ($separators as $separator) {
// FIXME: this could be more efficient
foreach ($node->children as $child) {
$name_substring = substr(
$child->name, 0, strlen($key) + strlen($separator)
);
if ($name_substring == $key . $separator
if (($name_substring == $key . $separator
|| $child->name == $key)
&& $child->type == Node::OBJECT
) {
$class = get_class($child);
Expand Down

0 comments on commit f3fc646

Please sign in to comment.