[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2RC1-2941-gbbbf2c4
Michal Čihař
nijel at users.sourceforge.net
Fri Jun 3 14:05:39 CEST 2011
The branch, master has been updated
via bbbf2c49ed922c73f24b8e9c9c01c0721893cd07 (commit)
from 4841ee9d5f9926187b0eb8b23e6dd87af2daeab4 (commit)
- Log -----------------------------------------------------------------
commit bbbf2c49ed922c73f24b8e9c9c01c0721893cd07
Author: Michal Čihař <mcihar at novell.com>
Date: Fri Jun 3 14:02:02 2011 +0200
Drop $GLOBALS['charset'].
It was anyway always set to utf-8 so it does not make sense to keep it
as a variable.
-----------------------------------------------------------------------
Summary of changes:
export.php | 6 +-
index.php | 4 +-
libraries/File.class.php | 8 +-
libraries/auth/config.auth.lib.php | 2 +-
libraries/auth/cookie.auth.lib.php | 3 +-
libraries/auth/http.auth.lib.php | 2 +-
libraries/database_interface.lib.php | 12 +-
libraries/export/htmlword.php | 4 +-
libraries/export/ods.php | 2 +-
libraries/export/odt.php | 4 +-
libraries/export/sql.php | 6 +-
libraries/export/xml.php | 84 +++++-----
libraries/header_http.inc.php | 2 +-
libraries/header_meta_style.inc.php | 4 +-
libraries/import.lib.php | 176 ++++++++++----------
libraries/schema/Export_Relation_Schema.class.php | 10 +-
libraries/select_lang.lib.php | 3 -
libraries/sql_query_form.lib.php | 1 -
libraries/string.lib.php | 2 +-
navigation.php | 6 +-
pmd_relation_new.php | 2 +-
test/PMA_SQL_parser_test.php | 1 -
test/PMA_STR_sub_test.php | 2 -
test/theme.php | 5 +-
24 files changed, 164 insertions(+), 187 deletions(-)
diff --git a/export.php b/export.php
index 22a6324..1a60151 100644
--- a/export.php
+++ b/export.php
@@ -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);
@@ -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
diff --git a/index.php b/index.php
index 66f6bf5..36a6118 100644
--- a/index.php
+++ b/index.php
@@ -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[
diff --git a/libraries/File.class.php b/libraries/File.class.php
index 4fd3342..109c188 100644
--- a/libraries/File.class.php
+++ b/libraries/File.class.php
@@ -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
diff --git a/libraries/auth/config.auth.lib.php b/libraries/auth/config.auth.lib.php
index 3a9f82b..dfa2f2c 100644
--- a/libraries/auth/config.auth.lib.php
+++ b/libraries/auth/config.auth.lib.php
@@ -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';
diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php
index c04d5a2..23b6ff0 100644
--- a/libraries/auth/cookie.auth.lib.php
+++ b/libraries/auth/cookie.auth.lib.php
@@ -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';
diff --git a/libraries/auth/http.auth.lib.php b/libraries/auth/http.auth.lib.php
index b3d305a..f4157b6 100644
--- a/libraries/auth/http.auth.lib.php
+++ b/libraries/auth/http.auth.lib.php
@@ -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';
diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php
index 9735a82..91a2283 100644
--- a/libraries/database_interface.lib.php
+++ b/libraries/database_interface.lib.php
@@ -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()
diff --git a/libraries/export/htmlword.php b/libraries/export/htmlword.php
index d23640a..b88cb8f 100644
--- a/libraries/export/htmlword.php
+++ b/libraries/export/htmlword.php
@@ -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>');
}
diff --git a/libraries/export/ods.php b/libraries/export/ods.php
index 28a5dfd..0533741 100644
--- a/libraries/export/ods.php
+++ b/libraries/export/ods.php
@@ -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">'
diff --git a/libraries/export/odt.php b/libraries/export/odt.php
index d1324f0..7af6013 100644
--- a/libraries/export/odt.php
+++ b/libraries/export/odt.php
@@ -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;
diff --git a/libraries/export/sql.php b/libraries/export/sql.php
index 19f9873..3ed1c57 100644
--- a/libraries/export/sql.php
+++ b/libraries/export/sql.php
@@ -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
diff --git a/libraries/export/xml.php b/libraries/export/xml.php
index 9bafb09..55b272d 100644
--- a/libraries/export/xml.php
+++ b/libraries/export/xml.php
@@ -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;
}
diff --git a/libraries/header_http.inc.php b/libraries/header_http.inc.php
index 9ad890d..f9d7d71 100644
--- a/libraries/header_http.inc.php
+++ b/libraries/header_http.inc.php
@@ -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');
}
?>
diff --git a/libraries/header_meta_style.inc.php b/libraries/header_meta_style.inc.php
index 0c6633d..5e5c533 100644
--- a/libraries/header_meta_style.inc.php
+++ b/libraries/header_meta_style.inc.php
@@ -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
diff --git a/libraries/import.lib.php b/libraries/import.lib.php
index 0c77f54..54858a6 100644
--- a/libraries/import.lib.php
+++ b/libraries/import.lib.php
@@ -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);
}
diff --git a/libraries/schema/Export_Relation_Schema.class.php b/libraries/schema/Export_Relation_Schema.class.php
index 2d23c5b..e75b3e8 100644
--- a/libraries/schema/Export_Relation_Schema.class.php
+++ b/libraries/schema/Export_Relation_Schema.class.php
@@ -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";
diff --git a/libraries/select_lang.lib.php b/libraries/select_lang.lib.php
index 08a5b2f..15945be 100644
--- a/libraries/select_lang.lib.php
+++ b/libraries/select_lang.lib.php
@@ -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');
diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php
index 25f67cd..80ee79e 100644
--- a/libraries/sql_query_form.lib.php
+++ b/libraries/sql_query_form.lib.php
@@ -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()
diff --git a/libraries/string.lib.php b/libraries/string.lib.php
index e17a935..650a2ef 100644
--- a/libraries/string.lib.php
+++ b/libraries/string.lib.php
@@ -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');
}
/**
diff --git a/navigation.php b/navigation.php
index e9b2236..76f5b98 100644
--- a/navigation.php
+++ b/navigation.php
@@ -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,8 +130,7 @@ 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('', ''); ?>&js_frame=left&nocache=<?php echo $GLOBALS['PMA_Config']->getThemeUniqueValue(); ?>" />
diff --git a/pmd_relation_new.php b/pmd_relation_new.php
index 6ea4485..da92e97 100644
--- a/pmd_relation_new.php
+++ b/pmd_relation_new.php
@@ -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).
diff --git a/test/PMA_SQL_parser_test.php b/test/PMA_SQL_parser_test.php
index aa3299c..d384bd2 100644
--- a/test/PMA_SQL_parser_test.php
+++ b/test/PMA_SQL_parser_test.php
@@ -13,7 +13,6 @@ require_once 'PHPUnit/Framework.php';
define('PHPMYADMIN', 1);
define('TESTSUITE', 1);
-$GLOBALS['charset'] = 'utf-8';
function __($s) {
return $s;
diff --git a/test/PMA_STR_sub_test.php b/test/PMA_STR_sub_test.php
index 7900b92..640c777 100644
--- a/test/PMA_STR_sub_test.php
+++ b/test/PMA_STR_sub_test.php
@@ -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';
/**
diff --git a/test/theme.php b/test/theme.php
index d49a577..5e0dcb2 100644
--- a/test/theme.php
+++ b/test/theme.php
@@ -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(); ?>&js_frame=right&nocache=<?php echo $GLOBALS['PMA_Config']->getThemeUniqueValue(); ?>" />
<link rel="stylesheet" type="text/css" media="print"
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list