Default charset for export is now configurable (RFE #1263772).

This commit is contained in:
Michal Čihař
2005-08-22 21:41:20 +00:00
parent 6164cb16ae
commit 39ea0b8557
5 changed files with 12 additions and 10 deletions

View File

@@ -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 <lem9@users.sourceforge.net>
* libraries/common.lib.php, new error.php: patch #1258978, move common

View File

@@ -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;

View File

@@ -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');
}

View File

@@ -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;
}

View File

@@ -687,19 +687,14 @@ if (isset($table) && !empty($table) && !isset($num_tables)) {
echo "\n";
$temp_charset = reset($cfg['AvailableCharsets']);
echo '<select id="select_charset_of_file" name="charset_of_file" size="1">' . "\n"
. ' <option value="' . $temp_charset . '"';
if ($temp_charset == $charset) {
echo ' selected="selected"';
}
echo '>' . $temp_charset . '</option>' . "\n";
while ($temp_charset = next($cfg['AvailableCharsets'])) {
echo '<select id="select_charset_of_file" name="charset_of_file" size="1">' . "\n";
foreach($cfg['AvailableCharsets'] as $key => $temp_charset) {
echo ' <option value="' . $temp_charset . '"';
if ($temp_charset == $charset) {
if ((empty($cfg['Export']['charset']) && $temp_charset == $charset) || $temp_charset == $cfg['Export']['charset']) {
echo ' selected="selected"';
}
echo '>' . $temp_charset . '</option>' . "\n";
} // end while
} // end foreach
echo ' </select>';
} // end if
echo "\n";