The branch, master has been updated
via ad9ba4e6113bfb59c1700081695f52fc3db7cda0 (commit)
via 6762ae67d9080ddd622f7270d062b8d5a82ad8bd (commit)
from 4547ca37f4c9f5e71a59849272665c4d0180fb1b (commit)
- Log -----------------------------------------------------------------
commit ad9ba4e6113bfb59c1700081695f52fc3db7cda0
Author: Rouslan Placella <rouslan(a)placella.com>
Date: Sun Oct 30 18:43:33 2011 +0000
Coding style fixes for db_search.js
commit 6762ae67d9080ddd622f7270d062b8d5a82ad8bd
Author: Rouslan Placella <rouslan(a)placella.com>
Date: Sun Oct 30 18:28:47 2011 +0000
Made ajax messages in database search not dismissable
-----------------------------------------------------------------------
Summary of changes:
js/db_search.js | 97 +++++++++++++++++++++++++++++++++----------------------
1 files changed, 58 insertions(+), 39 deletions(-)
diff --git a/js/db_search.js b/js/db_search.js
index 4b9ef61..d6a42ff 100644
--- a/js/db_search.js
+++ b/js/db_search.js
@@ -1,10 +1,11 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
- * @fileoverview JavaScript functions used on Database Search page
- * @name Database Search
+ * JavaScript functions used on Database Search page
*
* @requires jQuery
* @requires js/functions.js
+ *
+ * @package PhpMyAdmin
*/
/**
@@ -14,36 +15,50 @@
* Retrieve result of SQL query
*/
-/** Loads the database search results */
-function loadResult(result_path , table_name , link , ajaxEnable)
+/**
+ * Loads the database search results
+ *
+ * @param result_path Url of the page to load
+ * @param table_name Name of table to browse
+ * @param ajaxEnable Whether to use ajax or not
+ *
+ * @return nothing
+ */
+function loadResult(result_path, table_name, link, ajaxEnable)
{
$(document).ready(function() {
- if(ajaxEnable)
- {
+ if(ajaxEnable) {
/** Hides the results shown by the delete criteria */
- PMA_ajaxShowMessage(PMA_messages['strBrowsing']);
+ var $msg = PMA_ajaxShowMessage();
$('#sqlqueryform').hide();
$('#togglequerybox').hide();
/** Load the browse results to the page */
$("#table-info").show();
$('#table-link').attr({"href" : 'sql.php?'+link }).text(table_name);
- $('#browse-results').load(result_path + " '"+'#sqlqueryresults' + "'", null, function() {
+ var url = result_path + " #sqlqueryresults";
+ $('#browse-results').load(url, null, function() {
+ PMA_ajaxRemoveMessage($msg);
// because under db_search, window.parent.table is not defined yet,
// we assign it manually from #table-link
window.parent.table = $('#table-link').text().trim();
-
$('#table_results').makegrid();
}).show();
- }
- else
- {
+ } else {
event.preventDefault();
}
});
}
-/** Delete the selected search results */
-function deleteResult(result_path , msg , ajaxEnable)
+/**
+ * Delete the selected search results
+ *
+ * @param result_path Url of the page to load
+ * @param msg Text for the confirmation dialog
+ * @param ajaxEnable Whether to use ajax or not
+ *
+ * @return nothing
+ */
+function deleteResult(result_path, msg, ajaxEnable)
{
$(document).ready(function() {
/** Hides the results shown by the browse criteria */
@@ -52,14 +67,13 @@ function deleteResult(result_path , msg , ajaxEnable)
$('#sqlqueryform').hide();
$('#togglequerybox').hide();
/** Conformation message for deletion */
- if(confirm(msg))
- {
- if(ajaxEnable)
- {
- var $msg = PMA_ajaxShowMessage(PMA_messages['strDeleting']);
+ if(confirm(msg)) {
+ if(ajaxEnable) {
+ var $msg = PMA_ajaxShowMessage(PMA_messages['strDeleting'], false);
/** Load the deleted option to the page*/
$('#sqlqueryform').html('');
- $('#browse-results').load(result_path + " #result_query, #sqlqueryform", function () {
+ var url = result_path + " #result_query, #sqlqueryform";
+ $('#browse-results').load(url, function () {
/** Refresh the search results after the deletion */
document.getElementById('buttonGo').click();
$('#togglequerybox').html(PMA_messages['strHideQueryBox']);
@@ -69,9 +83,7 @@ function deleteResult(result_path , msg , ajaxEnable)
$('#sqlqueryform').show();
$('#togglequerybox').show();
});
- }
- else
- {
+ } else {
event.preventDefault();
}
}
@@ -79,17 +91,17 @@ function deleteResult(result_path , msg , ajaxEnable)
}
$(document).ready(function() {
-
/**
- * Set a parameter for all Ajax queries made on this page. Don't let the
- * web server serve cached pagesshow
+ * Set a parameter for all Ajax queries made on this page.
+ * Don't let the web server serve cached pages
*/
$.ajaxSetup({
cache: 'false'
});
/** Hide the table link in the initial search result */
- $("#table-info").prepend(PMA_getImage('s_tbl.png', '', {'id': 'table-image'}).toString()).hide();
+ var icon = PMA_getImage('s_tbl.png', '', {'id': 'table-image'}).toString();
+ $("#table-info").prepend(icon).hide();
/** Hide the browse and deleted results in the new search criteria */
$('#buttonGo').click(function(){
@@ -99,7 +111,7 @@ $(document).ready(function() {
$('#togglequerybox').hide();
});
/**
- *Prepare a div containing a link for toggle the search results
+ * Prepare a div containing a link for toggle the search results
*/
$('<div id="togglesearchresultsdiv"><a id="togglesearchresultlink"></a></div>')
.insertAfter('#searchresults')
@@ -107,8 +119,10 @@ $(document).ready(function() {
.hide();
$('<br class="clearfloat" />').insertAfter("#togglesearchresultsdiv").show();
- /** Changing the displayed text according to the hide/show criteria in search result forms*/
-
+ /**
+ * Changing the displayed text according to
+ * the hide/show criteria in search result forms
+ */
$('#togglesearchresultlink')
.html(PMA_messages['strHideSearchResults'])
.bind('click', function() {
@@ -124,15 +138,17 @@ $(document).ready(function() {
});
/**
- * Prepare a div containing a link for toggle the search form, otherwise it's incorrectly displayed
- * after a couple of clicks
+ * Prepare a div containing a link for toggle the search form,
+ * otherwise it's incorrectly displayed after a couple of clicks
*/
$('<div id="togglesearchformdiv"><a id="togglesearchformlink"></a></div>')
.insertAfter('#db_search_form')
- /** don't show it until we have results on-screen */
- .hide();
+ .hide(); // don't show it until we have results on-screen
- /** Changing the displayed text according to the hide/show criteria in search form*/
+ /**
+ * Changing the displayed text according to
+ * the hide/show criteria in search form
+ */
$("#togglequerybox").hide();
$("#togglequerybox").bind('click', function() {
var $link = $(this);
@@ -148,7 +164,10 @@ $(document).ready(function() {
/** don't show it until we have results on-screen */
- /** Changing the displayed text according to the hide/show criteria in search criteria form*/
+ /**
+ * Changing the displayed text according to
+ * the hide/show criteria in search criteria form
+ */
$('#togglesearchformlink')
.html(PMA_messages['strShowSearchCriteria'])
.bind('click', function() {
@@ -166,19 +185,19 @@ $(document).ready(function() {
* Ajax Event handler for retrieving the result of an SQL Query
* (see $GLOBALS['cfg']['AjaxEnable'])
*
- * @uses PMA_ajaxShowMessage()
* @see $GLOBALS['cfg']['AjaxEnable']
*/
$("#db_search_form.ajax").live('submit', function(event) {
event.preventDefault();
- var $msgbox = PMA_ajaxShowMessage(PMA_messages['strSearching']);
+ var $msgbox = PMA_ajaxShowMessage(PMA_messages['strSearching'], false);
// jQuery object to reuse
$form = $(this);
PMA_prepareForAjaxRequest($form);
- $.post($form.attr('action'), $form.serialize() + "&submit_search=" + $("#buttonGo").val(), function(response) {
+ var url = $form.serialize() + "&submit_search=" + $("#buttonGo").val();
+ $.post($form.attr('action'), url, function(response) {
if (typeof response == 'string') {
// found results
$("#searchresults").html(response);
hooks/post-receive
--
phpMyAdmin
The branch, master has been updated
via 4547ca37f4c9f5e71a59849272665c4d0180fb1b (commit)
from c52063d283fe2e58a397f6832b87ae9fceef0ef2 (commit)
- Log -----------------------------------------------------------------
commit 4547ca37f4c9f5e71a59849272665c4d0180fb1b
Author: Rouslan Placella <rouslan(a)placella.com>
Date: Sun Oct 30 16:11:03 2011 +0000
Removed an unncessary AJAX request from database search
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 ++-
js/db_search.js | 21 ++++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fc44298..a23a65e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -51,9 +51,10 @@ phpMyAdmin - ChangeLog
- bug #3356456 [interface] Interface problems for queries having LIMIT clauses
+ [interface] Remove DefaultPropDisplay feature
- bug #3299486 [prettyprint] Order By in a query containing comment character
-- [interface] Improved ENUM/SET editor
++ [interface] Improved ENUM/SET editor
+ patch #3428376 [pmadb] pmadb on a different MySQL server
+ patch #3410688 [interface] Improving field size for character columns
+- [usability] Removed an unnecessary AJAX request from database search
3.4.8.0 (not yet released)
- bug #3425230 [interface] enum data split at space char (more space to edit)
diff --git a/js/db_search.js b/js/db_search.js
index 026d470..4b9ef61 100644
--- a/js/db_search.js
+++ b/js/db_search.js
@@ -58,17 +58,16 @@ function deleteResult(result_path , msg , ajaxEnable)
{
var $msg = PMA_ajaxShowMessage(PMA_messages['strDeleting']);
/** Load the deleted option to the page*/
- $('#browse-results').load(result_path + " '"+'#result_query' + "'", function () { // FIXME: no need for two ajax reqests here
- $('#sqlqueryform').load(result_path + " '"+'#sqlqueryform' + "'", function () { // since they both fetch the same page
- /** Refresh the search results after the deletion */
- document.getElementById('buttonGo').click();
- $('#togglequerybox').html(PMA_messages['strHideQueryBox']);
- PMA_ajaxRemoveMessage($msg);
- /** Show the results of the deletion option */
- $('#browse-results').show();
- $('#sqlqueryform').show();
- $('#togglequerybox').show();
- });
+ $('#sqlqueryform').html('');
+ $('#browse-results').load(result_path + " #result_query, #sqlqueryform", function () {
+ /** Refresh the search results after the deletion */
+ document.getElementById('buttonGo').click();
+ $('#togglequerybox').html(PMA_messages['strHideQueryBox']);
+ PMA_ajaxRemoveMessage($msg);
+ /** Show the results of the deletion option */
+ $('#browse-results').show();
+ $('#sqlqueryform').show();
+ $('#togglequerybox').show();
});
}
else
hooks/post-receive
--
phpMyAdmin
The branch, master has been updated
via c3801028167ed4e3734c7e5205c07310b2d22ecb (commit)
via 8fd1ae10bb15e5c861c30e233aab493220c78e68 (commit)
via 46ce1d765e4322a5765bc49b427168c44c2ca07d (commit)
via 991cbfcc97c2c616f77f911c8de172f88dec4de0 (commit)
via af8a61f73c25bdf6b2259d2ac6a9eae5f5835ce1 (commit)
from 240cb2418cbe7f870801451e89002f07871d2381 (commit)
- Log -----------------------------------------------------------------
commit c3801028167ed4e3734c7e5205c07310b2d22ecb
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sat Oct 29 08:24:11 2011 -0400
Setup for controlhost
commit 8fd1ae10bb15e5c861c30e233aab493220c78e68
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sat Oct 29 08:11:02 2011 -0400
Documentation for controlhost
commit 46ce1d765e4322a5765bc49b427168c44c2ca07d
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sat Oct 29 08:07:44 2011 -0400
Default values for controlhost
commit 991cbfcc97c2c616f77f911c8de172f88dec4de0
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sat Oct 29 07:58:40 2011 -0400
Provide for the case when controlhost is not defined
commit af8a61f73c25bdf6b2259d2ac6a9eae5f5835ce1
Author: Marco Gergele <mgergele(a)users.sourceforge.net>
Date: Sat Oct 29 07:55:39 2011 -0400
patch #3428376 [pmadb] pmadb on a different MySQL server
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
Documentation.html | 6 ++++++
config.sample.inc.php | 1 +
libraries/common.inc.php | 11 +++++++++--
libraries/config.default.php | 9 +++++++++
libraries/config/messages.inc.php | 2 ++
libraries/config/setup.forms.php | 1 +
7 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3e2e9c4..d10a483 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -52,6 +52,7 @@ phpMyAdmin - ChangeLog
+ [interface] Remove DefaultPropDisplay feature
- bug #3299486 [prettyprint] Order By in a query containing comment character
- [interface] Improved ENUM/SET editor
++ patch #3428376 [pmadb] pmadb on a different MySQL server
3.4.8.0 (not yet released)
- bug #3425230 [interface] enum data split at space char (more space to edit)
diff --git a/Documentation.html b/Documentation.html
index 9aeaa66..e1ce310 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -710,6 +710,12 @@ since this link provides funding for phpMyAdmin.
<dd>Whether to use a compressed protocol for the MySQL server connection
or not (experimental).</dd>
+ <dt id="controlhost">
+ <span id="cfg_Servers_controlhost">$cfg['Servers'][$i]['controlhost']</span> string<br />
+ </dt>
+ <dd>Permits to use an alternate host to hold the configuration storage
+ data.</dd>
+
<dt id="controluser">
<span id="cfg_Servers_controluser">$cfg['Servers'][$i]['controluser']</span> string<br />
<span id="cfg_Servers_controlpass">$cfg['Servers'][$i]['controlpass']</span> string
diff --git a/config.sample.inc.php b/config.sample.inc.php
index aa363d6..0eab148 100644
--- a/config.sample.inc.php
+++ b/config.sample.inc.php
@@ -40,6 +40,7 @@ $cfg['Servers'][$i]['AllowNoPassword'] = false;
*/
/* User used to manipulate with storage */
+// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
diff --git a/libraries/common.inc.php b/libraries/common.inc.php
index 1c7e4d1..730cf19 100644
--- a/libraries/common.inc.php
+++ b/libraries/common.inc.php
@@ -919,8 +919,15 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// scripts)
$controllink = false;
if ($cfg['Server']['controluser'] != '') {
- $controllink = PMA_DBI_connect($cfg['Server']['controluser'],
- $cfg['Server']['controlpass'], true);
+ if (! empty($cfg['Server']['controlhost'])) {
+ $controllink = PMA_DBI_connect($cfg['Server']['controluser'],
+ $cfg['Server']['controlpass'], true,
+ array('host' => $cfg['Server']['controlhost'])
+ );
+ } else {
+ $controllink = PMA_DBI_connect($cfg['Server']['controluser'],
+ $cfg['Server']['controlpass'], true);
+ }
}
// Connects to the server (validates user's login)
diff --git a/libraries/config.default.php b/libraries/config.default.php
index e91638d..98ace3f 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -152,6 +152,15 @@ $cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['compress'] = false;
/**
+ * MySQL control host. This permits to use a host different than the
+ * main host, for the phpMyAdmin configuration storage. If left empty,
+ * $cfg['Servers'][$i]['host'] is used instead.
+ *
+ * @global string $cfg['Servers'][$i]['controlhost']
+ */
+$cfg['Servers'][$i]['controlhost'] = '';
+
+/**
* MySQL control user settings (this user must have read-only
* access to the "mysql/user" and "mysql/db" tables). The controluser is also
* used for all relational features (pmadb)
diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php
index f396550..5d19922 100644
--- a/libraries/config/messages.inc.php
+++ b/libraries/config/messages.inc.php
@@ -378,6 +378,8 @@ $strConfigServers_connect_type_name = __('Connection type');
$strConfigServers_controlpass_name = __('Control user password');
$strConfigServers_controluser_desc = __('A special MySQL user configured with limited permissions, more information available on [a@http://wiki.phpmyadmin.net/pma/controluser]wiki[/a]');
$strConfigServers_controluser_name = __('Control user');
+$strConfigServers_controlhost_desc = __('An alternate host to hold the configuration storage; leave blank to use the already defined host');
+$strConfigServers_controlhost_name = __('Control host');
$strConfigServers_CountTables_desc = __('Count tables when showing database list');
$strConfigServers_CountTables_name = __('Count tables');
$strConfigServers_designer_coords_desc = __('Leave blank for no Designer support, suggested: [kbd]pma_designer_coords[/kbd]');
diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php
index cddb88d..a8b8591 100644
--- a/libraries/config/setup.forms.php
+++ b/libraries/config/setup.forms.php
@@ -64,6 +64,7 @@ $forms['Servers']['Server_config'] = array('Servers' => array(1 => array(
'CountTables')));
$forms['Servers']['Server_pmadb'] = array('Servers' => array(1 => array(
'pmadb' => 'phpmyadmin',
+ 'controlhost',
'controluser',
'controlpass',
'verbose_check',
hooks/post-receive
--
phpMyAdmin