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

This commit is contained in:
Crack 2010-10-05 13:43:50 +02:00
commit 9a3120d185
91 changed files with 58460 additions and 57743 deletions

View File

@ -121,6 +121,10 @@
3.3.8.0 (not yet released)
- bug #3059311 [import] BIGINT field type added to table analysis
- [core] Update library PHPExcel to version 1.7.4
- bug #3062455 [core] copy procedures and routines before tables
- bug #3062455 [export] with SQL, export procedures and routines before tables
- bug #3056023 [import] USE query not working
- bug #3038193 [display] Error when editing row with GEOMETRY column
3.3.7.0 (2010-09-07)
- patch #3050492 [PDF scratchboard] Cannot drag table box to the edge after

View File

@ -1868,11 +1868,6 @@ $cfg['TrustedProxies'] =
</dt>
<dd>Defines if the whole textarea of the query box will be selected on
click.</dd>
<dt id="CtrlArrowsMoving">
<span id="cfg_CtrlArrowsMoving">$cfg['CtrlArrowsMoving'] </span>boolean
</dt>
<dd>Enable Ctrl+Arrows (Option+Arrows in Safari) moving between fields when
editing.</dd>
<dt id="cfg_LimitChars">$cfg['LimitChars'] integer</dt>
<dd>Maximum number of characters shown in any non-numeric field on browse view.
@ -4082,9 +4077,7 @@ INSERT INTO REL_towns VALUES ('M', 'Montr&eacute;al');
editing fields?</a></h4>
<p> You can use Ctrl+arrows (Option+Arrows in Safari) for moving on most pages
with many editing fields (table structure changes, row editing, etc.)
(must be enabled in configuration - see.
<a href="#CtrlArrowsMoving" class="configrule">$cfg['CtrlArrowsMoving']</a>).
with many editing fields (table structure changes, row editing, etc.).
You can also have a look at the directive
<a href="#DefaultPropDisplay" class="configrule">$cfg['DefaultPropDisplay']</a>
('vertical') and see if this eases up editing for you.</p>

View File

