From 4ae7df39ee11b2d28b0c15582df2f9548f09e742 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 31 Dec 2007 15:08:08 +0000 Subject: [PATCH] Moving from old "timezones" location to the new "timezone" one. MDL-12024 ; merged from 19_STABLE --- admin/timezoneimport.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/admin/timezoneimport.php b/admin/timezoneimport.php index b38ecdbbed..8506ad2b7c 100644 --- a/admin/timezoneimport.php +++ b/admin/timezoneimport.php @@ -23,9 +23,9 @@ if (!$ok or !confirm_sesskey()) { $message = '

'; $message .= $CFG->dataroot.'/temp/olson.txt
'; - $message .= $CFG->dataroot.'/temp/timezones.txt
'; - $message .= 'http://download.moodle.org/timezones/
'; - $message .= ''.$CFG->dirroot.'/lib/timezones.txt
'; + $message .= $CFG->dataroot.'/temp/timezone.txt
'; + $message .= 'http://download.moodle.org/timezone/
'; + $message .= ''.$CFG->dirroot.'/lib/timezone.txt
'; $message .= '
'; $message = get_string("configintrotimezones", 'admin', $message); @@ -53,7 +53,7 @@ /// Next, look for a CSV file locally - $source = $CFG->dataroot.'/temp/timezones.txt'; + $source = $CFG->dataroot.'/temp/timezone.txt'; if (!$importdone and is_readable($source)) { if ($timezones = get_records_csv($source, 'timezone')) { update_timezone_records($timezones); @@ -62,22 +62,22 @@ } /// Otherwise, let's try moodle.org's copy - $source = 'http://download.moodle.org/timezones/'; + $source = 'http://download.moodle.org/timezone/'; if (!$importdone && ($content=download_file_content($source))) { - if ($file = fopen($CFG->dataroot.'/temp/timezones.txt', 'w')) { // Make local copy + if ($file = fopen($CFG->dataroot.'/temp/timezone.txt', 'w')) { // Make local copy fwrite($file, $content); fclose($file); - if ($timezones = get_records_csv($CFG->dataroot.'/temp/timezones.txt', 'timezone')) { // Parse it + if ($timezones = get_records_csv($CFG->dataroot.'/temp/timezone.txt', 'timezone')) { // Parse it update_timezone_records($timezones); $importdone = $source; } - unlink($CFG->dataroot.'/temp/timezones.txt'); + unlink($CFG->dataroot.'/temp/timezone.txt'); } } /// Final resort, use the copy included in Moodle - $source = $CFG->dirroot.'/lib/timezones.txt'; + $source = $CFG->dirroot.'/lib/timezone.txt'; if (!$importdone and is_readable($source)) { // Distribution file if ($timezones = get_records_csv($source, 'timezone')) { update_timezone_records($timezones); -- 2.39.5