Improvements to timezone import interface

This commit is contained in:
moodler 2005-04-10 09:31:58 +00:00
parent c9e55a2583
commit a1e93da26c
5 changed files with 113 additions and 168 deletions

View file

@ -208,7 +208,7 @@ function get_records_csv($file, $table) {
function put_records_csv($file, $records, $table = NULL) {
global $CFG, $db;
if(empty($records)) {
if (empty($records)) {
return true;
}
@ -217,6 +217,8 @@ function put_records_csv($file, $records, $table = NULL) {
return false;
}
echo "x";
if(!($fp = @fopen($CFG->dataroot.'/temp/'.$file, 'w'))) {
error('put_records_csv failed to open '.$file);
}
@ -231,6 +233,7 @@ function put_records_csv($file, $records, $table = NULL) {
else {
return false;
}
echo "x";
if(!empty($metacolumns)) {
$fields_table = array_map(create_function('$a', 'return $a->name;'), $metacolumns);