Merge branch 'QA_4_1' of github.com:phpmyadmin/phpmyadmin into QA_4_1
This commit is contained in:
commit
cc38e422dc
18
ChangeLog
18
ChangeLog
@ -1,10 +1,24 @@
|
||||
phpMyAdmin - ChangeLog
|
||||
======================
|
||||
|
||||
4.1.3.0 (not yet released)
|
||||
4.1.4.0 (not yet released)
|
||||
- bug #3840 (additional fix) When exporting to gzip format, the data is compressed 2 times
|
||||
- bug #4209 Missing compression in one case
|
||||
- bug #4208 Can't browse tables after sorting on columns with fieldnames that have a '-'
|
||||
- bug #4184 Switch to wrong page after adding an index
|
||||
- bug #3885 Additional fix for this bug
|
||||
- bug #4212 Table "disappears" if it has the same name as its tablegroup
|
||||
|
||||
4.1.3.0 (2013-12-31)
|
||||
- bug #3938 PDFDefaultPageSize doc and easy configurability
|
||||
- bug #4198 Hovering over pie chart gives fatal JS error
|
||||
- bug #4212 Table "disappears" if it has the same name as its tablegroup
|
||||
- bug #4200 Missing syntax highlighting
|
||||
- bug #4201 Exports are not compressed
|
||||
- bug #4131 Import: "number of rows to skip" is ambiguous
|
||||
- bug #4205 Add a user shows additional "edit user group" link
|
||||
- bug #4202 Cannot read property 'token' of undefined
|
||||
- bug #4203 On refreshing designer, $.FullScreen is undefined
|
||||
- bug #3920 Lost space in navigation area
|
||||
|
||||
4.1.2.0 (2013-12-23)
|
||||
- bug #4178 Quick edit for BIT type does not work
|
||||
|
||||
4
README
4
README
@ -1,7 +1,7 @@
|
||||
phpMyAdmin - Readme
|
||||
===================
|
||||
|
||||
Version 4.1.3-dev
|
||||
Version 4.1.4-dev
|
||||
|
||||
A set of PHP-scripts to manage MySQL over the web.
|
||||
|
||||
@ -13,7 +13,7 @@ Copyright
|
||||
Copyright (C) 1998-2000
|
||||
Tobias Ratschiller <tobias_at_ratschiller.com>
|
||||
|
||||
Copyright (C) 2001-2013
|
||||
Copyright (C) 2001-2014
|
||||
Marc Delisle <marc_at_infomarc.info>
|
||||
Olivier Müller <om_at_omnis.ch>
|
||||
Robin Johnson <robbat2_at_users.sourceforge.net>
|
||||
|
||||
@ -49,7 +49,7 @@ copyright = u'2012 - 2013, The phpMyAdmin devel team'
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '4.1.3-dev'
|
||||
version = '4.1.4-dev'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = version
|
||||
|
||||
|
||||
14
export.php
14
export.php
@ -300,9 +300,17 @@ function PMA_isGzHandlerEnabled()
|
||||
*/
|
||||
function PMA_gzencodeNeeded()
|
||||
{
|
||||
/*
|
||||
* We should gzencode only if the function exists
|
||||
* but we don't want to compress twice, therefore
|
||||
* gzencode only if transparent compression is not enabled
|
||||
* and gz compression was not asked via $cfg['OBGzip']
|
||||
* but transparent compression does not apply when saving to server
|
||||
*/
|
||||
if (@function_exists('gzencode')
|
||||
&& ! @ini_get('zlib.output_compression')
|
||||
&& ! PMA_isGzHandlerEnabled()
|
||||
&& ((! @ini_get('zlib.output_compression')
|
||||
&& ! PMA_isGzHandlerEnabled())
|
||||
|| $GLOBALS['save_on_server'])
|
||||
) {
|
||||
return true;
|
||||
} else {
|
||||
@ -440,7 +448,7 @@ if (!defined('TESTSUITE')) {
|
||||
$memory_limit = trim(@ini_get('memory_limit'));
|
||||
$memory_limit_num = (int)substr($memory_limit, 0, -1);
|
||||
// 2 MB as default
|
||||
if (empty($memory_limit)) {
|
||||
if (empty($memory_limit) || '-1' == $memory_limit) {
|
||||
$memory_limit = 2 * 1024 * 1024;
|
||||
} elseif (strtolower(substr($memory_limit, -1)) == 'm') {
|
||||
$memory_limit = $memory_limit_num * 1024 * 1024;
|
||||
|
||||
@ -544,7 +544,11 @@ AJAX.cache = {
|
||||
* @return void
|
||||
*/
|
||||
navigate: function (index) {
|
||||
if (typeof this.pages[index] === 'undefined') {
|
||||
if (typeof this.pages[index] === 'undefined'
|
||||
|| typeof this.pages[index].content === 'undefined'
|
||||
|| typeof this.pages[index].menu === 'undefined'
|
||||
|| ! AJAX.cache.menus.get(this.pages[index].menu)
|
||||
) {
|
||||
PMA_ajaxShowMessage(
|
||||
'<div class="error">' + PMA_messages.strInvalidPage + '</div>',
|
||||
false
|
||||
@ -557,7 +561,7 @@ AJAX.cache = {
|
||||
$('#selflink').html(record.selflink);
|
||||
AJAX.cache.menus.replace(AJAX.cache.menus.get(record.menu));
|
||||
PMA_commonParams.setAll(record.params);
|
||||
AJAX.scriptHandler.load(record.scripts, record.params.token);
|
||||
AJAX.scriptHandler.load(record.scripts, record.params ? record.params.token : PMA_commonParams.get('token'));
|
||||
AJAX.cache.current = ++index;
|
||||
});
|
||||
}
|
||||
|
||||
@ -1273,6 +1273,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
if (typeof data.sql_query != 'undefined') {
|
||||
// display feedback
|
||||
$('#sqlqueryresults').prepend(data.sql_query);
|
||||
PMA_highlightSQL($('#result_query'));
|
||||
}
|
||||
// hide and/or update the successfully saved cells
|
||||
g.hideEditCell(true, data);
|
||||
|
||||
@ -43,10 +43,19 @@ $(function () {
|
||||
*/
|
||||
$('#pma_navigation_reload').live('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('#pma_navigation .throbber')
|
||||
.first()
|
||||
.css('visibility', 'visible');
|
||||
// reload icon object
|
||||
var $icon = $(this).find('img');
|
||||
// source of the hidden throbber icon
|
||||
var icon_throbber_src = $('#pma_navigation .throbber').attr('src');
|
||||
// source of the reload icon
|
||||
var icon_reload_src = $icon.attr('src');
|
||||
// replace the source of the reload icon with the one for throbber
|
||||
$icon.attr('src', icon_throbber_src);
|
||||
PMA_reloadNavigation();
|
||||
// after one second, put back the reload icon
|
||||
setTimeout(function () {
|
||||
$icon.attr('src', icon_reload_src);
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
/**
|
||||
@ -260,7 +269,7 @@ function expandTreeNode($expandElem, callback)
|
||||
var $throbber = $('#pma_navigation .throbber')
|
||||
.first()
|
||||
.clone()
|
||||
.css('visibility', 'visible')
|
||||
.css({visibility: 'visible', display: 'block'})
|
||||
.click(false);
|
||||
$icon.hide();
|
||||
$throbber.insertBefore($icon);
|
||||
@ -557,12 +566,6 @@ function PMA_showCurrentNavigation()
|
||||
* @return void
|
||||
*/
|
||||
function PMA_reloadNavigation(callback) {
|
||||
var $throbber = $('#pma_navigation .throbber')
|
||||
.first()
|
||||
.css({
|
||||
'visibility' : 'visible',
|
||||
'display' : 'block'
|
||||
});
|
||||
var params = {
|
||||
reload: true,
|
||||
pos: $('#pma_navigation_tree').find('a.expander:first > span.pos').text()
|
||||
@ -605,10 +608,6 @@ function PMA_reloadNavigation(callback) {
|
||||
});
|
||||
var url = $('#pma_navigation').find('a.navigation_url').attr('href');
|
||||
$.post(url, params, function (data) {
|
||||
// Hide throbber if it's visible
|
||||
$('#pma_navigation .throbber')
|
||||
.first()
|
||||
.css('visibility', 'hidden');
|
||||
if (data.success) {
|
||||
$('#pma_navigation_tree').html(data.message).children('div').show();
|
||||
PMA_showCurrentNavigation();
|
||||
@ -1127,7 +1126,7 @@ PMA_fastFilter.filter.prototype.request = function ()
|
||||
$('#pma_navigation_content')
|
||||
.find('img.throbber')
|
||||
.clone()
|
||||
.css('visibility', 'visible')
|
||||
.css({visibility: 'visible', display: 'block'})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
if (!window.all) { // if IE
|
||||
if (document.all) { // if IE
|
||||
document.attachEvent(
|
||||
"onreadystatechange", // document load
|
||||
function () {
|
||||
|
||||
@ -289,6 +289,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
.show()
|
||||
.html(data.message);
|
||||
}
|
||||
PMA_highlightSQL($('#result_query'));
|
||||
|
||||
if (typeof data.ajax_reload != 'undefined') {
|
||||
if (data.ajax_reload.reload) {
|
||||
|
||||
@ -74,6 +74,8 @@ AJAX.registerTeardown('tbl_structure.js', function () {
|
||||
$("button.change_columns_anchor.ajax, input.change_columns_anchor.ajax").die('click');
|
||||
$("a.drop_column_anchor.ajax").die('click');
|
||||
$("a.add_primary_key_anchor.ajax").die('click');
|
||||
$("a.add_index_anchor.ajax").die('click');
|
||||
$("a.add_unique_anchor.ajax").die('click');
|
||||
$("#move_columns_anchor").die('click');
|
||||
$(".append_fields_form.ajax").unbind('submit');
|
||||
});
|
||||
@ -283,6 +285,84 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
}); // end $.PMA_confirm()
|
||||
}); //end Add Primary Key
|
||||
|
||||
/**
|
||||
* Ajax Event handler for 'Add Index'
|
||||
*/
|
||||
$("a.add_index_anchor.ajax").live('click', function (event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var curr_table_name String containing the name of the current table
|
||||
*/
|
||||
var curr_table_name = $(this).closest('form').find('input[name=table]').val();
|
||||
/**
|
||||
* @var curr_column_name String containing name of the field referred to by {@link curr_row}
|
||||
*/
|
||||
var curr_column_name = $(this).parents('tr').children('th').children('label').text();
|
||||
/**
|
||||
* @var question String containing the question to be asked for confirmation
|
||||
*/
|
||||
var question = $.sprintf(PMA_messages.strDoYouReally, 'ALTER TABLE `' + escapeHtml(curr_table_name) + '` ADD INDEX(`' + escapeHtml(curr_column_name) + '`);');
|
||||
$(this).PMA_confirm(question, $(this).attr('href'), function (url) {
|
||||
var $msg = PMA_ajaxShowMessage(PMA_messages.strAddingIndex, false);
|
||||
$.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function (data) {
|
||||
if (data.success === true) {
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
if ($('#result_query').length) {
|
||||
$('#result_query').remove();
|
||||
}
|
||||
if (data.sql_query) {
|
||||
$('<div id="result_query"></div>')
|
||||
.html(data.sql_query)
|
||||
.prependTo('#page_content');
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
}
|
||||
PMA_reloadNavigation();
|
||||
} else {
|
||||
PMA_ajaxShowMessage(PMA_messages.strErrorProcessingRequest + " : " + data.error, false);
|
||||
}
|
||||
}); // end $.get()
|
||||
}); // end $.PMA_confirm()
|
||||
}); //end Add Index
|
||||
|
||||
/**
|
||||
* Ajax Event handler for 'Add Unique'
|
||||
*/
|
||||
$("a.add_unique_anchor.ajax").live('click', function (event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var curr_table_name String containing the name of the current table
|
||||
*/
|
||||
var curr_table_name = $(this).closest('form').find('input[name=table]').val();
|
||||
/**
|
||||
* @var curr_column_name String containing name of the field referred to by {@link curr_row}
|
||||
*/
|
||||
var curr_column_name = $(this).parents('tr').children('th').children('label').text();
|
||||
/**
|
||||
* @var question String containing the question to be asked for confirmation
|
||||
*/
|
||||
var question = $.sprintf(PMA_messages.strDoYouReally, 'ALTER TABLE `' + escapeHtml(curr_table_name) + '` ADD UNIQUE(`' + escapeHtml(curr_column_name) + '`);');
|
||||
$(this).PMA_confirm(question, $(this).attr('href'), function (url) {
|
||||
var $msg = PMA_ajaxShowMessage(PMA_messages.strAddingUnique, false);
|
||||
$.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function (data) {
|
||||
if (data.success === true) {
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
if ($('#result_query').length) {
|
||||
$('#result_query').remove();
|
||||
}
|
||||
if (data.sql_query) {
|
||||
$('<div id="result_query"></div>')
|
||||
.html(data.sql_query)
|
||||
.prependTo('#page_content');
|
||||
PMA_highlightSQL($('#page_content'));
|
||||
}
|
||||
PMA_reloadNavigation();
|
||||
} else {
|
||||
PMA_ajaxShowMessage(PMA_messages.strErrorProcessingRequest + " : " + data.error, false);
|
||||
}
|
||||
}); // end $.get()
|
||||
}); // end $.PMA_confirm()
|
||||
}); //end Add Unique
|
||||
|
||||
/**
|
||||
* Inline move columns
|
||||
**/
|
||||
|
||||
@ -114,7 +114,7 @@ class PMA_Config
|
||||
*/
|
||||
function checkSystem()
|
||||
{
|
||||
$this->set('PMA_VERSION', '4.1.3-dev');
|
||||
$this->set('PMA_VERSION', '4.1.4-dev');
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
|
||||
@ -5986,8 +5986,8 @@ class PMA_DisplayResults
|
||||
}
|
||||
|
||||
/**
|
||||
* Display binary fields as hex string for PHP <5.4,
|
||||
* otherwise escape the contents if it may be displayed as hex
|
||||
* Display binary columns as hex string if requested
|
||||
* otherwise escape the contents using the best possible way
|
||||
*
|
||||
* @param string $content String to parse
|
||||
* @param string $binary_or_blob binary' or 'blob'
|
||||
@ -6004,22 +6004,29 @@ class PMA_DisplayResults
|
||||
private function _displayBinaryAsPrintable(
|
||||
$content, $binary_or_blob, $hexlength = null
|
||||
) {
|
||||
if ((PMA_PHP_INT_VERSION < 50400)
|
||||
|| (($binary_or_blob === 'binary')
|
||||
if ($binary_or_blob === 'binary'
|
||||
&& $_SESSION['tmpval']['display_binary_as_hex']
|
||||
&& PMA_Util::containsNonPrintableAscii($content))
|
||||
) {
|
||||
$content = bin2hex($content);
|
||||
if ($hexlength !== null) {
|
||||
$content = $GLOBALS['PMA_String']->substr($content, $hexlength);
|
||||
}
|
||||
} else {
|
||||
$content = htmlspecialchars(
|
||||
PMA_Util::replaceBinaryContents(
|
||||
$content
|
||||
),
|
||||
ENT_SUBSTITUTE
|
||||
);
|
||||
} elseif (PMA_Util::containsNonPrintableAscii($content)) {
|
||||
if (PMA_PHP_INT_VERSION < 50400) {
|
||||
$content = htmlspecialchars(
|
||||
PMA_Util::replaceBinaryContents(
|
||||
$content
|
||||
)
|
||||
);
|
||||
} else {
|
||||
// The ENT_SUBSTITUTE option is available for PHP >= 5.4.0
|
||||
$content = htmlspecialchars(
|
||||
PMA_Util::replaceBinaryContents(
|
||||
$content
|
||||
),
|
||||
ENT_SUBSTITUTE
|
||||
);
|
||||
}
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
@ -648,6 +648,11 @@ function PMA_downloadHeader($filename, $mimetype, $length = 0, $no_cache = true)
|
||||
header('Content-Disposition: attachment; filename="' . $filename . '"');
|
||||
}
|
||||
header('Content-Type: ' . $mimetype);
|
||||
// inform the server that compression has been done,
|
||||
// to avoid a double compression (for example with Apache + mod_deflate)
|
||||
if (strpos($mimetype, 'gzip') !== false) {
|
||||
header('Content-Encoding: gzip');
|
||||
}
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
if ($length > 0) {
|
||||
header('Content-Length: ' . $length);
|
||||
|
||||
@ -299,7 +299,10 @@ function PMA_getHtmlForImportOptionsPartialImport($timeout_passed, $offset)
|
||||
if (! (isset($timeout_passed) && $timeout_passed)) {
|
||||
$html .= ' <div class="formelementrow">';
|
||||
$html .= ' <label for="text_skip_queries">'
|
||||
. __('Number of rows to skip, starting from the first row:')
|
||||
. __(
|
||||
'Skip this number of queries (for SQL) or lines (for other '
|
||||
. 'formats), starting from the first one:'
|
||||
)
|
||||
. '</label>';
|
||||
$html .= ' <input type="number" name="skip_queries" value="'
|
||||
. PMA_pluginGetDefault('Import', 'skip_queries')
|
||||
|
||||
@ -53,7 +53,7 @@ class PMA_NavigationHeader
|
||||
$buffer .= PMA_Util::getImage(
|
||||
'ajax_clock_small.gif',
|
||||
__('Loading…'),
|
||||
array('style' => 'visibility: hidden;', 'class' => 'throbber')
|
||||
array('style' => 'visibility: hidden; display:none', 'class' => 'throbber')
|
||||
);
|
||||
$buffer .= '</div>'; // pma_navigation_header
|
||||
$buffer .= '<div id="pma_navigation_tree"' . $class . '>';
|
||||
|
||||
@ -2249,6 +2249,23 @@ function PMA_getUserGroupEditLink($username)
|
||||
. '</a>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns number of defined user groups
|
||||
*
|
||||
* @return integer $user_group_count
|
||||
*/
|
||||
function PMA_getUserGroupCount()
|
||||
{
|
||||
$user_group_table = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
|
||||
. '.' . PMA_Util::backquote($GLOBALS['cfg']['Server']['usergroups']);
|
||||
$sql_query = 'SELECT COUNT(*) FROM ' . $user_group_table;
|
||||
$user_group_count = $GLOBALS['dbi']->fetchValue(
|
||||
$sql_query, 0, 0, $GLOBALS['controllink']
|
||||
);
|
||||
|
||||
return $user_group_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function return the extra data array for the ajax behavior
|
||||
*
|
||||
@ -2271,6 +2288,11 @@ function PMA_getExtraDataForAjaxBehavior(
|
||||
}
|
||||
}
|
||||
|
||||
$user_group_count = 0;
|
||||
if ($GLOBALS['cfgRelation']['menuswork']) {
|
||||
$user_group_count = PMA_getUserGroupCount();
|
||||
}
|
||||
|
||||
$extra_data = array();
|
||||
if (strlen($sql_query)) {
|
||||
$extra_data['sql_query']
|
||||
@ -2330,7 +2352,7 @@ function PMA_getExtraDataForAjaxBehavior(
|
||||
. PMA_getUserEditLink($username, $hostname)
|
||||
. '</td>' . "\n";
|
||||
|
||||
if (isset($cfgRelation['users']) && isset($cfgRelation['usergroups'])) {
|
||||
if (isset($cfgRelation['menuswork']) && $user_group_count > 0) {
|
||||
$new_user_string .= '<td>'
|
||||
. PMA_getUserGroupEditLink($username)
|
||||
. '</td>' . "\n";
|
||||
@ -2862,6 +2884,10 @@ function PMA_getUsersOverview($result, $db_rights, $pmaThemeImage, $text_dir)
|
||||
$db_rights[$row['User']][$row['Host']] = $row;
|
||||
}
|
||||
@$GLOBALS['dbi']->freeResult($result);
|
||||
$user_group_count = 0;
|
||||
if ($GLOBALS['cfgRelation']['menuswork']) {
|
||||
$user_group_count = PMA_getUserGroupCount();
|
||||
}
|
||||
|
||||
$html_output
|
||||
= '<form name="usersForm" id="usersForm" action="server_privileges.php" '
|
||||
@ -2882,7 +2908,8 @@ function PMA_getUsersOverview($result, $db_rights, $pmaThemeImage, $text_dir)
|
||||
$html_output .= '<th>' . __('User group') . '</th>' . "\n";
|
||||
}
|
||||
$html_output .= '<th>' . __('Grant') . '</th>' . "\n"
|
||||
. '<th colspan="3">' . __('Action') . '</th>' . "\n"
|
||||
. '<th colspan="' . ($user_group_count > 0 ? '3' : '2') . '">'
|
||||
. __('Action') . '</th>' . "\n"
|
||||
. '</tr>' . "\n"
|
||||
. '</thead>' . "\n";
|
||||
|
||||
@ -2927,24 +2954,19 @@ function PMA_getUsersOverview($result, $db_rights, $pmaThemeImage, $text_dir)
|
||||
function PMA_getTableBodyForUserRightsTable($db_rights)
|
||||
{
|
||||
if ($GLOBALS['cfgRelation']['menuswork']) {
|
||||
$usersTable = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
|
||||
$users_table = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
|
||||
. "." . PMA_Util::backquote($GLOBALS['cfg']['Server']['users']);
|
||||
$sqlQuery = "SELECT * FROM " . $usersTable;
|
||||
$result = PMA_queryAsControlUser($sqlQuery, false);
|
||||
$groupAssignment = array();
|
||||
$sql_query = 'SELECT * FROM ' . $users_table;
|
||||
$result = PMA_queryAsControlUser($sql_query, false);
|
||||
$group_assignment = array();
|
||||
if ($result) {
|
||||
while ($row = $GLOBALS['dbi']->fetchAssoc($result)) {
|
||||
$groupAssignment[$row['username']] = $row['usergroup'];
|
||||
$group_assignment[$row['username']] = $row['usergroup'];
|
||||
}
|
||||
}
|
||||
$GLOBALS['dbi']->freeResult($result);
|
||||
|
||||
$userGroupTable = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
|
||||
. "." . PMA_Util::backquote($GLOBALS['cfg']['Server']['usergroups']);
|
||||
$sqlQuery = "SELECT COUNT(*) FROM " . $userGroupTable;
|
||||
$userGroupCount = $GLOBALS['dbi']->fetchValue(
|
||||
$sqlQuery, 0, 0, $GLOBALS['controllink']
|
||||
);
|
||||
$user_group_count = PMA_getUserGroupCount();
|
||||
}
|
||||
|
||||
$odd_row = true;
|
||||
@ -2992,8 +3014,8 @@ function PMA_getTableBodyForUserRightsTable($db_rights)
|
||||
. '</code></td>' . "\n";
|
||||
if ($GLOBALS['cfgRelation']['menuswork']) {
|
||||
$html_output .= '<td class="usrGroup">' . "\n"
|
||||
. (isset($groupAssignment[$host['User']])
|
||||
? $groupAssignment[$host['User']]
|
||||
. (isset($group_assignment[$host['User']])
|
||||
? $group_assignment[$host['User']]
|
||||
: ''
|
||||
)
|
||||
. '</td>' . "\n";
|
||||
@ -3008,7 +3030,7 @@ function PMA_getTableBodyForUserRightsTable($db_rights)
|
||||
$host['Host']
|
||||
)
|
||||
. '</td>';
|
||||
if ($GLOBALS['cfgRelation']['menuswork'] && $userGroupCount > 0) {
|
||||
if ($GLOBALS['cfgRelation']['menuswork'] && $user_group_count > 0) {
|
||||
if (empty($host['User'])) {
|
||||
$html_output .= '<td class="center"></td>';
|
||||
} else {
|
||||
|
||||
@ -230,10 +230,11 @@ function PMA_handleSortOrder($db, $table, &$analyzed_sql_results, &$full_sql_que
|
||||
if (empty($analyzed_sql_results['analyzed_sql'][0]['order_by_clause'])) {
|
||||
$sorted_col = $pmatable->getUiProp(PMA_Table::PROP_SORTED_COLUMN);
|
||||
if ($sorted_col) {
|
||||
//remove the backquoting and tablename from retrieved preference
|
||||
//to get just column name
|
||||
$sorted_col = str_replace('`', '', $sorted_col);
|
||||
$sorted_col = str_replace($table . '.', '', $sorted_col);
|
||||
//remove the tablename from retrieved preference
|
||||
//to get just the column name and the sort order
|
||||
$sorted_col = str_replace(
|
||||
PMA_Util::backquote($table) . '.', '', $sorted_col
|
||||
);
|
||||
// retrieve the remembered sorting order for current table
|
||||
$sql_order_to_append = ' ORDER BY ' . $sorted_col . ' ';
|
||||
$full_sql_query
|
||||
@ -2278,7 +2279,7 @@ function PMA_executeQueryAndSendQueryResponse($analyzed_sql_results,
|
||||
// Handle remembered sorting order, only for single table query
|
||||
// Handling is not required when it's a union query
|
||||
// (the parser never sets the 'union' key to 0)
|
||||
if (PMA_isRememberSortingOrder($analyzed_sql_results)
|
||||
if (PMA_isRememberSortingOrder($analyzed_sql_results)
|
||||
&& ! isset($analyzed_sql_results['analyzed_sql'][0]['queryflags']['union'])
|
||||
) {
|
||||
PMA_handleSortOrder($db, $table, $analyzed_sql_results, $full_sql_query);
|
||||
|
||||
@ -1451,7 +1451,6 @@ function PMA_getHtmlDivForMoveColumnsDialog()
|
||||
*/
|
||||
function PMA_getHtmlForEditView($url_params)
|
||||
{
|
||||
$retval = array();
|
||||
$query = "SELECT `VIEW_DEFINITION`, `CHECK_OPTION`, `DEFINER`, `SECURITY_TYPE`"
|
||||
. " FROM `INFORMATION_SCHEMA`.`VIEWS`"
|
||||
. " WHERE TABLE_SCHEMA='" . PMA_Util::sqlAddSlashes($GLOBALS['db']) . "'"
|
||||
@ -1836,7 +1835,11 @@ function PMA_getHtmlForActionRowInStructureTable($type, $tbl_storage_engine,
|
||||
$action_enabled = false;
|
||||
} else {
|
||||
$html_output .= '<a rel="samepage" '
|
||||
. ($hasLinkClass ? 'class="ajax add_primary_key_anchor" ' : '')
|
||||
. ($hasLinkClass ? 'class="ajax add_primary_key_anchor" ' :
|
||||
($action=='Index' ? 'class="ajax add_index_anchor"' :
|
||||
($action=='Unique' ? 'class="ajax add_unique_anchor"' : ' ')
|
||||
)
|
||||
)
|
||||
. 'href="sql.php?' . $url_query . '&sql_query='
|
||||
. urlencode(
|
||||
'ALTER TABLE ' . PMA_Util::backquote($GLOBALS['table'])
|
||||
@ -1968,7 +1971,7 @@ function PMA_getHtmlForActionsInTableStructure($type, $tbl_storage_engine,
|
||||
list($unique, $unique_enabled)
|
||||
= PMA_getHtmlForActionRowInStructureTable(
|
||||
$type, $tbl_storage_engine,
|
||||
'unique nowrap',
|
||||
'add_unique nowrap',
|
||||
isset($columns_with_unique_index[$field_name]),
|
||||
false, $url_query, $primary, 'ADD UNIQUE',
|
||||
__('An index has been added on %s'),
|
||||
@ -1978,7 +1981,7 @@ function PMA_getHtmlForActionsInTableStructure($type, $tbl_storage_engine,
|
||||
list($index, $index_enabled)
|
||||
= PMA_getHtmlForActionRowInStructureTable(
|
||||
$type, $tbl_storage_engine,
|
||||
'index nowrap', false, false, $url_query,
|
||||
'add_index nowrap', false, false, $url_query,
|
||||
$primary, 'ADD INDEX', __('An index has been added on %s'),
|
||||
'Index', $titles, $row, false
|
||||
);
|
||||
|
||||
@ -30,12 +30,12 @@ $response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->setBodyId('pmd_body');
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('jquery/jquery.fullscreen.js');
|
||||
$scripts->addFile('pmd/ajax.js');
|
||||
$scripts->addFile('pmd/history.js');
|
||||
$scripts->addFile('pmd/move.js');
|
||||
$scripts->addFile('pmd/iecanvas.js', true);
|
||||
$scripts->addFile('pmd/init.js');
|
||||
$scripts->addFile('jquery/jquery.fullscreen.js');
|
||||
|
||||
require 'libraries/db_common.inc.php';
|
||||
require 'libraries/db_info.inc.php';
|
||||
|
||||
971
po/be@latin.po
971
po/be@latin.po
File diff suppressed because it is too large
Load Diff
967
po/en_GB.po
967
po/en_GB.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
963
po/pt_BR.po
963
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
963
po/sr@latin.po
963
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
971
po/uz@latin.po
971
po/uz@latin.po
File diff suppressed because it is too large
Load Diff
975
po/zh_CN.po
975
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1246
po/zh_TW.po
1246
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@ -66,6 +66,8 @@ class PMA_ServerPrivileges_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['Confirm'] = "Confirm";
|
||||
$GLOBALS['cfg']['ShowHint'] = true;
|
||||
|
||||
$GLOBALS['cfgRelation'] = array();
|
||||
$GLOBALS['cfgRelation']['menuswork'] = false;
|
||||
$GLOBALS['table'] = "table";
|
||||
$GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
|
||||
$GLOBALS['pmaThemeImage'] = 'image';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user