Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin into OpenGIS

This commit is contained in:
Madhura Jayaratne 2011-05-23 20:00:34 +05:30
commit 12038bd0c7
121 changed files with 46081 additions and 36245 deletions

View File

@ -2,10 +2,34 @@
======================
3.5.0.0 (not yet released)
+ rfe #2021981 [interface] Add support for mass prefix change.
+ "up to date" message on main page when current version is up to date
+ Update to jQuery 1.6.1
+ Patch #3256122 [search] Show/hide db search results
+ Patch #3302354 Add gettext wrappers around a message
+ Remove deprecated function PMA_DBI_get_fields
3.4.1.0 (not yet released)
3.4.2.0 (not yet released)
- bug #3301249 [interface] Iconic table operations does not remove inline edit label
- bug #3303869 [interface] Unnecessary scrolling on Databases page
- patch #3303813 [setup] Define a label that was missing
- bug #3305606 [interface] Show all button wraps on privileges page
- bug #3305517 [config] Config for export compression not used
- bug #3305883 [interface] Table is dropped regardless of confirmation
- [auth] Fixed error handling for signon auth method.
- bug #3276001 [core] Avoid caching of index.php.
3.4.0.0 (not yet released)
3.4.1.0 (2011-05-20)
- bug #3301108 [interface] Synchronize and already configured host
- bug #3302457 Inline edit and $cfg['PropertiesIconic']
- Patch #3302313 Show a translated label
- bug #3300981 [navi] Table filter is case sensitive
- bug #3285929 [privileges] Revert temporary fix
- bug #3302872 [synchronize] Synchronize and user name
- bug #3302733 [core] Some browsers report an insecure https connection
- [security] Make redirector require valid token
3.4.0.0 (2011-05-11)
+ rfe #2890226 [view] Enable VIEW rename
+ rfe #838637 [privileges] Export a user's privileges
- [core] Updated mootools to fix some glitches with Safari.
@ -162,6 +186,9 @@
3.3.11.0 (not yet released)
3.3.10.1 (2011-05-20)
- [security] XSS on Tracking page
3.3.10.0 (2011-03-19)
- patch #3147400 [structure] Aria table size printed as unknown,
thanks to erickoh75 - erickoh75

View File

@ -1280,6 +1280,8 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE</pre>
</dd>
<dt><span id="cfg_Servers_SignonSession">$cfg['Servers'][$i]['SignonSession']</span> string</dt>
<dd>Name of session which will be used for signon authentication method.
You should use something different than <code>phpMyAdmin</code>, because
this is session which phpMyAdmin uses internally.
</dd>
<dt><span id="cfg_Servers_SignonURL">$cfg['Servers'][$i]['SignonURL']</span> string</dt>
<dd>URL where user will be redirected to log in for signon authentication method. Should be absolute including protocol.

View File

