Skip to content

Commit

Permalink
fix module enabling (vars in database)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhahnweilheim committed Nov 27, 2023
1 parent 20a817a commit 5248f05
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,18 @@ public function enable() {
return false;
}

private function enableTheme() {

private function enableTheme()
{
// Save special colors (lightened, darkened, faded colors), create theme files etc.
$model = new ColorSettings();
$model->save();

// see https://community.humhub.com/s/module-development/wiki/Theme+Modules
$theme = ThemeHelper::getThemeByName(self::FLEX_THEME_NAME);
if ($theme !== null) {
$theme->activate();
DynamicConfig::rewrite();
}

// Save special colors (lightened, darkened, faded colors)
$model = new ColorSettings();
$model->saveSpecialColors();

// Create theme.css
FileHelper::updateThemeFile();
}

// Module Deactivation
Expand Down

0 comments on commit 5248f05

Please sign in to comment.