fix svg not used for pixelegg, if a non-existing theme is in the preferenes

This commit is contained in:
Ralf Becker 2019-03-06 09:12:24 +01:00
parent deef5d52fa
commit 8eb7ca2996

View File

@ -987,7 +987,10 @@ abstract class Framework extends Framework\Extra
self::includeJS('/api/images.php', array(
'template' => $GLOBALS['egw_info']['server']['template_set'],
'etag' => md5(json_encode(Image::map($GLOBALS['egw_info']['server']['template_set']))),
'svg' => Header\UserAgent::mobile() || $GLOBALS['egw_info']['user']['preferences']['common']['theme'] == 'pixelegg',
'svg' => Header\UserAgent::mobile() || $GLOBALS['egw_info']['user']['preferences']['common']['theme'] == 'pixelegg' ||
// if theme was set to something else before and we default to "pixelegg", we need it here too
$GLOBALS['egw_info']['server']['template_set'] == 'pixelegg' &&
$GLOBALS['egw_info']['user']['preferences']['common']['theme'] !== 'monochrome',
));
self::includeJS('/api/user.php', array(
'user' => $GLOBALS['egw_info']['user']['account_lid'],