diff --git a/ChangeLog b/ChangeLog
index 319658a732..3cd0d8f326 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,10 +40,12 @@ phpMyAdmin - ChangeLog
+ [interface] Improved support for triggers
+ [interface] Improved server monitoring
+ AJAX for table Structure column Add
++ AJAX for table Operations copy table
3.4.5.0 (not yet released)
- bug #3375325 [interface] Page list in navigation frame looks odd
- bug #3313235 [interface] Error div misplaced
+- bug #3374802 [interface] Comment on a column breaks inline editing
3.4.4.0 (not yet released)
- bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes
diff --git a/Documentation.html b/Documentation.html
index 26673cbc23..393e5c710d 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -699,18 +699,16 @@ since this link provides funding for phpMyAdmin.
mysql :
- The classic MySQL extension. This is the recommended and default
- method at this time.
+ The classic MySQL extension.
mysqli :
The improved MySQL extension. This extension became available
- with php 5.0.0 and is the recommended way to connect to a server
+ with PHP 5.0.0 and is the recommended way to connect to a server
running MySQL 4.1.x or newer.
$cfg['Servers'][$i]['compress'] boolean
Whether to use a compressed protocol for the MySQL server connection
- or not (experimental).
- This feature requires PHP >= 4.3.0.
Specifies whether GD >= 2 is available. If yes it can be used for
MIME transformations.
Possible values are:
-
auto - automatically detect, this is a bit expensive
- operation for php < 4.3.0 so it is preferred to change this
- according to your server real possibilities
You just forgot to read the install.txt file from the php distribution.
+
You just forgot to read the install.txt file from the PHP distribution.
Have a look at the last message in this
bug report from the
official PHP bug database.
@@ -2815,7 +2811,7 @@ setfacl -d -m "g:www-data:rwx" tmp
connect to your MySQL server using PHP's classic
MySQL extension as well as the
improved MySQL extension (MySQLi) that
- is available in php 5.0. The latter one should be used unless you have a
+ is available in PHP 5.0. The latter one should be used unless you have a
good reason not to do so.
When compiling PHP, we strongly recommend that you manually link the MySQL
extension of your choice to a MySQL client library of at least the same
@@ -3013,11 +3009,7 @@ SetInputFilter PHP
@@ -3226,8 +3218,8 @@ the mysql_upgrade command on the server.
Try to set the $cfg['OBGZip']
directive to FALSE in the phpMyAdmin configuration file. It helps
sometime.
- Also have a look at your PHP version number: if it contains "4.0b..."
- it means you're running a beta version of PHP. That's not a so good idea,
+ Also have a look at your PHP version number: if it contains "b" or "alpha"
+ it means you're running a testing version of PHP. That's not a so good idea,
please upgrade to a plain revision.
diff --git a/js/functions.js b/js/functions.js
index bbe00b51d3..287195dcce 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -211,9 +211,10 @@ function confirmLink(theLink, theSqlQuery)
var is_confirmed = confirm(PMA_messages['strDoYouReally'] + ' :\n' + theSqlQuery);
if (is_confirmed) {
if ( $(theLink).hasClass('formLinkSubmit') ) {
- var name = 'is_js_confirmed';
- if($(theLink).attr('href').indexOf('usesubform') != -1)
- name = 'subform[' + $(theLink).attr('href').substr('#').match(/usesubform\[(\d+)\]/i)[1] + '][is_js_confirmed]';
+ var name = 'is_js_confirmed';
+ if ($(theLink).attr('href').indexOf('usesubform') != -1) {
+ name = 'subform[' + $(theLink).attr('href').substr('#').match(/usesubform\[(\d+)\]/i)[1] + '][is_js_confirmed]';
+ }
$(theLink).parents('form').append('');
} else if ( typeof(theLink.href) != 'undefined' ) {
@@ -596,7 +597,7 @@ $(document).ready(function() {
* next pages reached via AJAX); a tr may have the class noclick to remove
* this behavior.
*/
- $('tr.odd:not(.noclick), tr.even:not(.noclick)').live('click',function(e) {
+ $('table:not(.noclick) tr.odd:not(.noclick), table:not(.noclick) tr.even:not(.noclick)').live('click',function(e) {
// do not trigger when clicked on anchor
if ($(e.target).is('a, img, a *')) {
return;
@@ -848,10 +849,11 @@ function insertValueQuery() {
var chaineAj = "";
var NbSelect = 0;
for(var i=0; i 1)
+ if (NbSelect > 1) {
chaineAj += ", ";
+ }
chaineAj += myListBox.options[i].value;
}
}
@@ -1139,12 +1141,14 @@ function pdfPaperSize(format, axis) {
function popupBSMedia(url_params, bs_ref, m_type, is_cust_type, w_width, w_height)
{
// if width not specified, use default
- if (w_width == undefined)
+ if (w_width == undefined) {
w_width = 640;
+ }
// if height not specified, use default
- if (w_height == undefined)
+ if (w_height == undefined) {
w_height = 480;
+ }
// open popup window (for displaying video/playing audio)
var mediaWin = window.open('bs_play_media.php?' + url_params + '&bs_reference=' + bs_ref + '&media_type=' + m_type + '&custom_type=' + is_cust_type, 'viewBSMedia', 'width=' + w_width + ', height=' + w_height + ', resizable=1, scrollbars=1, status=0');
@@ -1161,15 +1165,17 @@ function popupBSMedia(url_params, bs_ref, m_type, is_cust_type, w_width, w_heigh
function requestMIMETypeChange(db, table, reference, current_mime_type)
{
// no mime type specified, set to default (nothing)
- if (undefined == current_mime_type)
+ if (undefined == current_mime_type) {
current_mime_type = "";
+ }
// prompt user for new mime type
var new_mime_type = prompt("Enter custom MIME type", current_mime_type);
// if new mime_type is specified and is not the same as the previous type, request for mime type change
- if (new_mime_type && new_mime_type != current_mime_type)
+ if (new_mime_type && new_mime_type != current_mime_type) {
changeMIMEType(db, table, reference, new_mime_type);
+ }
}
/**
@@ -1470,8 +1476,11 @@ function PMA_createChart(passedSettings) {
return;
}
- if(lastValue==null) diff = curValue.x - thisChart.xAxis[0].getExtremes().max;
- else diff = parseInt(curValue.x - lastValue.x);
+ if (lastValue==null) {
+ diff = curValue.x - thisChart.xAxis[0].getExtremes().max;
+ } else {
+ diff = parseInt(curValue.x - lastValue.x);
+ }
thisChart.xAxis[0].setExtremes(
thisChart.xAxis[0].getExtremes().min+diff,
@@ -1485,7 +1494,9 @@ function PMA_createChart(passedSettings) {
numLoadedPoints++;
// Timeout has been cleared => don't start a new timeout
- if(chart_activeTimeouts[container] == null) return;
+ if (chart_activeTimeouts[container] == null) {
+ return;
+ }
chart_activeTimeouts[container] = setTimeout(
thisChart.options.realtime.timeoutCallBack,
@@ -1537,11 +1548,13 @@ function PMA_createChart(passedSettings) {
/* Set/Get realtime chart default values */
if(passedSettings.realtime) {
- if(!passedSettings.realtime.refreshRate)
+ if(!passedSettings.realtime.refreshRate) {
passedSettings.realtime.refreshRate = 5000;
+ }
- if(!passedSettings.realtime.numMaxPoints)
+ if(!passedSettings.realtime.numMaxPoints) {
passedSettings.realtime.numMaxPoints = 30;
+ }
// Allow custom POST vars to be added
passedSettings.realtime.postData = $.extend(false,{ ajax_request: true, chart_data: 1, type: passedSettings.realtime.type },passedSettings.realtime.postData);
@@ -1597,10 +1610,15 @@ function PMA_createProfilingChart(data, options) {
// Formats a profiling duration nicely. Used in PMA_createProfilingChart() and server_status.js
function PMA_prettyProfilingNum(num, acc) {
- if(!acc) acc = 1;
+ if (!acc) {
+ acc = 1;
+ }
acc = Math.pow(10,acc);
- if(num*1000 < 0.1) num = Math.round(acc*(num*1000*1000))/acc + 'µ'
- else if(num < 0.1) num = Math.round(acc*(num*1000))/acc + 'm'
+ if (num*1000 < 0.1) {
+ num = Math.round(acc*(num*1000*1000))/acc + 'µ'
+ } else if (num < 0.1) {
+ num = Math.round(acc*(num*1000))/acc + 'm'
+ }
return num + 's';
}
@@ -1954,6 +1972,9 @@ $(document).ready(function() {
if ($("#sqlqueryresults").length != 0) {
$("#sqlqueryresults").remove();
}
+ if ($("#result_query").length != 0) {
+ $("#result_query").remove();
+ }
if (data.success == true) {
PMA_ajaxShowMessage(data.message);
$("").insertAfter("#topmenucontainer");
@@ -1961,10 +1982,57 @@ $(document).ready(function() {
$("#result_query .notice").remove();
$("#result_query").prepend((data.message));
} else {
- PMA_ajaxShowMessage(data.error);
+ $temp_div = $("")
+ $temp_div.html(data.error);
+ $error = $temp_div.find("code").addClass("error");
+ PMA_ajaxShowMessage($error);
}
}) // end $.post()
});//end of alterTableOrderby ajax submit
+
+ /**
+ *Ajax action for submitting the "Copy table"
+ **/
+ $("#copyTable.ajax input[name='submit_copy']").live('click', function(event) {
+ event.preventDefault();
+ $form = $("#copyTable");
+ if($form.find("input[name='switch_to_new']").attr('checked')) {
+ $form.append('');
+ $form.removeClass('ajax');
+ $form.find("#ajax_request_hidden").remove();
+ $form.submit();
+ } else {
+ PMA_prepareForAjaxRequest($form);
+ /*variables which stores the common attributes*/
+ $.post($form.attr('action'), $form.serialize()+"&submit_copy=Go", function(data) {
+ if ($("#sqlqueryresults").length != 0) {
+ $("#sqlqueryresults").remove();
+ }
+ if ($("#result_query").length != 0) {
+ $("#result_query").remove();
+ }
+ if (data.success == true) {
+ PMA_ajaxShowMessage(data.message);
+ $("").insertAfter("#topmenucontainer");
+ $("#sqlqueryresults").html(data.sql_query);
+ $("#result_query .notice").remove();
+ $("#result_query").prepend((data.message));
+ $("#copyTable").find("select[name='target_db'] option[value="+data.db+"]").attr('selected', 'selected');
+
+ //Refresh navigation frame when the table is coppied
+ if (window.parent && window.parent.frame_navigation) {
+ window.parent.frame_navigation.location.reload();
+ }
+ } else {
+ $temp_div = $("")
+ $temp_div.html(data.error);
+ $error = $temp_div.find("code").addClass("error");
+ PMA_ajaxShowMessage($error);
+ }
+ }) // end $.post()
+ }
+ });//end of copyTable ajax submit
+
}, 'top.frame_content'); //end $(document).ready for 'Table operations'
diff --git a/js/server_synchronize.js b/js/server_synchronize.js
index 1dfd3d2387..2cc03652fe 100644
--- a/js/server_synchronize.js
+++ b/js/server_synchronize.js
@@ -33,17 +33,17 @@ function showDetails(i, update_size, insert_size, remove_size, insert_index, rem
// The image source is changed when the showDetails function is called.
if ($img.hasClass('selected')) {
if ($img.hasClass('struct_img')) {
- $img.attr('src', pmaThemeImage + 'new_struct_selected.jpg');
+ $img.attr('src', pmaThemeImage + 'new_struct_selected.png');
}
if ($img.hasClass('data_img')) {
- $img.attr('src', pmaThemeImage + 'new_data_selected.jpg');
+ $img.attr('src', pmaThemeImage + 'new_data_selected.png');
}
} else {
if ($img.hasClass('struct_img')) {
- $img.attr('src', pmaThemeImage + 'new_struct.jpg');
+ $img.attr('src', pmaThemeImage + 'new_struct.png');
}
if ($img.hasClass('data_img')) {
- $img.attr('src', pmaThemeImage + 'new_data.jpg');
+ $img.attr('src', pmaThemeImage + 'new_data.png');
}
}
@@ -347,9 +347,9 @@ $(document).ready(function() {
var $img = $(this);
$img.addClass('hover');
if ($img.hasClass('selected')) {
- $img.attr('src', pmaThemeImage + 'new_struct_selected_hovered.jpg');
+ $img.attr('src', pmaThemeImage + 'new_struct_selected_hovered.png');
} else {
- $img.attr('src', pmaThemeImage + 'new_struct_hovered.jpg');
+ $img.attr('src', pmaThemeImage + 'new_struct_hovered.png');
}
},
function() {
@@ -357,9 +357,9 @@ $(document).ready(function() {
var $img = $(this);
$img.removeClass('hover');
if ($img.hasClass('selected')) {
- $img.attr('src', pmaThemeImage + 'new_struct_selected.jpg');
+ $img.attr('src', pmaThemeImage + 'new_struct_selected.png');
} else {
- $img.attr('src', pmaThemeImage + 'new_struct.jpg');
+ $img.attr('src', pmaThemeImage + 'new_struct.png');
}
}
);
@@ -370,9 +370,9 @@ $(document).ready(function() {
var $img = $(this);
$img.addClass('hover');
if ($img.hasClass('selected')) {
- $img.attr('src', pmaThemeImage + 'new_data_selected_hovered.jpg');
+ $img.attr('src', pmaThemeImage + 'new_data_selected_hovered.png');
} else {
- $img.attr('src', pmaThemeImage + 'new_data_hovered.jpg');
+ $img.attr('src', pmaThemeImage + 'new_data_hovered.png');
}
},
function() {
@@ -380,9 +380,9 @@ $(document).ready(function() {
var $img = $(this);
$img.removeClass('hover');
if ($img.hasClass('selected')) {
- $img.attr('src', pmaThemeImage + 'new_data_selected.jpg');
+ $img.attr('src', pmaThemeImage + 'new_data_selected.png');
} else {
- $img.attr('src', pmaThemeImage + 'new_data.jpg');
+ $img.attr('src', pmaThemeImage + 'new_data.png');
}
}
);
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index 61f5aa6936..d812262c0b 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -1182,7 +1182,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
// in the tools div, only display the Inline link when not in ajax
// mode because 1) it currently does not work and 2) we would
// have two similar mechanisms on the page for the same goal
- if ($is_select || $GLOBALS['is_ajax_request'] === false) {
+ if ($is_select || $GLOBALS['is_ajax_request'] === false && ! $query_too_big) {
// see in js/functions.js the jQuery code attached to id inline_edit
// document.write conflicts with jQuery, hence used $().append()
echo "