mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-36754 core_files: Add a token version of pluginfile
This commit is contained in:
parent
6e445671c1
commit
4a74ab0200
5 changed files with 150 additions and 5 deletions
|
@ -25,12 +25,16 @@
|
|||
*/
|
||||
|
||||
// Disable moodle specific debug messages and any errors in output.
|
||||
define('NO_DEBUG_DISPLAY', true);
|
||||
if (!defined('NO_DEBUG_DISPLAY')) {
|
||||
define('NO_DEBUG_DISPLAY', true);
|
||||
}
|
||||
|
||||
require_once('config.php');
|
||||
require_once('lib/filelib.php');
|
||||
|
||||
$relativepath = get_file_argument();
|
||||
if (empty($relativepath)) {
|
||||
$relativepath = get_file_argument();
|
||||
}
|
||||
$forcedownload = optional_param('forcedownload', 0, PARAM_BOOL);
|
||||
$preview = optional_param('preview', null, PARAM_ALPHANUM);
|
||||
// Offline means download the file from the repository and serve it, even if it was an external link.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue