MDL-32683 use slashargument urls for theme images
This commit is contained in:
@@ -33,14 +33,15 @@ M.str = M.str || {};
|
||||
* @return {String}
|
||||
*/
|
||||
M.util.image_url = function(imagename, component) {
|
||||
var url = M.cfg.wwwroot + '/theme/image.php?theme=' + M.cfg.theme + '&image=' + imagename;
|
||||
|
||||
if (M.cfg.themerev > 0) {
|
||||
url = url + '&rev=' + M.cfg.themerev;
|
||||
if (component == '' || component == 'moodle' || component == 'core') {
|
||||
component = 'core';
|
||||
}
|
||||
|
||||
if (component && component != '' && component != 'moodle' && component != 'core') {
|
||||
url = url + '&component=' + component;
|
||||
if (M.cfg.themerev > 0 && M.cfg.slasharguments == 1) {
|
||||
var url = M.cfg.wwwroot + '/theme/image.php/' + M.cfg.theme + '/' + component + '/' + M.cfg.themerev + '/' + imagename;
|
||||
} else {
|
||||
var url = M.cfg.wwwroot + '/theme/image.php?theme=' + M.cfg.theme + '&component=' + component + '&rev=' + M.cfg.themerev + '&image=' + imagename;
|
||||
}
|
||||
|
||||
return url;
|
||||
|
||||
Reference in New Issue
Block a user