logo       

mantisbt config_defaults_inc.php,1.222,1.223 csv_export.php,1.21,1.22: msg#00025

Subject: mantisbt config_defaults_inc.php,1.222,1.223 csv_export.php,1.21,1.22
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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe