Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
1663bab7
Commit
1663bab7
authored
Jan 29, 2007
by
Nigel McNie
Committed by
Nigel McNie
Jan 29, 2007
Browse files
Moved serve_file to lib/file.php
parent
212fcc54
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/mahara.php
View file @
1663bab7
...
@@ -1348,18 +1348,4 @@ function get_dir_contents($directory) {
...
@@ -1348,18 +1348,4 @@ function get_dir_contents($directory) {
return
$contents
;
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
);
}
?>
?>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment