diff --git a/ChangeLog b/ChangeLog index 2901f12eb..9384ca71d 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,9 @@ $Source$ * error.php, libraries/common.lib.php, libraries/sanitizing.lib.php: Protect against possible XSS (bug #1265740), move input sanitizing to special file. + * config.inc.php, libraries/common.lib.php, + libraries/config_import.lib.php, libraries/display_export.lib.php: + Default charset for export is now configurable (RFE #1263772). 2005-08-20 Marc Delisle * libraries/common.lib.php, new error.php: patch #1258978, move common diff --git a/config.inc.php b/config.inc.php index 660d826de..11b97887d 100644 --- a/config.inc.php +++ b/config.inc.php @@ -330,6 +330,7 @@ $cfg['Export']['format'] = 'sql'; // sql/latex/excel/csv/xml $cfg['Export']['compression'] = 'none'; // none/zip/gzip/bzip2 $cfg['Export']['asfile'] = FALSE; +$cfg['Export']['charset'] = ''; $cfg['Export']['onserver'] = FALSE; $cfg['Export']['onserver_overwrite'] = FALSE; $cfg['Export']['remember_file_template'] = TRUE; diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 7613a5fe4..672a96b72 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -123,7 +123,7 @@ if (isset($cfg['FileRevision'])) { } else { $cfg['FileRevision'] = array(1, 1); } -if ($cfg['FileRevision'][0] < 2 || ($cfg['FileRevision'][0] == 2 && $cfg['FileRevision'][1] < 62)) { +if ($cfg['FileRevision'][0] < 2 || ($cfg['FileRevision'][0] == 2 && $cfg['FileRevision'][1] < 64)) { require_once('./libraries/config_import.lib.php'); } diff --git a/libraries/config_import.lib.php b/libraries/config_import.lib.php index a982abdb4..020c2ee43 100644 --- a/libraries/config_import.lib.php +++ b/libraries/config_import.lib.php @@ -1145,6 +1145,9 @@ if (!isset($cfg['Export']['compression'])) { if (!isset($cfg['Export']['asfile'])) { $cfg['Export']['asfile'] = FALSE; } +if (!isset($cfg['Export']['charset'])) { + $cfg['Export']['charset'] = ''; +} if (!isset($cfg['Export']['onserver'])) { $cfg['Export']['onserver'] = FALSE; } diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php index 12ce9b87f..197f20c27 100644 --- a/libraries/display_export.lib.php +++ b/libraries/display_export.lib.php @@ -687,19 +687,14 @@ if (isset($table) && !empty($table) && !isset($num_tables)) { echo "\n"; $temp_charset = reset($cfg['AvailableCharsets']); - echo '' . "\n"; + foreach($cfg['AvailableCharsets'] as $key => $temp_charset) { echo ' ' . "\n"; - } // end while + } // end foreach echo ' '; } // end if echo "\n";