mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-41634 - URL Download Repository doesn't warn when asked to download non-image files
This commit is contained in:
parent
b69ec2889e
commit
9b3d60fc47
@ -30,3 +30,4 @@ $string['url'] = 'URL';
|
||||
$string['url:view'] = 'Use URL downloader in file picker';
|
||||
$string['validname'] = 'You must provide a valid file name';
|
||||
$string['configplugin'] = 'URL repository type configuration';
|
||||
$string['validfiletype'] = 'You must provide a URL to an image file or a page containing images.';
|
||||
|
@ -168,6 +168,8 @@ EOD;
|
||||
} else if (strstr($info['content_type'], 'image/')) {
|
||||
// download this file
|
||||
$this->add_image_to_list($info['url'], $info['url'], $list);
|
||||
} else {
|
||||
$list['error'] = get_string('validfiletype', 'repository_url');
|
||||
}
|
||||
|
||||
// parse all found css styles
|
||||
|
Loading…
x
Reference in New Issue
Block a user