diff --git a/dev/Common/Links.js b/dev/Common/Links.js index d5ec584ca..29934ce00 100644 --- a/dev/Common/Links.js +++ b/dev/Common/Links.js @@ -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')) { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Themes.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Themes.php index b43bb21cd..0ac1db623 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Themes.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Themes.php @@ -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'; } }