Merge remote-tracking branch 'origin/master' into drizzle

Conflicts:
	libraries/server_links.inc.php
This commit is contained in:
Piotr Przybylski 2011-06-02 01:07:00 +02:00
commit 52df66878c
73 changed files with 51533 additions and 47000 deletions

View File

@ -23,6 +23,7 @@
- bug #3276001 [core] Avoid caching of index.php.
- bug #3306958 [interface] Unnecessary Details slider
- bug #3308476 [interface] "Show all" not persistent after a sort
- bug #3308072 [auth] Version disclosure to anonymous visitors
3.4.1.0 (2011-05-20)
- bug #3301108 [interface] Synchronize and already configured host

View File

@ -241,11 +241,11 @@ $(document).ready(function() {
$("#reload_privileges_anchor.ajax").live("click", function(event) {
event.preventDefault();
PMA_ajaxShowMessage(PMA_messages['strReloadingPrivileges']);
var $msgbox = PMA_ajaxShowMessage(PMA_messages['strReloadingPrivileges']);
$.get($(this).attr("href"), {'ajax_request': true}, function(data) {
if(data.success == true) {
PMA_ajaxShowMessage(data.message);
PMA_ajaxRemoveMessage($msgbox);
}
else {
PMA_ajaxShowMessage(data.error);

View File

@ -169,6 +169,7 @@ function PMA_auth()
/* HTML header; do not show here the PMA version to improve security */
$page_title = 'phpMyAdmin ';
require './libraries/header_meta_style.inc.php';
// if $page_title is set, this script uses it as the title:
require './libraries/header_scripts.inc.php';
?>
<script type="text/javascript">

View File

@ -813,9 +813,7 @@ function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count =
* or array of it
* @param boolean $do_it a flag to bypass this function (used by dump
* functions)
* @return mixed the "backquoted" database, table or field name if the
* current MySQL release is >= 3.23.6, the original one
* else
* @return mixed the "backquoted" database, table or field name
* @access public
*/
function PMA_backquote($a_name, $do_it = true)
@ -894,9 +892,9 @@ function PMA_reloadNavigation($jsonly=false)
unset($_SESSION['tmp_user_values']['table_limit_offset']);
echo "\n";
$reload_url = './navigation.php?' . PMA_generate_common_url($GLOBALS['db'], '', '&');
if (!$jsonly)
echo '<script type="text/javascript">' . PHP_EOL;
?>
if (!$jsonly)
echo '<script type="text/javascript">' . PHP_EOL;
?>
//<![CDATA[
if (typeof(window.parent) != 'undefined'
&& typeof(window.parent.frame_navigation) != 'undefined'
@ -1437,9 +1435,13 @@ function PMA_localizeNumber($value)
*/
function PMA_formatNumber($value, $length = 3, $comma = 0, $only_down = false)
{
$originalValue = $value;
//number_format is not multibyte safe, str_replace is safe
if ($length === 0) {
return PMA_localizeNumber(number_format($value, $comma));
$value = number_format($value, $comma);
if($originalValue!=0 && floatval($value) == 0) $value = ' <'.(1/PMA_pow(10,$comma));
return PMA_localizeNumber($value);
}
// this units needs no translation, ISO
@ -1501,6 +1503,8 @@ function PMA_formatNumber($value, $length = 3, $comma = 0, $only_down = false)
//number_format is not multibyte safe, str_replace is safe
$value = PMA_localizeNumber(number_format($value, $comma));
if($originalValue!=0 && floatval($value) == 0) return ' <'.(1/PMA_pow(10,$comma)).' '.$unit;
return $sign . $value . ' ' . $unit;
} // end of the 'PMA_formatNumber' function
@ -1651,10 +1655,10 @@ function PMA_generate_html_tab($tab, $url_params = array())
$tab['attr'] .= ' title="' . htmlspecialchars($tab['warning']) . '"';
}
// If there are any tab specific URL parameters, merge those with the general URL parameters
if(! empty($tab['url_params']) && is_array($tab['url_params'])) {
$url_params = array_merge($url_params, $tab['url_params']);
}
// If there are any tab specific URL parameters, merge those with the general URL parameters
if(! empty($tab['url_params']) && is_array($tab['url_params'])) {
$url_params = array_merge($url_params, $tab['url_params']);
}
// build the link
if (!empty($tab['link'])) {
@ -2944,8 +2948,8 @@ function PMA_browseUploadFile($max_upload_size) {
* @param $uploaddir
*/
function PMA_selectUploadFile($import_list, $uploaddir) {
echo '<label for="radio_local_import_file">' . sprintf(__("Select from the web server upload directory <b>%s</b>:"), htmlspecialchars(PMA_userDir($uploaddir))) . '</label>';
$extensions = '';
echo '<label for="radio_local_import_file">' . sprintf(__("Select from the web server upload directory <b>%s</b>:"), htmlspecialchars(PMA_userDir($uploaddir))) . '</label>';
$extensions = '';
foreach ($import_list as $key => $val) {
if (!empty($extensions)) {
$extensions .= '|';

View File

@ -445,7 +445,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
global $sql_query, $num_rows;
global $vertical_display, $highlight_columns;
// required to generate sort links that will remember whether the
// required to generate sort links that will remember whether the
// "Show all" button has been clicked
$sql_md5 = md5($GLOBALS['sql_query']);
$session_max_rows = $_SESSION['tmp_user_values']['query'][$sql_md5]['max_rows'];
@ -2387,7 +2387,7 @@ function PMA_handle_non_printable_contents($category, $content, $transform_funct
} elseif (isset($content)) {
$size = strlen($content);
$display_size = PMA_formatByteDown($size, 3, 1);
$result .= ' - '. $display_size[0] . '&nbsp;' . $display_size[1];
$result .= ' - '. $display_size[0] . ' ' . $display_size[1];
}
$result .= ']';

View File

@ -18,13 +18,17 @@ require_once './libraries/common.inc.php';
if ( false === $GLOBALS['cfg']['AllowThirdPartyFraming']) {
echo PMA_includeJS('cross_framing_protection.js');
}
// generate title
$title = PMA_expandUserString(
// generate title (unless we already have $page_title, from cookie auth)
if (! isset($page_title)) {
$title = PMA_expandUserString(
!empty($GLOBALS['table']) ? $GLOBALS['cfg']['TitleTable'] :
(!empty($GLOBALS['db']) ? $GLOBALS['cfg']['TitleDatabase'] :
(!empty($GLOBALS['cfg']['Server']['host']) ? $GLOBALS['cfg']['TitleServer'] :
$GLOBALS['cfg']['TitleDefault']))
);
);
} else {
$title = $page_title;
}
// here, the function does not exist with this configuration: $cfg['ServerDefault'] = 0;
$is_superuser = function_exists('PMA_isSuperuser') && PMA_isSuperuser();

View File

@ -34,6 +34,7 @@ if (!$GLOBALS['is_ajax_request']) {
/**
* Displays tab links
* Put the links we assume are used less, towards the end
*/
$tabs = array();
@ -49,11 +50,6 @@ if (!$GLOBALS['is_ajax_request']) {
$tabs['status']['link'] = 'server_status.php';
$tabs['status']['text'] = __('Status');
if (! empty($binary_logs)) {
$tabs['binlog']['icon'] = 's_tbl.png';
$tabs['binlog']['link'] = 'server_binlog.php';
$tabs['binlog']['text'] = __('Binary log');
}
$tabs['process']['icon'] = 's_process.png';
$tabs['process']['link'] = 'server_processlist.php';
$tabs['process']['text'] = __('Processes');
@ -72,6 +68,28 @@ if (!$GLOBALS['is_ajax_request']) {
$tabs['import']['link'] = 'server_import.php';
$tabs['import']['text'] = __('Import');
$tabs['settings']['icon'] = 'b_tblops.png';
$tabs['settings']['link'] = 'prefs_manage.php';
$tabs['settings']['text'] = __('Settings');
$tabs['settings']['active'] = in_array(basename($GLOBALS['PMA_PHP_SELF']),
array('prefs_forms.php', 'prefs_manage.php'));
$tabs['synchronize']['icon'] = 's_sync.png';
$tabs['synchronize']['link'] = 'server_synchronize.php';
$tabs['synchronize']['text'] = __('Synchronize');
if (! empty($binary_logs)) {
$tabs['binlog']['icon'] = 's_tbl.png';
$tabs['binlog']['link'] = 'server_binlog.php';
$tabs['binlog']['text'] = __('Binary log');
}
if ($is_superuser && !PMA_DRIZZLE) {
$tabs['replication']['icon'] = 's_replication.png';
$tabs['replication']['link'] = 'server_replication.php';
$tabs['replication']['text'] = __('Replication');
}
$tabs['vars']['icon'] = 's_vars.png';
$tabs['vars']['link'] = 'server_variables.php';
$tabs['vars']['text'] = __('Variables');
@ -90,22 +108,6 @@ if (!$GLOBALS['is_ajax_request']) {
$tabs['engine']['text'] = __('Engines');
}
if ($is_superuser && !PMA_DRIZZLE) {
$tabs['replication']['icon'] = 's_replication.png';
$tabs['replication']['link'] = 'server_replication.php';
$tabs['replication']['text'] = __('Replication');
}
$tabs['synchronize']['icon'] = 's_sync.png';
$tabs['synchronize']['link'] = 'server_synchronize.php';
$tabs['synchronize']['text'] = __('Synchronize');
$tabs['settings']['icon'] = 'b_tblops.png';
$tabs['settings']['link'] = 'prefs_manage.php';
$tabs['settings']['text'] = __('Settings');
$tabs['settings']['active'] = in_array(basename($GLOBALS['PMA_PHP_SELF']),
array('prefs_forms.php', 'prefs_manage.php'));
echo PMA_generate_html_tabs($tabs, array());
unset($tabs);

1481
po/af.po

File diff suppressed because it is too large Load Diff

1506
po/ar.po

File diff suppressed because it is too large Load Diff

1481
po/az.po

File diff suppressed because it is too large Load Diff

1505
po/be.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1525
po/bg.po

File diff suppressed because it is too large Load Diff

1509
po/bn.po

File diff suppressed because it is too large Load Diff

1481
po/bs.po

File diff suppressed because it is too large Load Diff

1526
po/ca.po

File diff suppressed because it is too large Load Diff

1482
po/cs.po

File diff suppressed because it is too large Load Diff

1508
po/cy.po

File diff suppressed because it is too large Load Diff

1506
po/da.po

File diff suppressed because it is too large Load Diff

1526
po/de.po

File diff suppressed because it is too large Load Diff

1556
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1537
po/es.po

File diff suppressed because it is too large Load Diff

1497
po/et.po

File diff suppressed because it is too large Load Diff

1481
po/eu.po

File diff suppressed because it is too large Load Diff

1497
po/fa.po

File diff suppressed because it is too large Load Diff

1526
po/fi.po

File diff suppressed because it is too large Load Diff

1540
po/fr.po

File diff suppressed because it is too large Load Diff

1530
po/gl.po

File diff suppressed because it is too large Load Diff

1495
po/he.po

File diff suppressed because it is too large Load Diff

1517
po/hi.po

File diff suppressed because it is too large Load Diff

1509
po/hr.po

File diff suppressed because it is too large Load Diff

1934
po/hu.po

File diff suppressed because it is too large Load Diff

1507
po/id.po

File diff suppressed because it is too large Load Diff

1536
po/it.po

File diff suppressed because it is too large Load Diff

1553
po/ja.po

File diff suppressed because it is too large Load Diff

1537
po/ka.po

File diff suppressed because it is too large Load Diff

1489
po/ko.po

File diff suppressed because it is too large Load Diff

1523
po/lt.po

File diff suppressed because it is too large Load Diff

1499
po/lv.po

File diff suppressed because it is too large Load Diff

1493
po/mk.po

File diff suppressed because it is too large Load Diff

1498
po/ml.po

File diff suppressed because it is too large Load Diff

1510
po/mn.po

File diff suppressed because it is too large Load Diff

1481
po/ms.po

File diff suppressed because it is too large Load Diff

1518
po/nb.po

File diff suppressed because it is too large Load Diff

1518
po/nl.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1537
po/pl.po

File diff suppressed because it is too large Load Diff

1491
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1505
po/ro.po

File diff suppressed because it is too large Load Diff

1522
po/ru.po

File diff suppressed because it is too large Load Diff

1504
po/si.po

File diff suppressed because it is too large Load Diff

1606
po/sk.po

File diff suppressed because it is too large Load Diff

1532
po/sl.po

File diff suppressed because it is too large Load Diff

1483
po/sq.po

File diff suppressed because it is too large Load Diff

1505
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1615
po/sv.po

File diff suppressed because it is too large Load Diff

1500
po/ta.po

File diff suppressed because it is too large Load Diff

1488
po/te.po

File diff suppressed because it is too large Load Diff

1489
po/th.po

File diff suppressed because it is too large Load Diff

1538
po/tr.po

File diff suppressed because it is too large Load Diff

1501
po/tt.po

File diff suppressed because it is too large Load Diff

1508
po/ug.po

File diff suppressed because it is too large Load Diff

1502
po/uk.po

File diff suppressed because it is too large Load Diff

1519
po/ur.po

File diff suppressed because it is too large Load Diff

1538
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

@ -40,12 +40,11 @@ CREATE TABLE IF NOT EXISTS `pma_bookmark` (
`id` int(11) NOT NULL auto_increment,
`dbase` varchar(255) NOT NULL default '',
`user` varchar(255) NOT NULL default '',
`label` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default '',
`label` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
`query` text NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM COMMENT='Bookmarks'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ENGINE=MyISAM COMMENT='Bookmarks';
-- --------------------------------------------------------
@ -58,15 +57,14 @@ CREATE TABLE IF NOT EXISTS `pma_column_info` (
`db_name` varchar(64) NOT NULL default '',
`table_name` varchar(64) NOT NULL default '',
`column_name` varchar(64) NOT NULL default '',
`comment` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default '',
`mimetype` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default '',
`comment` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
`mimetype` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
`transformation` varchar(255) NOT NULL default '',
`transformation_options` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
)
ENGINE=MyISAM COMMENT='Column information for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ENGINE=MyISAM COMMENT='Column information for phpMyAdmin';
-- --------------------------------------------------------
@ -84,8 +82,7 @@ CREATE TABLE IF NOT EXISTS `pma_history` (
PRIMARY KEY (`id`),
KEY `username` (`username`,`db`,`table`,`timevalue`)
)
ENGINE=MyISAM COMMENT='SQL history for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ENGINE=MyISAM COMMENT='SQL history for phpMyAdmin';
-- --------------------------------------------------------
@ -96,12 +93,11 @@ CREATE TABLE IF NOT EXISTS `pma_history` (
CREATE TABLE IF NOT EXISTS `pma_pdf_pages` (
`db_name` varchar(64) NOT NULL default '',
`page_nr` int(10) unsigned NOT NULL auto_increment,
`page_descr` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default '',
`page_descr` varchar(50) COLLATE utf8_general_ci NOT NULL default '',
PRIMARY KEY (`page_nr`),
KEY `db_name` (`db_name`)
)
ENGINE=MyISAM COMMENT='PDF relation pages for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ENGINE=MyISAM COMMENT='PDF relation pages for phpMyAdmin';
-- --------------------------------------------------------
@ -110,10 +106,11 @@ CREATE TABLE IF NOT EXISTS `pma_pdf_pages` (
--
CREATE TABLE IF NOT EXISTS `pma_recent` (
`username` varchar(64) COLLATE utf8_bin NOT NULL,
`tables` blob NOT NULL,
`username` varchar(64) NOT NULL,
`tables` text NOT NULL,
PRIMARY KEY (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
)
ENGINE=MyISAM COMMENT='Recently accessed tables';
-- --------------------------------------------------------
@ -122,13 +119,13 @@ CREATE TABLE IF NOT EXISTS `pma_recent` (
--
CREATE TABLE IF NOT EXISTS `pma_table_uiprefs` (
`username` varchar(64) COLLATE utf8_bin NOT NULL,
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`prefs` blob NOT NULL,
`username` varchar(64) NOT NULL,
`db_name` varchar(64) NOT NULL,
`table_name` varchar(64) NOT NULL,
`prefs` text NOT NULL,
PRIMARY KEY (`username`,`db_name`,`table_name`)
) ENGINE=MyISAM COMMENT='tables'' UI preferences'
DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
)
ENGINE=MyISAM COMMENT='Tables'' UI preferences';
-- --------------------------------------------------------
@ -146,8 +143,7 @@ CREATE TABLE IF NOT EXISTS `pma_relation` (
PRIMARY KEY (`master_db`,`master_table`,`master_field`),
KEY `foreign_field` (`foreign_db`,`foreign_table`)
)
ENGINE=MyISAM COMMENT='Relation table'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ENGINE=MyISAM COMMENT='Relation table';
-- --------------------------------------------------------
@ -163,8 +159,7 @@ CREATE TABLE IF NOT EXISTS `pma_table_coords` (
`y` float unsigned NOT NULL default '0',
PRIMARY KEY (`db_name`,`table_name`,`pdf_page_number`)
)
ENGINE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ENGINE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output';
-- --------------------------------------------------------
@ -178,8 +173,7 @@ CREATE TABLE IF NOT EXISTS `pma_table_info` (
`display_field` varchar(64) NOT NULL default '',
PRIMARY KEY (`db_name`,`table_name`)
)
ENGINE=MyISAM COMMENT='Table information for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ENGINE=MyISAM COMMENT='Table information for phpMyAdmin';
-- --------------------------------------------------------
@ -196,8 +190,7 @@ CREATE TABLE IF NOT EXISTS `pma_designer_coords` (
`h` TINYINT,
PRIMARY KEY (`db_name`,`table_name`)
)
ENGINE=MyISAM COMMENT='Table coordinates for Designer'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ENGINE=MyISAM COMMENT='Table coordinates for Designer';
-- --------------------------------------------------------
@ -206,18 +199,19 @@ CREATE TABLE IF NOT EXISTS `pma_designer_coords` (
--
CREATE TABLE IF NOT EXISTS `pma_tracking` (
`db_name` varchar(64) collate utf8_bin NOT NULL,
`table_name` varchar(64) collate utf8_bin NOT NULL,
`db_name` varchar(64) NOT NULL,
`table_name` varchar(64) NOT NULL,
`version` int(10) unsigned NOT NULL,
`date_created` datetime NOT NULL,
`date_updated` datetime NOT NULL,
`schema_snapshot` text collate utf8_bin NOT NULL,
`schema_sql` text collate utf8_bin,
`data_sql` longtext collate utf8_bin,
`tracking` set('UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE','ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE','RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX','CREATE VIEW','ALTER VIEW','DROP VIEW') collate utf8_bin default NULL,
`schema_snapshot` text NOT NULL,
`schema_sql` text,
`data_sql` longtext,
`tracking` set('UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE','ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE','RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX','CREATE VIEW','ALTER VIEW','DROP VIEW') default NULL,
`tracking_active` int(1) unsigned NOT NULL default '1',
PRIMARY KEY (`db_name`,`table_name`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=COMPACT;
)
ENGINE=MyISAM ROW_FORMAT=COMPACT COMMENT='Database changes tracking for phpMyAdmin';
-- --------------------------------------------------------
@ -231,5 +225,4 @@ CREATE TABLE IF NOT EXISTS `pma_userconfig` (
`config_data` text NOT NULL,
PRIMARY KEY (`username`)
)
ENGINE=MyISAM COMMENT='User preferences storage for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ENGINE=MyISAM COMMENT='User preferences storage for phpMyAdmin';

View File

@ -1549,10 +1549,10 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
/**
* Displays the initials
* In an Ajax request, we don't need to show this
* In an Ajax request, we don't need to show this. Also not necassary if there is less than 20 privileges
*/
if( $GLOBALS['is_ajax_request'] != true ) {
if( $GLOBALS['is_ajax_request'] != true && PMA_DBI_num_rows($res) > 20 ) {
// initialize to FALSE the letters A-Z
for ($letter_counter = 1; $letter_counter < 27; $letter_counter++) {