Merge branch 'master' of github.com:phpmyadmin/phpmyadmin
This commit is contained in:
commit
e00f728959
@ -113,6 +113,7 @@
|
||||
<fileset dir="${basedir}">
|
||||
<include name="js/pmd/*.js" />
|
||||
<include name="js/*.js" />
|
||||
<include name="setup/*.js" />
|
||||
</fileset>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
@ -49,6 +49,7 @@ $tracker_url_bug = 'https://sourceforge.net/p/phpmyadmin/bugs/\\1/';
|
||||
$tracker_url_rfe = 'https://sourceforge.net/p/phpmyadmin/feature-requests/\\1/';
|
||||
$tracker_url_patch = 'https://sourceforge.net/p/phpmyadmin/patches/\\1/';
|
||||
$github_url = 'https://github.com/phpmyadmin/phpmyadmin/';
|
||||
$faq_url = 'http://docs.phpmyadmin.net/en/latest/faq.html';
|
||||
|
||||
$replaces = array(
|
||||
'@(http://[./a-zA-Z0-9.-_-]*[/a-zA-Z0-9_])@'
|
||||
@ -80,7 +81,7 @@ $replaces = array(
|
||||
|
||||
// FAQ entries
|
||||
'/FAQ ([0-9]+)\.([0-9a-z]+)/i'
|
||||
=> '<a href="http://docs.phpmyadmin.net/en/latest/faq.html#faq\\1-\\2">FAQ \\1.\\2</a>',
|
||||
=> '<a href="' . $faq_url . '#faq\\1-\\2">FAQ \\1.\\2</a>',
|
||||
|
||||
// linking bugs
|
||||
'/bug\s*#?([0-9]{6,})/i'
|
||||
|
||||
@ -91,21 +91,13 @@ if ($GLOBALS['dbi']->numRows($all_tables_result) > 0) {
|
||||
// Print out information about versions
|
||||
|
||||
$drop_image_or_text = '';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$drop_image_or_text .= PMA_Util::getImage(
|
||||
'b_drop.png',
|
||||
__('Delete tracking data for this table')
|
||||
);
|
||||
}
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('text', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showText('ActionLinksMode')) {
|
||||
$drop_image_or_text .= __('Drop');
|
||||
}
|
||||
|
||||
|
||||
@ -2876,6 +2876,14 @@ Developer
|
||||
Enable logging queries and execution times to be
|
||||
displayed in the bottom of main page (right frame).
|
||||
|
||||
.. config:option:: $cfg['DBG']['demo']
|
||||
|
||||
:type: boolean
|
||||
:default: false
|
||||
|
||||
Enable to let server present itself as demo server.
|
||||
This is used for <http://demo.phpmyadmin.net/>.
|
||||
|
||||
.. config:option:: $cfg['Error_Handler']['display']
|
||||
|
||||
:type: boolean
|
||||
|
||||
15
index.php
15
index.php
@ -110,6 +110,21 @@ echo '<div id="maincontainer">' . "\n";
|
||||
echo '<div id="main_pane_left">';
|
||||
if ($server > 0 || count($cfg['Servers']) > 1
|
||||
) {
|
||||
if ($cfg['DBG']['demo']) {
|
||||
echo '<div class="group">';
|
||||
echo '<h2>' . __('phpMyAdmin Demo Server') . '</h2>';
|
||||
echo '<p style="margin: 0.5em 1em 0.5em 1em">';
|
||||
printf(
|
||||
__(
|
||||
'You are using the demo server. You can do anything here, but '
|
||||
. 'please do not change root, debian-sys-maint and pma users. '
|
||||
. 'More information is available at %s.'
|
||||
),
|
||||
'<a href="http://demo.phpmyadmin.net/">demo.phpmyadmin.net</a>'
|
||||
);
|
||||
echo '</p>';
|
||||
echo '</div>';
|
||||
}
|
||||
echo '<div class="group">';
|
||||
echo '<h2>' . __('General Settings') . '</h2>';
|
||||
echo '<ul>';
|
||||
|
||||
44
js/ajax.js
44
js/ajax.js
@ -59,10 +59,12 @@ var AJAX = {
|
||||
registerOnload: function (file, func) {
|
||||
var eventName = 'onload_' + AJAX.hash(file);
|
||||
$(document).bind(eventName, func);
|
||||
this._debug && console.log(
|
||||
// no need to translate
|
||||
"Registered event " + eventName + " for file " + file
|
||||
);
|
||||
if (this._debug) {
|
||||
console.log(
|
||||
// no need to translate
|
||||
"Registered event " + eventName + " for file " + file
|
||||
);
|
||||
}
|
||||
return this;
|
||||
},
|
||||
/**
|
||||
@ -78,10 +80,12 @@ var AJAX = {
|
||||
registerTeardown: function (file, func) {
|
||||
var eventName = 'teardown_' + AJAX.hash(file);
|
||||
$(document).bind(eventName, func);
|
||||
this._debug && console.log(
|
||||
// no need to translate
|
||||
"Registered event " + eventName + " for file " + file
|
||||
);
|
||||
if (this._debug) {
|
||||
console.log(
|
||||
// no need to translate
|
||||
"Registered event " + eventName + " for file " + file
|
||||
);
|
||||
}
|
||||
return this;
|
||||
},
|
||||
/**
|
||||
@ -95,10 +99,12 @@ var AJAX = {
|
||||
fireOnload: function (file) {
|
||||
var eventName = 'onload_' + AJAX.hash(file);
|
||||
$(document).trigger(eventName);
|
||||
this._debug && console.log(
|
||||
// no need to translate
|
||||
"Fired event " + eventName + " for file " + file
|
||||
);
|
||||
if (this._debug) {
|
||||
console.log(
|
||||
// no need to translate
|
||||
"Fired event " + eventName + " for file " + file
|
||||
);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Called just before a page is torn down, once for every
|
||||
@ -111,10 +117,12 @@ var AJAX = {
|
||||
fireTeardown: function (file) {
|
||||
var eventName = 'teardown_' + AJAX.hash(file);
|
||||
$(document).triggerHandler(eventName);
|
||||
this._debug && console.log(
|
||||
// no need to translate
|
||||
"Fired event " + eventName + " for file " + file
|
||||
);
|
||||
if (this._debug) {
|
||||
console.log(
|
||||
// no need to translate
|
||||
"Fired event " + eventName + " for file " + file
|
||||
);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Event handler for clicks on links and form submissions
|
||||
@ -169,7 +177,9 @@ var AJAX = {
|
||||
// Add a list of menu hashes that we have in the cache to the request
|
||||
params += AJAX.cache.menus.getRequestParam();
|
||||
|
||||
AJAX._debug && console.log("Loading: " + url); // no need to translate
|
||||
if (AJAX._debug) {
|
||||
console.log("Loading: " + url); // no need to translate
|
||||
}
|
||||
|
||||
if (isLink) {
|
||||
AJAX.active = true;
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
/**
|
||||
* Conditionally included if framing is not allowed
|
||||
*/
|
||||
if(self == top) {
|
||||
document.documentElement.style.display = 'block' ;
|
||||
if (self == top) {
|
||||
document.documentElement.style.display = 'block';
|
||||
} else {
|
||||
top.location = self.location ;
|
||||
top.location = self.location;
|
||||
}
|
||||
|
||||
46
js/export.js
46
js/export.js
@ -4,6 +4,28 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Disables the "Dump some row(s)" sub-options
|
||||
*/
|
||||
function disable_dump_some_rows_sub_options()
|
||||
{
|
||||
$("label[for='limit_to']").fadeTo('fast', 0.4);
|
||||
$("label[for='limit_from']").fadeTo('fast', 0.4);
|
||||
$("input[type='text'][name='limit_to']").prop('disabled', 'disabled');
|
||||
$("input[type='text'][name='limit_from']").prop('disabled', 'disabled');
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the "Dump some row(s)" sub-options
|
||||
*/
|
||||
function enable_dump_some_rows_sub_options()
|
||||
{
|
||||
$("label[for='limit_to']").fadeTo('fast', 1);
|
||||
$("label[for='limit_from']").fadeTo('fast', 1);
|
||||
$("input[type='text'][name='limit_to']").prop('disabled', '');
|
||||
$("input[type='text'][name='limit_from']").prop('disabled', '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
@ -221,7 +243,7 @@ AJAX.registerOnload('export.js', function () {
|
||||
* Initially disables the "Dump some row(s)" sub-options
|
||||
*/
|
||||
disable_dump_some_rows_sub_options();
|
||||
|
||||
|
||||
/**
|
||||
* Disables the "Dump some row(s)" sub-options when it is not selected
|
||||
*/
|
||||
@ -233,25 +255,3 @@ AJAX.registerOnload('export.js', function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Disables the "Dump some row(s)" sub-options
|
||||
*/
|
||||
function disable_dump_some_rows_sub_options()
|
||||
{
|
||||
$("label[for='limit_to']").fadeTo('fast', 0.4);
|
||||
$("label[for='limit_from']").fadeTo('fast', 0.4);
|
||||
$("input[type='text'][name='limit_to']").prop('disabled', 'disabled');
|
||||
$("input[type='text'][name='limit_from']").prop('disabled', 'disabled');
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the "Dump some row(s)" sub-options
|
||||
*/
|
||||
function enable_dump_some_rows_sub_options()
|
||||
{
|
||||
$("label[for='limit_to']").fadeTo('fast', 1);
|
||||
$("label[for='limit_from']").fadeTo('fast', 1);
|
||||
$("input[type='text'][name='limit_to']").prop('disabled', '');
|
||||
$("input[type='text'][name='limit_from']").prop('disabled', '');
|
||||
}
|
||||
|
||||
@ -4,21 +4,6 @@
|
||||
*
|
||||
* @param object event data
|
||||
*/
|
||||
|
||||
AJAX.registerTeardown('keyhandler.js', function() {
|
||||
$('#table_columns').die('keydown keyup');
|
||||
$('table.insertRowTable').die('keydown keyup');
|
||||
});
|
||||
|
||||
AJAX.registerOnload('keyhandler.js', function() {
|
||||
$('#table_columns').live('keydown keyup', function(event) {
|
||||
onKeyDownArrowsHandler(event.originalEvent);
|
||||
});
|
||||
$('table.insertRowTable').live('keydown keyup', function(event) {
|
||||
onKeyDownArrowsHandler(event.originalEvent);
|
||||
});
|
||||
});
|
||||
|
||||
function onKeyDownArrowsHandler(e)
|
||||
{
|
||||
e = e || window.event;
|
||||
@ -28,7 +13,8 @@ function onKeyDownArrowsHandler(e)
|
||||
}
|
||||
if (o.tagName != "TEXTAREA" && o.tagName != "INPUT" && o.tagName != "SELECT") {
|
||||
return;
|
||||
}console.log(e);
|
||||
}
|
||||
console.log(e);
|
||||
if (navigator.userAgent.toLowerCase().indexOf('applewebkit/') != -1) {
|
||||
if (e.ctrlKey || e.shiftKey || !e.altKey) {
|
||||
return;
|
||||
@ -101,3 +87,17 @@ function onKeyDownArrowsHandler(e)
|
||||
}
|
||||
e.returnValue = false;
|
||||
}
|
||||
|
||||
AJAX.registerTeardown('keyhandler.js', function () {
|
||||
$('#table_columns').die('keydown keyup');
|
||||
$('table.insertRowTable').die('keydown keyup');
|
||||
});
|
||||
|
||||
AJAX.registerOnload('keyhandler.js', function () {
|
||||
$('#table_columns').live('keydown keyup', function (event) {
|
||||
onKeyDownArrowsHandler(event.originalEvent);
|
||||
});
|
||||
$('table.insertRowTable').live('keydown keyup', function (event) {
|
||||
onKeyDownArrowsHandler(event.originalEvent);
|
||||
});
|
||||
});
|
||||
|
||||
@ -15,7 +15,7 @@ $(function () {
|
||||
}
|
||||
|
||||
// Do not let the page reload on submitting the fast filter
|
||||
$(document).on('submit', '.fast_filter', function(event) {
|
||||
$(document).on('submit', '.fast_filter', function (event) {
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
@ -220,7 +220,7 @@ $(function () {
|
||||
event.preventDefault();
|
||||
$.ajax({
|
||||
url: $(this).attr('href') + '&ajax_request=true',
|
||||
success: function(data) {
|
||||
success: function (data) {
|
||||
if (data.success === true) {
|
||||
PMA_reloadNavigation();
|
||||
} else {
|
||||
@ -267,7 +267,7 @@ $(function () {
|
||||
var $msg = PMA_ajaxShowMessage();
|
||||
$.ajax({
|
||||
url: $(this).attr('href') + '&ajax_request=true',
|
||||
success: function(data) {
|
||||
success: function (data) {
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
if (data.success === true) {
|
||||
$tr.remove();
|
||||
|
||||
@ -188,7 +188,7 @@ AJAX.registerOnload('server_privileges.js', function () {
|
||||
$("#fieldset_add_user_login input[name='username']").live("focusout", function () {
|
||||
var username = $(this).val();
|
||||
var $warning = $("#user_exists_warning");
|
||||
if ($("#select_pred_username").val() == 'userdefined' && username != '') {
|
||||
if ($("#select_pred_username").val() == 'userdefined' && username !== '') {
|
||||
var href = $("form[name='usersForm']").attr('action');
|
||||
var params = {
|
||||
'ajax_request' : true,
|
||||
@ -410,7 +410,7 @@ AJAX.registerOnload('server_privileges.js', function () {
|
||||
}
|
||||
$div.html(data.message);
|
||||
PMA_highlightSQL($div);
|
||||
var $div = $('#edit_user_dialog');
|
||||
$div = $('#edit_user_dialog');
|
||||
displayPasswordGenerateButton();
|
||||
$(checkboxes_sel).trigger("change");
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
@ -456,14 +456,16 @@ AJAX.registerOnload('server_privileges.js', function () {
|
||||
// If any option other than 'keep the old one'(option 4) is chosen, we need to remove
|
||||
// the old one from the table.
|
||||
var $row_to_remove;
|
||||
if (curr_submit_name == 'change_copy'
|
||||
&& $('input[name=mode]:checked', '#fieldset_mode').val() != '4') {
|
||||
if (curr_submit_name == 'change_copy' &&
|
||||
$('input[name=mode]:checked', '#fieldset_mode').val() != '4'
|
||||
) {
|
||||
var old_username = $t.find('input[name="old_username"]').val();
|
||||
var old_hostname = $t.find('input[name="old_hostname"]').val();
|
||||
$('#usersForm tbody tr').each(function () {
|
||||
var $tr = $(this);
|
||||
if ($tr.find('td:nth-child(2) label').text() == old_username
|
||||
&& $tr.find('td:nth-child(3)').text() == old_hostname) {
|
||||
if ($tr.find('td:nth-child(2) label').text() == old_username &&
|
||||
$tr.find('td:nth-child(3)').text() == old_hostname
|
||||
) {
|
||||
$row_to_remove = $tr;
|
||||
return false;
|
||||
}
|
||||
@ -584,9 +586,7 @@ AJAX.registerOnload('server_privileges.js', function () {
|
||||
); //end $.post
|
||||
});
|
||||
// if exporting non-ajax, highlight anyways
|
||||
if ($("textarea.export").length > 0
|
||||
&& typeof CodeMirror != 'undefined')
|
||||
{
|
||||
if ($("textarea.export").length > 0 && typeof CodeMirror != 'undefined') {
|
||||
CodeMirror.fromTextArea(
|
||||
$('textarea.export')[0],
|
||||
{
|
||||
|
||||
@ -1205,7 +1205,7 @@ AJAX.registerOnload('server_status_monitor.js', function () {
|
||||
|| settings.title === PMA_messages.strConnections
|
||||
) {
|
||||
settings.axes.yaxis.tickOptions = {
|
||||
formatter: function(format, val) {
|
||||
formatter: function (format, val) {
|
||||
if (Math.abs(val) >= 1000000)
|
||||
return $.jqplot.sprintf("%.3g M", val/1000000);
|
||||
else if (Math.abs(val) >= 1000)
|
||||
|
||||
@ -56,9 +56,8 @@ AJAX.registerOnload('server_variables.js', function () {
|
||||
var mark_next = false, $row, odd_row = false;
|
||||
$('#serverVariables .var-row').not('.var-header').each(function () {
|
||||
$row = $(this);
|
||||
if (mark_next
|
||||
|| textFilter === null
|
||||
|| textFilter.exec($row.find('.var-name').text())
|
||||
if (mark_next || textFilter === null ||
|
||||
textFilter.exec($row.find('.var-name').text())
|
||||
) {
|
||||
// If current global value is different from session value
|
||||
// (has class diffSession), then display that one too
|
||||
|
||||
16
js/sql.js
16
js/sql.js
@ -104,7 +104,7 @@ AJAX.registerTeardown('sql.js', function () {
|
||||
*/
|
||||
AJAX.registerOnload('sql.js', function () {
|
||||
// Delete row from SQL results
|
||||
$('a.delete_row.ajax').live('click',function (e) {
|
||||
$('a.delete_row.ajax').live('click', function (e) {
|
||||
e.preventDefault();
|
||||
var question = $.sprintf(PMA_messages.strDoYouReally, $(this).closest('td').find('div').text());
|
||||
var $link = $(this);
|
||||
@ -589,11 +589,9 @@ AJAX.registerOnload('sql.js', function () {
|
||||
*/
|
||||
function makeProfilingChart()
|
||||
{
|
||||
if ($('#profilingchart').length === 0
|
||||
|| $('#profilingchart').html().length !== 0
|
||||
|| !$.jqplot
|
||||
|| !$.jqplot.Highlighter
|
||||
|| !$.jqplot.PieRenderer
|
||||
if ($('#profilingchart').length === 0 ||
|
||||
$('#profilingchart').html().length !== 0 ||
|
||||
!$.jqplot || !$.jqplot.Highlighter || !$.jqplot.PieRenderer
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@ -621,7 +619,7 @@ function initProfilingTables()
|
||||
|
||||
$('#profiletable').tablesorter({
|
||||
widgets: ['zebra'],
|
||||
sortList: [[0,0]],
|
||||
sortList: [[0, 0]],
|
||||
textExtraction: function (node) {
|
||||
if (node.children.length > 0) {
|
||||
return node.children[0].innerHTML;
|
||||
@ -630,10 +628,10 @@ function initProfilingTables()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#profilesummarytable').tablesorter({
|
||||
widgets: ['zebra'],
|
||||
sortList: [[1,1]],
|
||||
sortList: [[1, 1]],
|
||||
textExtraction: function (node) {
|
||||
if (node.children.length > 0) {
|
||||
return node.children[0].innerHTML;
|
||||
|
||||
@ -54,9 +54,10 @@ AJAX.registerOnload('tbl_chart.js', function () {
|
||||
$('input[name="chartType"]').click(function () {
|
||||
currentSettings.type = $(this).val();
|
||||
drawChart();
|
||||
if ($(this).val() == 'bar' || $(this).val() == 'column'
|
||||
|| $(this).val() == 'line' || $(this).val() == 'area'
|
||||
|| $(this).val() == 'timeline' || $(this).val() == 'spline') {
|
||||
if ($(this).val() == 'bar' || $(this).val() == 'column' ||
|
||||
$(this).val() == 'line' || $(this).val() == 'area' ||
|
||||
$(this).val() == 'timeline' || $(this).val() == 'spline'
|
||||
) {
|
||||
$('span.barStacked').show();
|
||||
} else {
|
||||
$('span.barStacked').hide();
|
||||
@ -151,8 +152,9 @@ AJAX.registerOnload('tbl_chart.js', function () {
|
||||
*
|
||||
*/
|
||||
$("#tblchartform").live('submit', function (event) {
|
||||
if (!checkFormElementInRange(this, 'session_max_rows', PMA_messages.strNotValidRowNumber, 1)
|
||||
|| !checkFormElementInRange(this, 'pos', PMA_messages.strNotValidRowNumber, 0 - 1)) {
|
||||
if (!checkFormElementInRange(this, 'session_max_rows', PMA_messages.strNotValidRowNumber, 1) ||
|
||||
!checkFormElementInRange(this, 'pos', PMA_messages.strNotValidRowNumber, 0 - 1)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ AJAX.registerOnload('tbl_find_replace.js', function () {
|
||||
|
||||
$('#toggle_find')
|
||||
.html(PMA_messages.strHideFindNReplaceCriteria)
|
||||
.click(function() {
|
||||
.click(function () {
|
||||
var $link = $(this);
|
||||
$('#find_replace_form').slideToggle();
|
||||
if ($link.text() == PMA_messages.strHideFindNReplaceCriteria) {
|
||||
@ -25,10 +25,10 @@ AJAX.registerOnload('tbl_find_replace.js', function () {
|
||||
} else {
|
||||
$link.text(PMA_messages.strHideFindNReplaceCriteria);
|
||||
}
|
||||
return false
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#find_replace_form').submit(function(e) {
|
||||
$('#find_replace_form').submit(function (e) {
|
||||
e.preventDefault();
|
||||
var findReplaceForm = $('#find_replace_form');
|
||||
PMA_prepareForAjaxRequest(findReplaceForm);
|
||||
@ -44,4 +44,4 @@ AJAX.registerOnload('tbl_find_replace.js', function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -60,13 +60,13 @@ function getDropdownValues($dropdown) {
|
||||
+ '&table=' + $form.find('input[name="table"]').val()
|
||||
+ '&foreign=' + (foreign != '')
|
||||
+ '&foreignDb=' + encodeURIComponent(foreignDb)
|
||||
+ (foreignTable !== null ?
|
||||
+ (foreignTable !== null ?
|
||||
'&foreignTable=' + encodeURIComponent(foreignTable) : ''
|
||||
);
|
||||
$.ajax({
|
||||
url: url,
|
||||
datatype: 'json',
|
||||
success: function(data) {
|
||||
success: function (data) {
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
if (data.success) {
|
||||
// if the changed dropdown is a database selector
|
||||
@ -90,7 +90,7 @@ function setDropdownValues($dropdown, values) {
|
||||
var optionsAsString = '';
|
||||
// add an empty string to the beginning for empty selection
|
||||
values.unshift('');
|
||||
$.each(values, function() {
|
||||
$.each(values, function () {
|
||||
optionsAsString += "<option value='" + this + "'>" + this + "</option>";
|
||||
})
|
||||
$dropdown.append($(optionsAsString));
|
||||
@ -121,7 +121,7 @@ AJAX.registerOnload('tbl_relation.js', function () {
|
||||
+ ' select[name^="destination_table"],'
|
||||
+ ' select[name^="destination_foreign_db"],'
|
||||
+ ' select[name^="destination_foreign_table"]')
|
||||
.change(function() {
|
||||
.change(function () {
|
||||
getDropdownValues($(this));
|
||||
});
|
||||
});
|
||||
|
||||
@ -18,6 +18,38 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* This function returns the horizontal space available for the menu in pixels.
|
||||
* To calculate this value we start we the width of the main panel, then we
|
||||
* substract the margin of the page content, then we substract any cellspacing
|
||||
* that the table may have (original theme only) and finally we substract the
|
||||
* width of all columns of the table except for the last one (which is where
|
||||
* the menu will go). What we should end up with is the distance between the
|
||||
* start of the last column on the table and the edge of the page, again this
|
||||
* is the space available for the menu.
|
||||
*
|
||||
* In the case where the table cell where the menu will be displayed is already
|
||||
* off-screen (the table is wider than the page), a negative value will be returned,
|
||||
* but this will be treated as a zero by the menuResizer plugin.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
function PMA_tbl_structure_menu_resizer_callback() {
|
||||
var pagewidth = $('body').width();
|
||||
var $page = $('#page_content');
|
||||
pagewidth -= $page.outerWidth(true) - $page.outerWidth();
|
||||
var columnsWidth = 0;
|
||||
var $columns = $('#tablestructure').find('tr:eq(1)').find('td,th');
|
||||
$columns.not(':last').each(function () {
|
||||
columnsWidth += $(this).outerWidth(true);
|
||||
});
|
||||
var totalCellSpacing = $('#tablestructure').width();
|
||||
$columns.each(function () {
|
||||
totalCellSpacing -= $(this).outerWidth(true);
|
||||
});
|
||||
return pagewidth - columnsWidth - totalCellSpacing - 15; // 15px extra margin
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload fields table
|
||||
*/
|
||||
@ -74,12 +106,12 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
//User wants to submit the form
|
||||
$msg = PMA_ajaxShowMessage();
|
||||
$.post($form.attr('action'), $form.serialize() + '&do_save_data=1', function (data) {
|
||||
if ($("#sqlqueryresults").length != 0) {
|
||||
if ($("#sqlqueryresults").length !== 0) {
|
||||
$("#sqlqueryresults").remove();
|
||||
} else if ($(".error:not(.tab)").length != 0) {
|
||||
} else if ($(".error:not(.tab)").length !== 0) {
|
||||
$(".error:not(.tab)").remove();
|
||||
}
|
||||
if (data.success == true) {
|
||||
if (data.success === true) {
|
||||
$("#page_content")
|
||||
.empty()
|
||||
.append(data.message)
|
||||
@ -174,7 +206,7 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
$(this).PMA_confirm(question, $(this).attr('href'), function (url) {
|
||||
var $msg = PMA_ajaxShowMessage(PMA_messages.strDroppingColumn, false);
|
||||
$.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true, 'ajax_page_request' : true}, function (data) {
|
||||
if (data.success == true) {
|
||||
if (data.success === true) {
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
if ($('#result_query').length) {
|
||||
$('#result_query').remove();
|
||||
@ -372,38 +404,6 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* This function returns the horizontal space available for the menu in pixels.
|
||||
* To calculate this value we start we the width of the main panel, then we
|
||||
* substract the margin of the page content, then we substract any cellspacing
|
||||
* that the table may have (original theme only) and finally we substract the
|
||||
* width of all columns of the table except for the last one (which is where
|
||||
* the menu will go). What we should end up with is the distance between the
|
||||
* start of the last column on the table and the edge of the page, again this
|
||||
* is the space available for the menu.
|
||||
*
|
||||
* In the case where the table cell where the menu will be displayed is already
|
||||
* off-screen (the table is wider than the page), a negative value will be returned,
|
||||
* but this will be treated as a zero by the menuResizer plugin.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
function PMA_tbl_structure_menu_resizer_callback() {
|
||||
var pagewidth = $('body').width();
|
||||
var $page = $('#page_content');
|
||||
pagewidth -= $page.outerWidth(true) - $page.outerWidth();
|
||||
var columnsWidth = 0;
|
||||
var $columns = $('#tablestructure').find('tr:eq(1)').find('td,th');
|
||||
$columns.not(':last').each(function () {
|
||||
columnsWidth += $(this).outerWidth(true);
|
||||
});
|
||||
var totalCellSpacing = $('#tablestructure').width();
|
||||
$columns.each(function () {
|
||||
totalCellSpacing -= $(this).outerWidth(true);
|
||||
});
|
||||
return pagewidth - columnsWidth - totalCellSpacing - 15; // 15px extra margin
|
||||
}
|
||||
|
||||
/** Handler for "More" dropdown in structure table rows */
|
||||
AJAX.registerOnload('tbl_structure.js', function () {
|
||||
if ($('#fieldsForm').hasClass('HideStructureActions')) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// todo: change the axis
|
||||
// TODO: change the axis
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
** @fileoverview JavaScript functions used on tbl_select.php
|
||||
@ -57,7 +57,9 @@ function isEmpty(obj) {
|
||||
** @param type Sring Field type(datetime/timestamp/time/date)
|
||||
**/
|
||||
function getTimeStamp(val, type) {
|
||||
if (type.toString().search(/datetime/i) != -1 || type.toString().search(/timestamp/i) != -1) {
|
||||
if (type.toString().search(/datetime/i) != -1 ||
|
||||
type.toString().search(/timestamp/i) != -1
|
||||
) {
|
||||
return $.datepicker.parseDateTime('yy-mm-dd', 'HH:mm:ss', val);
|
||||
}
|
||||
else if (type.toString().search(/time/i) != -1) {
|
||||
@ -73,10 +75,14 @@ function getTimeStamp(val, type) {
|
||||
** @param field: field type (as in database structure)
|
||||
**/
|
||||
function getType(field) {
|
||||
if (field.toString().search(/int/i) != -1 || field.toString().search(/decimal/i) != -1
|
||||
|| field.toString().search(/year/i) != -1) {
|
||||
if (field.toString().search(/int/i) != -1 ||
|
||||
field.toString().search(/decimal/i) != -1 ||
|
||||
field.toString().search(/year/i) != -1
|
||||
) {
|
||||
return 'numeric';
|
||||
} else if (field.toString().search(/time/i) != -1 || field.toString().search(/date/i) != -1) {
|
||||
} else if (field.toString().search(/time/i) != -1 ||
|
||||
field.toString().search(/date/i) != -1
|
||||
) {
|
||||
return 'time';
|
||||
} else {
|
||||
return 'text';
|
||||
@ -320,10 +326,10 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () {
|
||||
series[0][searchedDataKey][0] =
|
||||
getTimeStamp(selectedRow[xLabel], $('#types_0').val());
|
||||
} else {
|
||||
// todo: text values
|
||||
// TODO: text values
|
||||
}
|
||||
currentChart.series[0].data = series[0];
|
||||
// todo: axis changing
|
||||
// TODO: axis changing
|
||||
currentChart.replot();
|
||||
|
||||
}
|
||||
@ -336,10 +342,10 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () {
|
||||
series[0][searchedDataKey][1] =
|
||||
getTimeStamp(selectedRow[yLabel], $('#types_1').val());
|
||||
} else {
|
||||
// todo: text values
|
||||
// TODO: text values
|
||||
}
|
||||
currentChart.series[0].data = series[0];
|
||||
// todo: axis changing
|
||||
// TODO: axis changing
|
||||
currentChart.replot();
|
||||
}
|
||||
} //End plot update
|
||||
@ -448,6 +454,9 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () {
|
||||
var xMin; // xAxis extreme min
|
||||
var yMax; // yAxis extreme max
|
||||
var yMin; // yAxis extreme min
|
||||
var xVal;
|
||||
var yVal;
|
||||
var format;
|
||||
|
||||
var options = {
|
||||
series: [
|
||||
@ -497,11 +506,10 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () {
|
||||
|
||||
if (xType == 'time') {
|
||||
var originalXType = $('#types_0').val();
|
||||
var format;
|
||||
if (originalXType == 'date') {
|
||||
format = '%Y-%m-%d';
|
||||
}
|
||||
// todo: does not seem to work
|
||||
// TODO: does not seem to work
|
||||
//else if (originalXType == 'time') {
|
||||
// format = '%H:%M';
|
||||
//} else {
|
||||
@ -516,7 +524,6 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () {
|
||||
}
|
||||
if (yType == 'time') {
|
||||
var originalYType = $('#types_1').val();
|
||||
var format;
|
||||
if (originalYType == 'date') {
|
||||
format = '%Y-%m-%d';
|
||||
}
|
||||
@ -530,16 +537,16 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () {
|
||||
|
||||
$.each(searchedData, function (key, value) {
|
||||
if (xType == 'numeric') {
|
||||
var xVal = parseFloat(value[xLabel]);
|
||||
xVal = parseFloat(value[xLabel]);
|
||||
}
|
||||
if (xType == 'time') {
|
||||
var xVal = getTimeStamp(value[xLabel], originalXType);
|
||||
xVal = getTimeStamp(value[xLabel], originalXType);
|
||||
}
|
||||
if (yType == 'numeric') {
|
||||
var yVal = parseFloat(value[yLabel]);
|
||||
yVal = parseFloat(value[yLabel]);
|
||||
}
|
||||
if (yType == 'time') {
|
||||
var yVal = getTimeStamp(value[yLabel], originalYType);
|
||||
yVal = getTimeStamp(value[yLabel], originalYType);
|
||||
}
|
||||
series[0].push([
|
||||
xVal,
|
||||
|
||||
@ -535,19 +535,11 @@ class PMA_DisplayResults
|
||||
) {
|
||||
|
||||
$caption_output = '';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
|
||||
$caption_output .= $caption;
|
||||
}
|
||||
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('text', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showText('TableNavigationLinksMode')) {
|
||||
$caption_output .= ' ' . $title;
|
||||
}
|
||||
$title_output = ' title="' . $title . '"';
|
||||
|
||||
@ -62,6 +62,36 @@ class PMA_Footer
|
||||
$this->_isMinimal = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the message for demo server to error messages
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function _addDemoMessage()
|
||||
{
|
||||
$message = '<a href="/">' . __('phpMyAdmin Demo Server') . '</a>: ';
|
||||
if (file_exists('./revision-info.php')) {
|
||||
include './revision-info.php';
|
||||
$message .= sprintf(
|
||||
__('Currently running Git revision %1$s from the %2$s branch.'),
|
||||
'<a target="_top" href="' . $repobase . $fullrevision . '">'
|
||||
. $revision .'</a>',
|
||||
'<a target="_top" href="' . $repobranchbase . $branch . '">'
|
||||
. $branch . '</a>'
|
||||
);
|
||||
} else {
|
||||
$message .= __('Git information missing!');
|
||||
}
|
||||
|
||||
$GLOBALS['error_handler']->addError(
|
||||
$message,
|
||||
E_USER_NOTICE,
|
||||
'',
|
||||
'',
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the debug messages
|
||||
*
|
||||
@ -131,11 +161,7 @@ class PMA_Footer
|
||||
$retval .= '<div id="selflink" class="print_ignore">';
|
||||
$retval .= '<a href="' . $url . '"'
|
||||
. ' title="' . __('Open new phpMyAdmin window') . '" target="_blank">';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TabsMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TabsMode')) {
|
||||
$retval .= PMA_Util::getImage(
|
||||
'window-new.png',
|
||||
__('Open new phpMyAdmin window')
|
||||
@ -240,6 +266,9 @@ class PMA_Footer
|
||||
if (! $this->_isAjax) {
|
||||
$retval .= "</div>";
|
||||
}
|
||||
if ($GLOBALS['cfg']['DBG']['demo']) {
|
||||
$this->_addDemoMessage();
|
||||
}
|
||||
if (! $this->_isAjax && ! $this->_isMinimal) {
|
||||
if (PMA_getenv('SCRIPT_NAME')
|
||||
&& empty($_POST)
|
||||
|
||||
@ -178,13 +178,13 @@ class PMA_Menu
|
||||
$item = '<a href="%1$s?%2$s" class="item">';
|
||||
|
||||
|
||||
if (in_array($GLOBALS['cfg']['TabsMode'], array('text', 'both'))) {
|
||||
if (PMA_Util::showText('TabsMode')) {
|
||||
$item .= '%4$s: ';
|
||||
}
|
||||
$item .= '%3$s</a>';
|
||||
$retval .= "<div id='floating_menubar'></div>";
|
||||
$retval .= "<div id='serverinfo'>";
|
||||
if (in_array($GLOBALS['cfg']['TabsMode'], array('icons', 'both'))) {
|
||||
if (PMA_Util::showIcons('TabsMode')) {
|
||||
$retval .= PMA_Util::getImage(
|
||||
's_host.png',
|
||||
'',
|
||||
@ -201,7 +201,7 @@ class PMA_Menu
|
||||
|
||||
if (strlen($this->_db)) {
|
||||
$retval .= $separator;
|
||||
if (in_array($GLOBALS['cfg']['TabsMode'], array('icons', 'both'))) {
|
||||
if (PMA_Util::showIcons('TabsMode')) {
|
||||
$retval .= PMA_Util::getImage(
|
||||
's_db.png',
|
||||
'',
|
||||
@ -223,7 +223,7 @@ class PMA_Menu
|
||||
include './libraries/tbl_info.inc.php';
|
||||
|
||||
$retval .= $separator;
|
||||
if (in_array($GLOBALS['cfg']['TabsMode'], array('icons', 'both'))) {
|
||||
if (PMA_Util::showIcons('TabsMode')) {
|
||||
$icon = $tbl_is_view ? 'b_views.png' : 's_tbl.png';
|
||||
$retval .= PMA_Util::getImage(
|
||||
$icon,
|
||||
|
||||
@ -92,12 +92,14 @@ class PMA_Tracker
|
||||
*/
|
||||
static protected function init()
|
||||
{
|
||||
self::$pma_table = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb']) .".".
|
||||
PMA_Util::backquote($GLOBALS['cfg']['Server']['tracking']);
|
||||
self::$pma_table = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
|
||||
. '.' . PMA_Util::backquote($GLOBALS['cfg']['Server']['tracking']);
|
||||
|
||||
self::$add_drop_table = $GLOBALS['cfg']['Server']['tracking_add_drop_table'];
|
||||
self::$add_drop_table
|
||||
= $GLOBALS['cfg']['Server']['tracking_add_drop_table'];
|
||||
|
||||
self::$add_drop_view = $GLOBALS['cfg']['Server']['tracking_add_drop_view'];
|
||||
self::$add_drop_view
|
||||
= $GLOBALS['cfg']['Server']['tracking_add_drop_view'];
|
||||
|
||||
self::$add_drop_database
|
||||
= $GLOBALS['cfg']['Server']['tracking_add_drop_database'];
|
||||
@ -330,7 +332,9 @@ class PMA_Tracker
|
||||
'" . PMA_Util::sqlAddSlashes($snapshot) . "',
|
||||
'" . PMA_Util::sqlAddSlashes($create_sql) . "',
|
||||
'" . PMA_Util::sqlAddSlashes("\n") . "',
|
||||
'" . PMA_Util::sqlAddSlashes(self::_transformTrackingSet($tracking_set)) . "' )";
|
||||
'" . PMA_Util::sqlAddSlashes(
|
||||
self::_transformTrackingSet($tracking_set)
|
||||
) . "' )";
|
||||
|
||||
$result = PMA_queryAsControlUser($sql_query);
|
||||
|
||||
@ -419,7 +423,9 @@ class PMA_Tracker
|
||||
'" . PMA_Util::sqlAddSlashes('') . "',
|
||||
'" . PMA_Util::sqlAddSlashes($create_sql) . "',
|
||||
'" . PMA_Util::sqlAddSlashes("\n") . "',
|
||||
'" . PMA_Util::sqlAddSlashes(self::_transformTrackingSet($tracking_set)) . "' )";
|
||||
'" . PMA_Util::sqlAddSlashes(
|
||||
self::_transformTrackingSet($tracking_set)
|
||||
) . "' )";
|
||||
|
||||
$result = PMA_queryAsControlUser($sql_query);
|
||||
|
||||
@ -574,7 +580,8 @@ class PMA_Tracker
|
||||
*
|
||||
* @static
|
||||
*
|
||||
* @return mixed record DDM log, DDL log, structure snapshot, tracked statements.
|
||||
* @return mixed record DDM log, DDL log, structure snapshot, tracked
|
||||
* statements.
|
||||
*/
|
||||
static public function getTrackedData($dbname, $tablename, $version)
|
||||
{
|
||||
@ -587,8 +594,8 @@ class PMA_Tracker
|
||||
$sql_query .= " AND `table_name` = '"
|
||||
. PMA_Util::sqlAddSlashes($tablename) ."' ";
|
||||
}
|
||||
$sql_query .= " AND `version` = '" . PMA_Util::sqlAddSlashes($version) ."' ".
|
||||
" ORDER BY `version` DESC LIMIT 1";
|
||||
$sql_query .= " AND `version` = '" . PMA_Util::sqlAddSlashes($version)
|
||||
. "' " . " ORDER BY `version` DESC LIMIT 1";
|
||||
|
||||
$mixed = $GLOBALS['dbi']->fetchAssoc(PMA_queryAsControlUser($sql_query));
|
||||
|
||||
@ -1012,7 +1019,8 @@ class PMA_Tracker
|
||||
$sql_query .=
|
||||
" WHERE FIND_IN_SET('" . $result['identifier'] . "',tracking) > 0" .
|
||||
" AND `db_name` = '" . PMA_Util::sqlAddSlashes($dbname) . "' " .
|
||||
" AND `table_name` = '" . PMA_Util::sqlAddSlashes($result['tablename']) . "' " .
|
||||
" AND `table_name` = '"
|
||||
. PMA_Util::sqlAddSlashes($result['tablename']) . "' " .
|
||||
" AND `version` = '" . PMA_Util::sqlAddSlashes($version) . "' ";
|
||||
|
||||
$result = PMA_queryAsControlUser($sql_query);
|
||||
|
||||
@ -86,6 +86,30 @@ class PMA_Util
|
||||
return $pow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether configuration value tells to show icons.
|
||||
*
|
||||
* @param string $value Configuration option name
|
||||
*
|
||||
* @return boolean Whether to show icons.
|
||||
*/
|
||||
public static function showIcons($value)
|
||||
{
|
||||
return in_array($GLOBALS['cfg'][$value], array('icons', 'both'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether configuration value tells to show text.
|
||||
*
|
||||
* @param string $value Configuration option name
|
||||
*
|
||||
* @return boolean Whether to show text.
|
||||
*/
|
||||
public static function showText($value)
|
||||
{
|
||||
return in_array($GLOBALS['cfg'][$value], array('text', 'both'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an HTML IMG tag for a particular icon from a theme,
|
||||
* which may be an actual file or an icon from a sprite.
|
||||
@ -105,18 +129,11 @@ class PMA_Util
|
||||
$menu_icon = false, $control_param = 'ActionLinksMode'
|
||||
) {
|
||||
$include_icon = $include_text = false;
|
||||
if (in_array(
|
||||
$GLOBALS['cfg'][$control_param],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (self::showIcons($control_param)) {
|
||||
$include_icon = true;
|
||||
}
|
||||
if ($force_text
|
||||
|| in_array(
|
||||
$GLOBALS['cfg'][$control_param],
|
||||
array('text', 'both')
|
||||
)
|
||||
|| self::showText($control_param)
|
||||
) {
|
||||
$include_text = true;
|
||||
}
|
||||
@ -2528,11 +2545,7 @@ class PMA_Util
|
||||
|
||||
// Move to the beginning or to the previous page
|
||||
if ($pos > 0) {
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (self::showIcons('TableNavigationLinksMode')) {
|
||||
$caption1 = '<<';
|
||||
$caption2 = ' < ';
|
||||
$title1 = ' title="' . _pgettext('First page', 'Begin') . '"';
|
||||
@ -2569,11 +2582,7 @@ class PMA_Util
|
||||
$list_navigator_html .= '</form>';
|
||||
|
||||
if ($pos + $max_count < $count) {
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if ( self::showIcons('TableNavigationLinksMode')) {
|
||||
$caption3 = ' > ';
|
||||
$caption4 = '>>';
|
||||
$title3 = ' title="' . _pgettext('Next page', 'Next') . '"';
|
||||
|
||||
@ -2906,6 +2906,13 @@ $cfg['DBG'] = array();
|
||||
*/
|
||||
$cfg['DBG']['sql'] = false;
|
||||
|
||||
/**
|
||||
* Enable to let server present itself as demo server.
|
||||
*
|
||||
* @global boolean $cfg['DBG']['demo']
|
||||
*/
|
||||
$cfg['DBG']['demo'] = false;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* MySQL settings
|
||||
|
||||
@ -40,11 +40,7 @@ $is_create_table_priv = true;
|
||||
<fieldset>
|
||||
<legend>
|
||||
<?php
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
echo PMA_Util::getImage('b_newtbl.png');
|
||||
}
|
||||
echo __('Create table');
|
||||
|
||||
@ -21,10 +21,7 @@ if (! defined('PHPMYADMIN')) {
|
||||
|
||||
|
||||
$HideStructureActions = '';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('text', 'both')
|
||||
)
|
||||
if (PMA_Util::showText('ActionLinksMode')
|
||||
&& $GLOBALS['cfg']['HideStructureActions'] === true
|
||||
) {
|
||||
$HideStructureActions .= ' HideStructureActions';
|
||||
|
||||
@ -576,11 +576,7 @@ class PMA_NavigationTree
|
||||
$groups[$key]->separator = $node->separator;
|
||||
$groups[$key]->separator_depth = $node->separator_depth - 1;
|
||||
$groups[$key]->icon = '';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
|
||||
$groups[$key]->icon = PMA_Util::getImage(
|
||||
'b_group.png'
|
||||
);
|
||||
@ -900,11 +896,7 @@ class PMA_NavigationTree
|
||||
if ($node->type == Node::CONTAINER) {
|
||||
$retval .= "<i>";
|
||||
}
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
|
||||
$retval .= "<div class='block'>";
|
||||
if (isset($node->links['icon'])) {
|
||||
$args = array();
|
||||
|
||||
@ -25,11 +25,7 @@ function PMA_getHtmlForDatabaseComment($db)
|
||||
. PMA_generate_common_hidden_inputs($db)
|
||||
. '<fieldset>'
|
||||
. '<legend>';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= '<img class="icon ic_b_comment" '
|
||||
. 'src="themes/dot.gif" alt="" />';
|
||||
}
|
||||
@ -73,11 +69,7 @@ function PMA_getHtmlForRenameDatabase($db)
|
||||
. '<fieldset>'
|
||||
. '<legend>';
|
||||
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= PMA_Util::getImage('b_edit.png');
|
||||
}
|
||||
$html_output .= __('Rename database to:')
|
||||
@ -121,11 +113,7 @@ function PMA_getHtmlForDropDatabaseLink($db)
|
||||
$html_output = '<div class="operations_half_width">'
|
||||
. '<fieldset class="caution">';
|
||||
$html_output .= '<legend>';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= PMA_Util::getImage('b_deltbl.png');
|
||||
}
|
||||
$html_output .= __('Remove database')
|
||||
@ -181,11 +169,7 @@ function PMA_getHtmlForCopyDatabase($db)
|
||||
$html_output .= '<fieldset>'
|
||||
. '<legend>';
|
||||
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= PMA_Util::getImage('b_edit.png');
|
||||
}
|
||||
$html_output .= __('Copy database to:')
|
||||
@ -250,11 +234,7 @@ function PMA_getHtmlForChangeDatabaseCharset($db, $table)
|
||||
|
||||
$html_output .= '<fieldset>' . "\n"
|
||||
. ' <legend>';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= PMA_Util::getImage('s_asci.png');
|
||||
}
|
||||
$html_output .= '<label for="select_db_collation">' . __('Collation')
|
||||
@ -289,11 +269,7 @@ function PMA_getHtmlForExportRelationalSchemaView($url_query)
|
||||
{
|
||||
$html_output = '<div class="operations_full_width">'
|
||||
. '<fieldset><a href="schema_edit.php?' . $url_query . '">';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= PMA_Util::getImage(
|
||||
'b_edit.png'
|
||||
);
|
||||
|
||||
@ -409,11 +409,7 @@ class PMA_User_Schema
|
||||
<legend>
|
||||
<?php
|
||||
echo PMA_generate_common_hidden_inputs($db);
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
echo PMA_Util::getImage('b_views.png');
|
||||
}
|
||||
echo __('Display relational schema');
|
||||
|
||||
@ -167,11 +167,7 @@ function PMA_getNavigationRow($url_params, $pos, $num_rows, $dontlimitchars)
|
||||
|
||||
$html .= '<a href="server_binlog.php'
|
||||
. PMA_generate_common_url($this_url_params) . '"';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
|
||||
$html .= ' title="' . _pgettext('Previous page', 'Previous') . '">';
|
||||
} else {
|
||||
$html .= '>' . _pgettext('Previous page', 'Previous');
|
||||
@ -205,11 +201,7 @@ function PMA_getNavigationRow($url_params, $pos, $num_rows, $dontlimitchars)
|
||||
$html .= ' - <a href="server_binlog.php'
|
||||
. PMA_generate_common_url($this_url_params)
|
||||
. '"';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
|
||||
$html .= ' title="' . _pgettext('Next page', 'Next') . '">';
|
||||
} else {
|
||||
$html .= '>' . _pgettext('Next page', 'Next');
|
||||
|
||||
@ -295,11 +295,7 @@ function PMA_sqlQueryFormInsert(
|
||||
}
|
||||
$html .= '</select>'
|
||||
. '<div id="tablefieldinsertbuttoncontainer">';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html .= '<input type="button" class="button" name="insert"'
|
||||
. ' value="<<" onclick="insertValueQuery()"'
|
||||
. ' title="' . __('Insert') . '" />';
|
||||
|
||||
@ -1191,7 +1191,7 @@ function PMA_getHtmlForTableStructureHeader(
|
||||
if (PMA_DRIZZLE) {
|
||||
$colspan -= 2;
|
||||
}
|
||||
if (in_array($GLOBALS['cfg']['ActionLinksMode'], array('icons', 'both'))) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$colspan--;
|
||||
}
|
||||
$html_output .= '<th colspan="' . $colspan . '" '
|
||||
@ -1562,11 +1562,7 @@ function PMA_getHtmlForAddColumn($columns_list)
|
||||
$GLOBALS['db'],
|
||||
$GLOBALS['table']
|
||||
);
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .=PMA_Util::getImage(
|
||||
'b_insrow.png',
|
||||
__('Add column')
|
||||
|
||||
1635
po/be@latin.po
1635
po/be@latin.po
File diff suppressed because it is too large
Load Diff
1663
po/en_GB.po
1663
po/en_GB.po
File diff suppressed because it is too large
Load Diff
1610
po/phpmyadmin.pot
1610
po/phpmyadmin.pot
File diff suppressed because it is too large
Load Diff
1634
po/pt_BR.po
1634
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
1633
po/sr@latin.po
1633
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user