Merge remote-tracking branch 'origin/master'

This commit is contained in:
Rouslan Placella 2011-06-04 20:25:54 +01:00
commit 5d6a5a8adb
39 changed files with 247 additions and 257 deletions

View File

@ -14,6 +14,9 @@
+ rfe #3310562 Wording about Column
3.4.3.0 (not yet released)
- bug #3311170 [sync] Missing helper icons in Synchronize
- patch #3304473 [setup] Redefine a lable that was wrong
- bug #3304544 [parser] master is not a reserved word
3.4.2.0 (not yet released)
- bug #3301249 [interface] Iconic table operations does not remove inline edit label

View File

@ -147,7 +147,7 @@ function PMA_exportOutputHandler($line)
if ($dump_buffer_len > $GLOBALS['memory_limit']) {
if ($GLOBALS['output_charset_conversion']) {
$dump_buffer = PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $dump_buffer);
$dump_buffer = PMA_convert_string('utf-8', $GLOBALS['charset_of_file'], $dump_buffer);
}
// as bzipped
if ($GLOBALS['compression'] == 'bzip' && @function_exists('bzcompress')) {
@ -181,7 +181,7 @@ function PMA_exportOutputHandler($line)
} else {
if ($GLOBALS['asfile']) {
if ($GLOBALS['output_charset_conversion']) {
$line = PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $line);
$line = PMA_convert_string('utf-8', $GLOBALS['charset_of_file'], $line);
}
if ($GLOBALS['save_on_server'] && strlen($line) > 0) {
$write_result = @fwrite($GLOBALS['file_handle'], $line);
@ -218,7 +218,7 @@ $output_kanji_conversion = function_exists('PMA_kanji_str_conv') && $type != 'xl
// Do we need to convert charset?
$output_charset_conversion = $asfile && $GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE
&& isset($charset_of_file) && $charset_of_file != $charset
&& isset($charset_of_file) && $charset_of_file != 'utf-8'
&& $type != 'xls';
// Use on the fly compression?
@ -273,7 +273,7 @@ if ($asfile) {
$filename = PMA_expandUserString($filename_template);
// convert filename to iso-8859-1, it is safer
$filename = PMA_convert_string($charset, 'iso-8859-1', $filename);
$filename = PMA_convert_string('utf-8', 'iso-8859-1', $filename);
// Grab basic dump extension and mime type
// Check if the user already added extension; get the substring where the extension would be if it was included
@ -637,7 +637,7 @@ if ($save_on_server && isset($message)) {
if (!empty($asfile)) {
// Convert the charset if required.
if ($output_charset_conversion) {
$dump_buffer = PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $dump_buffer);
$dump_buffer = PMA_convert_string('utf-8', $GLOBALS['charset_of_file'], $dump_buffer);
}
// Do the compression

View File

@ -343,7 +343,7 @@ if ($import_file != 'none' && !$error) {
// Convert the file's charset if necessary
if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE && isset($charset_of_file)) {
if ($charset_of_file != $charset) {
if ($charset_of_file != 'utf-8') {
$charset_conversion = TRUE;
}
} elseif (isset($charset_of_file) && $charset_of_file != 'utf8') {

View File

@ -12,7 +12,6 @@
* or common.inc.php
* @uses $GLOBALS['available_languages'] from common.inc.php (select_lang.lib.php)
* @uses $GLOBALS['db']
* @uses $GLOBALS['charset']
* @uses $GLOBALS['lang']
* @uses $GLOBALS['text_dir']
* @uses $_ENV['HTTP_HOST']
@ -102,8 +101,7 @@ include ('./libraries/header_http.inc.php');
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<title>phpMyAdmin <?php echo PMA_VERSION; ?> -
<?php echo htmlspecialchars($HTTP_HOST); ?></title>
<meta http-equiv="Content-Type"
content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<script type="text/javascript">
// <![CDATA[

View File

@ -888,16 +888,20 @@ $(document).ready(function() {
*/
var is_null = $this_field.find('input:checkbox').is(':checked');
var value;
var addQuotes = true;
if (is_null) {
sql_query += ' `' + field_name + "`=NULL , ";
need_to_post = true;
} else {
if($this_field.is(":not(.relation, .enum, .set)")) {
if($this_field.is(":not(.relation, .enum, .set, .bit)")) {
this_field_params[field_name] = $this_field.find('textarea').val();
if($this_field.is('.transformed')) {
$.extend(transform_fields, this_field_params);
}
} else if ($this_field.is('.bit')) {
this_field_params[field_name] = '0b' + $this_field.find('textarea').val();
addQuotes = false;
} else if ($this_field.is('.set')) {
$test_element = $this_field.find('select');
this_field_params[field_name] = $test_element.map(function(){
@ -924,7 +928,11 @@ $(document).ready(function() {
new_clause += '`' + window.parent.table + '`.' + '`' + field_name + "` = '" + this_field_params[field_name].replace(/'/g,"''") + "'" + ' AND ';
}
if (this_field_params[field_name] != $this_field.data('original_data')) {
sql_query += ' `' + field_name + "`='" + this_field_params[field_name].replace(/'/g, "''") + "' , ";
if (addQuotes == true) {
sql_query += ' `' + field_name + "`='" + this_field_params[field_name].replace(/'/g, "''") + "', ";
} else {
sql_query += ' `' + field_name + "`=" + this_field_params[field_name].replace(/'/g, "''") + ", ";
}
need_to_post = true;
}
}

View File

@ -259,7 +259,7 @@ class PMA_File
* @uses curl_setopt_array()
* @uses PMA_File::$_error_message
* @uses $_FILES
* @param string $key the md5 hash of the column name
* @param string $key the md5 hash of the column name
* @param string $rownumber
* @return boolean success
*/
@ -378,7 +378,7 @@ class PMA_File
* @uses $_REQUEST
* @uses PMA_File::setLocalSelectedFile()
* @uses is_string()
* @param string $key the md5 hash of the column name
* @param string $key the md5 hash of the column name
* @param string $rownumber
* @return boolean success
*/
@ -462,7 +462,7 @@ class PMA_File
* @access public
* @uses PMA_File::setUploadedFromTblChangeRequest()
* @uses PMA_File::setSelectedFromTblChangeRequest()
* @param string $key the md5 hash of the column name
* @param string $key the md5 hash of the column name
* @param string $rownumber
* @return boolean success
*/
@ -820,7 +820,7 @@ class PMA_File
echo '<hr />';
if ($GLOBALS['charset_conversion']) {
$result = PMA_convert_string($this->getCharset(), $GLOBALS['charset'], $result);
$result = PMA_convert_string($this->getCharset(), 'utf-8', $result);
} else {
/**
* Skip possible byte order marks (I do not think we need more

View File

@ -78,7 +78,7 @@ function PMA_auth_fails()
}
// Defines the charset to be used
header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
header('Content-Type: text/html; charset=utf-8');
/* HTML header */
$page_title = __('Access denied');
require './libraries/header_meta_style.inc.php';

View File

@ -110,7 +110,6 @@ function PMA_get_blowfish_secret() {
* @uses $GLOBALS['pma_auth_server']
* @uses $GLOBALS['text_dir']
* @uses $GLOBALS['pmaThemeImage']
* @uses $GLOBALS['charset']
* @uses $GLOBALS['target']
* @uses $GLOBALS['db']
* @uses $GLOBALS['table']
@ -162,7 +161,7 @@ function PMA_auth()
$cell_align = ($GLOBALS['text_dir'] == 'ltr') ? 'left' : 'right';
// Defines the charset to be used
header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
header('Content-Type: text/html; charset=utf-8');
// Defines the "item" image depending on text direction
$item_img = $GLOBALS['pmaThemeImage'] . 'item_' . $GLOBALS['text_dir'] . '.png';

View File

@ -46,7 +46,7 @@ function PMA_auth()
}
// Defines the charset to be used
header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
header('Content-Type: text/html; charset=utf-8');
/* HTML header */
$page_title = __('Access denied');
require './libraries/header_meta_style.inc.php';

View File

@ -117,7 +117,7 @@ $strConfigExport_remember_file_template_name = __('Remember file name template')
$strConfigExport_sql_auto_increment_name = __('Add AUTO_INCREMENT value');
$strConfigExport_sql_backquotes_name = __('Enclose table and column names with backquotes');
$strConfigExport_sql_compatibility_name = __('SQL compatibility mode');
$strConfigExport_sql_create_table_statements_name = __('Syntax to use when inserting data');
$strConfigExport_sql_create_table_statements_name = __('<code>CREATE TABLE</code> options:');
$strConfigExport_sql_dates_name = __('Creation/Update/Check dates');
$strConfigExport_sql_delayed_name = __('Use delayed inserts');
$strConfigExport_sql_disable_fk_name = __('Disable foreign key checks');

View File

@ -82,7 +82,6 @@ function PMA_DBI_query($query, $link = null, $options = 0, $cache_affected_rows
* and charset names to ISO charset from information_schema.CHARACTER_SETS
*
* @uses $GLOBALS['cfg']['IconvExtraParams']
* @uses $GLOBALS['charset'] as target charset
* @uses PMA_DBI_fetch_value() to get server_language
* @uses preg_match() to filter server_language
* @uses in_array()
@ -135,20 +134,20 @@ function PMA_DBI_convert_message($message) {
if ((@stristr(PHP_OS, 'AIX')) && (@strcasecmp(ICONV_IMPL, 'unknown') == 0) && (@strcasecmp(ICONV_VERSION, 'unknown') == 0)) {
require_once './libraries/iconv_wrapper.lib.php';
$message = PMA_aix_iconv_wrapper($encodings[$server_language],
$GLOBALS['charset'] . $GLOBALS['cfg']['IconvExtraParams'], $message);
'utf-8' . $GLOBALS['cfg']['IconvExtraParams'], $message);
} else {
$message = iconv($encodings[$server_language],
$GLOBALS['charset'] . $GLOBALS['cfg']['IconvExtraParams'], $message);
'utf-8' . $GLOBALS['cfg']['IconvExtraParams'], $message);
}
} elseif (function_exists('recode_string')) {
$message = recode_string($encodings[$server_language] . '..' . $GLOBALS['charset'],
$message = recode_string($encodings[$server_language] . '..' . 'utf-8',
$message);
} elseif (function_exists('libiconv')) {
$message = libiconv($encodings[$server_language], $GLOBALS['charset'], $message);
$message = libiconv($encodings[$server_language], 'utf-8', $message);
} elseif (function_exists('mb_convert_encoding')) {
// do not try unsupported charsets
if (! in_array($server_language, array('ukrainian', 'greek', 'serbian'))) {
$message = mb_convert_encoding($message, $GLOBALS['charset'],
$message = mb_convert_encoding($message, 'utf-8',
$encodings[$server_language]);
}
}
@ -919,7 +918,6 @@ function PMA_DBI_get_variable($var, $type = PMA_DBI_GETVAR_SESSION, $link = null
* @uses $GLOBALS['collation_connection']
* @uses $GLOBALS['available_languages']
* @uses $GLOBALS['mysql_charset_map']
* @uses $GLOBALS['charset']
* @uses $GLOBALS['lang']
* @uses $GLOBALS['cfg']['Lang']
* @uses defined()

View File

@ -285,7 +285,7 @@ if(isset($_GET['sql_query'])) {
echo '<option value="' . $temp_charset . '"';
if(isset($_GET['charset_of_file']) && ($_GET['charset_of_file'] != $temp_charset)) {
echo '';
} elseif ((empty($cfg['Export']['charset']) && $temp_charset == $charset)
} elseif ((empty($cfg['Export']['charset']) && $temp_charset == 'utf-8')
|| $temp_charset == $cfg['Export']['charset']) {
echo ' selected="selected"';
}

View File

@ -190,7 +190,7 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
echo '<select id="charset_of_file" name="charset_of_file" size="1">';
foreach ($cfg['AvailableCharsets'] as $temp_charset) {
echo '<option value="' . htmlentities($temp_charset) . '"';
if ((empty($cfg['Import']['charset']) && $temp_charset == $charset)
if ((empty($cfg['Import']['charset']) && $temp_charset == 'utf-8')
|| $temp_charset == $cfg['Import']['charset']) {
echo ' selected="selected"';
}

View File

@ -1033,6 +1033,11 @@ function PMA_addClass($class, $condition_field, $meta, $nowrap, $is_field_trunca
$set_class = ' set';
}
$bit_class = '';
if(strpos($meta->type, 'bit') !== false) {
$bit_class = ' bit';
}
$mime_type_class = '';
if(isset($meta->mimetype)) {
$mime_type_class = ' ' . preg_replace('/\//', '_', $meta->mimetype);
@ -1041,7 +1046,7 @@ function PMA_addClass($class, $condition_field, $meta, $nowrap, $is_field_trunca
$result = $class . ($condition_field ? ' condition' : '') . $nowrap
. ' ' . ($is_field_truncated ? ' truncated' : '')
. ($transform_function != $default_function ? ' transformed' : '')
. $enum_class . $set_class . $mime_type_class;
. $enum_class . $set_class . $bit_class . $mime_type_class;
return $result;
}

View File

@ -63,7 +63,7 @@ function PMA_exportFooter() {
* @access public
*/
function PMA_exportHeader() {
global $charset, $charset_of_file;
global $charset_of_file;
return PMA_exportOutputHandler('<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
@ -71,7 +71,7 @@ xmlns="http://www.w3.org/TR/REC-html40">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=' . (isset($charset_of_file) ? $charset_of_file : $charset) . '" />
<meta http-equiv="Content-type" content="text/html;charset=' . (isset($charset_of_file) ? $charset_of_file : 'utf-8') . '" />
</head>
<body>');
}

View File

@ -68,7 +68,7 @@ function PMA_exportFooter() {
* @access public
*/
function PMA_exportHeader() {
$GLOBALS['ods_buffer'] .= '<?xml version="1.0" encoding="' . $GLOBALS['charset'] . '"?' . '>'
$GLOBALS['ods_buffer'] .= '<?xml version="1.0" encoding="utf-8"?' . '>'
. '<office:document-content '. $GLOBALS['OpenDocumentNS'] . 'office:version="1.0">'
. '<office:automatic-styles>'
. '<number:date-style style:name="N37" number:automatic-order="true">'

View File

@ -100,7 +100,7 @@ function PMA_exportFooter() {
* @access public
*/
function PMA_exportHeader() {
$GLOBALS['odt_buffer'] .= '<?xml version="1.0" encoding="' . $GLOBALS['charset'] . '"?' . '>'
$GLOBALS['odt_buffer'] .= '<?xml version="1.0" encoding="utf-8"?' . '>'
. '<office:document-content '. $GLOBALS['OpenDocumentNS'] . 'office:version="1.0">'
. '<office:body>'
. '<office:text>';
@ -236,7 +236,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
*
* @access public
*/
// @@@ Table structure
// @@@ Table structure
function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $dummy)
{
global $cfgRelation;

View File

@ -183,9 +183,9 @@ if (! isset($sql_backquotes)) {
}
/**
* Exports routines (procedures and functions)
* Exports routines (procedures and functions)
*
* @param string $db
* @param string $db
*
* @return bool Whether it suceeded
*/
@ -389,7 +389,7 @@ function PMA_exportHeader()
$set_names = $mysql_charset_map[$GLOBALS['charset_of_file']];
} else {
// by default we use the connection charset
$set_names = $mysql_charset_map[$GLOBALS['charset']];
$set_names = $mysql_charset_map['utf-8'];
}
$head .= $crlf
. '/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;' . $crlf

View File

@ -3,7 +3,7 @@
/**
* Set of functions used to build XML dumps of tables
*
* @todo
* @todo
* @package phpMyAdmin-Export-XML
*/
if (! defined('PHPMYADMIN')) {
@ -24,7 +24,7 @@ if (isset($plugin_list)) {
),
'options_text' => __('Options')
);
/* Export structure */
$plugin_list['xml']['options'][] =
array('type' => 'begin_group', 'name' => 'structure', 'text' => __('Object creation options (all are recommended)'));
@ -39,7 +39,7 @@ if (isset($plugin_list)) {
$plugin_list['xml']['options'][] =
array('type' => 'bool', 'name' => 'export_views', 'text' => __('Views'));
$plugin_list['xml']['options'][] = array('type' => 'end_group');
/* Data */
$plugin_list['xml']['options'][] =
array('type' => 'begin_group', 'name' => 'data', 'text' => __('Data dump options'));
@ -68,7 +68,7 @@ function PMA_exportComment($text) {
*/
function PMA_exportFooter() {
$foot = '</pma_xml_export>';
return PMA_exportOutputHandler($foot);
}
@ -86,14 +86,14 @@ function PMA_exportHeader() {
global $db;
global $table;
global $tables;
$export_struct = isset($GLOBALS[$what . '_export_struc']) ? true : false;
$export_data = isset($GLOBALS[$what . '_export_contents']) ? true : false;
if ($GLOBALS['output_charset_conversion']) {
$charset = $GLOBALS['charset_of_file'];
} else {
$charset = $GLOBALS['charset'];
$charset = 'utf-8';
}
$head = '<?xml version="1.0" encoding="' . $charset . '"?>' . $crlf
@ -111,53 +111,53 @@ function PMA_exportHeader() {
. '- ' . __('Server version') . ': ' . substr(PMA_MYSQL_INT_VERSION, 0, 1) . '.' . (int) substr(PMA_MYSQL_INT_VERSION, 1, 2) . '.' . (int) substr(PMA_MYSQL_INT_VERSION, 3) . $crlf
. '- ' . __('PHP Version') . ': ' . phpversion() . $crlf
. '-->' . $crlf . $crlf;
$head .= '<pma_xml_export version="1.0"' . (($export_struct) ? ' xmlns:pma="http://www.phpmyadmin.net/some_doc_url/"' : '') . '>' . $crlf;
if ($export_struct) {
$result = PMA_DBI_fetch_result('SELECT `DEFAULT_CHARACTER_SET_NAME`, `DEFAULT_COLLATION_NAME` FROM `information_schema`.`SCHEMATA` WHERE `SCHEMA_NAME` = \''.$db.'\' LIMIT 1');
$db_collation = $result[0]['DEFAULT_COLLATION_NAME'];
$db_charset = $result[0]['DEFAULT_CHARACTER_SET_NAME'];
$head .= ' <!--' . $crlf;
$head .= ' - Structure schemas' . $crlf;
$head .= ' -->' . $crlf;
$head .= ' <pma:structure_schemas>' . $crlf;
$head .= ' <pma:database name="' . $db . '" collation="' . $db_collation . '" charset="' . $db_charset . '">' . $crlf;
if (count($tables) == 0) {
$tables[] = $table;
}
foreach ($tables as $table) {
// Export tables and views
$result = PMA_DBI_fetch_result('SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table), 0);
$tbl = $result[$table][1];
$is_view = PMA_isView($db, $table);
if ($is_view) {
$type = 'view';
} else {
$type = 'table';
}
if ($is_view && ! isset($GLOBALS[$what . '_export_views'])) {
continue;
}
if (! $is_view && ! isset($GLOBALS[$what . '_export_tables'])) {
continue;
}
$head .= ' <pma:' . $type . ' name="' . $table . '">' . $crlf;
$tbl = " " . $tbl;
$tbl = str_replace("\n", "\n ", $tbl);
$head .= $tbl . ';' . $crlf;
$head .= ' </pma:' . $type . '>' . $crlf;
if (isset($GLOBALS[$what . '_export_triggers']) && $GLOBALS[$what . '_export_triggers']) {
// Export triggers
$triggers = PMA_DBI_get_triggers($db, $table);
@ -165,78 +165,78 @@ function PMA_exportHeader() {
foreach ($triggers as $trigger) {
$code = $trigger['create'];
$head .= ' <pma:trigger name="' . $trigger['name'] . '">' . $crlf;
// Do some formatting
$code = substr(rtrim($code), 0, -3);
$code = " " . $code;
$code = str_replace("\n", "\n ", $code);
$head .= $code . $crlf;
$head .= ' </pma:trigger>' . $crlf;
}
unset($trigger);
unset($triggers);
}
}
}
if (isset($GLOBALS[$what . '_export_functions']) && $GLOBALS[$what . '_export_functions']) {
// Export functions
$functions = PMA_DBI_get_procedures_or_functions($db, 'FUNCTION');
if ($functions) {
foreach ($functions as $function) {
$head .= ' <pma:function name="' . $function . '">' . $crlf;
// Do some formatting
$sql = PMA_DBI_get_definition($db, 'FUNCTION', $function);
$sql = rtrim($sql);
$sql = " " . $sql;
$sql = str_replace("\n", "\n ", $sql);
$head .= $sql . $crlf;
$head .= ' </pma:function>' . $crlf;
}
unset($create_func);
unset($function);
unset($functions);
}
}
if (isset($GLOBALS[$what . '_export_procedures']) && $GLOBALS[$what . '_export_procedures']) {
// Export procedures
$procedures = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');
if ($procedures) {
foreach ($procedures as $procedure) {
$head .= ' <pma:procedure name="' . $procedure . '">' . $crlf;
// Do some formatting
$sql = PMA_DBI_get_definition($db, 'PROCEDURE', $procedure);
$sql = rtrim($sql);
$sql = " " . $sql;
$sql = str_replace("\n", "\n ", $sql);
$head .= $sql . $crlf;
$head .= ' </pma:procedure>' . $crlf;
}
unset($create_proc);
unset($procedure);
unset($procedures);
}
}
unset($result);
$head .= ' </pma:database>' . $crlf;
$head .= ' </pma:structure_schemas>' . $crlf;
if ($export_data) {
$head .= $crlf;
}
}
return PMA_exportOutputHandler($head);
}
@ -252,13 +252,13 @@ function PMA_exportHeader() {
function PMA_exportDBHeader($db) {
global $crlf;
global $what;
if (isset($GLOBALS[$what . '_export_contents']) && $GLOBALS[$what . '_export_contents']) {
$head = ' <!--' . $crlf
. ' - ' . __('Database') . ': ' . (isset($GLOBALS['use_backquotes']) ? PMA_backquote($db) : '\'' . $db . '\''). $crlf
. ' -->' . $crlf
. ' <database name="' . $db . '">' . $crlf;
return PMA_exportOutputHandler($head);
}
else
@ -279,7 +279,7 @@ function PMA_exportDBHeader($db) {
function PMA_exportDBFooter($db) {
global $crlf;
global $what;
if (isset($GLOBALS[$what . '_export_contents']) && $GLOBALS[$what . '_export_contents']) {
return PMA_exportOutputHandler(' </database>' . $crlf);
}
@ -318,21 +318,21 @@ function PMA_exportDBCreate($db) {
*/
function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
global $what;
if (isset($GLOBALS[$what . '_export_contents']) && $GLOBALS[$what . '_export_contents']) {
$result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
$columns_cnt = PMA_DBI_num_fields($result);
for ($i = 0; $i < $columns_cnt; $i++) {
$columns[$i] = stripslashes(str_replace(' ', '_', PMA_DBI_field_name($result, $i)));
}
unset($i);
$buffer = ' <!-- ' . __('Table') . ' ' . $table . ' -->' . $crlf;
if (!PMA_exportOutputHandler($buffer)) {
return FALSE;
}
while ($record = PMA_DBI_fetch_row($result)) {
$buffer = ' <table name="' . htmlspecialchars($table) . '">' . $crlf;
for ($i = 0; $i < $columns_cnt; $i++) {
@ -344,7 +344,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
. '</column>' . $crlf;
}
$buffer .= ' </table>' . $crlf;
if (!PMA_exportOutputHandler($buffer)) {
return FALSE;
}

View File

@ -30,6 +30,6 @@ header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-ch
header('Pragma: no-cache'); // HTTP/1.0
if (!defined('IS_TRANSFORMATION_WRAPPER')) {
// Define the charset to be used
header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
header('Content-Type: text/html; charset=utf-8');
}
?>

View File

@ -28,14 +28,14 @@ if ($GLOBALS['text_dir'] == 'ltr') {
}
// removes the bug with the horizontal scrollbar in IE (it's allways shown, if need it or not)
// xml declaration moves IE into quirks mode, making much trouble with CSS
/* echo '<?xml version="1.0" encoding="' . $GLOBALS['charset'] . '"?>'; */
/* echo '<?xml version="1.0" encoding="utf-8"?>'; */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<title><?php

View File

@ -43,7 +43,7 @@ if ($text_dir == 'ltr') {
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $available_languages[$lang][1]; ?>" lang="<?php echo $available_languages[$lang][1]; ?>" dir="<?php echo $text_dir; ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<title><?php echo __('SQL result'); ?> - phpMyAdmin <?php echo PMA_VERSION ?></title>

View File

@ -131,11 +131,11 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
$my_die = array();
}
$my_die[] = array('sql' => $import_run_buffer['full'], 'error' => PMA_DBI_getError());
if ($cfg['VerboseMultiSubmit']) {
$msg .= __('Error');
}
if (!$cfg['IgnoreMultiSubmitErrors']) {
$error = TRUE;
return;
@ -156,12 +156,12 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
if (!$sql_query_disabled) {
$sql_query .= $msg . "\n";
}
// If a 'USE <db>' SQL-clause was found and the query succeeded, set our current $db to the new one
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'])) {
$reload = TRUE;
}
@ -206,16 +206,16 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
}
/**
* Looks for the presence of USE to possibly change current db
* 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)
* @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;
@ -241,7 +241,7 @@ function PMA_lookForUse($buffer, $db, $reload)
function PMA_importGetNextChunk($size = 32768)
{
global $compression, $import_handle, $charset_conversion, $charset_of_file,
$charset, $read_multiply;
$read_multiply;
// Add some progression while reading large amount of data
if ($read_multiply <= 8) {
@ -298,7 +298,7 @@ function PMA_importGetNextChunk($size = 32768)
$GLOBALS['offset'] += $size;
if ($charset_conversion) {
return PMA_convert_string($charset_of_file, $charset, $result);
return PMA_convert_string($charset_of_file, 'utf-8', $result);
} else {
/**
* Skip possible byte order marks (I do not think we need more
@ -328,9 +328,9 @@ function PMA_importGetNextChunk($size = 32768)
* The column number (1-26) is converted to the responding ASCII character (A-Z) and returned.
*
* If the column number is bigger than 26 (= num of letters in alfabet),
* an extra character needs to be added. To find this extra character, the number is divided by 26
* and this value is passed to another instance of the same function (hence recursion).
* In that new instance the number is evaluated again, and if it is still bigger than 26, it is divided again
* an extra character needs to be added. To find this extra character, the number is divided by 26
* and this value is passed to another instance of the same function (hence recursion).
* In that new instance the number is evaluated again, and if it is still bigger than 26, it is divided again
* and passed to another instance of the same function. This continues until the number is smaller than 26.
* Then the last called function returns the corresponding ASCII character to the function that called it.
* Each time a called function ends an extra character is added to the column name.
@ -489,10 +489,10 @@ function PMA_getDecimalSize(&$cell) {
$curr_size = strlen((string)$cell);
$decPos = strpos($cell, ".");
$decPrecision = ($curr_size - 1) - $decPos;
$m = $curr_size - 1;
$d = $decPrecision;
return array($m, $d, ($m . "," . $d));
}
@ -525,7 +525,7 @@ function PMA_getDecimalSize(&$cell) {
*/
function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type, &$cell) {
$curr_size = strlen((string)$cell);
/**
* If the cell is NULL, don't treat it as a varchar
*/
@ -551,7 +551,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type
*/
elseif ($last_cumulative_type == DECIMAL) {
$oldM = PMA_getM($last_cumulative_size);
if ($curr_size >= $oldM) {
return $curr_size;
} else {
@ -581,7 +581,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type
/**
* TODO: Handle this MUCH more elegantly
*/
return -1;
}
}
@ -595,7 +595,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type
if ($last_cumulative_type == VARCHAR) {
/* Convert $last_cumulative_size from varchar to decimal format */
$size = PMA_getDecimalSize($cell);
if ($size[M] >= $last_cumulative_size) {
return $size[M];
} else {
@ -607,10 +607,10 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type
*/
elseif ($last_cumulative_type == DECIMAL) {
$size = PMA_getDecimalSize($cell);
$oldM = PMA_getM($last_cumulative_size);
$oldD = PMA_getD($last_cumulative_size);
/* New val if M or D is greater than current largest */
if ($size[M] > $oldM || $size[D] > $oldD) {
/* Take the largest of both types */
@ -625,7 +625,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type
elseif ($last_cumulative_type == BIGINT || $last_cumulative_type == INT) {
/* Convert $last_cumulative_size from int to decimal format */
$size = PMA_getDecimalSize($cell);
if ($size[M] >= $last_cumulative_size) {
return $size[FULL];
} else {
@ -638,7 +638,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type
elseif (! isset($last_cumulative_type) || $last_cumulative_type == NONE) {
/* First row of the column */
$size = PMA_getDecimalSize($cell);
return $size[FULL];
}
/**
@ -648,7 +648,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type
/**
* TODO: Handle this MUCH more elegantly
*/
return -1;
}
}
@ -674,7 +674,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type
$oldD = PMA_getD($last_cumulative_size);
$oldInt = $oldM - $oldD;
$newInt = strlen((string)$cell);
/* See which has the larger integer length */
if ($oldInt >= $newInt) {
/* Use old decimal size */
@ -707,7 +707,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type
/**
* TODO: Handle this MUCH more elegantly
*/
return -1;
}
}
@ -718,7 +718,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type
/**
* TODO: Handle this MUCH more elegantly
*/
return -1;
}
}
@ -747,7 +747,7 @@ function PMA_detectType($last_cumulative_type, &$cell) {
* If numeric, determine if decimal, int or bigint
* Else, we call it varchar for simplicity
*/
if (! strcmp('NULL', $cell)) {
if ($last_cumulative_type === NULL || $last_cumulative_type == NONE) {
return NONE;
@ -807,7 +807,7 @@ function PMA_analyzeTable(&$table) {
for ($i = 0; $i < $numCols; ++$i) {
$sizes[$i] = 0;
}
/* Initialize $types to NONE */
for ($i = 0; $i < $numCols; ++$i) {
$types[$i] = NONE;
@ -816,7 +816,7 @@ function PMA_analyzeTable(&$table) {
/* Temp vars */
$curr_type = NONE;
$curr_size = 0;
/* If the passed array is not of the correct form, do not process it */
if (is_array($table) && ! is_array($table[TBL_NAME]) && is_array($table[COL_NAMES]) && is_array($table[ROWS])) {
/* Analyze each column */
@ -827,7 +827,7 @@ function PMA_analyzeTable(&$table) {
$curr_type = PMA_detectType($types[$i], $table[ROWS][$j][$i]);
/* Determine size of the current cell */
$sizes[$i] = PMA_detectSize($sizes[$i], $types[$i], $curr_type, $table[ROWS][$j][$i]);
/**
* If a type for this column has already been declared,
* only alter it if it was a number and a varchar was found
@ -851,7 +851,7 @@ function PMA_analyzeTable(&$table) {
}
}
}
/* Check to ensure that all types are valid */
$len = count($types);
for ($n = 0; $n < $len; ++$n) {
@ -860,7 +860,7 @@ function PMA_analyzeTable(&$table) {
$sizes[$n] = '10';
}
}
return array($types, $sizes);
}
else
@ -868,7 +868,7 @@ function PMA_analyzeTable(&$table) {
/**
* TODO: Handle this better
*/
return false;
}
}
@ -913,38 +913,38 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
} else {
$collation = "utf8_general_ci";
}
if (isset($options['db_charset']) && ! is_null($options['db_charset'])) {
$charset = $options['db_charset'];
} else {
$charset = "utf8";
}
if (isset($options['create_db'])) {
$create_db = $options['create_db'];
} else {
$create_db = true;
}
/* Create SQL code to handle the database */
$sql = array();
if ($create_db) {
$sql[] = "CREATE DATABASE IF NOT EXISTS " . PMA_backquote($db_name) . " DEFAULT CHARACTER SET " . $charset . " COLLATE " . $collation;
}
/**
* The calling plug-in should include this statement, if necessary, in the $additional_sql parameter
*
* $sql[] = "USE " . PMA_backquote($db_name);
*/
/* Execute the SQL statements create above */
$sql_len = count($sql);
for ($i = 0; $i < $sql_len; ++$i) {
PMA_importRunQuery($sql[$i], $sql[$i]);
}
/* No longer needed */
unset($sql);
@ -952,7 +952,7 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
if ($additional_sql != NULL) {
/* Clean the SQL first */
$additional_sql_len = count($additional_sql);
/**
* Only match tables for now, because CREATE IF NOT EXISTS
* syntax is lacking or nonexisting for views, triggers,
@ -966,7 +966,7 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
*/
$pattern = '/CREATE .*(TABLE)/';
$replacement = 'CREATE \\1 IF NOT EXISTS';
/* Change CREATE statements to CREATE IF NOT EXISTS to support inserting into existing structures */
for ($i = 0; $i < $additional_sql_len; ++$i) {
$additional_sql[$i] = preg_replace($pattern, $replacement, $additional_sql[$i]);
@ -977,12 +977,12 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
if ($analyses != NULL) {
$type_array = array(NONE => "NULL", VARCHAR => "varchar", INT => "int", DECIMAL => "decimal", BIGINT => "bigint");
/* TODO: Do more checking here to make sure they really are matched */
if (count($tables) != count($analyses)) {
exit();
}
/* Create SQL code to create the tables */
$tempSQLStr = "";
$num_tables = count($tables);
@ -994,15 +994,15 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
if ((int)$size == 0) {
$size = 10;
}
$tempSQLStr .= PMA_backquote($tables[$i][COL_NAMES][$j]) . " " . $type_array[$analyses[$i][TYPES][$j]] . "(" . $size . ")";
if ($j != (count($tables[$i][COL_NAMES]) - 1)) {
$tempSQLStr .= ", ";
}
}
$tempSQLStr .= ") ENGINE=MyISAM DEFAULT CHARACTER SET " . $charset . " COLLATE " . $collation . ";";
/**
* Each SQL statement is executed immediately
* after it is formed so that we don't have
@ -1011,7 +1011,7 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
PMA_importRunQuery($tempSQLStr, $tempSQLStr);
}
}
/**
* Create the SQL statements to insert all the data
*
@ -1023,65 +1023,65 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
for ($i = 0; $i < $num_tables; ++$i) {
$num_cols = count($tables[$i][COL_NAMES]);
$num_rows = count($tables[$i][ROWS]);
$tempSQLStr = "INSERT INTO " . PMA_backquote($db_name) . '.' . PMA_backquote($tables[$i][TBL_NAME]) . " (";
for ($m = 0; $m < $num_cols; ++$m) {
$tempSQLStr .= PMA_backquote($tables[$i][COL_NAMES][$m]);
if ($m != ($num_cols - 1)) {
$tempSQLStr .= ", ";
}
}
$tempSQLStr .= ") VALUES ";
for ($j = 0; $j < $num_rows; ++$j) {
$tempSQLStr .= "(";
for ($k = 0; $k < $num_cols; ++$k) {
if ($analyses != NULL) {
$is_varchar = ($analyses[$i][TYPES][$col_count] === VARCHAR);
} else {
$is_varchar = !is_numeric($tables[$i][ROWS][$j][$k]);
}
/* Don't put quotes around NULL fields */
if (! strcmp($tables[$i][ROWS][$j][$k], 'NULL')) {
$is_varchar = false;
}
$tempSQLStr .= (($is_varchar) ? "'" : "");
$tempSQLStr .= PMA_sqlAddslashes((string)$tables[$i][ROWS][$j][$k]);
$tempSQLStr .= (($is_varchar) ? "'" : "");
if ($k != ($num_cols - 1)) {
$tempSQLStr .= ", ";
}
if ($col_count == ($num_cols - 1)) {
$col_count = 0;
} else {
$col_count++;
}
/* Delete the cell after we are done with it */
unset($tables[$i][ROWS][$j][$k]);
}
$tempSQLStr .= ")";
if ($j != ($num_rows - 1)) {
$tempSQLStr .= ",\n ";
}
$col_count = 0;
/* Delete the row after we are done with it */
unset($tables[$i][ROWS][$j]);
}
$tempSQLStr .= ";";
/**
* Each SQL statement is executed immediately
* after it is formed so that we don't have
@ -1089,32 +1089,32 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
*/
PMA_importRunQuery($tempSQLStr, $tempSQLStr);
}
/* No longer needed */
unset($tempSQLStr);
/**
* A work in progress
*/
/* Add the viewable structures from $additional_sql to $tables so they are also displayed */
$view_pattern = '@VIEW `[^`]+`\.`([^`]+)@';
$table_pattern = '@CREATE TABLE IF NOT EXISTS `([^`]+)`@';
/* Check a third pattern to make sure its not a "USE `db_name`;" statement */
$regs = array();
$inTables = false;
$additional_sql_len = count($additional_sql);
for ($i = 0; $i < $additional_sql_len; ++$i) {
preg_match($view_pattern, $additional_sql[$i], $regs);
if (count($regs) == 0) {
preg_match($table_pattern, $additional_sql[$i], $regs);
}
if (count($regs)) {
for ($n = 0; $n < $num_tables; ++$n) {
if (!strcmp($regs[1], $tables[$n][TBL_NAME])) {
@ -1122,21 +1122,21 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
break;
}
}
if (!$inTables) {
$tables[] = array(TBL_NAME => $regs[1]);
}
}
/* Reset the array */
$regs = array();
$inTables = false;
}
$params = array('db' => (string)$db_name);
$db_url = 'db_structure.php' . PMA_generate_common_url($params);
$db_ops_url = 'db_operations.php' . PMA_generate_common_url($params);
$message = '<br /><br />';
$message .= '<strong>' . __('The following structures have either been created or altered. Here you can:') . '</strong><br />';
$message .= '<ul><li>' . __('View a structure`s contents by clicking on its name') . '</li>';
@ -1148,11 +1148,11 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
$db_name,
$db_ops_url,
__('Edit') . ' ' . PMA_backquote($db_name) . ' ' . __('settings'));
$message .= '<ul>';
unset($params);
$num_tables = count($tables);
for ($i = 0; $i < $num_tables; ++$i)
{
@ -1160,9 +1160,9 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
$tbl_url = 'sql.php' . PMA_generate_common_url($params);
$tbl_struct_url = 'tbl_structure.php' . PMA_generate_common_url($params);
$tbl_ops_url = 'tbl_operations.php' . PMA_generate_common_url($params);
unset($params);
if (! PMA_isView($db_name, $tables[$i][TBL_NAME])) {
$message .= sprintf('<li><a href="%s" title="%s">%s</a> (<a href="%s" title="%s">' . __('Structure') . '</a>) (<a href="%s" title="%s">' . __('Options') . '</a>)</li>',
$tbl_url,
@ -1179,12 +1179,12 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql =
$tables[$i][TBL_NAME]);
}
}
$message .= '</ul></ul>';
global $import_notice;
$import_notice = $message;
unset($tables);
}

View File

@ -186,22 +186,14 @@ class PMA_Export_Relation_Schema
* @param string type Schema Type
* @param string error_message the error mesage
* @global array the PMA configuration array
* @global integer the current server id
* @global string the current language
* @global string the charset to convert to
* @global string the current database name
* @global string the current charset
* @global string the current text direction
* @global string a localized string
* @global string an other localized string
* @access public
* @return void
*/
function dieSchema($pageNumber, $type = '', $error_message = '')
{
global $cfg;
global $server, $lang, $convcharset, $db;
global $charset, $text_dir;
global $db;
require_once './libraries/header.inc.php';
echo "<p><strong>" . __("SCHEMA ERROR: ") . $type ."</strong></p>" . "\n";

View File

@ -478,9 +478,6 @@ if (! function_exists('__')) {
die('Bad invocation!');
}
/* We use only utf-8 */
$charset = 'utf-8';
/* l10n: Text direction, use either ltr or rtl */
$GLOBALS['text_dir'] = __('ltr');

View File

@ -464,7 +464,6 @@ function PMA_sqlQueryFormBookmark()
* @uses $GLOBALS['cfg']['BZipDump']
* @uses $GLOBALS['cfg']['UploadDir']
* @uses $GLOBALS['cfg']['AvailableCharsets']
* @uses $GLOBALS['charset']
* @uses $GLOBALS['max_upload_size']
* @uses PMA_supportedDecompressions()
* @uses PMA_getFileSelectOptions()

View File

@ -527,7 +527,6 @@ $PMA_SQPdata_reserved_word = array (
'LOGS',
'LOW_PRIORITY',
'MARIA', // 5.1 ?
'MASTER',
'MASTER_CONNECT_RETRY',
'MASTER_HOST',
'MASTER_LOG_FILE',
@ -685,7 +684,7 @@ $PMA_SQPdata_reserved_word = array (
*
* @global integer MySQL reserved words count
*/
$PMA_SQPdata_reserved_word_cnt = 288;
$PMA_SQPdata_reserved_word_cnt = 287;
/**
* words forbidden to be used as column or table name wihtout quotes

View File

@ -28,7 +28,7 @@ $GLOBALS['PMA_allow_mbstr'] = @function_exists('mb_strlen');
$GLOBALS['PMA_allow_ctype'] = @extension_loaded('ctype');
if ($GLOBALS['PMA_allow_mbstr']) {
mb_internal_encoding($GLOBALS['charset']);
mb_internal_encoding('utf-8');
}
/**

View File

@ -168,8 +168,8 @@ if ($server > 0 && $GLOBALS['cfg']['ShowServerInfo']) {
echo ' <li id="li_select_mysql_charset">';
echo ' ' . __('MySQL charset') . ': '
. ' <span xml:lang="en" dir="ltr">'
. ' ' . $mysql_charsets_descriptions[$mysql_charset_map[strtolower($charset)]] . "\n"
. ' (' . $mysql_charset_map[strtolower($charset)] . ')' . "\n"
. ' ' . $mysql_charsets_descriptions[$mysql_charset_map['utf-8']] . "\n"
. ' (' . $mysql_charset_map['utf-8'] . ')' . "\n"
. ' </span>' . "\n"
. ' </li>' . "\n";
echo ' </ul>';

View File

@ -11,7 +11,6 @@
* @uses $GLOBALS['available_languages']
* @uses $GLOBALS['lang']
* @uses $GLOBALS['text_dir']
* @uses $GLOBALS['charset']
* @uses $GLOBALS['pmaThemeImage']
* @uses $GLOBALS['cfg']['LeftFrameLight']
* @uses $GLOBALS['cfg']['ShowTooltip']
@ -118,7 +117,7 @@ require_once './libraries/header_http.inc.php';
* Displays the frame
*/
// xml declaration moves IE into quirks mode, making much trouble with CSS
/* echo '<?xml version="1.0" encoding="' . $GLOBALS['charset'] . '"?>'; */
/* echo '<?xml version="1.0" encoding="utf-8"?>'; */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -131,16 +130,17 @@ require_once './libraries/header_http.inc.php';
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<title>phpMyAdmin</title>
<meta http-equiv="Content-Type"
content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<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.6.1.js" type="text/javascript"></script>
<script src="./js/jquery/jquery-ui-1.8.custom.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" src="js/messages.php"></script>
<?php
echo PMA_includeJS('jquery/jquery-1.6.1.js');
echo PMA_includeJS('jquery/jquery-ui-1.8.custom.js');
echo PMA_includeJS('navigation.js');
echo PMA_includeJS('functions.js');
echo PMA_includeJS('messages.php');
?>
<script type="text/javascript">
// <![CDATA[
var image_minus = '<?php echo $GLOBALS['pmaThemeImage']; ?>b_minus.png';

View File

@ -22,7 +22,7 @@ $hidden = "hidden";
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="icon" href="pmd/images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="pmd/images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="pmd/styles/<?php echo $GLOBALS['PMD']['STYLE'] ?>/style1.css" />

View File

@ -12,11 +12,7 @@ require_once 'pmd_common.php';
?>
<html>
<head>
<?php if(0){ ?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link rel="stylesheet" type="text/css" href="./libraries/pmd/styles/default/style1.css">
<?php } ?>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="./libraries/pmd/styles/<?php echo $GLOBALS['PMD']['STYLE'] ?>/style1.css">
<title>Designer</title>
</head>

View File

@ -91,7 +91,7 @@ if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) &&
function PMD_return_new($b,$ret)
{
global $db,$T1,$F1,$T2,$F2;
header("Content-Type: text/xml; charset=utf-8");//utf-8 .$_GLOBALS['charset']
header("Content-Type: text/xml; charset=utf-8");
header("Cache-Control: no-cache");
die('<root act="relation_new" return="'.$ret.'" b="'.$b.
'" DB1="'.urlencode($db).

View File

@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2011-06-02 11:25-0400\n"
"PO-Revision-Date: 2011-06-02 10:34+0200\n"
"PO-Revision-Date: 2011-06-03 11:59+0200\n"
"Last-Translator: Michal Čihař <michal@cihar.com>\n"
"Language-Team: czech <cs@li.org>\n"
"MIME-Version: 1.0\n"
@ -618,8 +618,8 @@ msgstr "Sledování není zapnuté."
#: db_structure.php:379 libraries/display_tbl.lib.php:2068
#, php-format
msgid ""
"This view has at least this number of rows. Please refer to %sdocumentation%"
"s."
"This view has at least this number of rows. Please refer to %sdocumentation"
"%s."
msgstr ""
"Tento pohled má alespoň tolik řádek. Podrobnosti naleznete v %sdokumentaci%s."
@ -856,8 +856,8 @@ msgstr "Výpis byl uložen do souboru %s."
#: import.php:58
#, php-format
msgid ""
"You probably tried to upload too large file. Please refer to %sdocumentation%"
"s for ways to workaround this limit."
"You probably tried to upload too large file. Please refer to %sdocumentation"
"%s for ways to workaround this limit."
msgstr ""
"Pravděpodobně jste se pokusili nahrát příliš velký soubor. Přečtěte si "
"prosím %sdokumentaci%s, jak toto omezení obejít."
@ -1714,8 +1714,8 @@ msgstr "Vítejte v %s"
#: libraries/auth/config.auth.lib.php:106
#, php-format
msgid ""
"You probably did not create a configuration file. You might want to use the %"
"1$ssetup script%2$s to create one."
"You probably did not create a configuration file. You might want to use the "
"%1$ssetup script%2$s to create one."
msgstr ""
"Pravděpodobná příčina je, že nemáte vytvořený konfigurační soubor. Pro jeho "
"vytvoření by se vám mohl hodit %1$snastavovací skript%2$s."
@ -3493,7 +3493,7 @@ msgstr "Jedná se o odkazy Upravit, Upravit zde, Kopírovat a Odstranit"
#: libraries/config/messages.inc.php:318
msgid "Where to show the table row links"
msgstr ""
msgstr "Kde zobrazit odkazy s akcemi při procházení"
#: libraries/config/messages.inc.php:319
msgid "Use natural order for sorting table and database names"
@ -4740,8 +4740,8 @@ msgstr ", @TABLE@ bude nahrazen jménem tabulky"
#, php-format
msgid ""
"This value is interpreted using %1$sstrftime%2$s, so you can use time "
"formatting strings. Additionally the following transformations will happen: %"
"3$s. Other text will be kept as is. See the %4$sFAQ%5$s for details."
"formatting strings. Additionally the following transformations will happen: "
"%3$s. Other text will be kept as is. See the %4$sFAQ%5$s for details."
msgstr ""
"Tato hodnota je interpretována pomocí %1$sstrftime%2$s, takže můžete použít "
"libovolné řetězce pro formátování data a času. Dále budou provedena "
@ -5467,8 +5467,8 @@ msgstr ""
#: libraries/engines/pbxt.lib.php:125
#, php-format
msgid ""
"Documentation and further information about PBXT can be found on the %"
"sPrimeBase XT Home Page%s."
"Documentation and further information about PBXT can be found on the "
"%sPrimeBase XT Home Page%s."
msgstr ""
"Dokumentace a další informace o PBXT můžete nalézt na %sstránkách PrimeBase "
"XT%s."
@ -6738,8 +6738,8 @@ msgid ""
"For a list of available transformation options and their MIME type "
"transformations, click on %stransformation descriptions%s"
msgstr ""
"Pro seznam dostupných parametrů transformací a jejich MIME typů klikněte na %"
"spopisy transformací%s"
"Pro seznam dostupných parametrů transformací a jejich MIME typů klikněte na "
"%spopisy transformací%s"
#: libraries/tbl_properties.inc.php:143
msgid "Transformation options"
@ -6790,8 +6790,8 @@ msgid ""
"No description is available for this transformation.<br />Please ask the "
"author what %s does."
msgstr ""
"Pro tuto transformaci není dostupný žádný popis.<br />Zeptejte se autora co %"
"s dělá."
"Pro tuto transformaci není dostupný žádný popis.<br />Zeptejte se autora co "
"%s dělá."
#: libraries/tbl_properties.inc.php:625 tbl_structure.php:636
#, php-format
@ -7410,8 +7410,8 @@ msgid ""
"You can set more settings by modifying config.inc.php, eg. by using %sSetup "
"script%s."
msgstr ""
"Více věcí můžete nastavit úpravou config.inc.php, např. použitím %"
"sNastavovacího skriptu%s."
"Více věcí můžete nastavit úpravou config.inc.php, např. použitím "
"%sNastavovacího skriptu%s."
#: prefs_manage.php:302
msgid "Save to browser's storage"
@ -7859,8 +7859,8 @@ msgstr "Odstranit databáze se stejnými jmény jako uživatelé."
msgid ""
"Note: phpMyAdmin gets the users' privileges directly from MySQL's privilege "
"tables. The content of these tables may differ from the privileges the "
"server uses, if they have been changed manually. In this case, you should %"
"sreload the privileges%s before you continue."
"server uses, if they have been changed manually. In this case, you should "
"%sreload the privileges%s before you continue."
msgstr ""
"Poznámka: phpMyAdmin získává oprávnění přímo z tabulek MySQL. Obsah těchto "
"tabulek se může lišit od oprávnění, která server právě používá, pokud byly "
@ -9328,8 +9328,8 @@ msgid ""
"If using cookie authentication and %sLogin cookie store%s is not 0, %sLogin "
"cookie validity%s must be set to a value less or equal to it."
msgstr ""
"Při použití přihlašování přes cookies a při %sUkládádání přihlašovaci cookie%"
"s vyšší než 0 musí být %sPlatnost přihlašovací cookie%s nastavena na vyšší "
"Při použití přihlašování přes cookies a při %sUkládádání přihlašovaci cookie"
"%s vyšší než 0 musí být %sPlatnost přihlašovací cookie%s nastavena na vyšší "
"hodnotu než je tato."
#: setup/lib/index.lib.php:266
@ -9340,8 +9340,8 @@ msgid ""
"protection may not be reliable if your IP belongs to an ISP where thousands "
"of users, including you, are connected to."
msgstr ""
"Pokud to považujete za nutné, použijte další možnosti zabezpečení - %"
"somezení počítačů%s a %sseznam důvěryhodných proxy%s. Nicméně zabezpečení "
"Pokud to považujete za nutné, použijte další možnosti zabezpečení - "
"%somezení počítačů%s a %sseznam důvěryhodných proxy%s. Nicméně zabezpečení "
"založené na IP adresách nemusí být spolehlivé, pokud je vaše IP adresa "
"dynamicky přidělována poskytovatelem spolu s mnoha dalšími uživateli."

View File

@ -4,13 +4,13 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2011-06-02 11:25-0400\n"
"PO-Revision-Date: 2011-05-30 13:03+0200\n"
"PO-Revision-Date: 2011-06-03 14:53+0200\n"
"Last-Translator: Martin Lacina <martin@whistler.sk>\n"
"Language-Team: slovak <sk@li.org>\n"
"Language: sk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: sk\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"X-Generator: Pootle 2.0.5\n"
@ -6543,7 +6543,7 @@ msgstr "Iba prezrieť"
#: libraries/sql_query_form.lib.php:491 prefs_manage.php:241
msgid "Location of the text file"
msgstr "Lokácia textového súboru"
msgstr "Umiestnenie textového súboru"
#: libraries/sql_query_form.lib.php:503 tbl_change.php:965
msgid "web server upload directory"
@ -6879,6 +6879,8 @@ msgid ""
"Your preferences will be saved for current session only. Storing them "
"permanently requires %sphpMyAdmin configuration storage%s."
msgstr ""
"Vaše nastavenia budú uložené len počas tohto prihlásenia. Pre trvalé "
"nastavenie potrebujete nastaviť %smiesto uloženia phpMyAdmin konfigurácie%s."
#: libraries/user_preferences.lib.php:142
#, fuzzy
@ -6914,7 +6916,7 @@ msgstr "Nastavenia vzhľadu"
#: main.php:146 prefs_manage.php:274
msgid "More settings"
msgstr "Viac nastavení"
msgstr "Ďalšie nastavenia"
#: main.php:163
msgid "Protocol version"
@ -7296,24 +7298,23 @@ msgstr "Importovať zo súboru"
#: prefs_manage.php:245
msgid "Import from browser's storage"
msgstr ""
msgstr "Načítať z pamäte prehliadača"
#: prefs_manage.php:248
msgid "Settings will be imported from your browser's local storage."
msgstr ""
msgstr "Nastavenia budú načítané z lokálneho úložišťa vášho prehliadača."
#: prefs_manage.php:254
msgid "You have no saved settings!"
msgstr "Nemáte žiadne uložené nastavenia!"
msgstr "Nemáte uložené žiadne nastavenia!"
#: prefs_manage.php:258 prefs_manage.php:312
msgid "This feature is not supported by your web browser"
msgstr ""
#: prefs_manage.php:263
#, fuzzy
msgid "Merge with current configuration"
msgstr "Master replikácia"
msgstr "Zlúčiť so súčasným nastavením"
#: prefs_manage.php:277
#, php-format
@ -7321,10 +7322,12 @@ msgid ""
"You can set more settings by modifying config.inc.php, eg. by using %sSetup "
"script%s."
msgstr ""
"Ďalšie nastavenia môžete urobiť úpravou config.inc.php, napr. použitím %"
"sNastavovacieho skriptu%s."
#: prefs_manage.php:302
msgid "Save to browser's storage"
msgstr ""
msgstr "Uložiť do úložiska prehliadača"
#: prefs_manage.php:306
msgid "Settings will be saved in your browser's local storage."
@ -7337,6 +7340,7 @@ msgstr "Súčasné nastavenia budú prepísané!"
#: prefs_manage.php:323
msgid "You can reset all your settings and restore them to default values."
msgstr ""
"Môžete vymazať všetky vaše nastavenia a vrátiť sa k východziím hodnotám."
#: querywindow.php:93
msgid "Import files"

View File

@ -253,22 +253,18 @@ if ((isset($_REQUEST['submit_connect']))) {
*/
echo '<form name="synchronize_form" id="synchronize_form" method="post" action="server_synchronize.php">'
. PMA_generate_common_hidden_inputs('', '');
echo '<table id="serverstatustraffic" class="data" width = "60%">
echo '<table id="serverstatustraffic" class="data" width = "40%">
<tr>
<td> <h2>'
. ($GLOBALS['cfg']['MainPageIconic']
? '<img class="icon" src="' . $pmaThemeImage . 'new_struct.jpg" width="32"'
<td>'
. '<img class="icon" src="' . $pmaThemeImage . 'new_struct.jpg" width="32"'
. ' height="32" alt="" />'
: '')
. __('Structure Synchronization')
.'</h2>' .'</td>';
echo '<td> <h2>'
. ($GLOBALS['cfg']['MainPageIconic']
? '<img class="icon" src="' . $pmaThemeImage . 'new_data.jpg" width="32"'
.'</td>';
echo '<td>'
. '<img class="icon" src="' . $pmaThemeImage . 'new_data.jpg" width="32"'
. ' height="32" alt="" />'
: '')
. __('Data Synchronization')
. '</h2>' .'</td>';
. '</td>';
echo '</tr>
</table>';

View File

@ -13,7 +13,6 @@ require_once 'PHPUnit/Framework.php';
define('PHPMYADMIN', 1);
define('TESTSUITE', 1);
$GLOBALS['charset'] = 'utf-8';
function __($s) {
return $s;

View File

@ -33,8 +33,6 @@ if (isset($match) && ! empty($match[1])) {
define('PMA_PHP_INT_VERSION', 0);
}
$GLOBALS['charset'] = 'UTF-8';
require_once './libraries/string.lib.php';
/**

View File

@ -17,7 +17,7 @@ require_once './libraries/common.inc.php';
$lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][1];
// start output
header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
header('Content-Type: text/html; charset=utf-8');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
@ -28,8 +28,7 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
<head>
<title>phpMyAdmin <?php echo PMA_VERSION; ?> -
<?php echo htmlspecialchars($HTTP_HOST); ?> - Theme Test</title>
<meta http-equiv="Content-Type"
content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css"
href="../phpmyadmin.css.php?<?php echo PMA_generate_common_url(); ?>&amp;js_frame=right&amp;nocache=<?php echo $GLOBALS['PMA_Config']->getThemeUniqueValue(); ?>" />
<link rel="stylesheet" type="text/css" media="print"