From 7293a1aafd3915385719fad7e44509ed99e952ff Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Mon, 22 Dec 2014 15:07:59 +0000 Subject: [PATCH] MDL-44260 uplodate: move deprecated functions to deprecatedlib --- lib/deprecatedlib.php | 22 ++++++++++++++++++++++ lib/uploadlib.php | 23 ----------------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 384a969cb00..83f548addcb 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -95,6 +95,28 @@ function clam_replace_infected_file($file) { throw new coding_exception('clam_replace_infected_file() can not be used any more, please use file picker instead'); } +/** + * Deals with an infected file - either moves it to a quarantinedir + * (specified in CFG->quarantinedir) or deletes it. + * + * If moving it fails, it deletes it. + * + * @deprecated since 2.7 + */ +function clam_handle_infected_file($file, $userid=0, $basiconly=false) { + throw new coding_exception('clam_handle_infected_file() can not be used any more, please use file picker instead'); +} + +/** + * If $CFG->runclamonupload is set, we scan a given file. (called from {@link preprocess_files()}) + * + * @deprecated since 2.7 + */ +function clam_scan_moodle_file(&$file, $course) { + throw new coding_exception('clam_scan_moodle_file() can not be used any more, please use file picker instead'); +} + + /** * Checks whether the password compatibility library will work with the current * version of PHP. This cannot be done using PHP version numbers since the fix diff --git a/lib/uploadlib.php b/lib/uploadlib.php index 314ebc9903e..4d746097f33 100644 --- a/lib/uploadlib.php +++ b/lib/uploadlib.php @@ -56,29 +56,6 @@ FOR EXAMPLE CLAM_HANDLE_INFECTED_FILE AND CLAM_REPLACE_INFECTED_FILE USED FROM C UPLOAD_PRINT_FORM_FRAGMENT DOESN'T REALLY BELONG IN THE CLASS BUT CERTAINLY IN THIS FILE ***************************************************************************************/ -/** - * Deals with an infected file - either moves it to a quarantinedir - * (specified in CFG->quarantinedir) or deletes it. - * - * If moving it fails, it deletes it. - * - * @deprecated since 2.7 - to be removed together with the upload_manager above - * - */ -function clam_handle_infected_file($file, $userid=0, $basiconly=false) { - throw new coding_exception('clam_handle_infected_file() can not be used any more, please use file picker instead'); -} - -/** - * If $CFG->runclamonupload is set, we scan a given file. (called from {@link preprocess_files()}) - * - * @deprecated since 2.7 - to be removed together with the upload_manager above - * - */ -function clam_scan_moodle_file(&$file, $course) { - throw new coding_exception('clam_scan_moodle_file() can not be used any more, please use file picker instead'); -} - /** * Emails admins about a clam outcome * -- 2.43.0