Commit df93c85d authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1234615: Check that resized image files are viewable by user" into 15.04_STABLE

parents cdeb29ac 32b65c72
......@@ -888,6 +888,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);
......@@ -898,9 +899,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);
......
Markdown is supported
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