Removed the AjaxEnable directive

This commit is contained in:
Marc Delisle 2012-12-21 16:04:57 -05:00
parent c305c505e3
commit 2723495a4f
41 changed files with 103 additions and 230 deletions

View File

@ -78,6 +78,7 @@ VerboseMultiSubmit, ReplaceHelpImg
+ Upgraded jquery to v1.8.3 and jquery-ui to v1.9.2
+ Patch #3597529 [status] Add raw value as title on server status page
+ Support MySQL 5.6 partitioning
+ Removed the AjaxEnable directive
3.5.6.0 (not yet released)
- bug #3593604 [status] Erroneous advisor rule

View File

@ -134,7 +134,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) {
<td><?php echo $version_data['date_created'];?></td>
<td><?php echo $version_data['date_updated'];?></td>
<td><?php echo $version_status;?></td>
<td><a class="drop_tracking_anchor<?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' ajax' : ''); ?>" href="<?php echo $delete_link;?>" ><?php echo $drop_image_or_text; ?></a></td>
<td><a class="drop_tracking_anchor ajax" href="<?php echo $delete_link;?>" ><?php echo $drop_image_or_text; ?></a></td>
<td> <a href="<?php echo $tmp_link; ?>"><?php echo __('Versions');?></a>
| <a href="<?php echo $tmp_link; ?>&amp;report=true&amp;version=<?php echo $version_data['version'];?>"><?php echo __('Tracking report');?></a>
| <a href="<?php echo $tmp_link; ?>&amp;snapshot=true&amp;version=<?php echo $version_data['version'];?>"><?php echo __('Structure snapshot');?></a></td>

View File

@ -993,16 +993,6 @@ Generic settings
If you have only one server configured,
:config:option:`$cfg['ServerDefault']` MUST be set to that server.
.. config:option:: $cfg['AjaxEnable']
:type: boolean
:default: true
Defines whether to refresh only parts of certain pages using Ajax
techniques. Applies only where a non-Ajax behavior is possible; for
example, the Designer feature is Ajax-only so this directive does not
apply to it.
.. config:option:: $cfg['VersionCheck']
:type: boolean

View File

@ -32,7 +32,7 @@ foreach ($drops as $each_drop) {
}
unset($drops, $each_drop);
// If we have a valid a valid target, lets load that script instead
// If we have a valid a valid target, let's load that script instead
if (! empty($_REQUEST['target'])
&& is_string($_REQUEST['target'])
&& ! preg_match('/^index/', $_REQUEST['target'])
@ -135,11 +135,7 @@ if ($server > 0
// Logout for advanced authentication
if ($cfg['Server']['auth_type'] != 'config') {
if ($cfg['ShowChgPassword']) {
if ($GLOBALS['cfg']['AjaxEnable']) {
$conditional_class = 'ajax';
} else {
$conditional_class = null;
}
$conditional_class = 'ajax';
PMA_printListItem(
__('Change password'),
'li_change_password',

View File

@ -31,8 +31,6 @@ AJAX.registerOnload('db_operations.js', function() {
/**
* Ajax event handlers for 'Rename Database'
*
* @see $cfg['AjaxEnable']
*/
$("#rename_db_form.ajax").live('submit', function(event) {
event.preventDefault();
@ -87,8 +85,6 @@ AJAX.registerOnload('db_operations.js', function() {
/**
* Ajax Event Handler for 'Copy Database'
*
* @see $cfg['AjaxEnable']
*/
$("#copy_db_form.ajax").live('submit', function(event) {
event.preventDefault();
@ -117,8 +113,6 @@ AJAX.registerOnload('db_operations.js', function() {
/**
* Ajax Event handler for 'Change Charset' of the database
*
* @see $cfg['AjaxEnable']
*/
$("#change_db_charset_form.ajax").live('submit', function(event) {
event.preventDefault();

View File

@ -31,33 +31,28 @@ AJAX.registerTeardown('db_search.js', function() {
*
* @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)
function loadResult(result_path, table_name, link)
{
$(function() {
if (ajaxEnable) {
/** Hides the results shown by the delete criteria */
var $msg = PMA_ajaxShowMessage(PMA_messages['strBrowsing'], false);
$('#sqlqueryform').hide();
$('#togglequerybox').hide();
/** Load the browse results to the page */
$("#table-info").show();
$('#table-link').attr({"href" : 'sql.php?'+link }).text(table_name);
var url = result_path + " #sqlqueryresults";
$('#browse-results').load(url, null, function() {
$('html, body')
.animate({
scrollTop: $("#browse-results").offset().top
}, 1000);
PMA_ajaxRemoveMessage($msg);
PMA_makegrid($('#table_results')[0], true, true, true, true);
}).show();
} else {
event.preventDefault();
}
/** Hides the results shown by the delete criteria */
var $msg = PMA_ajaxShowMessage(PMA_messages['strBrowsing'], false);
$('#sqlqueryform').hide();
$('#togglequerybox').hide();
/** Load the browse results to the page */
$("#table-info").show();
$('#table-link').attr({"href" : 'sql.php?'+link }).text(table_name);
var url = result_path + " #sqlqueryresults";
$('#browse-results').load(url, null, function() {
$('html, body')
.animate({
scrollTop: $("#browse-results").offset().top
}, 1000);
PMA_ajaxRemoveMessage($msg);
PMA_makegrid($('#table_results')[0], true, true, true, true);
}).show();
});
}
@ -66,11 +61,10 @@ function loadResult(result_path, table_name, link, ajaxEnable)
*
* @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)
function deleteResult(result_path, msg)
{
$(function() {
/** Hides the results shown by the browse criteria */
@ -80,28 +74,24 @@ function deleteResult(result_path, msg, ajaxEnable)
$('#togglequerybox').hide();
/** Conformation message for deletion */
if (confirm(msg)) {
if (ajaxEnable) {
var $msg = PMA_ajaxShowMessage(PMA_messages['strDeleting'], false);
/** Load the deleted option to the page*/
$('#sqlqueryform').html('');
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']);
/** Show the results of the deletion option */
$('#browse-results').show();
$('#sqlqueryform').show();
$('#togglequerybox').show();
$('html, body')
.animate({
scrollTop: $("#browse-results").offset().top
}, 1000);
PMA_ajaxRemoveMessage($msg);
});
} else {
event.preventDefault();
}
var $msg = PMA_ajaxShowMessage(PMA_messages['strDeleting'], false);
/** Load the deleted option to the page*/
$('#sqlqueryform').html('');
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']);
/** Show the results of the deletion option */
$('#browse-results').show();
$('#sqlqueryform').show();
$('#togglequerybox').show();
$('html, body')
.animate({
scrollTop: $("#browse-results").offset().top
}, 1000);
PMA_ajaxRemoveMessage($msg);
});
}
});
}
@ -191,9 +181,6 @@ AJAX.registerOnload('db_search.js', function() {
});
/**
* Ajax Event handler for retrieving the result of an SQL Query
* (see $GLOBALS['cfg']['AjaxEnable'])
*
* @see $GLOBALS['cfg']['AjaxEnable']
*/
$("#db_search_form.ajax").live('submit', function(event) {
event.preventDefault();

View File

@ -179,8 +179,6 @@ AJAX.registerOnload('db_structure.js', function() {
/**
* Ajax Event handler for 'Truncate Table'
*
* @see $cfg['AjaxEnable']
*/
$("a.truncate_table_anchor.ajax").live('click', function(event) {
event.preventDefault();
@ -231,8 +229,6 @@ AJAX.registerOnload('db_structure.js', function() {
/**
* Ajax Event handler for 'Drop Table' or 'Drop View'
*
* @see $cfg['AjaxEnable']
*/
$("a.drop_table_anchor.ajax").live('click', function(event) {
event.preventDefault();
@ -286,8 +282,6 @@ AJAX.registerOnload('db_structure.js', function() {
/**
* Ajax Event handler for 'Drop tracking'
*
* @see $cfg['AjaxEnable']
*/
$('a.drop_tracking_anchor.ajax').live('click', function(event) {
event.preventDefault();

View File

@ -2222,8 +2222,6 @@ AJAX.registerTeardown('functions.js', function() {
/**
* Attach Ajax event handlers for Drop Database. Moved here from db_structure.js
* as it was also required on db_create.php
*
* @see $cfg['AjaxEnable']
*/
AJAX.registerOnload('functions.js', function() {
$("#drop_db_anchor.ajax").live('click', function(event) {
@ -2307,7 +2305,6 @@ AJAX.registerOnload('functions.js', function() {
/**
* Attach Ajax event handler on the change password anchor
* @see $cfg['AjaxEnable']
*/
$('#change_password_anchor.ajax').live('click', function(event) {
event.preventDefault();
@ -3291,8 +3288,6 @@ AJAX.registerTeardown('functions.js', function() {
});
/**
* Attach Ajax event handlers for Drop Table.
*
* @see $cfg['AjaxEnable']
*/
AJAX.registerOnload('functions.js', function() {
$("#drop_tbl_anchor.ajax").live('click', function(event) {

View File

@ -367,7 +367,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 AjaxEnable is true
if ($(g.t).is('.ajax')) { // only send preferences if ajax class
var post_params = {
ajax_request: true,
db: g.db,
@ -1801,7 +1801,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
g.initColVisib();
}
if (enableGridEdit &&
$(t).is('.ajax')) // make sure AjaxEnable is enabled in Settings
$(t).is('.ajax')) // make sure we have the ajax class
{
g.initGridEdit();
}

View File

@ -87,8 +87,6 @@ AJAX.registerOnload('server_databases.js', function() {
/**
* Attach Ajax event handlers for 'Create Database'.
*
* @see $cfg['AjaxEnable']
*/
$('#create_database_form.ajax').live('submit', function(event) {
event.preventDefault();

View File

@ -118,7 +118,6 @@ AJAX.registerOnload('server_privileges.js', function() {
*
* @see PMA_ajaxShowMessage()
* @see appendNewUser()
* @see $cfg['AjaxEnable']
* @memberOf jQuery
* @name add_user_click
*
@ -246,7 +245,6 @@ AJAX.registerOnload('server_privileges.js', function() {
* Ajax event handler for 'Reload Privileges' anchor
*
* @see PMA_ajaxShowMessage()
* @see $cfg['AjaxEnable']
* @memberOf jQuery
* @name reload_privileges_click
*/
@ -269,7 +267,6 @@ AJAX.registerOnload('server_privileges.js', function() {
* AJAX handler for 'Revoke User'
*
* @see PMA_ajaxShowMessage()
* @see $cfg['AjaxEnable']
* @memberOf jQuery
* @name revoke_user_click
*/
@ -326,7 +323,6 @@ AJAX.registerOnload('server_privileges.js', function() {
* Step 1: Load Edit User Dialog
* @memberOf jQuery
* @name edit_user_click
* @see $cfg['AjaxEnable']
*/
$("a.edit_user_anchor.ajax").live('click', function(event) {
/** @lends jQuery */
@ -376,7 +372,6 @@ AJAX.registerOnload('server_privileges.js', function() {
* Step 2: Submit the Edit User Dialog
*
* @see PMA_ajaxShowMessage()
* @see $cfg['AjaxEnable']
* @memberOf jQuery
* @name edit_user_submit
*/
@ -461,7 +456,6 @@ AJAX.registerOnload('server_privileges.js', function() {
* AJAX handler for 'Export Privileges'
*
* @see PMA_ajaxShowMessage()
* @see $cfg['AjaxEnable']
* @memberOf jQuery
* @name export_user_click
*/
@ -570,7 +564,6 @@ AJAX.registerOnload('server_privileges.js', function() {
* AJAX handler to Paginate the Users Table
*
* @see PMA_ajaxShowMessage()
* @see $cfg['AjaxEnable']
* @name paginate_users_table_click
* @memberOf jQuery
*/

View File

@ -222,7 +222,6 @@ AJAX.registerOnload('sql.js', function() {
* Ajax Event handler for 'SQL Query Submit'
*
* @see PMA_ajaxShowMessage()
* @see $cfg['AjaxEnable']
* @memberOf jQuery
* @name sqlqueryform_submit
*/
@ -312,7 +311,6 @@ AJAX.registerOnload('sql.js', function() {
* Paginate results with Page Selector dropdown
* @memberOf jQuery
* @name paginate_dropdown_change
* @see $cfg['AjaxEnable']
*/
$("#pageselector").live('change', function(event) {
var $form = $(this).parent("form");
@ -323,7 +321,6 @@ AJAX.registerOnload('sql.js', function() {
* Ajax Event handler for the display options
* @memberOf jQuery
* @name displayOptionsForm_submit
* @see $cfg['AjaxEnable']
*/
$("#displayOptionsForm.ajax").live('submit', function(event) {
event.preventDefault();

View File

@ -49,8 +49,6 @@ AJAX.registerOnload('tbl_select.js', function() {
/**
* Ajax event handler for Table Search
*
* (see $GLOBALS['cfg']['AjaxEnable'])
*/
$("#tbl_search_form.ajax").live('submit', function(event) {
var unaryFunctions = [

View File

@ -35,8 +35,6 @@ AJAX.registerTeardown('tbl_structure.js', function() {
AJAX.registerOnload('tbl_structure.js', function() {
/**
* Attach Event Handler for 'Change Column'
*
* (see $GLOBALS['cfg']['AjaxEnable'])
*/
$("a.change_column_anchor.ajax").live('click', function(event) {
event.preventDefault();
@ -55,8 +53,6 @@ AJAX.registerOnload('tbl_structure.js', function() {
/**
* Attach Event Handler for 'Change multiple columns'
*
* (see $GLOBALS['cfg']['AjaxEnable'])
*/
$("button.change_columns_anchor.ajax, input.change_columns_anchor.ajax").live('click', function(event) {
event.preventDefault();
@ -77,8 +73,6 @@ AJAX.registerOnload('tbl_structure.js', function() {
/**
* Attach Event Handler for 'Drop Column'
*
* (see $GLOBALS['cfg']['AjaxEnable'])
*/
$("a.drop_column_anchor.ajax").live('click', function(event) {
event.preventDefault();
@ -135,8 +129,6 @@ AJAX.registerOnload('tbl_structure.js', function() {
/**
* Ajax Event handler for 'Add Primary Key'
*
* (see $GLOBALS['cfg']['AjaxEnable'])
*/
$("a.add_primary_key_anchor.ajax").live('click', function(event) {
event.preventDefault();
@ -180,8 +172,6 @@ AJAX.registerOnload('tbl_structure.js', function() {
/**
* Ajax Event handler for 'Drop Primary Key/Index'
*
* (see $GLOBALS['cfg']['AjaxEnable'])
*/
$('a.drop_primary_key_index_anchor.ajax').live('click', function(event) {
event.preventDefault();

View File

@ -340,8 +340,8 @@ class PMA_DbSearch
$html_output .= '<td><a name="browse_search" href="'
. $browse_result_path . '" onclick="loadResult(\''
. $browse_result_path . '\',\'' . $each_table . '\',\''
. PMA_generate_common_url($GLOBALS['db'], $each_table) . '\',\''
. ($GLOBALS['cfg']['AjaxEnable']) .'\');return false;" >'
. PMA_generate_common_url($GLOBALS['db'], $each_table) . '\''
. ');return false;" >'
. __('Browse') . '</a></td>';
$this_url_params['sql_query'] = $newsearchsqls['delete'];
$delete_result_path = 'sql.php' . PMA_generate_common_url($this_url_params);
@ -352,7 +352,7 @@ class PMA_DbSearch
__('Delete the matches for the %s table?'),
htmlspecialchars($each_table)
)
. '\',\'' . ($GLOBALS['cfg']['AjaxEnable']) . '\');return false;">'
. '\');return false;">'
. __('Delete') . '</a></td>';
} else {
$html_output .= '<td>&nbsp;</td>'
@ -373,7 +373,7 @@ class PMA_DbSearch
{
$html_output = '<a id="db_search"></a>';
$html_output .= '<form id="db_search_form"'
. ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : '')
. ' class="ajax"'
. ' method="post" action="db_search.php" name="db_search">';
$html_output .= PMA_generate_common_hidden_inputs($GLOBALS['db']);
$html_output .= '<fieldset>';

View File

@ -560,7 +560,7 @@ class PMA_DisplayResults
. '" />'
. $input_for_real_end
. '<input type="submit" name="navig"'
. ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax" ' : '' )
. ' class="ajax" '
. 'value="' . $caption_output . '" ' . $title_output . $onclick . ' />'
. '</form>'
. '</td>';
@ -899,7 +899,7 @@ class PMA_DisplayResults
. '<input type="hidden" name="goto" value="' . $this->__get('goto')
. '" />'
. '<input type="submit" name="navig"'
. ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : '')
. ' class="ajax"'
. ' value="' . __('Show') . ' :" />'
. __('Start row') . ': ' . "\n"
. '<input type="text" name="pos" size="3" value="'
@ -1561,9 +1561,7 @@ class PMA_DisplayResults
. 'name="displayOptionsForm" '
. 'id="displayOptionsForm"';
if ($GLOBALS['cfg']['AjaxEnable']) {
$options_html .= ' class="ajax" ';
}
$options_html .= ' class="ajax" ';
$options_html .= '>';
$url_params = array(
@ -1729,22 +1727,18 @@ class PMA_DisplayResults
$form_html .= '<form method="post" action="tbl_row_action.php" '
. 'name="resultsForm" id="resultsForm"';
if ($GLOBALS['cfg']['AjaxEnable']) {
$form_html .= ' class="ajax" ';
}
$form_html .= ' class="ajax" ';
$form_html .= '>' . "\n"
$form_html .= '>'
. PMA_generate_common_hidden_inputs(
$this->__get('db'), $this->__get('table'), 1
)
. '<input type="hidden" name="goto" value="sql.php" />' . "\n";
. '<input type="hidden" name="goto" value="sql.php" />';
}
$form_html .= '<table id="table_results" class="data';
if ($GLOBALS['cfg']['AjaxEnable']) {
$form_html .= ' ajax';
}
$form_html .= '">' . "\n";
$form_html .= ' ajax';
$form_html .= '">';
return $form_html;
@ -5345,7 +5339,7 @@ class PMA_DisplayResults
if (!PMA_DRIZZLE && !isset($analyzed_sql[0]['queryflags']['procedure'])) {
$ajax_class = $GLOBALS['cfg']['AjaxEnable'] ? ' ajax' : '';
$ajax_class = ' ajax';
$results_operations_html .= '<span>'
. PMA_Util::linkOrButton(

View File

@ -581,14 +581,10 @@ class PMA_Index
$this_params = $GLOBALS['url_params'];
$this_params['index'] = $index->getName();
$r .= '<td class="edit_index';
if ($GLOBALS['cfg']['AjaxEnable']) {
$r .= ' ajax';
}
$r .= ' ajax';
$r .= '" ' . $row_span . '>'
. ' <a class="';
if ($GLOBALS['cfg']['AjaxEnable']) {
$r .= 'ajax';
}
$r .= 'ajax';
$r .= '" href="tbl_indexes.php' . PMA_generate_common_url($this_params)
. '">' . PMA_Util::getIcon('b_edit.png', __('Edit')) . '</a>'
. '</td>' . "\n";
@ -621,9 +617,7 @@ class PMA_Index
$r .= '<input type="hidden" class="drop_primary_key_index_msg"'
. ' value="' . $js_msg . '" />';
$r .= ' <a class="drop_primary_key_index_anchor';
if ($GLOBALS['cfg']['AjaxEnable']) {
$r .= ' ajax';
}
$r .= ' ajax';
$r .= '" href="sql.php' . PMA_generate_common_url($this_params)
. '" >'
. PMA_Util::getIcon('b_drop.png', __('Drop')) . '</a>'

View File

@ -1069,7 +1069,7 @@ EOT;
$html_output .= '<form method="post" action="' . $scriptName . '" '
. 'name="insertForm" id="' . $formId . '" '
. ($GLOBALS['cfg']['AjaxEnable'] ? 'class="ajax"' : '') . '>';
. 'class="ajax"' . '>';
$html_output .= PMA_generate_common_hidden_inputs($this->_db, $this->_table);
$html_output .= '<input type="hidden" name="goto" value="' . $goto . '" />';
@ -1154,7 +1154,7 @@ EOT;
$titles['Browse'] = PMA_Util::getIcon('b_browse.png', __('Browse foreign values'));
$html_output .= '<form method="post" action="tbl_zoom_select.php"'
. ' name="displayResultForm" id="zoom_display_form"'
. ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : '') . '>';
. ' class="ajax"' . '>';
$html_output .= PMA_generate_common_hidden_inputs($this->_db, $this->_table);
$html_output .= '<input type="hidden" name="goto" value="' . $goto . '" />';
$html_output .= '<input type="hidden" name="back" value="tbl_zoom_select.php" />';

View File

@ -2395,9 +2395,7 @@ class PMA_Util
$pageNowPlusRange = ($pageNow + $range);
$gotopage = $prompt . ' <select class="pageselector ';
if ($GLOBALS['cfg']['AjaxEnable']) {
$gotopage .= ' ajax';
}
$gotopage .= ' ajax';
$gotopage .= '" name="' . $name . '" >';
if ($nbTotalPage < $showAll) {

View File

@ -551,12 +551,6 @@ $cfg['ServerDefault'] = 1;
/*
* Other core phpMyAdmin settings
*/
/**
* whether Ajax behavior is active
*
* @global boolean $cfg['AjaxEnable']
*/
$cfg['AjaxEnable'] = true;
/**
* whether version check is active

View File

@ -14,8 +14,6 @@ if (!function_exists('__')) {
PMA_fatalError('Bad invocation!');
}
$strConfigAjaxEnable_desc = __('Improves efficiency of screen refresh');
$strConfigAjaxEnable_name = __('Enable Ajax');
$strConfigAllowArbitraryServer_desc = __('If enabled user can enter any MySQL server in login form for cookie auth');
$strConfigAllowArbitraryServer_name = __('Allow login to any MySQL server');
$strConfigAllowUserDropDatabase_name = __('Show &quot;Drop database&quot; link to normal users');

View File

@ -124,7 +124,6 @@ $forms['Features']['Developer'] = array(
'Error_Handler/gather',
'DBG/sql');
$forms['Features']['Other_core_settings'] = array(
'AjaxEnable',
'VersionCheck',
'NaturalOrder',
'InitialSlidersState',

View File

@ -22,7 +22,6 @@
$forms = array();
$forms['Features']['General'] = array(
'AjaxEnable',
'VersionCheck',
'NaturalOrder',
'InitialSlidersState',

View File

@ -30,10 +30,7 @@ function PMA_getHtmlForChangePassword($username, $hostname) {
$html = '<form method="post" id="change_password_form" '
. 'action="' . $GLOBALS['PMA_PHP_SELF'] . '" '
. 'name="chgPassword" '
. ($GLOBALS['cfg']['AjaxEnable']
? 'class="ajax" '
: '')
. '>';
. 'class="ajax" >';
$html .= PMA_generate_common_hidden_inputs();

View File

@ -17,7 +17,7 @@ require_once './libraries/check_user_privileges.lib.php';
if ($is_create_db_priv) {
// The user is allowed to create a db
?>
<form method="post" action="db_create.php" id="create_database_form" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="ajax" ' : ''); ?>><strong>
<form method="post" action="db_create.php" id="create_database_form" class="ajax"><strong>
<?php echo '<label for="text_create_db">' . __('Create database') . '</label>&nbsp;' . PMA_Util::showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<?php echo PMA_generate_common_hidden_inputs('', '', 5); ?>
<input type="hidden" name="reload" value="1" />

View File

@ -165,9 +165,7 @@ if ($_SESSION[$SESSION_KEY]["handler"] != "UploadNoplugin") {
if ($_SESSION[$SESSION_KEY]["handler"] != "UploadNoplugin") {
echo ' target="import_upload_iframe"';
}
if ($GLOBALS['cfg']['AjaxEnable']) {
echo ' class="ajax"';
}
echo ' class="ajax"';
?>>
<input type="hidden" name="<?php
echo $_SESSION[$SESSION_KEY]["handler"]::getIdKey();

View File

@ -55,7 +55,7 @@ function PMA_getHtmlForRenameDatabase($db)
{
$html_output = '<div class="operations_half_width">'
. '<form id="rename_db_form" '
. ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax" ' : '')
. 'class="ajax" '
. 'method="post" action="db_operations.php" '
. 'onsubmit="return emptyFormElements(this, \'newname\')">';
if (isset($_REQUEST['db_collation'])) {
@ -156,7 +156,7 @@ function PMA_getHtmlForCopyDatabase($db)
$html_output = '<div class="operations_half_width clearfloat">';
$html_output .= '<form id="copy_db_form" '
. ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax" ' : '')
. 'class="ajax" '
. 'method="post" action="db_operations.php"'
. 'onsubmit="return emptyFormElements(this, \'newname\')">';
@ -227,9 +227,7 @@ function PMA_getHtmlForChangeDatabaseCharset($db, $table)
{
$html_output = '<div class="operations_half_width">'
. '<form id="change_db_charset_form" ';
if ($GLOBALS['cfg']['AjaxEnable']) {
$html_output .= ' class="ajax" ';
}
$html_output .= 'class="ajax" ';
$html_output .= 'method="post" action="db_operations.php">';
$html_output .= PMA_generate_common_hidden_inputs($db, $table);
@ -988,7 +986,7 @@ function PMA_getHtmlForCopytable()
$html_output .= '<form method="post" action="tbl_operations.php" '
. 'name="copyTable" '
. 'id="copyTable" '
. ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : '')
. ' class="ajax" '
. 'onsubmit="return emptyFormElements(this, \'new_name\')">'
. PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table'])
. '<input type="hidden" name="reload" value="1" />';
@ -1212,9 +1210,8 @@ function PMA_getListofMaintainActionLink($is_myisam_or_aria,
function PMA_getMaintainActionlink($action, $params, $url_params, $link,
$chapter = 'MySQL_Database_Administration'
) {
$isAjax = ($GLOBALS['cfg']['AjaxEnable'] ? ' ajax' : '');
return '<li>'
. '<a class="maintain_action' . $isAjax . '" '
. '<a class="maintain_action ajax" '
. 'href="sql.php'
. PMA_generate_common_url(array_merge($url_params, $params)) .'">'
. $action
@ -1274,10 +1271,9 @@ function PMA_getHtmlForDeleteDataOrTable(
*/
function PMA_getDeleteDataOrTablelink($url_params, $syntax, $link, $id)
{
$isAjax = $GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : '';
return '<li><a '
. 'href="sql.php' . PMA_generate_common_url($url_params) . '"'
. ' id="' . $id . '"' . $isAjax . '>'
. ' id="' . $id . '" class="ajax">'
. $link . '</a>'
. PMA_Util::showMySQLDocu(
'SQL-Syntax', $syntax

View File

@ -54,15 +54,13 @@ $ajax_class = array(
'drop' => '',
'export' => ''
);
if ($GLOBALS['cfg']['AjaxEnable']) {
$ajax_class = array(
'add' => 'class="ajax add_anchor"',
'edit' => 'class="ajax edit_anchor"',
'exec' => 'class="ajax exec_anchor"',
'drop' => 'class="ajax drop_anchor"',
'export' => 'class="ajax export_anchor"'
);
}
$ajax_class = array(
'add' => 'class="ajax add_anchor"',
'edit' => 'class="ajax edit_anchor"',
'exec' => 'class="ajax exec_anchor"',
'drop' => 'class="ajax drop_anchor"',
'export' => 'class="ajax export_anchor"'
);
/**
* Create labels for the list

View File

@ -1936,7 +1936,7 @@ function PMA_getChangeLoginInformationHtmlForm($username, $hostname)
'2' => __('... revoke all active privileges from the old one and delete it afterwards.'),
'3' => __('... delete the old one from the user tables and reload the privileges afterwards.'));
$class = $GLOBALS['cfg']['AjaxEnable'] ? ' ajax' : '';
$class = ' ajax';
$html_output = '<form action="server_privileges.php" '
. 'method="post" class="copyUserForm' . $class .'">' . "\n"
. PMA_generate_common_hidden_inputs('', '')
@ -3029,7 +3029,7 @@ function PMA_getHtmlForDisplayUserProperties($dbname_is_wildcard,$url_dbname,
//exit;
}
$class = $GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : '';
$class = ' class="ajax"';
$html_output .= '<form' . $class . ' name="usersForm"'
. ' id="addUsersForm_' . $random_n . '"'
. ' action="server_privileges.php" method="post">' . "\n";

View File

@ -93,9 +93,7 @@ function PMA_sqlQueryForm($query = true, $display_tab = false, $delimiter = ';')
<?php
} else {
echo '<form method="post" action="import.php" ' . $enctype;
if ($GLOBALS['cfg']['AjaxEnable']) {
echo ' class="ajax"';
}
echo ' class="ajax"';
echo ' id="sqlqueryform" name="sqlform">' . "\n";
}

View File

@ -56,11 +56,8 @@ function PMA_getHtmlForActionLinks($current_table, $table_is_view, $tbl_url_quer
. $truename . '</a>';
if (!$db_is_information_schema) {
$empty_table = '<a class="truncate_table_anchor';
if ($GLOBALS['cfg']['AjaxEnable']) {
$empty_table .= ' ajax';
}
$empty_table .= '" href="sql.php?' . $tbl_url_query
$empty_table = '<a class="truncate_table_anchor ajax"';
$empty_table .= ' href="sql.php?' . $tbl_url_query
. '&amp;sql_query=';
$empty_table .= urlencode(
'TRUNCATE ' . PMA_Util::backquote($current_table['TABLE_NAME'])
@ -543,15 +540,13 @@ function PMA_getHtmlForInsertEmptyDropActionLinks($tbl_url_query, $table_is_view
$html_output .= '<td class="center">' . $empty_table . '</td>';
$html_output .= '<td class="center">';
$html_output .= '<a ';
if ($GLOBALS['cfg']['AjaxEnable']) {
$html_output .= 'class="ajax drop_table_anchor';
if ($table_is_view || $current_table['ENGINE'] == null) {
// this class is used in db_structure.js to display the
// correct confirmation message
$html_output .= ' view';
}
$html_output .= '"';
$html_output .= 'class="ajax drop_table_anchor';
if ($table_is_view || $current_table['ENGINE'] == null) {
// this class is used in db_structure.js to display the
// correct confirmation message
$html_output .= ' view';
}
$html_output .= '"';
$html_output .= 'href="sql.php?' . $tbl_url_query
. '&amp;reload=1&amp;purge=1&amp;sql_query='
. urlencode($drop_query) . '&amp;message_to_show='
@ -1316,16 +1311,14 @@ function PMA_getHtmlForDropColumn($tbl_is_view, $db_is_information_schema,
if (! $tbl_is_view && ! $db_is_information_schema) {
$html_output .= '<td class="edit center">'
. '<a class="change_column_anchor'
. ($GLOBALS['cfg']['AjaxEnable'] ? ' ajax' : '')
. '" href="tbl_structure.php?'
. '<a class="change_column_anchor ajax"'
. ' href="tbl_structure.php?'
. $url_query . '&amp;field=' . $field_encoded
. '&amp;change_column=1">'
. $titles['Change'] . '</a>' . '</td>';
$html_output .= '<td class="drop center">'
. '<a class="drop_column_anchor'
. ($GLOBALS['cfg']['AjaxEnable'] ? ' ajax' : '')
. '" href="sql.php?' . $url_query . '&amp;sql_query='
. '<a class="drop_column_anchor ajax"'
. ' href="sql.php?' . $url_query . '&amp;sql_query='
. urlencode(
'ALTER TABLE ' . PMA_Util::backquote($table)
. ' DROP ' . PMA_Util::backquote($row['Field']) . ';'
@ -1611,9 +1604,8 @@ function PMA_getHtmlForDisplayIndexes()
'<input type="text" size="2" name="added_fields" value="1" />'
);
$html_output .= '<input type="hidden" name="create_index" value="1" />'
. '<input '
. 'class="add_index' . ($GLOBALS['cfg']['AjaxEnable'] ? ' ajax' : '')
. '" type="submit" value="' . __('Go') . '" />';
. '<input class="add_index ajax"'
. ' type="submit" value="' . __('Go') . '" />';
$html_output .= '</form>'
. '</fieldset>'

View File

@ -729,7 +729,7 @@ $html .= '<script src="js/keyhandler.js" type="text/javascript"></script>'
$html .= '<form method="post" action="' . $action . '" class="'
. ($action == 'tbl_create.php' ? 'create_table' : 'append_fields')
. '_form' . ($GLOBALS['cfg']['AjaxEnable'] ? ' ajax' : '') . '">';
. '_form ajax">';
$html .= PMA_generate_common_hidden_inputs($_form_params);
unset($_form_params);

View File

@ -322,7 +322,7 @@ if ($databases_count > 0) {
. '<i style="margin-left: 2em">' . __('With selected:') . '</i>' . "\n";
echo PMA_Util::getButtonOrImage(
'',
'mult_submit' . ($cfg['AjaxEnable'] ? ' ajax' : ''),
'mult_submit' . ' ajax',
'drop_selected_dbs',
__('Drop'), 'b_deltbl.png'
);

View File

@ -51,11 +51,7 @@ foreach (array_keys($_POST) as $post_key) {
require 'libraries/server_common.inc.php';
if ($GLOBALS['cfg']['AjaxEnable']) {
$conditional_class = 'ajax';
} else {
$conditional_class = '';
}
$conditional_class = 'ajax';
/**
* Messages are built using the message name

View File

@ -991,7 +991,7 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) {
// At least one row is returned -> displays a table with results
//If we are retrieving the full value of a truncated field or the original
// value of a transformed field, show it here and exit
if ($GLOBALS['grid_edit'] == true && $GLOBALS['cfg']['AjaxEnable']) {
if ($GLOBALS['grid_edit'] == true) {
$row = PMA_DBI_fetch_row($result);
$response = PMA_Response::getInstance();
$response->addJSON('value', $row[0]);
@ -1107,7 +1107,7 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) {
unset($message);
if (! $GLOBALS['is_ajax_request'] || ! $GLOBALS['cfg']['AjaxEnable']) {
if (! $GLOBALS['is_ajax_request']) {
if (strlen($table)) {
include 'libraries/tbl_common.inc.php';
$url_query .= '&amp;goto=tbl_sql.php&amp;back=tbl_sql.php';
@ -1137,9 +1137,7 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) {
//begin the sqlqueryresults div here. container div
echo '<div id="sqlqueryresults"';
if ($GLOBALS['cfg']['AjaxEnable']) {
echo ' class="ajax"';
}
echo ' class="ajax"';
echo '>';
// Display previous update query (from tbl_replace)

View File

@ -161,10 +161,7 @@ if (isset($_REQUEST['index']) && is_array($_REQUEST['index'])) {
// end preparing form values
?>
<form action="tbl_indexes.php" method="post" name="index_frm" id="index_frm" <?php
echo ($GLOBALS['cfg']['AjaxEnable']
? ' class="ajax"'
: ''); ?>
<form action="tbl_indexes.php" method="post" name="index_frm" id="index_frm" class="ajax"
onsubmit="if (typeof(this.elements['index[Key_name]'].disabled) != 'undefined') {
this.elements['index[Key_name]'].disabled = false}">
<?php

View File

@ -396,8 +396,7 @@ if (! $tbl_is_view && ! $db_is_information_schema) {
$response->addHTML('<br />');
$response->addHTML(PMA_getHtmlForAddColumn($columns_list));
$response->addHTML(
'<div id="index_div" '
. ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : '') . ' >'
'<div id="index_div" class="ajax" >'
);
}

View File

@ -127,7 +127,6 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
$each_table, $newsearchsqls, $odd_row, $output
) {
$GLOBALS['cfg']['AjaxEnable'] = true;
$this->assertEquals(
$output,
$this->_callProtectedFunction(
@ -155,7 +154,7 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
'delete' => 'column2'
),
true,
'<tr class="noclick odd"><td>2 matches in <strong>table1</strong></td><td><a name="browse_search" href="sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column1&amp;server=0&amp;lang=en&amp;token=token" onclick="loadResult(\'sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column1&amp;server=0&amp;lang=en&amp;token=token\',\'table1\',\'db=pma&amp;table=table1&amp;server=0&amp;lang=en&amp;token=token\',\'1\');return false;" >Browse</a></td><td><a name="delete_search" href="sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column2&amp;server=0&amp;lang=en&amp;token=token" onclick="deleteResult(\'sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column2&amp;server=0&amp;lang=en&amp;token=token\' , \'Delete the matches for the table1 table?\',\'1\');return false;">Delete</a></td></tr>'
'<tr class="noclick odd"><td>2 matches in <strong>table1</strong></td><td><a name="browse_search" href="sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column1&amp;server=0&amp;lang=en&amp;token=token" onclick="loadResult(\'sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column1&amp;server=0&amp;lang=en&amp;token=token\',\'table1\',\'db=pma&amp;table=table1&amp;server=0&amp;lang=en&amp;token=token\');return false;" >Browse</a></td><td><a name="delete_search" href="sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column2&amp;server=0&amp;lang=en&amp;token=token" onclick="deleteResult(\'sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column2&amp;server=0&amp;lang=en&amp;token=token\' , \'Delete the matches for the table1 table?\');return false;">Delete</a></td></tr>'
)
);
}

View File

@ -354,7 +354,6 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
$caption, $title, $pos, $html_sql_query, $output
) {
$GLOBALS['cfg']['NavigationBarIconic'] = true;
$GLOBALS['cfg']['AjaxEnable'] = true;
$_SESSION[' PMA_token '] = 'token';
$this->assertEquals(
@ -411,7 +410,6 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
$pos_next, $pos_prev, $id_for_direction_dropdown, $is_innodb, $output
) {
$_SESSION['tmp_user_values']['max_rows'] = '20';
$GLOBALS['cfg']['AjaxEnable'] = true;
$_SESSION['tmp_user_values']['pos'] = true;
$GLOBALS['num_rows'] = '20';
$GLOBALS['unlim_num_rows'] = '50';

View File

@ -41,7 +41,6 @@ class PMA_Operations_Test extends PHPUnit_Framework_TestCase
$_SESSION[' PMA_token '] = 'token';
$GLOBALS['cfg'] = array(
'MySQLManualType' => 'none',
'AjaxEnable' => true,
'ServerDefault' => 1,
'PropertiesIconic' => true,
);

View File

@ -37,7 +37,6 @@ class PMA_Transformation_Test extends PHPUnit_Framework_TestCase
$_SESSION[' PMA_token '] = 'token';
$GLOBALS['cfg'] = array(
'MySQLManualType' => 'none',
'AjaxEnable' => true,
'ServerDefault' => 1,
'PropertiesIconic' => true,
);