From c19977a6f50124da97a8da0b667e84efc027bf03 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 11 Oct 2007 14:16:32 +0000 Subject: [PATCH] MDL-8605 Minor typos and version.php fix --- lib/db/upgrade.php | 13 ++++++++----- user/editlib.php | 2 +- version.php | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 6696053e39c..e23252c644a 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -698,16 +698,19 @@ function xmldb_main_upgrade($oldversion=0) { } return $result; - -} - if ($result && $oldversion < 2007101101) { + if ($result && $oldversion < 2007021531) { // Get list of users by browsing moodledata/user $oldusersdir = $CFG->dataroot . '/users'; $folders = get_directory_list($oldusersdir, '', false, true, false); foreach ($folders as $userid) { $olddir = $oldusersdir . '/' . $userid; + $files = get_directory_list($olddir); + + if (empty($files)) { + continue; + } // Create new user directory if (!$newdir = make_user_directory($userid)) { @@ -717,7 +720,6 @@ function xmldb_main_upgrade($oldversion=0) { // Move contents of old directory to new one if (file_exists($olddir) && file_exists($newdir)) { - $files = get_directory_list($olddir); foreach ($files as $file) { copy($olddir . '/' . $file, $newdir . '/' . $file); } @@ -743,6 +745,7 @@ function xmldb_main_upgrade($oldversion=0) { } - return $result; + return $result; +} ?> diff --git a/user/editlib.php b/user/editlib.php index a0666dc104d..ddc83971679 100644 --- a/user/editlib.php +++ b/user/editlib.php @@ -249,4 +249,4 @@ function useredit_shared_definition(&$mform) { $mform->setType('address', PARAM_MULTILANG); } -?> \ No newline at end of file +?> diff --git a/version.php b/version.php index b9504183e7b..06402086e91 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2007021530; // YYYYMMDD = date of the 1.8 branch (don't change) + $version = 2007021531; // YYYYMMDD = date of the 1.8 branch (don't change) // X = release number 1.8.[0,1,2,3...] // Y = micro-increments between releases