~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to lib/uploadlib.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
            $course = $SITE;
95
95
        }
96
96
 
 
97
        $this->config = new stdClass();
97
98
        $this->config->deleteothers = $deleteothers;
98
99
        $this->config->handlecollisions = $handlecollisions;
99
100
        $this->config->recoverifmultiple = $recoverifmultiple;
582
583
 * @return boolean
583
584
 */
584
585
function clam_replace_infected_file($file) {
 
586
    global $CFG;
 
587
 
585
588
    $newcontents = get_string('virusplaceholder');
586
589
    if (!$f = fopen($file, 'w')) {
587
590
        return false;
589
592
    if (!fwrite($f, $newcontents)) {
590
593
        return false;
591
594
    }
 
595
    @chmod($file, $CFG->filepermissions);
592
596
    return true;
593
597
}
594
598