From 735de4b93c3afacc6e818638b7c34a830820dd6c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 17 Feb 2007 18:02:36 +0000 Subject: [PATCH] undefined variable if AllowAnywhereRecoding is false --- ChangeLog | 1 + libraries/export/sql.php | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c79cd5e90..e6b2a9ce3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ $HeadURL$ * Documentation.html: patch #1659347, missing doc for some config, thanks to Isaac Bennetch * libraries/select_server.lib.php: avoid displaying a wide selector + * libraries/export/sql.php: undefined variable 2007-02-16 Marc Delisle * libraries/common.lib.php, footer.inc.php: avoid generating big links diff --git a/libraries/export/sql.php b/libraries/export/sql.php index b75fa6bb4..b455af0bd 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -162,7 +162,8 @@ function PMA_exportFooter() } // restore connection settings - $charset_of_file = $GLOBALS['charset_of_file']; + // (not set if $cfg['AllowAnywhereRecoding'] is false) + $charset_of_file = isset($GLOBALS['charset_of_file']) ? $GLOBALS['charset_of_file'] : ''; if (!empty($GLOBALS['asfile']) && isset($mysql_charset_map[$charset_of_file])) { $foot .= $crlf . '/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;' . $crlf @@ -226,7 +227,7 @@ function PMA_exportHeader() $head .= $crlf; - $charset_of_file = $GLOBALS['charset_of_file']; + $charset_of_file = isset($GLOBALS['charset_of_file']) ? $GLOBALS['charset_of_file'] : ''; if (!empty($GLOBALS['asfile']) && isset($mysql_charset_map[$charset_of_file])) { $head .= $crlf . '/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;' . $crlf @@ -239,7 +240,7 @@ function PMA_exportHeader() } /** - * Outputs create database database + * Outputs CREATE DATABASE database * * @param string Database name *