Update of /cvsroot/mantisbt/mantisbt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16534
Modified Files:
config_defaults_inc.php csv_export.php
Log Message:
4872: CSV export uses , as separator but excel only recognizes ; in non-english
locales (thanks to Thiebaut)
Added a configuration variable to allow confguring the separator to be used in
exported csv files.
Index: csv_export.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/csv_export.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- csv_export.php 8 Jul 2004 03:50:15 -0000 1.21
+++ csv_export.php 19 Nov 2004 12:54:13 -0000 1.22
@@ -58,16 +58,16 @@
$t_header = implode( $t_sep, $t_titles ) . $t_nl;
- # Fixed for a problem in Excel where it prompts error message "SYLK:
File Format Is Not Valid"
- # See Microsoft Knowledge Base Article - 323626
+ # Fixed for a problem in Excel where it prompts error message "SYLK:
File Format Is Not Valid"
+ # See Microsoft Knowledge Base Article - 323626
#
http://support.microsoft.com/default.aspx?scid=kb;en-us;323626&Product=xlw
- $t_first_two_chars = substr( $t_header, 0, 2 );
- if ( strcmp( $t_first_two_chars, 'ID' ) == 0 ) {
- $t_header = str_replace( 'ID,', 'Id,', $t_header );
+ $t_first_three_chars = substr( $t_header, 0, 3 );
+ if ( strcmp( $t_first_three_chars, 'ID' . $t_sep ) == 0 ) {
+ $t_header = str_replace( 'ID' . $t_sep, 'Id' . $t_sep,
$t_header );
}
# end of fix
- echo $t_header;
+ echo $t_header;
# export the rows
foreach ( $rows as $row ) {
@@ -85,4 +85,4 @@
echo implode( $t_sep, $t_values ) . $t_nl;
}
-?>
+?>
\ No newline at end of file
Index: config_defaults_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -d -r1.222 -r1.223
--- config_defaults_inc.php 16 Nov 2004 20:47:05 -0000 1.222
+++ config_defaults_inc.php 19 Nov 2004 12:54:13 -0000 1.223
@@ -1040,6 +1040,10 @@
# the manage users page takes a long time.
$g_default_manage_user_prefix = 'ALL';
+ # --- CSV Export ---------------
+ # Set the csv separator
+ $g_csv_separator = ',';
+
################################
# Mantis Look and Feel Variables
################################
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
|