Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Site id parameter for theme list to set correct active theme for current site, excluded backup folder from site duplicate skip folders
givanz3b322be025b9
diff --git a/admin/controller/theme/themes.php b/admin/controller/theme/themes.phpindex 05218aa..d5f5531 100755--- a/admin/controller/theme/themes.php+++ b/admin/controller/theme/themes.php@@ -41,7 +41,7 @@ class Themes extends Base {$srcDir = DIR_THEMES . $theme;$destDir = DIR_THEMES . $newSlug;- $skipFolders = ['backup', 'src', 'node_modules', '.git'];+ $skipFolders = [/*'backup', */'src', 'node_modules', '.git'];if ($dest) {if (file_exists($destDir)) {@@ -128,7 +128,7 @@ class Themes extends Base {}function index() {- $themes = ThemesList :: getList();+ $themes = ThemesList :: getList($this->global['site_id']);$this->view->themes = $themes;//$this->view->count = count($themes);@@ -179,7 +179,7 @@ class Themes extends Base {function activate() {$theme = $this->request->get['theme'];- if (Sites::setTheme($this->global['site_id'], $theme)) {+ if (Sites::setTheme($this->global['site_id'], $theme, 'index.html')) {$themeName = \Vvveb\humanReadable($theme);$this->themeActivateUrl = \Vvveb\url(['module' => 'theme/themes', 'action'=> 'import', 'theme' => $theme]);$successMessage = sprintf(__('Theme <b>%s</b> was activated!'), $themeName, $this->themeActivateUrl);diff --git a/system/extensions/themes.php b/system/extensions/themes.phpindex 21cd0c3..935426e 100755--- a/system/extensions/themes.php+++ b/system/extensions/themes.php@@ -48,8 +48,8 @@ class Themes extends Extensions {return $params;}- static function getList($path = '') {- $activeTheme = Sites::getTheme() ?? 'default';+ static function getList($site_id = false) {+ $activeTheme = Sites::getTheme($site_id) ?? 'default';$list = glob(DIR_ROOT . '/public/themes/*/index.html');$themes = [];