From 86900a93bb852195277d12e30da776c599f764dc Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 3 Jul 2009 13:40:37 +0000 Subject: [PATCH] MDL-14589 improved _pluginfile function - added forcedownload param and fixed docs --- mod/data/lib.php | 9 ++++----- mod/forum/lib.php | 5 +++-- mod/glossary/lib.php | 2 +- mod/scorm/lib.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mod/data/lib.php b/mod/data/lib.php index fd56087129..b787c1dcfc 100755 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -2821,16 +2821,15 @@ function data_get_file_areas($course, $cm, $context) { /** * Serves the data attachments. Implements needed access control ;-) * - * @global object - * @global object * @param object $course * @param object $cminfo * @param object $context - * @param string filearea + * @param string $filearea * @param array $args - * @return bool + * @param bool $forcedownload + * @return bool false if file not found, does not return if found - justsend the file */ -function data_pluginfile($course, $cminfo, $context, $filearea, $args) { +function data_pluginfile($course, $cminfo, $context, $filearea, $args, $forcedownload) { global $CFG, $DB; if (!$cminfo->uservisible) { diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 08498674ab..0d5ae62a7c 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -4365,9 +4365,10 @@ function forum_get_file_areas($course, $cm, $context) { * @param object $context * @param string $filearea * @param array $args - * @return bool + * @param bool $forcedownload + * @return bool false if file not found, does not return if found - justsend the file */ -function forum_pluginfile($course, $cminfo, $context, $filearea, $args) { +function forum_pluginfile($course, $cminfo, $context, $filearea, $args, $forcedownload) { global $CFG, $DB; if (!$cminfo->uservisible) { diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index e369ec6f9e..a7ce4064d7 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -1311,7 +1311,7 @@ function glossary_get_file_areas($course, $cm, $context) { * @param string $filearea * @param array $args * @param bool $forcedownload - * @return bool falso if file not found, does not return if found - just send the file + * @return bool false if file not found, does not return if found - justsend the file */ function glossary_pluginfile($course, $cminfo, $context, $filearea, $args, $forcedownload) { global $CFG, $DB; diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php index e4c86f9650..22eb8b1ad3 100755 --- a/mod/scorm/lib.php +++ b/mod/scorm/lib.php @@ -853,7 +853,7 @@ function scorm_get_file_info($browser, $areas, $course, $cm, $context, $filearea * @param string $filearea * @param array $args * @param bool $forcedownload - * @return bool falso if file not found, does not return if found - justsend the file + * @return bool false if file not found, does not return if found - just send the file */ function scorm_pluginfile($course, $cminfo, $context, $filearea, $args, $forcedownload) { global $CFG; -- 2.39.5