diff --git a/lib/db/mysql.php b/lib/db/mysql.php
index 6bf079213aa..5e82e17671e 100644
--- a/lib/db/mysql.php
+++ b/lib/db/mysql.php
@@ -252,7 +252,8 @@ function main_upgrade($oldversion=0) {
}
if ($oldversion < 2003012200) {
- execute_sql(" ALTER TABLE `log_display` CHANGE `module` `module` VARCHAR( 20 ) NOT NULL ");
+ // execute_sql(" ALTER TABLE `log_display` CHANGE `module` `module` VARCHAR( 20 ) NOT NULL ");
+ // Commented out - see below where it's done properly
}
if ($oldversion < 2003032500) {
@@ -275,6 +276,16 @@ function main_upgrade($oldversion=0) {
table_column("course_modules", "", "visible", "integer", "1", "unsigned", "1", "not null", "score");
}
+ if ($oldversion < 2003042104) { // Try to update permissions of all files
+ if ($files = get_directory_list($CFG->dataroot)) {
+ echo "Attempting to update permissions for all files... ignore any errors.";
+ foreach ($files as $file) {
+ echo "$CFG->dataroot/$file
";
+ @chown("$CFG->dataroot/$file", $CFG->directorypermissions);
+ }
+ }
+ }
+
return true;
}
diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php
index b1d74d63c96..9538f881dff 100644
--- a/lib/db/postgres7.php
+++ b/lib/db/postgres7.php
@@ -50,6 +50,17 @@ function main_upgrade($oldversion=0) {
if ($oldversion < 2003041400) {
table_column("course_modules", "", "visible", "integer", "1", "unsigned", "1", "not null", "score");
}
+
+ if ($oldversion < 2003042104) { // Try to update permissions of all files
+ if ($files = get_directory_list($CFG->dataroot)) {
+ echo "Attempting to update permissions for all files... ignore any errors.";
+ foreach ($files as $file) {
+ echo "$CFG->dataroot/$file
";
+ @chown("$CFG->dataroot/$file", $CFG->directorypermissions);
+ }
+ }
+ }
+
return true;
}
diff --git a/version.php b/version.php
index 428cef39dc7..efb6c3ff655 100644
--- a/version.php
+++ b/version.php
@@ -5,7 +5,7 @@
// database to determine whether upgrades should
// be performed (see lib/db/*.php)
-$version = 2003042100; // The current version is a date (YYYYMMDDXX)
+$version = 2003042104; // The current version is a date (YYYYMMDDXX)
-$release = "1.0.9 - development"; // User-friendly version number
+$release = "1.0.9 development"; // User-friendly version number