Split line into two separated commands to allow people with

chmod disabled to run backup/restore code. Credits go to
Grigory Rubtsov. Bug 4299.
(http://moodle.org/bugs/bug.php?op=show&bugid=4299)

Merged from MOODLE_15_STABLE
This commit is contained in:
stronk7 2005-11-08 19:33:21 +00:00
parent c999ea82e0
commit 9704c86631

View File

@ -1,4 +1,4 @@
<?PHP //$Id$
<?php //$Id$
//This file contains all the general function needed (file manipulation...)
//not directly part of the backup/restore utility
@ -289,7 +289,8 @@
//$perms=fileperms($from_file);
//return copy($from_file,$to_file) && chmod($to_file,$perms);
umask(0000);
if (copy($from_file,$to_file) && chmod($to_file,$CFG->directorypermissions)) {
if (copy($from_file,$to_file)) {
chmod($to_file,$CFG->directorypermissions);
if (!empty($log_clam)) {
clam_log_upload($to_file,null,true);
}