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

This commit is contained in:
skodak
2009-07-03 13:40:37 +00:00
parent 98edf7b647
commit 86900a93bb
4 changed files with 9 additions and 9 deletions
+4 -5
View File
@@ -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) {
+3 -2
View File
@@ -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) {
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;