]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed some version numbers on three blocks
authormoodler <moodler>
Thu, 12 Aug 2004 04:44:14 +0000 (04:44 +0000)
committermoodler <moodler>
Thu, 12 Aug 2004 04:44:14 +0000 (04:44 +0000)
blocks/admin/block_admin.php
blocks/calendar_month/block_calendar_month.php
blocks/course_list/block_course_list.php
blocks/course_list/db/mysql.php
lib/db/mysql.php
lib/db/postgres7.php
version.php

index da84d258c4db678790943682d6666625bd0b1444..87a836485ccfff1d0afb92b5cfec9741cf1f59c9 100644 (file)
@@ -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() {
index e10b4c821f7b513aad6d88cfdc41b65cbea18860..46d771563a5e58a5c3a69e84f1cca493573b8003 100644 (file)
@@ -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() {
index e23acae83529a220407aa7109a66588b323b2a3c..e9b9054ab9d477a7bb6ca041b2452642a46b6489 100644 (file)
@@ -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() {
index f02c929896c7d2066c0ed0506f9f5e394907e38b..4f8d21387b09c161236f322b8ac7661f3144fdf4 100644 (file)
@@ -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
     }
index 281743049d5e9686c1c5822c6f8238888b86674c..7def4d560125dd6f4d5ccffb715e71e046f48aed 100644 (file)
@@ -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;
 
 }
index f247e660c94029910fa1787bc74e0273f8a52e1d..96999eae1b2b6be2dd8bd1965a1cc2032fe6218c 100644 (file)
@@ -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;
 
index bfad387ae88fa0c46e26f7e4625b7e84dfbd53bf..8659ab660ee11ab2f1c1408ba074ccf70351df4c 100644 (file)
@@ -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