MDL-35238 Inform the admin if the update can not be deployed due to write permissions

This commit is contained in:
David Mudrák
2012-11-09 00:20:18 +01:00
parent d80f80f386
commit 0daa642894
4 changed files with 97 additions and 14 deletions
+6 -1
View File
@@ -1048,6 +1048,10 @@ class worker extends singleton_pattern {
*/
protected function move_directory_source_precheck($source) {
if (!is_writable($source)) {
return false;
}
if (is_dir($source)) {
$handle = opendir($source);
} else {
@@ -1072,7 +1076,8 @@ class worker extends singleton_pattern {
}
closedir($handle);
return $result && is_writable($source);
return $result;
}
/**