From c0fe3453ef4029ea9e1c141ded7634896eeafe5e Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 22 Aug 2006 20:10:54 +0000 Subject: [PATCH] Change rule to tzrule (reserved word) --- lib/olson.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/olson.php b/lib/olson.php index 4c2ac6ae15..ac83492363 100644 --- a/lib/olson.php +++ b/lib/olson.php @@ -168,6 +168,16 @@ if(isset($mdl_tz['dst_time']) && !strpos($mdl_tz['dst_time'], ':') || isset($mdl } */ +/// Since Moodle 1.7, rule is tzrule in DB (reserved words problem), so change it here +/// after everything is calculated to be properly loaded to the timezone table. +/// Pre 1.7 users won't have the old rule if updating this from moodle.org but it +/// seems that such field isn't used at all by the rest of Moodle (at least I haven't +/// found any use when looking for it). + + foreach($mdl_zones as $key=>$mdl_zone) { + $mdl_zones[$key]['tzrule'] = $mdl_zones[$key]['rule']; + } + return $mdl_zones; } -- 2.39.5