New functions get_list_of_modules() and moodle_needs_upgrading().

Used on the home page when admin is logged in, to check for any
upgrading of the databases that might need to be done.
This commit is contained in:
martin
2002-08-09 02:45:15 +00:00
parent 01cfc1a02a
commit 53bfe78cd4
4 changed files with 60 additions and 13 deletions
+6 -9
View File
@@ -76,20 +76,17 @@
// Find and check all modules and load them up or upgrade them if necessary
$dir = opendir("$CFG->dirroot/mod");
while ($mod = readdir($dir)) {
if ($mod == "." || $mod == ".." || $mod == "CVS") {
continue;
}
if (!$mods = get_list_of_modules() ) {
error("No modules installed!");
}
foreach ($mods as $mod) {
$fullmod = "$CFG->dirroot/mod/$mod";
if (filetype($fullmod) != "dir") {
continue;
}
unset($module);
include_once("$CFG->dirroot/mod/$mod/version.php"); # defines $module with version etc
include_once("$fullmod/version.php"); # defines $module with version etc
if (!isset($module)) {
continue;