MDL-14589 improved _pluginfile function - added forcedownload param and fixed docs
This commit is contained in:
+4
-5
@@ -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
@@ -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) {
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user