]> git.mjollnir.org Git - moodle.git/commitdiff
Added a new $release variable that shows the user-friendly version number
authormartin <martin>
Fri, 6 Sep 2002 14:06:48 +0000 (14:06 +0000)
committermartin <martin>
Fri, 6 Sep 2002 14:06:48 +0000 (14:06 +0000)
admin/index.php
lib/moodlelib.php
version.php

index 577dc5d1a2446570817515843cf7012e991dfe5d..2f7b3320d546fce0276325102ee136214ce85191 100644 (file)
@@ -80,7 +80,7 @@
         $strdatabaseupgrades = get_string("databaseupgrades");
         print_header($strdatabaseupgrades, $strdatabaseupgrades, $strdatabaseupgrades);
         if (insert_record("config", $dversion)) {
-            notify("You are currently using Moodle version $version");
+            notify("You are currently using Moodle version $release ($version)");
             print_continue("index.php");
             die;
         } else {
         }
     }
 
+    // Updated human-readable release version if necessary
+
+    if ($drelease = get_field("config", "value", "name", "release")) { 
+        if ($release <> $drelease) {  // Update the release version
+            set_field("config", "value", "$release", "name", "release");
+        }
+    } else {
+        $drelease->name  = "release";
+        $drelease->value = $release;
+        insert_record("config", $drelease);
+    }
+
 
     // Find and check all modules and load them up or upgrade them if necessary
 
index b132be0da15cab0a8ac01906dbcbc645a6184bde..41f61c8823e885dc0b680fb21c77df6b3b91c36d 100644 (file)
@@ -53,9 +53,12 @@ function print_footer ($course=NULL) {
     if ($course) {
         if ($course == "home") {   // special case for site home page - please do not remove
             if (!$dversion = get_field("config", "value", "name", "version")) {
-                $dversion = "unknown!";
+                $dversion = "xxx";
             }
-            $homelink  = "<P ALIGN=center><A TITLE=\"Version $dversion: Click to visit moodle.com\" HREF=\"http://moodle.com/\">";
+            if (!$drelease = get_field("config", "value", "name", "release")) {
+                $drelease = "xxx";
+            }
+            $homelink  = "<P ALIGN=center><A TITLE=\"Moodle $drelease ($dversion)\" HREF=\"http://moodle.com/\">";
             $homelink .= "<BR><IMG WIDTH=130 HEIGHT=19 SRC=\"pix/madewithmoodle2.gif\" BORDER=0></A></P>";
         } else {
             $homelink = "<A TARGET=_top HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>";
index db1c303ae73b315ec51b05b5d768de7b7ebcc654..7899f9ea768fe51ce4bc6a6055f21cba096be203 100644 (file)
@@ -9,7 +9,8 @@
 // Moodle installed, which can be compared against
 // a previous version (see the "config" table).
 //
-// To do this, visit the "admin" page.
+// To do this, visit the "admin" page or the site
+// home page while logged in as an admin.
 //
 // The upgrade function in this file will attempt
 // to perform all the necessary actions to upgrade
 // If there's something it cannot do itself, it 
 // will tell you what you need to do.
 
-$version = 2002090501;
+$version = 2002090501;   // The current version is a date (YYYYMMDDXX) where 
+                         //    XX is a number that increments during the day
+
+$release = "1.0.3.1";    // For humans only, not used for the upgrade process
 
 function upgrade_moodle($oldversion=0) {