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
a824c9eb
Commit
a824c9eb
authored
Feb 09, 2015
by
Robert Lyon
Committed by
Gerrit Code Review
Feb 09, 2015
Browse files
Merge "Display cleaned content of XML file. Bug 1404117"
parents
e5a0f676
3cf59153
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/file.php
View file @
a824c9eb
...
...
@@ -55,7 +55,11 @@ function serve_file($path, $filename, $mimetype, $options=array()) {
$lastmodified
=
filemtime
(
$path
);
$filesize
=
filesize
(
$path
);
if
(
$mimetype
==
'text/html'
||
$mimetype
==
'text/xml'
||
$mimetype
==
'application/xhtml+xml'
||
$mimetype
==
'image/svg+xml'
)
{
if
(
$mimetype
==
'text/html'
||
$mimetype
==
'text/xml'
||
$mimetype
==
'application/xml'
||
$mimetype
==
'application/xhtml+xml'
||
$mimetype
==
'image/svg+xml'
)
{
if
(
isset
(
$options
[
'downloadurl'
])
&&
$filesize
<
1024
*
1024
)
{
display_cleaned_html
(
file_get_contents
(
$path
),
$filename
,
$options
);
exit
;
...
...
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