Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 96... Línea 96...
96
                throw new moodle_exception('nofile');
96
                throw new moodle_exception('nofile');
97
        }
97
        }
98
    }
98
    }
Línea 99... Línea 99...
99
 
99
 
-
 
100
    // Scan for viruses.
100
    // Scan for viruses.
101
    $avscanstarttime = microtime(true);
Línea 101... Línea 102...
101
    \core\antivirus\manager::scan_file($_FILES[$fieldname]['tmp_name'], $_FILES[$fieldname]['name'], true);
102
    \core\antivirus\manager::scan_file($_FILES[$fieldname]['tmp_name'], $_FILES[$fieldname]['name'], true);
-
 
103
 
102
 
104
    $file = new stdClass();
103
    $file = new stdClass();
105
    $file->avscantime = microtime(true) - $avscanstarttime;
104
    $file->filename = clean_param($_FILES[$fieldname]['name'], PARAM_FILE);
106
    $file->filename = clean_param($_FILES[$fieldname]['name'], PARAM_FILE);
105
    // Check system maxbytes setting.
107
    // Check system maxbytes setting.
106
    if (($_FILES[$fieldname]['size'] > get_max_upload_file_size($CFG->maxbytes))) {
108
    if (($_FILES[$fieldname]['size'] > get_max_upload_file_size($CFG->maxbytes))) {
Línea 171... Línea 173...
171
                        'itemid' => $filerecord->itemid,
173
                        'itemid' => $filerecord->itemid,
172
                        'filename' => $filerecord->filename,
174
                        'filename' => $filerecord->filename,
173
                        'filesize' => $filerecord->filesize,
175
                        'filesize' => $filerecord->filesize,
174
                        'filepath' => $filerecord->filepath,
176
                        'filepath' => $filerecord->filepath,
175
                        'contenthash' => $storedfile->get_contenthash(),
177
                        'contenthash' => $storedfile->get_contenthash(),
-
 
178
                        'avscantime' => $file->avscantime,
176
                ],
179
                ],
177
        ]);
180
        ]);
178
        $logevent->trigger();
181
        $logevent->trigger();
179
    }
182
    }
180
}
183
}