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
74a41e4e
Commit
74a41e4e
authored
Jul 11, 2016
by
Robert Lyon
Committed by
Gerrit Code Review
Jul 11, 2016
Browse files
Merge "Bug 1234615: Check that resized image files are viewable by user"
parents
c2460f76
aa31ba59
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/export/html/lib.php
View file @
74a41e4e
...
...
@@ -934,6 +934,7 @@ class HtmlExportOutputFilter {
* will be placed
*/
private
function
get_export_path_for_file
(
ArtefactTypeFileBase
$file
,
array
$options
,
$basefolder
=
null
)
{
global
$SESSION
;
if
(
is_null
(
$basefolder
))
{
if
(
$file
->
get
(
'owner'
)
==
$this
->
owner
)
{
$basefolder
=
'/files/file/'
.
$this
->
get_folder_path_for_file
(
$file
);
...
...
@@ -944,9 +945,12 @@ class HtmlExportOutputFilter {
}
unset
(
$options
[
'view'
]);
if
(
!
$this
->
exporter
->
get
(
'user'
)
->
can_view_artefact
(
$file
))
{
$SESSION
->
add_info_msg
(
get_string
(
'unabletocopyartefact'
,
'export'
,
$file
->
get
(
'title'
)));
return
''
;
}
$prefix
=
''
;
$title
=
PluginExportHtml
::
sanitise_path
(
$file
->
get
(
'title'
));
if
(
$options
)
{
list
(
$size
,
$prefix
)
=
$this
->
get_size_from_options
(
$options
);
$from
=
$file
->
get_path
(
$size
);
...
...
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