@ -105,7 +105,7 @@ if (0 == $tbl_result_cnt) {
// The tables list gets from MySQL
while (list($tbl) = PMA_DBI_fetch_row($tbl_result)) {
$fld_results = PMA_DBI_get_fields($db, $tbl);
$fld_results = PMA_DBI_get_columns($db, $tbl, true);
if (empty($tbl_names[$tbl]) && !empty($_REQUEST['TableList'])) {
$tbl_names[$tbl] = '';

View File

@ -517,6 +517,12 @@ if (!$db_is_information_schema) {
. __('Repair table') . '</option>' . "\n";
echo ' <option value="analyze_tbl" >'
. __('Analyze table') . '</option>' . "\n";
echo ' <option value="add_prefix_tbl" >'
. __('Add prefix to table') . '</option>' . "\n";
echo ' <option value="replace_prefix_tbl" >'
. __('Replace table prefix') . '</option>' . "\n";
echo ' <option value="copy_tbl_change_prefix" >'
. __('Copy table with prefix') . '</option>' . "\n";
}
?>
</select>

View File

@ -89,7 +89,7 @@ $lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][1];
// start output
header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
include ('./libraries/header_http.inc.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
@ -153,7 +153,7 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
// ]]>
</script>
<?php
echo PMA_includeJS('jquery/jquery-1.4.4.js');
echo PMA_includeJS('jquery/jquery-1.6.1.js');
echo PMA_includeJS('update-location.js');
echo PMA_includeJS('common.js');
?>

View File

@ -20,7 +20,7 @@ function loadResult(result_path , table_name , link , ajaxEnable){
if(ajaxEnable)
{
/** Hides the results shown by the delete criteria */
//PMA_ajaxShowMessage(PMA_messages['strBrowsing']);
PMA_ajaxShowMessage(PMA_messages['strBrowsing']);
$('#sqlqueryform').hide();
$('#togglequerybox').hide();
/** Load the browse results to the page */
@ -51,14 +51,14 @@ function deleteResult(result_path , msg , ajaxEnable){
/** Load the deleted option to the page*/
$('#browse-results').load(result_path + " '"+'#result_query' + "'");
$('#sqlqueryform').load(result_path + " '"+'#sqlqueryform' + "'");
$('#togglequerybox').html(PMA_messages['strHideQueryBox']);
$('#togglequerybox').html(PMA_messages['strShowQueryBox']);
/** Refresh the search results after the deletion */
document.getElementById('buttonGo'). click();
//PMA_ajaxShowMessage(PMA_messages['strDeleting']);
PMA_ajaxShowMessage(PMA_messages['strDeleting']);
/** Show the results of the deletion option */
$('#browse-results').show();
$('#sqlqueryform').show();
$('#sqlqueryform').hide();
$('#togglequerybox').show();
}
else
@ -89,6 +89,31 @@ $(document).ready(function() {
$('#sqlqueryform').hide();
$('#togglequerybox').hide();
});
/**
*Prepare a div containing a link for toggle the search results
*/
$('<div id="togglesearchresultsdiv"><a id="togglesearchresultlink"></a></div>')
.insertAfter('#searchresults')
/** don't show it until we have results on-screen */
.hide();
$('<br class="clearfloat" />').insertAfter("#togglesearchresultsdiv").show();
/** Changing the displayed text according to the hide/show criteria in search result forms*/
$('#togglesearchresultlink')
.html(PMA_messages['strHideSearchResults'])
.bind('click', function() {
var $link = $(this);
$('#searchresults').slideToggle();
if ($link.text() == PMA_messages['strHideSearchResults']) {
$link.text(PMA_messages['strShowSearchResults']);
} else {
$link.text(PMA_messages['strHideSearchResults']);
}
/** avoid default click action */
return false;
});
/**
* Prepare a div containing a link for toggle the search form, otherwise it's incorrectly displayed
* after a couple of clicks
@ -101,7 +126,7 @@ $(document).ready(function() {
/** Changing the displayed text according to the hide/show criteria in search form*/
$("#togglequerybox").hide();
$("#togglequerybox").bind('click', function() {
var $link = $(this)
var $link = $(this);
$('#sqlqueryform').slideToggle("medium");
if ($link.text() == PMA_messages['strHideQueryBox']) {
$link.text(PMA_messages['strShowQueryBox']);
@ -110,7 +135,7 @@ $(document).ready(function() {
}
/** avoid default click action */
return false;
})
});
/** don't show it until we have results on-screen */
@ -149,6 +174,16 @@ $(document).ready(function() {
// found results
$("#searchresults").html(response);
$("#sqlqueryresults").trigger('appendAnchor');
$('#togglesearchresultlink')
// always start with the Show message
.text(PMA_messages['strHideSearchResults'])
$('#togglesearchresultsdiv')
// now it's time to show the div containing the link
.show();
$('#searchresults').show();
$('#db_search_form')
// workaround for Chrome problem (bug #3168569)
.slideToggle()

View File

@ -90,19 +90,23 @@ function parseVersionString (str) {
* Indicates current available version on main page.
*/
function PMA_current_version() {
var current = parseVersionString('3.4.0'/*pmaversion*/);
var current = parseVersionString(pmaversion);
var latest = parseVersionString(PMA_latest_version);
$('#li_pma_version').append(PMA_messages['strLatestAvailable'] + ' ' + PMA_latest_version);
var version_information_message = PMA_messages['strLatestAvailable'] + ' ' + PMA_latest_version;
if (latest > current) {
var message = $.sprintf(PMA_messages['strNewerVersion'], PMA_latest_version, PMA_latest_date);
if (Math.floor(latest / 10000) == Math.floor(current / 10000)) {
/* Security update */
klass = 'warning';
klass = 'error';
} else {
klass = 'notice';
}
$('#maincontainer').after('<div class="' + klass + '">' + message + '</div>');
}
if (latest == current) {
version_information_message = ' (' + PMA_messages['strUpToDate'] + ')';
}
$('#li_pma_version').append(version_information_message);
}
/**
@ -606,7 +610,7 @@ $(document).ready(function() {
*/
$('tr.odd:not(.noclick), tr.even:not(.noclick)').live('click',function(e) {
// do not trigger when clicked on anchor
if ($(e.target).is('a, a *')) {
if ($(e.target).is('a, img, a *')) {
return;
}
// XXX: FF fires two click events for <label> (label and checkbox), so we need to handle this differently
@ -743,21 +747,19 @@ function insertQuery(queryType) {
valDis += "[value-" + NbSelect + "]";
editDis += myListBox.options[i].value + "=[value-" + NbSelect + "]";
}
if (queryType == "selectall") {
query = "SELECT * FROM `" + table + "` WHERE 1";
} else if (queryType == "select") {
query = "SELECT " + chaineAj + " FROM `" + table + "` WHERE 1";
} else if (queryType == "insert") {
query = "INSERT INTO `" + table + "`(" + chaineAj + ") VALUES (" + valDis + ")";
} else if (queryType == "update") {
query = "UPDATE `" + table + "` SET " + editDis + " WHERE 1";
} else if(queryType == "delete") {
query = "DELETE FROM `" + table + "` WHERE 1";
} else if(queryType == "clear") {
query = '';
}
document.sqlform.sql_query.value = query;
sql_box_locked = false;
if (queryType == "selectall") {
query = "SELECT * FROM `" + table + "` WHERE 1";
} else if (queryType == "select") {
query = "SELECT " + chaineAj + " FROM `" + table + "` WHERE 1";
} else if (queryType == "insert") {
query = "INSERT INTO `" + table + "`(" + chaineAj + ") VALUES (" + valDis + ")";
} else if (queryType == "update") {
query = "UPDATE `" + table + "` SET " + editDis + " WHERE 1";
} else if(queryType == "delete") {
query = "DELETE FROM `" + table + "` WHERE 1";
}
document.sqlform.sql_query.value = query;
sql_box_locked = false;
}
}
@ -1145,7 +1147,11 @@ $(document).ready(function(){
});
$('.sqlbutton').click(function(evt){
insertQuery(evt.target.id);
if (evt.target.id == 'clear') {
$('#sqlquery').val('');
} else {
insertQuery(evt.target.id);
}
return false;
});
@ -1189,7 +1195,12 @@ $(document).ready(function(){
}
});
$('#sqlquery').focus();
$('#sqlquery').focus().keydown(function (e) {
if (e.ctrlKey && e.keyCode == 13) {
$("#sqlqueryform").submit();
}
});
if ($('#input_username')) {
if ($('#input_username').val() == '') {
$('#input_username').focus();
@ -1269,7 +1280,7 @@ function PMA_ajaxShowMessage(message, timeout) {
.hide();
})
}
return $("#loading");
}
@ -1442,7 +1453,7 @@ $(document).ready(function() {
open: PMA_verifyTypeOfAllColumns,
buttons : button_options
}); // end dialog options
}
}
PMA_ajaxRemoveMessage($msgbox);
}) // end $.get()
@ -1583,7 +1594,7 @@ $(document).ready(function() {
$("#create_table_div").html(data);
}
PMA_verifyTypeOfAllColumns();
PMA_ajaxRemoveMessage($msgbox);
PMA_ajaxRemoveMessage($msgbox);
}) //end $.post()
}) // end create table form (add fields)
@ -1733,7 +1744,7 @@ $(document).ready(function() {
.dialog({
title: PMA_messages['strChangePassword'],
width: 600,
close: function(ev,ui) {$(this).remove();},
close: function(ev,ui) {$(this).remove();},
buttons : button_options,
beforeClose: function(ev,ui){ $('#change_password_anchor.dialog_active').removeClass('dialog_active').addClass('ajax')}
})
@ -1772,7 +1783,7 @@ $(document).ready(function() {
$("#change_password_dialog").hide().remove();
$("#edit_user_dialog").dialog("close").remove();
$('#change_password_anchor.dialog_active').removeClass('dialog_active').addClass('ajax');
PMA_ajaxRemoveMessage($msgbox);
PMA_ajaxRemoveMessage($msgbox);
}
else {
PMA_ajaxShowMessage(data.error);
@ -2278,3 +2289,64 @@ $(document).ready(function() {
}) // end of $(document).ready()
/**
* Attach Ajax event handlers for Drop Table.
*
* @uses $.PMA_confirm()
* @uses PMA_ajaxShowMessage()
* @uses window.parent.refreshNavigation()
* @uses window.parent.refreshMain()
* @see $cfg['AjaxEnable']
*/
$(document).ready(function() {
$("#drop_tbl_anchor").live('click', function(event) {
event.preventDefault();
//context is top.frame_content, so we need to use window.parent.db to access the db var
/**
* @var question String containing the question to be asked for confirmation
*/
var question = PMA_messages['strDropTableStrongWarning'] + '\n' + PMA_messages['strDoYouReally'] + ' :\n' + 'DROP TABLE ' + window.parent.table;
$(this).PMA_confirm(question, $(this).attr('href') ,function(url) {
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
$.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function(data) {
//Database deleted successfully, refresh both the frames
window.parent.refreshNavigation();
window.parent.refreshMain();
}) // end $.get()
}); // end $.PMA_confirm()
}); //end of Drop Table Ajax action
}) // end of $(document).ready() for Drop Table
/**
* Attach Ajax event handlers for Truncate Table.
*
* @uses $.PMA_confirm()
* @uses PMA_ajaxShowMessage()
* @uses window.parent.refreshNavigation()
* @uses window.parent.refreshMain()
* @see $cfg['AjaxEnable']
*/
$(document).ready(function() {
$("#truncate_tbl_anchor").live('click', function(event) {
event.preventDefault();
//context is top.frame_content, so we need to use window.parent.db to access the db var
/**
* @var question String containing the question to be asked for confirmation
*/
var question = PMA_messages['strTruncateTableStrongWarning'] + '\n' + PMA_messages['strDoYouReally'] + ' :\n' + 'TRUNCATE TABLE ' + window.parent.table;
$(this).PMA_confirm(question, $(this).attr('href') ,function(url) {
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
$.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function(data) {
//Database deleted successfully, refresh both the frames
window.parent.refreshNavigation();
window.parent.refreshMain();
}) // end $.get()
}); // end $.PMA_confirm()
}); //end of Drop Table Ajax action
}) // end of $(document).ready() for Drop Table

View File

@ -16,7 +16,7 @@ function changePluginOpts() {
var selected_plugin_name = $("#plugins option:selected").attr("value");
$("#" + selected_plugin_name + "_options").fadeIn('slow');
if(selected_plugin_name == "csv") {
$("#import_notification").text("Note: If the file contains multiple tables, they will be combined into one");
$("#import_notification").text(PMA_messages['strImportCSV']);
} else {
$("#import_notification").text("");
}

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,8 @@ $js_messages['strNoDropDatabases'] = __('"DROP DATABASE" statements are disabled
/* For confirmations */
$js_messages['strDoYouReally'] = __('Do you really want to ');
$js_messages['strDropDatabaseStrongWarning'] = __('You are about to DESTROY a complete database!');
$js_messages['strDropTableStrongWarning'] = __('You are about to DESTROY a complete table!');
$js_messages['strTruncateTableStrongWarning'] = __('You are about to TRUNCATE a complete table!');
$js_messages['strDroppingEvent'] = __('Dropping Event');
$js_messages['strDroppingProcedure'] = __('Dropping Procedure');
$js_messages['strDeleteTrackingData'] = __('Delete tracking data for this table');
@ -79,13 +81,19 @@ $js_messages['strNo'] = __('No');
/* For db_search.js */
$js_messages['strSearching'] = __('Searching');
//$js_messages['strBrowsing'] = __('Browsing');
//$js_messages['strDeleting'] = __('Deleting');
$js_messages['strHideSearchResults'] = __('Hide search results');
$js_messages['strShowSearchResults'] = __('Show search results');
$js_messages['strBrowsing'] = __('Browsing');
$js_messages['strDeleting'] = __('Deleting');
/* For import.js */
$js_messages['strImportCSV'] = __('Note: If the file contains multiple tables, they will be combined into one');
/* For sql.js */
$js_messages['strHideQueryBox'] = __('Hide query box');
$js_messages['strShowQueryBox'] = __('Show query box');
$js_messages['strInlineEdit'] = __('Inline Edit');
$js_messages['strEdit'] = __('Edit');
$js_messages['strSave'] = __('Save');
$js_messages['strHide'] = __('Hide');
@ -101,6 +109,7 @@ $js_messages['strSelectReferencedKey'] = __('Select referenced key');
$js_messages['strSelectForeignKey'] = __('Select Foreign Key');
$js_messages['strPleaseSelectPrimaryOrUniqueKey'] = __('Please select the primary key or a unique key');
$js_messages['strChangeDisplay'] = __('Choose column to display');
$js_messages['strLeavingDesigner'] = __('You haven\'t saved the changes in the layout. They will be lost if you don\'t save them.Do you want to continue?');
/* Visual query builder (pmd/scripts/move.js) */
$js_messages['strAddOption'] = __('Add an option for column ');
@ -117,6 +126,7 @@ $js_messages['strMore'] = __('More');
$js_messages['strNewerVersion'] = __('A newer version of phpMyAdmin is available and you should consider upgrading. The newest version is %s, released on %s.');
/* l10n: Latest available phpMyAdmin version */
$js_messages['strLatestAvailable'] = __(', latest stable version:');
$js_messages['strUpToDate'] = __('up to date');
echo "var PMA_messages = new Array();\n";
foreach ($js_messages as $name => $js_message) {

View File

@ -145,9 +145,11 @@ function PMA_setCookie(name, value, expires, path, domain, secure) {
*
*/
function fast_filter(value){
lowercase_value = value.toLowerCase();
$("#subel0 a[class!='tableicon']").each(function(idx,elem){
$elem = $(elem);
if (value && $elem.html().indexOf(value) == -1) {
// .indexOf is case sensitive so convert to lowercase to compare
if (value && $elem.html().toLowerCase().indexOf(lowercase_value) == -1) {
$elem.parent().hide();
} else {
$elem.parent().show();

148
js/sql.js
View File

@ -7,13 +7,14 @@
*
*/
var $data_a;
/**
* decode a string URL_encoded
*
* @param string str
* @return string the URL-decoded string
*/
var data_vt;
function PMA_urldecode(str) {
return decodeURIComponent(str.replace(/\+/g, '%20'));
}
@ -81,10 +82,16 @@ function appendInlineAnchor() {
$cloned_tr.find('td')
.addClass('inline_edit_anchor')
.find('a').attr('href', '#')
.find('span')
.text(' ' + PMA_messages['strInlineEdit'])
.prepend($img_object);
.find('a').attr('href', '#');
var $edit_span = $cloned_tr.find('span:contains("' + PMA_messages['strEdit'] + '")');
var $span = $cloned_tr.find('a').find('span');
if ($edit_span.length > 0) {
$span.text(' ' + PMA_messages['strInlineEdit']);
$span.prepend($img_object);
} else {
$span.text('');
$span.append($img_object);
}
$cloned_tr.insertAfter($this_tr);
});
@ -109,19 +116,27 @@ function appendInlineAnchor() {
if ($img_object.length != 0) {
var img_src = $img_object.attr('src').replace(/b_edit/,'b_inline_edit');
$img_object.attr('src', img_src);
$cloned_anchor
.find('a').attr('href', '#')
.find('span')
.text(' ' + PMA_messages['strInlineEdit']);
$cloned_anchor
.find('span')
.first()
.prepend($img_object);
$cloned_anchor.find('a').attr('href', '#');
var $edit_span = $cloned_anchor.find('span:contains("' + PMA_messages['strEdit'] + '")');
var $span = $cloned_anchor.find('a').find('span');
if ($edit_span.length > 0) {
$span.text(' ' + PMA_messages['strInlineEdit']);
$span.prepend($img_object);
} else {
$span.text('');
$span.append($img_object);
}
} else {
// Only text is displayed. See $cfg['PropertiesIconic']
$cloned_anchor.find('a').attr('href', '#');
$cloned_anchor.find('a span').text(PMA_messages['strInlineEdit']);
// the link was too big so <input type="image"> is there
$img_object = $cloned_anchor.find('input:image').attr('title', PMA_messages['strInlineEdit']);
var img_src = $img_object.attr('src').replace(/b_edit/,'b_inline_edit');
$img_object.attr('src', img_src);
if ($img_object.length > 0) {
var img_src = $img_object.attr('src').replace(/b_edit/,'b_inline_edit');
$img_object.attr('src', img_src);
}
$cloned_anchor
.find('.clickprevimage')
.text(' ' + PMA_messages['strInlineEdit']);
@ -248,10 +263,15 @@ $(document).ready(function() {
*/
$("#sqlqueryform.ajax").live('submit', function(event) {
event.preventDefault();
$form = $(this);
if (! checkSqlQuery($form[0])) {
return false;
}
// remove any div containing a previous error message
$('.error').remove();
$form = $(this);
var $msgbox = PMA_ajaxShowMessage();
PMA_prepareForAjaxRequest($form);
@ -441,24 +461,58 @@ $(document).ready(function() {
// Looping through all columns or rows, to find the required data and then storing it in an array.
var $this_children = $edit_td.children('span.nowrap').children('a').children('span.nowrap');
if (disp_mode != 'vertical') {
$this_children.empty();
$this_children.text(PMA_messages['strSave']);
// Keep the original data preserved.
$data_a = $edit_td.children('span.nowrap').children('a').clone();
// Change the inline edit to save.
var $img_object = $this_children.find('img');
// If texts are displayed. See $cfg['PropertiesIconic']
if ($this_children.parent('a').find('span:contains("' + PMA_messages['strInlineEdit'] + '")').length > 0) {
$this_children.text(' ' + PMA_messages['strSave']);
} else {
// vertical
data_vt = $this_children.html();
$this_children.text(PMA_messages['strSave']);
$this_children.empty();
}
var hide_link = '<br /><br /><a id="hide">' + PMA_messages['strHide'] + '</a>';
if (disp_mode != 'vertical') {
$edit_td.append(hide_link);
$('#table_results tbody tr td a#hide').click(function() {
$this_children = $(this).siblings('span.nowrap').children('a').children('span.nowrap');
$this_children.empty();
$this_children.text(PMA_messages['strInlineEdit']);
// If icons are displayed. See $cfg['PropertiesIconic']
if ($img_object.length > 0) {
$img_object.attr('title', PMA_messages['strSave']);
var img_src = $img_object.attr('src').replace(/b_inline_edit/,'b_save');
$img_object.attr('src', img_src);
$this_children.prepend($img_object);
}
// Clone the save link and change it to create the hide link.
var $hide_a = $edit_td.children('span.nowrap').children('a').clone().attr('id', 'hide');
var $hide_span = $hide_a.find('span');
var $img_object = $hide_a.find('span img');
// If texts are displayed. See $cfg['PropertiesIconic']
if ($hide_a.find('span:contains("' + PMA_messages['strSave'] + '")').length > 0) {
$hide_span.text(' ' + PMA_messages['strHide']);
} else {
$hide_span.empty();
}
// If icons are displayed. See $cfg['PropertiesIconic']
if ($img_object.length > 0) {
$img_object.attr('title', PMA_messages['strHide']);
var img_src = $img_object.attr('src').replace(/b_save/,'b_close');
$img_object.attr('src', img_src);
$hide_span.prepend($img_object);
}
// Add hide icon and/or text.
$edit_td.children('span.nowrap').append($('<br /><br />')).append($hide_a);
if (disp_mode != 'vertical') {
$('#table_results tbody tr td span a#hide').click(function() {
var $this_hide = $(this).parents('td');
var $this_span = $this_hide.find('span');
$this_span.find('a, br').remove();
$this_span.append($data_a.clone());
var $this_hide = $(this).parent();
$this_hide.removeClass("inline_edit_active hover").addClass("inline_edit_anchor");
$this_hide.parent().removeClass("hover noclick");
$this_hide.siblings().removeClass("hover");
@ -483,14 +537,15 @@ $(document).ready(function() {
var txt = '';
var rows = $edit_td.parent().siblings().length;
$edit_td.append(hide_link);
$('#table_results tbody tr td a#hide').click(function() {
var pos = $(this).parent().index();
var $chg_submit = $(this).parent().children('span.nowrap').children('a').children('span.nowrap');
$chg_submit.empty();
$chg_submit.append(data_vt);
$('#table_results tbody tr td span a#hide').click(function() {
var $hide_a = $(this);
var pos = $hide_a.parents('td').index();
var $this_row = $(this).parents('tr');
var $this_span = $hide_a.parent();
$this_span.find('a, br').remove();
$this_span.append($data_a.clone());
var $this_row = $this_span.parents('tr');
// changing inline_edit_active to inline_edit_anchor
$this_row.siblings("tr:eq(3) td:eq(" + pos + ")").removeClass("inline_edit_active").addClass("inline_edit_anchor");
@ -956,19 +1011,10 @@ $(document).ready(function() {
*/
function PMA_unInlineEditRow($del_hide, $chg_submit, $this_td, $input_siblings, data, disp_mode) {
// deleting the hide button
// remove <br><br><a> tags
for ( var i = 0; i <= 2; i++) {
$del_hide.next().remove();
}
if(disp_mode != 'vertical'){
$chg_submit.empty();
$chg_submit.html('<span class="nowrap"></span>');
$chg_submit.children('span.nowrap').text(PMA_messages['strInlineEdit']);
} else {
$chg_submit.children('span.nowrap').empty();
$chg_submit.children('span.nowrap').append(data_vt);
}
// deleting the hide button. remove <br><br><a> tags
$del_hide.find('a, br').remove();
// append inline edit button.
$del_hide.append($data_a.clone());
// changing inline_edit_active to inline_edit_anchor
$this_td.removeClass('inline_edit_active').addClass('inline_edit_anchor');
@ -978,7 +1024,7 @@ function PMA_unInlineEditRow($del_hide, $chg_submit, $this_td, $input_siblings,
if(disp_mode != 'vertical') {
$this_td.parent('tr').removeClass('hover').find('td').removeClass('hover');
} else {
$this_td.parents('tbody').find('tr').find('td:eq(' + $this_td.index() + ')').removeClass('marked');
$this_td.parents('tbody').find('tr').find('td:eq(' + $this_td.index() + ')').removeClass('marked hover');
}
$input_siblings.each(function() {

View File

@ -464,6 +464,51 @@ class PMA_Tracker
return $result;
}
/**
* Changes tracking data of a table.
*
* @static
*
* @param string $dbname name of database
* @param string $tablename name of table
* @param string $version version
* @param string $type type of data(DDL || DML)
* @param string || array $new_data the new tracking data
*
* @return bool result of change
*/
static public function changeTrackingData($dbname, $tablename, $version, $type, $new_data)
{
if ($type == 'DDL')
$save_to = 'schema_sql';
elseif ($type == 'DML')
$save_to = 'data_sql';
else
return false;
$date = date('Y-m-d H:i:s');
$new_data_processed = '';
if (is_array($new_data)) {
foreach ($new_data as $data) {
$new_data_processed .= '# log ' . $date . ' ' . $data['username'] . PMA_sqlAddslashes($data['statement']) . "\n";
}
} else {
$new_data_processed = $new_data;
}
$sql_query =
" UPDATE " . self::$pma_table .
" SET `" . $save_to . "` = '" . $new_data_processed . "' " .
" WHERE `db_name` = '" . PMA_sqlAddslashes($dbname) . "' " .
" AND `table_name` = '" . PMA_sqlAddslashes($tablename) . "' " .
" AND `version` = '" . PMA_sqlAddslashes($version) . "' ";
$result = PMA_query_as_controluser($sql_query);
return $result;
}
/**
* Activates tracking of a table.
*

View File

@ -202,18 +202,35 @@ function PMA_auth_set_user()
*/
function PMA_auth_fails()
{
if (! empty($GLOBALS['login_without_password_is_forbidden'])) {
$_SESSION['PMA_single_signon_error_message'] = __('Login without a password is forbidden by configuration (see AllowNoPassword)');
} elseif (! empty($GLOBALS['allowDeny_forbidden'])) {
$_SESSION['PMA_single_signon_error_message'] = __('Access denied');
} elseif (! empty($GLOBALS['no_activity'])) {
$_SESSION['PMA_single_signon_error_message'] = sprintf(__('No activity within %s seconds; please log in again'), $GLOBALS['cfg']['LoginCookieValidity']);
} elseif (PMA_DBI_getError()) {
$_SESSION['PMA_single_signon_error_message'] = PMA_sanitize(PMA_DBI_getError());
} elseif (isset($php_errormsg)) {
$_SESSION['PMA_single_signon_error_message'] = $php_errormsg;
} else {
$_SESSION['PMA_single_signon_error_message'] = __('Cannot log in to the MySQL server');
/* Session name */
$session_name = $GLOBALS['cfg']['Server']['SignonSession'];
/* Does session exist? */
if (isset($_COOKIE[$session_name])) {
/* End current session */
$old_session = session_name();
$old_id = session_id();
session_write_close();
/* Load single signon session */
session_name($session_name);
session_id($_COOKIE[$session_name]);
session_start();
/* Set error message */
if (! empty($GLOBALS['login_without_password_is_forbidden'])) {
$_SESSION['PMA_single_signon_error_message'] = __('Login without a password is forbidden by configuration (see AllowNoPassword)');
} elseif (! empty($GLOBALS['allowDeny_forbidden'])) {
$_SESSION['PMA_single_signon_error_message'] = __('Access denied');
} elseif (! empty($GLOBALS['no_activity'])) {
$_SESSION['PMA_single_signon_error_message'] = sprintf(__('No activity within %s seconds; please log in again'), $GLOBALS['cfg']['LoginCookieValidity']);
} elseif (PMA_DBI_getError()) {
$_SESSION['PMA_single_signon_error_message'] = PMA_sanitize(PMA_DBI_getError());
} elseif (isset($php_errormsg)) {
$_SESSION['PMA_single_signon_error_message'] = $php_errormsg;
} else {
$_SESSION['PMA_single_signon_error_message'] = __('Cannot log in to the MySQL server');
}
}
PMA_auth();
} // end of the 'PMA_auth_fails()' function

View File

@ -136,7 +136,7 @@ function PMA_analyseShowGrant()
/**
* @todo collect $GLOBALS['db_to_create'] into an array, to display a
* drop-down in the "Create new database" dialog
* drop-down in the "Create database" dialog
*/
// we don't break, we want all possible databases
//break;

View File

@ -477,8 +477,6 @@ if (! PMA_isValid($_REQUEST['token']) || $_SESSION[' PMA_token '] != $_REQUEST['
'media_type', 'custom_type', 'bs_reference',
/* for changing BLOB repository file MIME type */
'bs_db', 'bs_table', 'bs_ref', 'bs_new_mime_type',
/* URL redirector */
'url'
);
/**
* Require cleanup functions
@ -541,7 +539,7 @@ $_REQUEST['js_frame'] = PMA_ifSetOr($_REQUEST['js_frame'], '');
* @global array $js_include
*/
$GLOBALS['js_include'] = array();
$GLOBALS['js_include'][] = 'jquery/jquery-1.4.4.js';
$GLOBALS['js_include'][] = 'jquery/jquery-1.6.1.js';
$GLOBALS['js_include'][] = 'update-location.js';
/**

View File

@ -127,6 +127,7 @@ $strConfigExport_sql_hex_for_blob_name = __('Use hexadecimal for BLOB');
$strConfigExport_sql_if_not_exists_name = sprintf(__('Add %s'), 'IF NOT EXISTS');
$strConfigExport_sql_ignore_name = __('Use ignore inserts');
$strConfigExport_sql_include_comments_name = __('Comments');
$strConfigExport_sql_insert_syntax_name = __('Syntax to use when inserting data');
$strConfigExport_sql_max_query_size_name = __('Maximal length of created query');
$strConfigExport_sql_mime_name = __('MIME type');
$strConfigExport_sql_procedure_function_name = sprintf(__('Add %s'), 'CREATE PROCEDURE / FUNCTION / EVENT');

View File

@ -681,12 +681,12 @@ function PMA_array_remove($path, &$array)
* @return string URL for a link.
*/
function PMA_linkURL($url) {
if (!preg_match('#^https?://#', $url)) {
if (!preg_match('#^https?://#', $url) || defined('PMA_SETUP')) {
return $url;
} elseif (defined('PMA_SETUP')) {
return '../url.php?url=' . $url;
} else {
return './url.php?url=' . $url;
$params = array();
$params['url'] = $url;
return './url.php' . PMA_generate_common_url($params);
}
}

View File

@ -774,29 +774,6 @@ function PMA_DBI_get_columns_full($database = null, $table = null,
return $columns;
}
/**
* @todo should only return columns names, for more info use PMA_DBI_get_columns_full()
*
* @deprecated by PMA_DBI_get_columns() or PMA_DBI_get_columns_full()
* @param string $database name of database
* @param string $table name of table to retrieve columns from
* @param mixed $link mysql link resource
* @return array column info
*/
function PMA_DBI_get_fields($database, $table, $link = null)
{
// here we use a try_query because when coming from
// tbl_create + tbl_properties.inc.php, the table does not exist
$fields = PMA_DBI_fetch_result(
'SHOW FULL COLUMNS
FROM ' . PMA_backquote($database) . '.' . PMA_backquote($table),
null, null, $link);
if (! is_array($fields) || count($fields) < 1) {
return false;
}
return $fields;
}
/**
* array PMA_DBI_get_columns(string $database, string $table, bool $full = false, mysql db link $link = null)
*

View File

@ -18,7 +18,7 @@ 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>
<?php echo '<label for="text_create_db">' . __('Create new database') . '</label>&nbsp;' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<?php echo '<label for="text_create_db">' . __('Create database') . '</label>&nbsp;' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<?php echo PMA_generate_common_hidden_inputs('', '', 5); ?>
<input type="hidden" name="reload" value="1" />
<input type="text" name="new_db" value="<?php echo $db_to_create; ?>" maxlength="64" class="textfield" id="text_create_db"/>
@ -36,7 +36,7 @@ if ($is_create_db_priv) {
} else {
?>
<!-- db creation no privileges message -->
<strong><?php echo __('Create new database') . ':&nbsp;' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<strong><?php echo __('Create database') . ':&nbsp;' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<?php
echo '<span class="noPrivileges">'
. ($cfg['ErrorIconic'] ? '<img src="' . $pmaThemeImage . 's_error2.png" alt="" width="11" height="11" hspace="2" border="0" align="middle" />' : '')

View File

@ -296,7 +296,9 @@ if(isset($_GET['sql_query'])) {
?>
<?php
if(isset($_GET['compression'])) {
$selected_compression = $_GET['compression'];
$selected_compression = $_GET['compression'];
} elseif (isset($cfg['Export']['compression'])) {
$selected_compression = $cfg['Export']['compression'];
} else {
$selected_compression = "none";
}

View File

@ -38,7 +38,7 @@ if (isset($plugin_list)) {
} else {
$hint = new PMA_Message(__('If the data in each row of the file is not in the same order as in the database, list the corresponding column names here. Column names must be separated by commas and not enclosed in quotations.'));
$plugin_list['csv']['options'][] =
array('type' => 'text', 'name' => 'columns', 'text' => __('Column names: ' . PMA_showHint($hint)));
array('type' => 'text', 'name' => 'columns', 'text' => __('Column names: ') . PMA_showHint($hint));
}
$plugin_list['csv']['options'][] = array('type' => 'end_group');
@ -106,7 +106,7 @@ if (!$analyze) {
}
$sql_template .= ' INTO ' . PMA_backquote($table);
$tmp_fields = PMA_DBI_get_fields($db, $table);
$tmp_fields = PMA_DBI_get_columns($db, $table);
if (empty($csv_columns)) {
$fields = $tmp_fields;

View File

@ -29,6 +29,9 @@ if (! empty($submit_mult)
} else {
$selected = $selected_tbl;
switch ($submit_mult) {
case 'add_prefix_tbl':
case 'replace_prefix_tbl':
case 'copy_tbl_change_prefix':
case 'drop_db':
case 'drop_tbl':
case 'empty_tbl':
@ -238,16 +241,50 @@ if (!empty($submit_mult) && !empty($what)) {
<?php
echo PMA_generate_common_hidden_inputs($_url_params);
?>
<fieldset class="confirmation">
<legend><?php echo ($what == 'drop_db' ? __('You are about to DESTROY a complete database!') . '&nbsp;' : '') . __('Do you really want to '); ?>:</legend>
<tt><?php echo $full_query; ?></tt>
</fieldset>
<fieldset class="tblFooters">
<input type="submit" name="mult_btn" value="<?php echo __('Yes'); ?>" id="buttonYes" />
<input type="submit" name="mult_btn" value="<?php echo __('No'); ?>" id="buttonNo" />
</fieldset>
<?php if ($what == 'replace_prefix_tbl' || $what == 'copy_tbl_change_prefix'){ ?>
<fieldset class = "input">
<legend><?php echo ($what == 'replace_prefix_tbl' ? __('Replace table prefix') : __('Copy table with prefix')) ?>:</legend>
<table>
<tr>
<td><?php echo __('From'); ?></td><td><input type="text" name="from_prefix" id="initialPrefix"</td>
</tr>
<tr>
<td><?php echo __('To'); ?> </td><td><input type="text" name="to_prefix" id="newPrefix"</td>
</tr>
</table>
</fieldset>
<fieldset class="tblFooters">
<button type="submit" name="mult_btn" value="<?php echo __('Yes'); ?>" id="buttonYes"><? echo __('Submit'); ?></button>
</fieldset>
<?php
require './libraries/footer.inc.php';
}
elseif($what == 'add_prefix_tbl'){ ?>
<fieldset class = "input">
<legend><?php echo __('Add table prefix') ?>:</legend>
<table>
<tr>
<td><?php echo __('Add prefix'); ?></td> <td><input type="text" name="add_prefix" id="txtPrefix"</td>
</tr>
</table>
</fieldset>
<fieldset class="tblFooters">
<button type="submit" name="mult_btn" value="<?php echo __('Yes'); ?>" id="buttonYes"><? echo __('Submit'); ?></button>
</fieldset>
<?php
}
else { ?>
<fieldset class="confirmation">
<legend><?php echo ($what == 'drop_db' ? __('You are about to DESTROY a complete database!') . '&nbsp;' : '') . __('Do you really want to '); ?>:</legend>
<tt><?php echo $full_query; ?></tt>
</fieldset>
<fieldset class="tblFooters">
<input type="submit" name="mult_btn" value="<?php echo __('Yes'); ?>" id="buttonYes" />
<input type="submit" name="mult_btn" value="<?php echo __('No'); ?>" id="buttonNo" />
</fieldset>
<?php
}
require './libraries/footer.inc.php';
} // end if
@ -373,6 +410,27 @@ elseif ($mult_btn == __('Yes')) {
. PMA_backquote($selected[$i])
. (($i == $selected_cnt-1) ? ');' : '');
break;
case 'add_prefix_tbl':
$newtablename = $add_prefix . $selected[$i];
$a_query = 'ALTER TABLE ' . PMA_backquote($selected[$i]) . ' RENAME ' . PMA_backquote($newtablename) ; // ADD PREFIX TO TABLE NAME
$run_parts = true;
break;
case 'replace_prefix_tbl':
$current = $selected[$i];
$newtablename = preg_replace("/^" . $from_prefix . "/" , $to_prefix , $current);
$a_query = 'ALTER TABLE ' . PMA_backquote($selected[$i]) . ' RENAME ' . PMA_backquote($newtablename) ; // CHANGE PREFIX PATTERN
$run_parts = true;
break;
case 'copy_tbl_change_prefix':
$current = $selected[$i];
$newtablename = preg_replace("/^" . $from_prefix . "/" , $to_prefix , $current);
$a_query = 'CREATE TABLE ' . PMA_backquote($newtablename) . ' SELECT * FROM ' . PMA_backquote($selected[$i]) ; // COPY TABLE AND CHANGE PREFIX PATTERN
$run_parts = true;
break;
} // end switch
// All "DROP TABLE", "DROP FIELD", "OPTIMIZE TABLE" and "REPAIR TABLE"

0
libraries/php-gettext/gettext.php Executable file → Normal file
View File

View File

@ -517,7 +517,7 @@ function PMA_getDisplayField($db, $table)
* Gets the comments for all rows of a table or the db itself
*
* @access public
* @uses PMA_DBI_get_fields()
* @uses PMA_DBI_get_columns()
* @uses PMA_getDbComment()
* @param string the name of the db to check for
* @param string the name of the table to check for
@ -529,9 +529,9 @@ function PMA_getComments($db, $table = '')
if ($table != '') {
// MySQL native column comments
$fields = PMA_DBI_get_fields($db, $table);
$fields = PMA_DBI_get_columns($db, $table);
if ($fields) {
foreach ($fields as $key => $field) {
foreach ($fields as $field) {
if (! empty($field['Comment'])) {
$comments[$field['Field']] = $field['Comment'];
}

View File

@ -204,7 +204,7 @@ function PMA_replication_print_slaves_table($hidden = false) {
*/
function PMA_replication_get_username_hostname_length() {
$fields_info = PMA_DBI_get_fields('mysql', 'user');
$fields_info = PMA_DBI_get_columns('mysql', 'user');
$username_length = 16;
$hostname_length = 41;
foreach ($fields_info as $key => $val) {

View File

@ -68,7 +68,7 @@ function PMA_getNonMatchingTargetTables($trg_tables, $matching_tables, &$uncommo
* If update is required, it is placed in $update_array
* Otherwise that entry is placed in the $insert_array.
*
* @uses PMA_DBI_get_fields()
* @uses PMA_DBI_get_columns()
* @uses PMA_DBI_get_column_values()
* @uses PMA_DBI_fetch_result()
*
@ -95,7 +95,7 @@ function PMA_dataDiffInTables($src_db, $trg_db, $src_link, $trg_link, &$matching
{
if (isset($matching_table[$matching_table_index])) {
$fld = array();
$fld_results = PMA_DBI_get_fields($src_db, $matching_table[$matching_table_index], $src_link);
$fld_results = PMA_DBI_get_columns($src_db, $matching_table[$matching_table_index], true, $src_link);
$is_key = array();
if (isset($fld_results)) {
foreach ($fld_results as $each_field) {
@ -113,7 +113,7 @@ function PMA_dataDiffInTables($src_db, $trg_db, $src_link, $trg_link, &$matching
$source_result_set = PMA_DBI_get_column_values($src_db, $matching_table[$matching_table_index], $is_key, $src_link);
$source_size = sizeof($source_result_set);
$trg_fld_results = PMA_DBI_get_fields($trg_db, $matching_table[$matching_table_index], $trg_link);
$trg_fld_results = PMA_DBI_get_columns($trg_db, $matching_table[$matching_table_index], true, $trg_link);
$all_keys_match = true;
$trg_keys = array();
@ -597,7 +597,7 @@ function PMA_insertIntoTargetTable($matching_table, $src_db, $trg_db, $src_link,
/**
* PMA_createTargetTables() Create the missing table $uncommon_table in target database
*
* @uses PMA_DBI_get_fields()
* @uses PMA_DBI_get_columns()
* @uses PMA_backquote()
* @uses PMA_DBI_fetch_result()
*
@ -613,7 +613,7 @@ function PMA_insertIntoTargetTable($matching_table, $src_db, $trg_db, $src_link,
function PMA_createTargetTables($src_db, $trg_db, $src_link, $trg_link, &$uncommon_tables, $table_index, &$uncommon_tables_fields, $display)
{
if (isset($uncommon_tables[$table_index])) {
$fields_result = PMA_DBI_get_fields($src_db, $uncommon_tables[$table_index], $src_link);
$fields_result = PMA_DBI_get_columns($src_db, $uncommon_tables[$table_index], true, $src_link);
$fields = array();
foreach ($fields_result as $each_field) {
$field_name = $each_field['Field'];

View File

@ -119,8 +119,7 @@ function PMA_sqlQueryForm($query = true, $display_tab = false, $delimiter = ';')
if ($GLOBALS['cfg']['AjaxEnable']) {
echo ' class="ajax"';
}
echo ' id="sqlqueryform"'
.' onsubmit="return checkSqlQuery(this)" name="sqlform">' . "\n";
echo ' id="sqlqueryform" name="sqlform">' . "\n";
}
if ($is_querywindow) {

View File

@ -244,9 +244,10 @@ if (! defined('PMA_MINIMUM_COMMON')) {
6 => '<>',
7 => '>=',
8 => '>>',
9 => '||'
9 => '||',
10 => '==',
);
$allpunct_list_pair_size = 10; //count($allpunct_list_pair);
$allpunct_list_pair_size = 11; //count($allpunct_list_pair);
$quote_list = '\'"`';
$arraysize = 0;

View File

@ -112,7 +112,7 @@ unset($tabs);
if(PMA_Tracker::isActive() and PMA_Tracker::isTracked($GLOBALS["db"], $GLOBALS["table"]))
{
$msg = PMA_Message::notice('<a href="tbl_tracking.php?'.$url_query.'">'.sprintf(__('Tracking of %s.%s is activated.'), $GLOBALS["db"], $GLOBALS["table"]).'</a>');
$msg = PMA_Message::notice('<a href="tbl_tracking.php?'.$url_query.'">'.sprintf(__('Tracking of %s.%s is activated.'), htmlspecialchars($GLOBALS["db"]), htmlspecialchars($GLOBALS["table"])).'</a>');
$msg->display();
}

0
libraries/transformations/generator.sh Normal file → Executable file
View File

0
libraries/transformations/template_generator.sh Normal file → Executable file
View File

View File

View File

@ -27,6 +27,13 @@
*/
class zipfile
{
/**
* Whether to echo zip as it's built or return as string from -> file
*
* @var boolean $doWrite
*/
var $doWrite = false;
/**
* Array to store compressed data
*
@ -56,6 +63,21 @@ class zipfile
var $old_offset = 0;
/**
* Sets member variable this -> doWrite to true
* - Should be called immediately after class instantiantion
* - If set to true, then ZIP archive are echo'ed to STDOUT as each
* file is added via this -> addfile(), and central directories are
* echoed to STDOUT on final call to this -> file(). Also,
* this -> file() returns an empty string so it is safe to issue a
* "echo $zipfile;" command
*
* @access public
*/
function setDoWrite() {
$this -> doWrite = true;
} // end of the 'setDoWrite()' method
/**
* Converts an Unix timestamp to a four byte DOS date and time format (date
* in high two bytes, time in low two bytes allowing magnitude comparison).
@ -133,8 +155,12 @@ class zipfile
//$fr .= pack('V', $c_len); // compressed filesize
//$fr .= pack('V', $unc_len); // uncompressed filesize
// add this entry to array
$this -> datasec[] = $fr;
// echo this entry on the fly, ...
if ( $this -> doWrite) {
echo $fr;
} else { // ... OR add this entry to array
$this -> datasec[] = $fr;
}
// now add to central directory record
$cdrec = "\x50\x4b\x01\x02";
@ -165,26 +191,30 @@ class zipfile
/**
* Dumps out file
* Echo central dir if ->doWrite==true, else build string to return
*
* @return string the zipped file
* @return string if ->doWrite {empty string} else the ZIP file contents
*
* @access public
*/
function file()
{
$data = implode('', $this -> datasec);
$ctrldir = implode('', $this -> ctrl_dir);
return
$data .
$ctrldir .
$header = $ctrldir .
$this -> eof_ctrl_dir .
pack('v', sizeof($this -> ctrl_dir)) . // total # of entries "on this disk"
pack('v', sizeof($this -> ctrl_dir)) . // total # of entries overall
pack('V', strlen($ctrldir)) . // size of central dir
pack('V', strlen($data)) . // offset to start of central dir
"\x00\x00"; // .zip file comment length
if ( $this -> doWrite ) { // Send central directory & end ctrl dir to STDOUT
echo $header;
return ""; // Return empty string
} else { // Return entire ZIP archive as string
$data = implode('', $this -> datasec);
return $data . $header;
}
} // end of the 'file()' method
} // end of the 'zipfile' class

View File

@ -202,7 +202,10 @@ echo '<div class="group pmagroup">';
echo '<h2>phpMyAdmin</h2>';
echo '<ul>';
$class = null;
if ($GLOBALS['cfg']['VersionCheck']) {
// workaround for bug 3302733; some browsers don't like the situation
// where phpMyAdmin is called on a secure page but a part of the page
// (the version check) refers to a non-secure page
if ($GLOBALS['cfg']['VersionCheck'] && ! $GLOBALS['PMA_Config']->get('is_https')) {
$class = 'jsversioncheck';
}
PMA_printListItem(__('Version information') . ': ' . PMA_VERSION, 'li_pma_version', null, null, null, null, $class);

View File

@ -126,7 +126,7 @@ require_once './libraries/header_http.inc.php';
<base target="frame_content" />
<link rel="stylesheet" type="text/css"
href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&amp;js_frame=left&amp;nocache=<?php echo $GLOBALS['PMA_Config']->getThemeUniqueValue(); ?>" />
<script src="./js/jquery/jquery-1.4.4.js" type="text/javascript"></script>
<script src="./js/jquery/jquery-1.6.1.js" type="text/javascript"></script>
<script type="text/javascript" src="js/navigation.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
<script type="text/javascript">

View File

@ -6,6 +6,54 @@
/**
* init
*/
var _change = 0; // variable to track any change in designer layout.
var _staying = 0; // variable to check if the user stayed after seeing the confirmation prompt.
// Below is the function to change the href attributes to '#' while the href script is called using
// the onclick event. It fixes the Internet Explorer issue with href.
$(document).ready(function(){
$('a').filter(function(){
return ( /^javascript\:/i).test($(this).attr('href'));
}).each(function(){
var hrefscript = $(this).attr('href');
hrefscript = hrefscript.substr(11);
$(this).data('hrefscript', hrefscript);
}).click(function(){
var hrefscript = $(this).data('hrefscript');
eval (hrefscript);
return false;
}).attr('href', '#');
});
// Below is the function to bind onbeforeunload events with the content_frame as well as the top window.
$(document).ready(function(){
$(window).bind('beforeunload', function(){ // onbeforeunload for the frame window.
if (_change == 1 && _staying == 0)
return PMA_messages['strLeavingDesigner'];
else if (_change == 1 && _staying == 1)
_staying = 0;
});
$(window).unload(function(){
_change = 0;
});
window.top.onbeforeunload = function(){ // onbeforeunload for the browser main window.
if (_change == 1 && _staying == 0){
_staying = 1; // Helps if the user stays on the page as there
setTimeout('make_zero();', 100); // is no other way of knowing whether the user stayed or not.
return PMA_messages['strLeavingDesigner'];
}
};
});
function make_zero(){ // Function called if the user stays after seeing the confirmation prompt.
_staying = 0;
}
var dx, dy, dy2;
var cur_click;
// update in Main()
@ -95,6 +143,7 @@ function MouseMove(e)
//window.status = "X = "+ Glob_X + " Y = "+ Glob_Y;
if (cur_click != null) {
_change = 1;
var mGx = Glob_X - dx;
var mGy = Glob_Y - dy;
mGx = mGx > 0 ? mGx : 0;
@ -448,6 +497,7 @@ function Get_url_pos()
function Save2()
{
_change = 0;
var poststr = 'IS_AJAX=1&server='+server+'&db=' + db + '&token=' + token + '&die_save_pos=1';
poststr += Get_url_pos();
makeRequest('pmd_save_pos.php', poststr);

1120
po/af.po

File diff suppressed because it is too large Load Diff

1120
po/ar.po

File diff suppressed because it is too large Load Diff

1107
po/az.po

File diff suppressed because it is too large Load Diff

1116
po/be.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2129
po/bg.po

File diff suppressed because it is too large Load Diff

1118
po/bn.po

File diff suppressed because it is too large Load Diff

1129
po/bs.po

File diff suppressed because it is too large Load Diff

1134
po/ca.po

File diff suppressed because it is too large Load Diff

1067
po/cs.po

File diff suppressed because it is too large Load Diff

1158
po/cy.po

File diff suppressed because it is too large Load Diff

1116
po/da.po

File diff suppressed because it is too large Load Diff

1134
po/de.po

File diff suppressed because it is too large Load Diff

1144
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1108
po/es.po

File diff suppressed because it is too large Load Diff

1108
po/et.po

File diff suppressed because it is too large Load Diff

1127
po/eu.po

File diff suppressed because it is too large Load Diff

1116
po/fa.po

File diff suppressed because it is too large Load Diff

1128
po/fi.po

File diff suppressed because it is too large Load Diff

1112
po/fr.po

File diff suppressed because it is too large Load Diff

1132
po/gl.po

File diff suppressed because it is too large Load Diff

1105
po/he.po

File diff suppressed because it is too large Load Diff

1122
po/hi.po

File diff suppressed because it is too large Load Diff

1118
po/hr.po

File diff suppressed because it is too large Load Diff

2155
po/hu.po

File diff suppressed because it is too large Load Diff

1120
po/id.po

File diff suppressed because it is too large Load Diff

1130
po/it.po

File diff suppressed because it is too large Load Diff

1138
po/ja.po

File diff suppressed because it is too large Load Diff

1136
po/ka.po

File diff suppressed because it is too large Load Diff

1135
po/ko.po

File diff suppressed because it is too large Load Diff

1128
po/lt.po

File diff suppressed because it is too large Load Diff

1137
po/lv.po

File diff suppressed because it is too large Load Diff

1120
po/mk.po

File diff suppressed because it is too large Load Diff

1079
po/ml.po

File diff suppressed because it is too large Load Diff

1122
po/mn.po

File diff suppressed because it is too large Load Diff

1119
po/ms.po

File diff suppressed because it is too large Load Diff

1128
po/nb.po

File diff suppressed because it is too large Load Diff

1126
po/nl.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1140
po/pl.po

File diff suppressed because it is too large Load Diff

1114
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1113
po/ro.po

File diff suppressed because it is too large Load Diff

1130
po/ru.po

File diff suppressed because it is too large Load Diff

1170
po/si.po

File diff suppressed because it is too large Load Diff

3296
po/sk.po

File diff suppressed because it is too large Load Diff

1104
po/sl.po

File diff suppressed because it is too large Load Diff

1131
po/sq.po

File diff suppressed because it is too large Load Diff

1116
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1130
po/sv.po

File diff suppressed because it is too large Load Diff

1086
po/ta.po

File diff suppressed because it is too large Load Diff

1098
po/te.po

File diff suppressed because it is too large Load Diff

1133
po/th.po

File diff suppressed because it is too large Load Diff

1118
po/tr.po

File diff suppressed because it is too large Load Diff

1110
po/tt.po

File diff suppressed because it is too large Load Diff

1142
po/ug.po

File diff suppressed because it is too large Load Diff

1118
po/uk.po

File diff suppressed because it is too large Load Diff

1117
po/ur.po

File diff suppressed because it is too large Load Diff

1140
po/uz.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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