mirror of
https://github.com/humhub/humhub.git
synced 2025-01-18 06:38:14 +01:00
Fixed ThemeLoader with manually specified themes
This commit is contained in:
parent
670f49b4cb
commit
64985ef69f
@ -9,6 +9,7 @@
|
||||
namespace humhub\modules\ui\view\bootstrap;
|
||||
|
||||
use humhub\libs\BaseSettingsManager;
|
||||
use humhub\modules\ui\view\components\Theme;
|
||||
use humhub\modules\ui\view\helpers\ThemeHelper;
|
||||
use yii\base\BootstrapInterface;
|
||||
|
||||
@ -33,18 +34,18 @@ class ThemeLoader implements BootstrapInterface
|
||||
}
|
||||
|
||||
$themePath = $app->settings->get('theme');
|
||||
if (empty($themePath) || !is_dir($themePath)) {
|
||||
return;
|
||||
if (!empty($themePath) && is_dir($themePath)) {
|
||||
$theme = ThemeHelper::getThemeByPath($themePath);
|
||||
|
||||
if ($theme !== null) {
|
||||
$app->view->theme = $theme;
|
||||
$app->mailer->view->theme = $theme;
|
||||
}
|
||||
}
|
||||
|
||||
$theme = ThemeHelper::getThemeByPath($themePath);
|
||||
|
||||
if ($theme !== null) {
|
||||
$app->view->theme = $theme;
|
||||
$app->mailer->view->theme = $theme;
|
||||
if ($app->view->theme instanceof Theme) {
|
||||
$app->view->theme->register();
|
||||
}
|
||||
|
||||
$theme->register();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -22,24 +22,6 @@
|
||||
array (
|
||||
),
|
||||
'useFileTransport' => true,
|
||||
'view' =>
|
||||
array (
|
||||
'theme' =>
|
||||
array (
|
||||
'name' => 'HumHub',
|
||||
'basePath' => 'E:\\codebase\\humhub\\master/themes\\HumHub',
|
||||
'publishResources' => false,
|
||||
),
|
||||
),
|
||||
),
|
||||
'view' =>
|
||||
array (
|
||||
'theme' =>
|
||||
array (
|
||||
'name' => 'HumHub',
|
||||
'basePath' => 'E:\\codebase\\humhub\\master/themes\\HumHub',
|
||||
'publishResources' => false,
|
||||
),
|
||||
),
|
||||
'cache' =>
|
||||
array (
|
||||
|
Loading…
x
Reference in New Issue
Block a user