Index: csvlib.class.php =================================================================== RCS file: /cvsroot/moodle/moodle/lib/csvlib.class.php,v retrieving revision 1.1.2.2 diff -u -r1.1.2.2 csvlib.class.php --- lib/csvlib.class.php 5 Nov 2007 00:49:29 -0000 1.1.2.2 +++ lib/csvlib.class.php 31 May 2008 17:27:31 -0000 @@ -205,7 +205,13 @@ * @return array suitable for selection box */ function get_delimiter_list() { - $delimiters = array('comma'=>',', 'semicolon'=>';', 'colon'=>':', 'tab'=>'\\t'); + $delimiters = array( + 'comma' => ',', + 'semicolon' => ';', + 'colon' => ':', + 'pipe' => '|', + 'tab' => '\\t' + ); if (isset($CFG->CSV_DELIMITER) and strlen($CFG->CSV_DELIMITER) === 1 and !in_array($CFG->CSV_DELIMITER, $delimiters)) { $delimiters['cfg'] = $CFG->CSV_DELIMITER; } @@ -222,6 +228,7 @@ switch ($delimiter_name) { case 'colon': return ':'; case 'semicolon': return ';'; + case 'pipe': return '|'; case 'tab': return "\t"; case 'cfg': if (isset($CFG->CSV_DELIMITER)) { return $CFG->CSV_DELIMITER; } // no break; fall back to comma case 'comma': return ',';