This commit is contained in:
the-djmaze 2023-01-27 09:19:32 +01:00
parent f79e6f253d
commit f929c8fb69
2 changed files with 2 additions and 3 deletions

View file

@ -81,7 +81,7 @@ export const
themePreviewLink = theme => {
if (theme.endsWith('@nextcloud')) {
theme = theme.slice(0, theme.length - 10).trim();
return OC().webroot + '/themes/' + encodeURI(theme) + '/snappymail/preview.png';
return parent.OC.webroot + '/themes/' + encodeURI(theme) + '/snappymail/preview.png';
}
let path = 'webVersionPath';
if (theme.endsWith('@custom')) {

View file

@ -68,8 +68,7 @@ trait Themes
$sDir = \OC::$SERVERROOT . '/themes'; // custom user themes
if (\is_dir($sDir) && ($rDirH = \opendir($sDir))) {
while (($sFile = \readdir($rDirH)) !== false) {
if ('.' !== $sFile[0] && \is_dir($sDir . '/' . $sFile)
&& (\file_exists("{$sDir}/{$sFile}/snappymail.css") || \file_exists("{$sDir}/{$sFile}/snappymail.less"))) {
if ('.' !== $sFile[0] && \is_dir("{$sDir}/{$sFile}") && \file_exists("{$sDir}/{$sFile}/snappymail/style.css")) {
$aCache[] = $sFile . '@nextcloud';
}
}