Commit 1663bab7 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Moved serve_file to lib/file.php

parent 212fcc54
......@@ -1348,18 +1348,4 @@ function get_dir_contents($directory) {
return $contents;
}
function serve_file($file, $filename) {
if (!file_exists($file)) {
header('HTTP/1.0 404 Not Found');
exit;
}
// Moodle security stuff went here...
require_once('file.php');
session_write_close(); // unlock session during fileserving
send_file($file, $filename);
}
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment