fix: [UI] Base url for OrgImgHelper

pull/6423/head
Jakub Onderka 2020-10-11 15:50:14 +02:00
parent 81bc9d6b00
commit f6d651c115
1 changed files with 6 additions and 5 deletions

View File

@ -15,11 +15,12 @@ App::uses('AppHelper', 'View/Helper');
break;
}
}
$baseurl = $this->_View->viewVars['baseurl'];
if (!empty($imgOptions)) {
foreach ($imgOptions as $field => $imgOption) {
$result = sprintf(
'<img src="%s/img/orgs/%s" title="%s" width="%s" height="%s">',
$this->baseurl,
$baseurl,
$imgOption,
isset($options['name']) ? h($options['name']) : h($options['id']),
(int)$size,
@ -29,8 +30,8 @@ App::uses('AppHelper', 'View/Helper');
if (!$raw) {
$result = sprintf(
'<a href="%s/organisations/view/%s">%s</a>',
$this->baseurl,
(empty($options['id']) ? h($options['name']) : h($options['id'])),
$baseurl,
empty($options['id']) ? h($options['name']) : h($options['id']),
$result
);
}
@ -45,8 +46,8 @@ App::uses('AppHelper', 'View/Helper');
} else {
$result = sprintf(
'<a href="%s/organisations/view/%s"><span class="welcome">%s</span></a>',
$this->baseurl,
(empty($options['id']) ? h($options['name']) : h($options['id'])),
$baseurl,
empty($options['id']) ? h($options['name']) : h($options['id']),
h($options['name'])
);
}