From: skodak <skodak>
Date: Fri, 3 Jul 2009 13:40:37 +0000 (+0000)
Subject: MDL-14589 improved _pluginfile function - added forcedownload param and fixed docs
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=86900a93bb852195277d12e30da776c599f764dc;p=moodle.git

MDL-14589 improved _pluginfile function - added forcedownload param and fixed docs
---

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;