trying to fix up old file permissions
This commit is contained in:
+12
-1
@@ -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<br>";
|
||||
@chown("$CFG->dataroot/$file", $CFG->directorypermissions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -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<br>";
|
||||
@chown("$CFG->dataroot/$file", $CFG->directorypermissions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user