From 9fb216e8b6b9661961342cf6eead0a383ee38561 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 12 Aug 2004 04:44:14 +0000 Subject: [PATCH] Fixed some version numbers on three blocks --- blocks/admin/block_admin.php | 2 +- blocks/calendar_month/block_calendar_month.php | 2 +- blocks/course_list/block_course_list.php | 2 +- blocks/course_list/db/mysql.php | 5 +++++ lib/db/mysql.php | 7 +++++++ lib/db/postgres7.php | 6 ++++++ version.php | 2 +- 7 files changed, 22 insertions(+), 4 deletions(-) diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php index da84d258c4d..87a836485cc 100644 --- a/blocks/admin/block_admin.php +++ b/blocks/admin/block_admin.php @@ -5,7 +5,7 @@ class CourseBlock_admin extends MoodleBlock { $this->title = get_string('administration'); $this->content_type = BLOCK_TYPE_LIST; $this->course = $course; - $this->version = 2005052800; + $this->version = 2004081200; } function applicable_formats() { diff --git a/blocks/calendar_month/block_calendar_month.php b/blocks/calendar_month/block_calendar_month.php index e10b4c821f7..46d771563a5 100644 --- a/blocks/calendar_month/block_calendar_month.php +++ b/blocks/calendar_month/block_calendar_month.php @@ -5,7 +5,7 @@ class CourseBlock_calendar_month extends MoodleBlock { $this->title = get_string('calendar', 'calendar'); $this->content_type = BLOCK_TYPE_TEXT; $this->course = $course; - $this->version = 2005052600; + $this->version = 2004081200; } function applicable_formats() { diff --git a/blocks/course_list/block_course_list.php b/blocks/course_list/block_course_list.php index e23acae8352..e9b9054ab9d 100644 --- a/blocks/course_list/block_course_list.php +++ b/blocks/course_list/block_course_list.php @@ -5,7 +5,7 @@ class CourseBlock_course_list extends MoodleBlock { $this->title = get_string('courses'); $this->content_type = BLOCK_TYPE_LIST; $this->course = $course; - $this->version = 2005052600; + $this->version = 2004081200; } function has_config() { diff --git a/blocks/course_list/db/mysql.php b/blocks/course_list/db/mysql.php index f02c929896c..4f8d21387b0 100644 --- a/blocks/course_list/db/mysql.php +++ b/blocks/course_list/db/mysql.php @@ -24,6 +24,11 @@ function course_list_upgrade($oldversion=0) { $result = true; + if ($oldversion == 2005052600) { /// Fix a buggy date + $oldversion = 2004081200; + set_field(); + } + if ($oldversion < 2004041000 and $result) { $result = true; //Nothing to do } diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 281743049d5..7def4d56012 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -801,6 +801,13 @@ function main_upgrade($oldversion=0) { } } + if ($oldversion < 2004081200) { // Fixing version errors in some blocks + set_field('blocks', 'version', 2004081200, 'name', 'admin'); + set_field('blocks', 'version', 2004081200, 'name', 'calendar_month'); + set_field('blocks', 'version', 2004081200, 'name', 'course_list'); + } + + return $result; } diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index f247e660c94..96999eae1b2 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -543,6 +543,12 @@ function main_upgrade($oldversion=0) { } } + if ($oldversion < 2004081200) { // Fixing version errors in some blocks + set_field('blocks', 'version', 2004081200, 'name', 'admin'); + set_field('blocks', 'version', 2004081200, 'name', 'calendar_month'); + set_field('blocks', 'version', 2004081200, 'name', 'course_list'); + } + return $result; diff --git a/version.php b/version.php index bfad387ae88..8659ab660ee 100644 --- a/version.php +++ b/version.php @@ -5,7 +5,7 @@ // database to determine whether upgrades should // be performed (see lib/db/*.php) -$version = 2004080300; // The current version is a date (YYYYMMDDXX) +$version = 2004081200; // The current version is a date (YYYYMMDDXX) $release = "1.4 development"; // User-friendly version number