Skip to content
Browse files

Added a new $release variable that shows the user-friendly version nu…

…mber
  • Loading branch information...
1 parent 7c6addd commit c646b70d660f2bd58457361099a19774b6d81355 martin committed Sep 6, 2002
Showing with 24 additions and 5 deletions.
  1. +13 −1 admin/index.php
  2. +5 −2 lib/moodlelib.php
  3. +6 −2 version.php
View
14 admin/index.php
@@ -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 {
@@ -94,6 +94,18 @@
}
}
+ // 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
View
7 lib/moodlelib.php
@@ -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>";
View
8 version.php
@@ -9,15 +9,19 @@
// 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
// your older databases to the current version.
// 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) {

0 comments on commit c646b70

Please sign in to comment.
Something went wrong with that request. Please try again.