@ -69,6 +69,40 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
$GLOBALS['pma']->databases->build();
}
if (PMA_MYSQL_INT_VERSION >= 50000) {
// here I don't use DELIMITER because it's not part of the
// language; I have to send each statement one by one
// to avoid selecting alternatively the current and new db
// we would need to modify the CREATE definitions to qualify
// the db name
$procedure_names = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');
if ($procedure_names) {
foreach($procedure_names as $procedure_name) {
PMA_DBI_select_db($db);
$tmp_query = PMA_DBI_get_definition($db, 'PROCEDURE', $procedure_name);
// collect for later display
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
PMA_DBI_select_db($newname);
PMA_DBI_query($tmp_query);
}
}
$function_names = PMA_DBI_get_procedures_or_functions($db, 'FUNCTION');
if ($function_names) {
foreach($function_names as $function_name) {
PMA_DBI_select_db($db);
$tmp_query = PMA_DBI_get_definition($db, 'FUNCTION', $function_name);
// collect for later display
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
PMA_DBI_select_db($newname);
PMA_DBI_query($tmp_query);
}
}
}
// go back to current db, just in case
PMA_DBI_select_db($db);
if (isset($GLOBALS['add_constraints']) || $move) {
$GLOBALS['sql_constraints_query_full_db'] = array();
}
@ -181,40 +215,6 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
unset($GLOBALS['sql_constraints_query_full_db'], $one_query);
}
if (PMA_MYSQL_INT_VERSION >= 50000) {
// here I don't use DELIMITER because it's not part of the
// language; I have to send each statement one by one
// to avoid selecting alternatively the current and new db
// we would need to modify the CREATE definitions to qualify
// the db name
$procedure_names = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');
if ($procedure_names) {
foreach($procedure_names as $procedure_name) {
PMA_DBI_select_db($db);
$tmp_query = PMA_DBI_get_definition($db, 'PROCEDURE', $procedure_name);
// collect for later display
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
PMA_DBI_select_db($newname);
PMA_DBI_query($tmp_query);
}
}
$function_names = PMA_DBI_get_procedures_or_functions($db, 'FUNCTION');
if ($function_names) {
foreach($function_names as $function_name) {
PMA_DBI_select_db($db);
$tmp_query = PMA_DBI_get_definition($db, 'FUNCTION', $function_name);
// collect for later display
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
PMA_DBI_select_db($newname);
PMA_DBI_query($tmp_query);
}
}
}
// go back to current db, just in case
PMA_DBI_select_db($db);
// Duplicate the bookmarks for this db (done once for each db)
if (! $_error && $db != $newname) {
$get_fields = array('user', 'label', 'query');
@ -343,6 +343,7 @@ if (!$is_information_schema) {
/**
* rename database
*/
if ($db != 'mysql') {
?>
<form id="rename_db_form" method="post" action="db_operations.php"
onsubmit="return emptyFormElements(this, 'newname')">
@ -383,9 +384,11 @@ if (!$is_information_schema) {
</fieldset>
</form>
<?php
} // end if
// Drop link if allowed
// Don't even try to drop information_schema. You won't be able to. Believe me. You won't.
// Don't allow to easilly drop mysql database, RFE #1327514.
// Don't allow to easily drop mysql database, RFE #1327514.
if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) && ! $db_is_information_schema && ($db != 'mysql')) {
?>
<fieldset class="caution">

View File

@ -70,47 +70,7 @@ $db_collation = PMA_getDbCollation($db);
// in a separate file to avoid redeclaration of functions in some code paths
require_once './libraries/db_structure.lib.php';
$titles = array();
if (true == $cfg['PropertiesIconic']) {
$titles['Browse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />';
$titles['NoBrowse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />';
$titles['Search'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />';
$titles['NoSearch'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />';
$titles['Insert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />';
$titles['NoInsert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />';
$titles['Structure'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . __('Structure') . '" title="' . __('Structure') . '" />';
$titles['Drop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />';
$titles['NoDrop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />';
$titles['Empty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />';
$titles['NoEmpty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />';
if ('both' === $cfg['PropertiesIconic']) {
$titles['Browse'] .= __('Browse');
$titles['Search'] .= __('Search');
$titles['NoBrowse'] .= __('Browse');
$titles['NoSearch'] .= __('Search');
$titles['Insert'] .= __('Insert');
$titles['NoInsert'] .= __('Insert');
$titles['Structure'] .= __('Structure');
$titles['Drop'] .= __('Drop');
$titles['NoDrop'] .= __('Drop');
$titles['Empty'] .= __('Empty');
$titles['NoEmpty'] .= __('Empty');
}
} else {
$titles['Browse'] = __('Browse');
$titles['Search'] = __('Search');
$titles['NoBrowse'] = __('Browse');
$titles['NoSearch'] = __('Search');
$titles['Insert'] = __('Insert');
$titles['NoInsert'] = __('Insert');
$titles['Structure'] = __('Structure');
$titles['Drop'] = __('Drop');
$titles['NoDrop'] = __('Drop');
$titles['Empty'] = __('Empty');
$titles['NoEmpty'] = __('Empty');
}
require_once './libraries/build_action_titles.inc.php';
/**
* Displays the tables list
@ -573,7 +533,6 @@ if (PMA_MYSQL_INT_VERSION > 50100) {
/**
* Work on the database
* redesigned 2004-05-08 by mkkeck
*/
/* DATABASE WORK */
/* Printable view of a table */

View File

@ -20,6 +20,42 @@ var only_once_elements = new Array();
*/
var ajax_message_init = false;
/**
* Generate a new password and copy it to the password input areas
*
* @param object the form that holds the password fields
*
* @return boolean always true
*/
function suggestPassword(passwd_form) {
// restrict the password to just letters and numbers to avoid problems:
// "editors and viewers regard the password as multiple words and
// things like double click no longer work"
var pwchars = "abcdefhjmnpqrstuvwxyz23456789ABCDEFGHJKLMNPQRSTUVWYXZ";
var passwordlength = 16; // do we want that to be dynamic? no, keep it simple :)
var passwd = passwd_form.generated_pw;
passwd.value = '';
for ( i = 0; i < passwordlength; i++ ) {
passwd.value += pwchars.charAt( Math.floor( Math.random() * pwchars.length ) )
}
passwd_form.text_pma_pw.value = passwd.value;
passwd_form.text_pma_pw2.value = passwd.value;
return true;
}
/**
* for libraries/display_change_password.lib.php
* libraries/user_password.php
*
*/
function displayPasswordGenerateButton() {
$('#tr_element_before_generate_password').parent().append('<tr><td>' + PMA_messages['strGeneratePassword'] + '</td><td><input type="button" id="button_generate_password" value="' + PMA_messages['strGenerate'] + '" onclick="suggestPassword(this.form)" /><input type="text" name="generated_pw" id="generated_pw" /></td></tr>');
$('#div_element_before_generate_password').parent().append('<div class="item"><label for="button_generate_password">' + PMA_messages['strGeneratePassword'] + ':</label><span class="options"><input type="button" id="button_generate_password" value="' + PMA_messages['strGenerate'] + '" onclick="suggestPassword(this.form)" /></span><input type="text" name="generated_pw" id="generated_pw" /></div>');
}
/**
* selects the content of a given object, f.e. a textarea
*
@ -1996,16 +2032,90 @@ $(document).ready(function() {
}); // end dialog options
}) // end $.get()
// empty table name and number of columns from the minimal form
$(this).find('input[name=table],input[name=num_fields]').val('');
});
/**
* Attach event handler for submission of create table form
* Attach event handler for submission of create table form (save)
*
* @uses PMA_ajaxShowMessage()
* @uses $.PMA_sort_table()
* @uses window.parent.refreshNavigation()
*
*/
$("#create_table_form").find("input[name=submit_num_fields], input[name=do_save_data]").live('click', function(event) {
// .live() must be called after a selector, see http://api.jquery.com/live
$("#create_table_form input[name=do_save_data]").live('click', function(event) {
event.preventDefault();
/**
* @var the_form object referring to the create table form
*/
var the_form = $("#create_table_form");
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
$(the_form).append('<input type="hidden" name="ajax_request" value="true" />');
//User wants to submit the form
$.post($(the_form).attr('action'), $(the_form).serialize() + "&do_save_data=" + $(this).val(), function(data) {
if(data.success == true) {
PMA_ajaxShowMessage(data.message);
$("#create_table_dialog").dialog("close").remove();
/**
* @var tables_table Object referring to the <tbody> element that holds the list of tables
*/
var tables_table = $("#tablesForm").find("tbody").not("#tbl_summary_row");
/**
* @var curr_last_row Object referring to the last <tr> element in {@link tables_table}
*/
var curr_last_row = $(tables_table).find('tr:last');
/**
* @var curr_last_row_index_string String containing the index of {@link curr_last_row}
*/
var curr_last_row_index_string = $(curr_last_row).find('input:checkbox').attr('id').match(/\d+/)[0];
/**
* @var curr_last_row_index Index of {@link curr_last_row}
*/
var curr_last_row_index = parseFloat(curr_last_row_index_string);
/**
* @var new_last_row_index Index of the new row to be appended to {@link tables_table}
*/
var new_last_row_index = curr_last_row_index + 1;
/**
* @var new_last_row_id String containing the id of the row to be appended to {@link tables_table}
*/
var new_last_row_id = 'checkbox_tbl_' + new_last_row_index;
//append to table
$(data.new_table_string)
.find('input:checkbox')
.val(new_last_row_id)
.end()
.appendTo(tables_table);
//Sort the table
$(tables_table).PMA_sort_table('th');
//Refresh navigation frame as a new table has been added
window.parent.refreshNavigation();
}
else {
PMA_ajaxShowMessage(data.error);
}
}) // end $.post()
}) // end create table form (save)
/**
* Attach event handler for create table form (add fields)
*
* @uses PMA_ajaxShowMessage()
* @uses $.PMA_sort_table()
* @uses window.parent.refreshNavigation()
*
*/
// .live() must be called after a selector, see http://api.jquery.com/live
$("#create_table_form input[name=submit_num_fields]").live('click', function(event) {
event.preventDefault();
/**
@ -2016,64 +2126,12 @@ $(document).ready(function() {
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
$(the_form).append('<input type="hidden" name="ajax_request" value="true" />');
if($(this).attr('name') == 'submit_num_fields') {
//User wants to add more fields to the table
$.post($(the_form).attr('action'), $(the_form).serialize() + "&submit_num_fields=" + $(this).val(), function(data) {
$("#create_table_dialog").html(data);
}) //end $.post()
}
else if($(this).attr('name') == 'do_save_data') {
//User wants to submit the form
$.post($(the_form).attr('action'), $(the_form).serialize() + "&do_save_data=" + $(this).val(), function(data) {
if(data.success == true) {
PMA_ajaxShowMessage(data.message);
$("#create_table_dialog").dialog("close").remove();
//User wants to add more fields to the table
$.post($(the_form).attr('action'), $(the_form).serialize() + "&submit_num_fields=" + $(this).val(), function(data) {
$("#create_table_dialog").html(data);
}) //end $.post()
/**
* @var tables_table Object referring to the <tbody> element that holds the list of tables
*/
var tables_table = $("#tablesForm").find("tbody").not("#tbl_summary_row");
/**
* @var curr_last_row Object referring to the last <tr> element in {@link tables_table}
*/
var curr_last_row = $(tables_table).find('tr:last');
/**
* @var curr_last_row_index_string String containing the index of {@link curr_last_row}
*/
var curr_last_row_index_string = $(curr_last_row).find('input:checkbox').attr('id').match(/\d+/)[0];
/**
* @var curr_last_row_index Index of {@link curr_last_row}
*/
var curr_last_row_index = parseFloat(curr_last_row_index_string);
/**
* @var new_last_row_index Index of the new row to be appended to {@link tables_table}
*/
var new_last_row_index = curr_last_row_index + 1;
/**
* @var new_last_row_id String containing the id of the row to be appended to {@link tables_table}
*/
var new_last_row_id = 'checkbox_tbl_' + new_last_row_index;
//append to table
$(data.new_table_string)
.find('input:checkbox')
.val(new_last_row_id)
.end()
.appendTo(tables_table);
//Sort the table
$(tables_table).PMA_sort_table('th');
//Refresh navigation frame as a new table has been added
window.parent.refreshNavigation();
}
else {
PMA_ajaxShowMessage(data.error);
}
}) // end $.post()
} // end elseif()
}) // end create table form submit button actions
}) // end create table form (add fields)
}, 'top.frame_content'); //end $(document).ready for 'Create Table'
@ -2281,6 +2339,7 @@ $(document).ready(function() {
buttons : button_options
})
.append(data);
displayPasswordGenerateButton();
}) // end $.get()
}) // end handler for change password anchor

View File

@ -4,51 +4,6 @@
*
*/
/**
* Ensures a value submitted in a form is numeric and is in a range
*
* @param object the form
* @param string the name of the form field to check
* @param integer the minimum authorized value
* @param integer the maximum authorized value
*
* @return boolean whether a valid number has been submitted or not
*/
function checkFormElementInRange(theForm, theFieldName, message, min, max)
{
var theField = theForm.elements[theFieldName];
var val = parseInt(theField.value);
if (typeof(min) == 'undefined') {
min = 0;
}
if (typeof(max) == 'undefined') {
max = Number.MAX_VALUE;
}
// It's not a number
if (isNaN(val)) {
theField.select();
alert(PMA_messages['strNotNumber']);
theField.focus();
return false;
}
// It's a number but it is not between min and max
else if (val < min || val > max) {
theField.select();
alert(message.replace('%d', val));
theField.focus();
return false;
}
// It's a valid number
else {
theField.value = val;
}
return true;
} // end of the 'checkFormElementInRange()' function
/**
* Ensures indexes names are valid according to their type and, for a primary
* key, lock index name to 'PRIMARY'

View File

@ -81,7 +81,8 @@ $js_messages['strNo'] = __('No');
$js_messages['strSearching'] = __('Searching');
/* For sql.js */
$js_messages['strToggleQueryBox'] = __('Toggle Query Box Visibility');
$js_messages['strHideQueryBox'] = __('Hide query box');
$js_messages['strShowQueryBox'] = __('Show query box');
$js_messages['strInlineEdit'] = __('Inline Edit');
/* For tbl_change.js */

View File

@ -1,10 +0,0 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* for libraries/display_change_password.lib.php
*
*/
$(document).ready(function() {
$('#tr_element_before_generate_password').parent().append('<tr><td>' + PMA_messages['strGeneratePassword'] + '</td><td><input type="button" id="button_generate_password" value="' + PMA_messages['strGenerate'] + '" onclick="suggestPassword(this.form)" /><input type="text" name="generated_pw" id="generated_pw" /></td></tr>');
$('#div_element_before_generate_password').parent().append('<div class="item"><label for="button_generate_password">' + PMA_messages['strGeneratePassword'] + ':</label><span class="options"><input type="button" id="button_generate_password" value="' + PMA_messages['strGenerate'] + '" onclick="suggestPassword(this.form)" /></span><input type="text" name="generated_pw" id="generated_pw" /></div>');
});

View File

@ -73,31 +73,6 @@ function checkAddUser(the_form)
return checkPassword(the_form);
} // end of the 'checkAddUser()' function
/**
* Generate a new password and copy it to the password input areas
*
* @param object the form that holds the password fields
*
* @return boolean always true
*/
function suggestPassword(passwd_form) {
// restrict the password to just letters and numbers to avoid problems:
// "editors and viewers regard the password as multiple words and
// things like double click no longer work"
var pwchars = "abcdefhjmnpqrstuvwxyz23456789ABCDEFGHJKLMNPQRSTUVWYXZ";
var passwordlength = 16; // do we want that to be dynamic? no, keep it simple :)
var passwd = passwd_form.generated_pw;
passwd.value = '';
for ( i = 0; i < passwordlength; i++ ) {
passwd.value += pwchars.charAt( Math.floor( Math.random() * pwchars.length ) )
}
passwd_form.text_pma_pw.value = passwd.value;
passwd_form.text_pma_pw2.value = passwd.value;
return true;
}
/**
* When a new user is created and retrieved over Ajax, append the user's row to
* the user's table
@ -238,6 +213,7 @@ $(document).ready(function() {
modal: true,
buttons: button_options
}); //dialog options end
displayPasswordGenerateButton();
}); // end $.get()
});//end of Add New User AJAX event handler
@ -339,7 +315,8 @@ $(document).ready(function() {
.dialog({
width: 900,
buttons: button_options
})
}); //dialog options end
displayPasswordGenerateButton();
}) // end $.get()
})
@ -467,4 +444,4 @@ $(document).ready(function() {
}, 'top.frame_content'); //end $(document).ready()
/**#@- */
/**#@- */

View File

@ -150,19 +150,30 @@ $(document).ready(function() {
$("#sqlqueryresults").trigger('appendAnchor');
/**
* Append the Toggle Query Box message to the query input form
* Append the "Show/Hide query box" message to the query input form
*
* @memberOf jQuery
* @name appendToggleSpan
*/
$('<span id="togglequerybox"></span>')
.html(PMA_messages['strToggleQueryBox'])
.appendTo("#sqlqueryform");
// do not add this link more than once
if (! $('#sqlqueryform').find('a').is('#togglequerybox')) {
$('<a id="togglequerybox"></a>')
.html(PMA_messages['strHideQueryBox'])
.appendTo("#sqlqueryform");
// Attach the toggling of the query box visibility to a click
$("#togglequerybox").live('click', function() {
$(this).siblings().slideToggle("medium");
})
// Attach the toggling of the query box visibility to a click
$("#togglequerybox").bind('click', function() {
var $link = $(this)
$link.siblings().slideToggle("medium");
if ($link.text() == PMA_messages['strHideQueryBox']) {
$link.text(PMA_messages['strShowQueryBox']);
} else {
$link.text(PMA_messages['strHideQueryBox']);
}
// avoid default click action
return false;
})
}
/**
* Ajax Event handler for 'SQL Query Submit'
@ -173,17 +184,29 @@ $(document).ready(function() {
*/
$("#sqlqueryform").live('submit', function(event) {
event.preventDefault();
$form = $(this);
PMA_ajaxShowMessage();
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
if (! $form.find('input:hidden').is('#ajax_request_hidden')) {
$form.append('<input type="hidden" id="ajax_request_hidden" name="ajax_request" value="true" />');
}
$.post($(this).attr('action'), $(this).serialize() , function(data) {
if(data.success == true) {
PMA_ajaxShowMessage(data.message);
// this happens if a USE command was typed
if (typeof data.reload != 'undefined') {
$form.find('input[name=db]').val(data.db);
// need to regenerate the whole upper part
$form.find('input[name=ajax_request]').remove();
$form.append('<input type="hidden" name="reload" value="true" />');
$.post('db_sql.php', $form.serialize(), function(data) {
$('body').html(data);
}); // end inner post
}
}
else if (data.success == false ) {
PMA_ajaxShowMessage(data.error);
PMA_ajaxShowMessage(data.error, 50000);
}
else {
$("#sqlqueryresults").html(data);

View File

@ -0,0 +1,51 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
*
* @package phpMyAdmin
*/
if (! defined('PHPMYADMIN')) {
exit;
}
$titles = array();
if (true == $cfg['PropertiesIconic']) {
$titles['Browse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />';
$titles['NoBrowse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />';
$titles['Search'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />';
$titles['NoSearch'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />';
$titles['Insert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />';
$titles['NoInsert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />';
$titles['Structure'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . __('Structure') . '" title="' . __('Structure') . '" />';
$titles['Drop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />';
$titles['NoDrop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />';
$titles['Empty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />';
$titles['NoEmpty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />';
if ('both' === $cfg['PropertiesIconic']) {
$titles['Browse'] .= __('Browse');
$titles['Search'] .= __('Search');
$titles['NoBrowse'] .= __('Browse');
$titles['NoSearch'] .= __('Search');
$titles['Insert'] .= __('Insert');
$titles['NoInsert'] .= __('Insert');
$titles['Structure'] .= __('Structure');
$titles['Drop'] .= __('Drop');
$titles['NoDrop'] .= __('Drop');
$titles['Empty'] .= __('Empty');
$titles['NoEmpty'] .= __('Empty');
}
} else {
$titles['Browse'] = __('Browse');
$titles['Search'] = __('Search');
$titles['NoBrowse'] = __('Browse');
$titles['NoSearch'] = __('Search');
$titles['Insert'] = __('Insert');
$titles['NoInsert'] = __('Insert');
$titles['Structure'] = __('Structure');
$titles['Drop'] = __('Drop');
$titles['NoDrop'] = __('Drop');
$titles['Empty'] = __('Empty');
$titles['NoEmpty'] = __('Empty');
}
?>

View File

@ -2198,13 +2198,6 @@ $cfg['CharTextareaCols'] = 40;
*/
$cfg['CharTextareaRows'] = 2;
/**
* Enable Ctrl+Arrows moving between fields when editing?
*
* @global boolean $cfg['CtrlArrowsMoving']
*/
$cfg['CtrlArrowsMoving'] = true;
/**
* Max field data length in browse mode for all non-numeric fields
*

View File

@ -39,7 +39,6 @@ $strConfigCompressOnFly_name = __('Compress on the fly');
$strConfigConfigurationFile = __('Configuration file');
$strConfigConfirm_desc = __('Whether a warning (&quot;Are your really sure...&quot;) should be displayed when you\'re about to lose data');
$strConfigConfirm_name = __('Confirm DROP queries');
$strConfigCtrlArrowsMoving_name = __('Field navigation using Ctrl+Arrows');
$strConfigDBG_sql_name = __('Debug SQL');
$strConfigDefaultDisplay_name = __('Default display direction');
$strConfigDefaultPropDisplay_desc = __('[kbd]horizontal[/kbd], [kbd]vertical[/kbd] or a number that indicates maximum number for which vertical model is used');

View File

@ -115,7 +115,6 @@ $forms['Main_frame']['Edit'] = array(
'InsertRows',
'ForeignKeyDropdownOrder',
'ForeignKeyMaxLimit',
'CtrlArrowsMoving',
'DefaultPropDisplay');
$forms['Main_frame']['Tabs'] = array(
'LightTabs',

View File

@ -524,7 +524,7 @@ function PMA_DBI_get_fields_meta($result)
// so this would override TINYINT and mark all TINYINT as string
// https://sf.net/tracker/?func=detail&aid=1532111&group_id=23067&atid=377408
//$typeAr[MYSQLI_TYPE_CHAR] = 'string';
$typeAr[MYSQLI_TYPE_GEOMETRY] = 'unknown';
$typeAr[MYSQLI_TYPE_GEOMETRY] = 'geometry';
$typeAr[MYSQLI_TYPE_BIT] = 'bit';
$fields = mysqli_fetch_fields($result);

View File

@ -1118,25 +1118,6 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
}
} // end if (1.2.1)
if (isset($GLOBALS['cfg']['Bookmark']['table']) && isset($GLOBALS['cfg']['Bookmark']['db']) && $table == $GLOBALS['cfg']['Bookmark']['table'] && $db == $GLOBALS['cfg']['Bookmark']['db'] && isset($row[1]) && isset($row[0])) {
$_url_params = array(
'db' => $row[1],
'id_bookmark' => $row[0],
'action_bookmark' => '0',
'action_bookmark_all' => '1',
'SQL' => __('Execute bookmarked query'),
);
$bookmark_go = '<a href="import.php'
. PMA_generate_common_url($_url_params)
.' " title="' . __('Execute bookmarked query') . '">';
$bookmark_go .= PMA_getIcon('b_bookmark.png', __('Execute bookmarked query'), true);
$bookmark_go .= '</a>';
} else {
$bookmark_go = '';
}
// 1.2.2 Delete/Kill link(s)
if ($is_display['del_lnk'] == 'dr') { // delete row case
$_url_params = array(
@ -1330,7 +1311,13 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
$vertical_display['data'][$row_no][$i] = ' <td' . $mouse_events . ' class="' . $class . ($condition_field ? ' condition' : '') . '">&nbsp;</td>' . "\n";
}
}
// n o t n u m e r i c a n d n o t B L O B
// g e o m e t r y
} elseif ($meta->type == 'geometry') {
$geometry_text = PMA_handle_non_printable_contents('GEOMETRY', (isset($row[$i]) ? $row[$i] : ''), $transform_function, $transform_options, $default_function, $meta);
$vertical_display['data'][$row_no][$i] = ' <td align="left"' . $mouse_events . ' class="' . $class . ($condition_field ? ' condition' : '') . '">' . $geometry_text . '</td>';
unset($geometry_text);
// n o t n u m e r i c a n d n o t B L O B
} else {
if (!isset($row[$i]) || is_null($row[$i])) {
$vertical_display['data'][$row_no][$i] = ' <td' . $mouse_events . ' class="' . $class . ($condition_field ? ' condition' : '') . '"><i>NULL</i></td>' . "\n";
@ -1442,7 +1429,6 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
if (isset($edit_url)) {
$vertical_display['edit'][$row_no] .= ' <td align="center" class="' . $class . ' ' . $edit_anchor_class . '" ' . $column_style_vertical . '>' . "\n"
. PMA_linkOrButton($edit_url, $edit_str, array(), false)
. $bookmark_go
. ' </td>' . "\n";
} else {
unset($vertical_display['edit'][$row_no]);
@ -2266,7 +2252,7 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) {
* @uses PMA_formatByteDown()
* @uses strpos()
* @uses str_replace()
* @param string $category BLOB|BINARY
* @param string $category BLOB|BINARY|GEOMETRY
* @param string $content the binary content
* @param string $transform_function
* @param string $transform_options

View File

@ -28,7 +28,6 @@ if ($doWriteModifyAt == 'left') {
if (!empty($edit_url)) {
echo ' <td class="' . $edit_anchor_class . '" align="center">' . "\n"
. PMA_linkOrButton($edit_url, $edit_str, '', FALSE)
. $bookmark_go
. ' </td>' . "\n";
}
if (!empty($del_url)) {
@ -45,7 +44,6 @@ if ($doWriteModifyAt == 'left') {
if (!empty($edit_url)) {
echo ' <td class="' . $edit_anchor_class . '" align="center">' . "\n"
. PMA_linkOrButton($edit_url, $edit_str, '', FALSE)
. $bookmark_go
. ' </td>' . "\n";
}
if (!empty($del_url) && $is_display['del_lnk'] != 'kp') {

View File

@ -370,9 +370,60 @@ function PMA_exportDBCreate($db)
return FALSE;
}
if (isset($GLOBALS['sql_backquotes']) && isset($GLOBALS['sql_compatibility']) && $GLOBALS['sql_compatibility'] == 'NONE') {
return PMA_exportOutputHandler('USE ' . PMA_backquote($db) . ';' . $crlf);
$result = PMA_exportOutputHandler('USE ' . PMA_backquote($db) . ';' . $crlf);
} else {
$result = PMA_exportOutputHandler('USE ' . $db . ';' . $crlf);
}
return PMA_exportOutputHandler('USE ' . $db . ';' . $crlf);
if ($result && isset($GLOBALS['sql_structure']) && isset($GLOBALS['sql_procedure_function'])) {
$text = '';
$delimiter = '$$';
$procedure_names = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');
$function_names = PMA_DBI_get_procedures_or_functions($db, 'FUNCTION');
if ($procedure_names || $function_names) {
$text .= $crlf
. 'DELIMITER ' . $delimiter . $crlf;
}
if ($procedure_names) {
$text .=
PMA_exportComment()
. PMA_exportComment(__('Procedures'))
. PMA_exportComment();
foreach($procedure_names as $procedure_name) {
if (! empty($GLOBALS['sql_drop_table'])) {
$text .= 'DROP PROCEDURE IF EXISTS ' . PMA_backquote($procedure_name) . $delimiter . $crlf;
}
$text .= PMA_DBI_get_definition($db, 'PROCEDURE', $procedure_name) . $delimiter . $crlf . $crlf;
}
}
if ($function_names) {
$text .=
PMA_exportComment()
. PMA_exportComment(__('Functions'))
. PMA_exportComment();
foreach($function_names as $function_name) {
if (! empty($GLOBALS['sql_drop_table'])) {
$text .= 'DROP FUNCTION IF EXISTS ' . PMA_backquote($function_name) . $delimiter . $crlf;
}
$text .= PMA_DBI_get_definition($db, 'FUNCTION', $function_name) . $delimiter . $crlf . $crlf;
}
}
if ($procedure_names || $function_names) {
$text .= 'DELIMITER ;' . $crlf;
}
if (! empty($text)) {
$result = PMA_exportOutputHandler($text);
}
}
return $result;
}
/**
@ -415,49 +466,16 @@ function PMA_exportDBFooter($db)
$text = '';
$delimiter = '$$';
$procedure_names = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');
$function_names = PMA_DBI_get_procedures_or_functions($db, 'FUNCTION');
if (PMA_MYSQL_INT_VERSION > 50100) {
$event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= \'' . PMA_sqlAddslashes($db,true) . '\';');
} else {
$event_names = array();
}
if ($procedure_names || $function_names || $event_names) {
if ($event_names) {
$text .= $crlf
. 'DELIMITER ' . $delimiter . $crlf;
}
if ($procedure_names) {
$text .=
PMA_exportComment()
. PMA_exportComment(__('Procedures'))
. PMA_exportComment();
foreach($procedure_names as $procedure_name) {
if (! empty($GLOBALS['sql_drop_table'])) {
$text .= 'DROP PROCEDURE IF EXISTS ' . PMA_backquote($procedure_name) . $delimiter . $crlf;
}
$text .= PMA_DBI_get_definition($db, 'PROCEDURE', $procedure_name) . $delimiter . $crlf . $crlf;
}
}
if ($function_names) {
$text .=
PMA_exportComment()
. PMA_exportComment(__('Functions'))
. PMA_exportComment();
foreach($function_names as $function_name) {
if (! empty($GLOBALS['sql_drop_table'])) {
$text .= 'DROP FUNCTION IF EXISTS ' . PMA_backquote($function_name) . $delimiter . $crlf;
}
$text .= PMA_DBI_get_definition($db, 'FUNCTION', $function_name) . $delimiter . $crlf . $crlf;
}
}
if ($event_names) {
$text .=
PMA_exportComment()
. PMA_exportComment(__('Events'))
@ -469,8 +487,7 @@ function PMA_exportDBFooter($db)
}
$text .= PMA_DBI_get_definition($db, 'EVENT', $event_name) . $delimiter . $crlf . $crlf;
}
}
if ($procedure_names || $function_names || $event_names) {
$text .= 'DELIMITER ;' . $crlf;
}

View File

@ -117,6 +117,8 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
$display_query = '';
}
$sql_query = $import_run_buffer['sql'];
// If a 'USE <db>' SQL-clause was found, set our current $db to the new one
list($db, $reload) = PMA_lookForUse($import_run_buffer['sql'], $db, $reload);
} elseif ($run_query) {
if ($controluser) {
$result = PMA_query_as_controluser($import_run_buffer['sql']);
@ -156,10 +158,8 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
}
// If a 'USE <db>' SQL-clause was found and the query succeeded, set our current $db to the new one
if ($result != FALSE && preg_match('@^[\s]*USE[[:space:]]*([\S]+)@i', $import_run_buffer['sql'], $match)) {
$db = trim($match[1]);
$db = trim($db,';'); // for example, USE abc;
$reload = TRUE;
if ($result != FALSE) {
list($db, $reload) = PMA_lookForUse($import_run_buffer['sql'], $db, $reload);
}
if ($result != FALSE && preg_match('@^[\s]*(DROP|CREATE)[\s]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)@im', $import_run_buffer['sql'])) {
@ -205,6 +205,25 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
}
}
/**
* Looks for the presence of USE to possibly change current db
*
* @param string buffer to examine
* @param string current db
* @param boolean reload
* @return array (current or new db, whether to reload)
* @access public
*/
function PMA_lookForUse($buffer, $db, $reload)
{
if (preg_match('@^[\s]*USE[[:space:]]*([\S]+)@i', $buffer, $match)) {
$db = trim($match[1]);
$db = trim($db,';'); // for example, USE abc;
$reload = TRUE;
}
return(array($db, $reload));
}
/**
* Returns next part of imported file/buffer

View File

@ -2119,10 +2119,12 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$docu = TRUE;
break;
} // end switch
// inner_sql is a span that exists for all cases
// inner_sql is a span that exists for all cases, except query_only
// of $cfg['SQP']['fmtType'] to make possible a replacement
// for inline editing
$str .= '<span class="inner_sql">';
if ($mode!='query_only') {
$str .= '<span class="inner_sql">';
}
$close_docu_link = false;
$indent = 0;
$bracketlevel = 0;
@ -2617,8 +2619,10 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$str .= '</a>';
$close_docu_link = false;
}
// close inner_sql span
$str .= '</span>';
if ($mode!='query_only') {
// close inner_sql span
$str .= '</span>';
}
if ($mode=='color') {
// close syntax span
$str .= '</span>';

View File

@ -369,7 +369,7 @@ for ($i = 0; $i < $num_fields; $i++) {
. ' class="textfield" />'
. '<p class="enum_notice" id="enum_notice_' . $i . '_' . ($ci - $ci_offset) . '">';
$content_cells[$i][$ci] .= __('ENUM or SET data too long?')
. '<a onclick="return false;" href="enum_editor.php?' . PMA_generate_common_url() . '&values=' . urlencode($length_to_display) . '&field=' . (isset($row['Field']) ? urlencode($row['Field']) : "") . '" class="open_enum_editor" target="_blank"> '
. '<a onclick="return false;" href="enum_editor.php?' . PMA_generate_common_url() . '&amp;values=' . urlencode($length_to_display) . '&amp;field=' . (isset($row['Field']) ? urlencode($row['Field']) : "") . '" class="open_enum_editor" target="_blank"> '
. __('Get more editing space') . '</a></p>';
$ci++;
@ -597,7 +597,6 @@ for ($i = 0; $i < $num_fields; $i++) {
}
} // end for
if ($cfg['CtrlArrowsMoving']) {
?>
<script src="./js/keyhandler.js" type="text/javascript"></script>
<script type="text/javascript">
@ -606,11 +605,8 @@ var switch_movement = <?php echo $display_type == 'horizontal' ? '0' : '1'; ?>;
document.onkeydown = onKeyDownArrowsHandler;
// ]]>
</script>
<?php
}
?>
<form id="create_table_form" method="post" action="<?php echo $action; ?>">
<form id="<?php echo ($action == 'tbl_create.php' ? 'create_table' : 'append_fields'); ?>_form" method="post" action="<?php echo $action; ?>">
<?php
echo PMA_generate_common_hidden_inputs($_form_params);
unset($_form_params);

View File

@ -239,7 +239,6 @@ PMA_printListItem(__('Official Homepage'), 'li_pma_homepage', 'http://www.phpMyA
<?php
/**
* Warning if using the default MySQL privileged account
* modified: 2004-05-05 mkkeck
*/
if ($server != 0
&& $cfg['Server']['user'] == 'root'

View File

@ -566,7 +566,7 @@ function New_relation()
function Start_table_new()
{
window.location.href = 'db_operations.php?server=' + server + '&db=' + db + '&token=' + token;
window.location.href = 'tbl_create.php?server=' + server + '&db=' + db + '&token=' + token;
}
function Start_tab_upd(table)
@ -921,19 +921,19 @@ function Start_display_field()
}
//------------------------------------------------------------------------------
var TargetColors = new Array();
function getColorByTarget( target )
{
function getColorByTarget( target )
{
var color = ''; //"rgba(0,100,150,1)";
for (i in TargetColors)
if (TargetColors[i][0]==target) {
color = TargetColors[i][1];
break;
}
break;
}
if (color.length==0)
{
{
var i = TargetColors.length+1;
var d = i % 6;
var j = (i - d) / 6;
@ -951,7 +951,7 @@ function getColorByTarget( target )
var b = color_case[d][1];
var c = color_case[d][2];
e = (1 - (j - 1) / 6);
var r = Math.round(a * 200 * e);
var g = Math.round(b * 200 * e);
var b = Math.round(c * 200 * e);
@ -959,8 +959,8 @@ function getColorByTarget( target )
TargetColors.push( new Array(target, color) );
}
return color;
return color;
}

1814
po/af.po

File diff suppressed because it is too large Load Diff

1816
po/ar.po

File diff suppressed because it is too large Load Diff

1814
po/az.po

File diff suppressed because it is too large Load Diff

1814
po/be.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1814
po/bg.po

File diff suppressed because it is too large Load Diff

1814
po/bn.po

File diff suppressed because it is too large Load Diff

1814
po/bs.po

File diff suppressed because it is too large Load Diff

1816
po/ca.po

File diff suppressed because it is too large Load Diff

1906
po/cs.po

File diff suppressed because it is too large Load Diff

1816
po/cy.po

File diff suppressed because it is too large Load Diff

1816
po/da.po

File diff suppressed because it is too large Load Diff

1816
po/de.po

File diff suppressed because it is too large Load Diff

1816
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1816
po/es.po

File diff suppressed because it is too large Load Diff

1814
po/et.po

File diff suppressed because it is too large Load Diff

1814
po/eu.po

File diff suppressed because it is too large Load Diff

1814
po/fa.po

File diff suppressed because it is too large Load Diff

1816
po/fi.po

File diff suppressed because it is too large Load Diff

2088
po/fr.po

File diff suppressed because it is too large Load Diff

1816
po/gl.po

File diff suppressed because it is too large Load Diff

1814
po/he.po

File diff suppressed because it is too large Load Diff

1810
po/hi.po

File diff suppressed because it is too large Load Diff

1814
po/hr.po

File diff suppressed because it is too large Load Diff

1816
po/hu.po

File diff suppressed because it is too large Load Diff

1814
po/id.po

File diff suppressed because it is too large Load Diff

1829
po/it.po

File diff suppressed because it is too large Load Diff

1816
po/ja.po

File diff suppressed because it is too large Load Diff

1816
po/ka.po

File diff suppressed because it is too large Load Diff

1814
po/ko.po

File diff suppressed because it is too large Load Diff

1819
po/lt.po

File diff suppressed because it is too large Load Diff

1814
po/lv.po

File diff suppressed because it is too large Load Diff

1814
po/mk.po

File diff suppressed because it is too large Load Diff

1816
po/mn.po

File diff suppressed because it is too large Load Diff

1814
po/ms.po

File diff suppressed because it is too large Load Diff

1819
po/nb.po

File diff suppressed because it is too large Load Diff

1818
po/nl.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1991
po/pl.po

File diff suppressed because it is too large Load Diff

1814
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1814
po/ro.po

File diff suppressed because it is too large Load Diff

1816
po/ru.po

File diff suppressed because it is too large Load Diff

1814
po/si.po

File diff suppressed because it is too large Load Diff

1814
po/sk.po

File diff suppressed because it is too large Load Diff

1957
po/sl.po

File diff suppressed because it is too large Load Diff

1814
po/sq.po

File diff suppressed because it is too large Load Diff

1814
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1816
po/sv.po

File diff suppressed because it is too large Load Diff

1810
po/ta.po

File diff suppressed because it is too large Load Diff

1812
po/te.po

File diff suppressed because it is too large Load Diff

1814
po/th.po

File diff suppressed because it is too large Load Diff

1992
po/tr.po

File diff suppressed because it is too large Load Diff

1822
po/tt.po

File diff suppressed because it is too large Load Diff

1812
po/ug.po

File diff suppressed because it is too large Load Diff

1816
po/uk.po

File diff suppressed because it is too large Load Diff

1810
po/ur.po

File diff suppressed because it is too large Load Diff

1816
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

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,6 @@ $GLOBALS['js_include'][] = 'server_privileges.js';
$GLOBALS['js_include'][] = 'functions.js';
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
$GLOBALS['js_include'][] = 'password_generation.js';
require './libraries/server_common.inc.php';
/**

View File

@ -677,7 +677,10 @@ if (0 == $num_rows || $is_affected) {
if(isset($GLOBALS['display_query'])) {
$extra_data['sql_query'] = PMA_showMessage(NULL, $GLOBALS['display_query']);
}
if ($GLOBALS['reload'] == 1) {
$extra_data['reload'] = 1;
$extra_data['db'] = $GLOBALS['db'];
}
PMA_ajaxResponse($message, $message->isSuccess(), (isset($extra_data) ? $extra_data : ''));
}

View File

@ -207,7 +207,6 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5 &&
// Had to put the URI because when hosted on an https server,
// some browsers send wrongly this form to the http server.
if ($cfg['CtrlArrowsMoving']) {
?>
<!-- Set on key handler for moving using by Ctrl+arrows -->
<script src="./js/keyhandler.js" type="text/javascript"></script>
@ -218,7 +217,6 @@ document.onkeydown = onKeyDownArrowsHandler;
//]]>
</script>
<?php
}
$_form_params = array(
'db' => $db,
@ -509,7 +507,7 @@ foreach ($rows as $row_id => $vrow) {
if (($cfg['ProtectBinary'] && $field['is_blob'] && !$is_upload)
|| ($cfg['ProtectBinary'] == 'all' && $field['is_binary'])) {
echo ' <td align="center">' . __('Binary') . '</td>' . "\n";
} elseif (strstr($field['True_Type'], 'enum') || strstr($field['True_Type'], 'set')) {
} elseif (strstr($field['True_Type'], 'enum') || strstr($field['True_Type'], 'set') || 'geometry' == $field['pma_type']) {
echo ' <td align="center">--</td>' . "\n";
} else {
?>
@ -934,6 +932,10 @@ foreach ($rows as $row_id => $vrow) {
}
} // end if (web-server upload directory)
} // end elseif (binary or blob)
elseif ('geometry' == $field['pma_type']) {
// ignore this column to avoid changing it
}
else {
// field size should be at least 4 and max 40
$fieldsize = min(max($field['len'], 4), 40);

View File

@ -38,6 +38,7 @@ require_once './libraries/common.inc.php';
$action = 'tbl_create.php';
require_once './libraries/header.inc.php';
require_once './libraries/build_action_titles.inc.php';
// Check parameters
PMA_checkParameters(array('db'));
@ -299,25 +300,21 @@ if (isset($_REQUEST['do_save_data'])) {
}
$new_table_string .= '</th>' . "\n";
$new_table_string .= '<td> <img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" /> </td>' . "\n";
$new_table_string .= '<td>' . $titles['NoBrowse'] . '</td>' . "\n";
$new_table_string .= '<td> <a href="tbl_structure.php' . PMA_generate_common_url($tbl_url_params) . '"> ';
$new_table_string .= '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . __('Structure') . '" title="' . __('Structure') . '" />';
$new_table_string .= '</a> </td>' . "\n";
$new_table_string .= '<td><a href="tbl_structure.php' . PMA_generate_common_url($tbl_url_params) . '">' . $titles['Structure'] . '</a></td>' . "\n";
$new_table_string .= '<td> <img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" /> </td>' . "\n";
$new_table_string .= '<td>' . $titles['NoSearch'] . '</td>' . "\n";
$new_table_string .= '<td> <a href="tbl_change.php' . PMA_generate_common_url($tbl_url_params) . '"> ';
$new_table_string .= '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />';
$new_table_string .= '</a> </td>' . "\n";
$new_table_string .= '<td><a href="tbl_change.php' . PMA_generate_common_url($tbl_url_params) . '">' . $titles['Insert'] . '</a></td>' . "\n";
$new_table_string .= '<td> <img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" /> </td>' . "\n";
$new_table_string .= '<td>' . $titles['NoEmpty'] . '</td>' . "\n";
$new_table_string .= '<td> <a class="drop_table_anchor" href="sql.php' . PMA_generate_common_url($tbl_url_params) . '&amp;sql_query=';
$new_table_string .= '<td><a class="drop_table_anchor" href="sql.php' . PMA_generate_common_url($tbl_url_params) . '&amp;sql_query=';
$new_table_string .= urlencode('DROP TABLE ' . PMA_backquote($table));
$new_table_string .= '">';
$new_table_string .= '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />';
$new_table_string .= '</a> </td>' . "\n";
$new_table_string .= $titles['Drop'];
$new_table_string .= '</a></td>' . "\n";
$new_table_string .= '<td class="value">' . $tbl_stats['Rows'] . '</td>' . "\n";

View File

@ -35,7 +35,6 @@ if (! defined('PMA_NO_VARIABLES_IMPORT')) {
require_once './libraries/common.inc.php';
$GLOBALS['js_include'][] = 'server_privileges.js';
$GLOBALS['js_include'][] = 'password_generation.js';
/**
* Displays an error message and exits if the user isn't allowed to use this