MDL-19718 fixed critical race condition when deleting posts - credit goes to Ashley Holman; backported from MOODLE_19_STABLE

This commit is contained in:
skodak
2009-09-27 09:50:11 +00:00
parent a4f0dd0725
commit 1f52eab1c2
+6 -1
View File
@@ -2320,7 +2320,12 @@ function forum_file_area_name($post) {
}
function forum_file_area($post) {
return make_upload_directory( forum_file_area_name($post) );
$path = forum_file_area_name($post);
if ($path) {
return make_upload_directory($path);
} else {
return false;
}
}
function forum_delete_old_attachments($post, $exception="") {