From c682844ae9a8cebb4e670496cb13f66ade11e21b Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Wed, 2 Apr 2014 14:41:58 +0800 Subject: [PATCH] MDL-44739 theme_more: Force default settings to be set --- theme/more/db/upgrade.php | 14 ++++++++++++++ theme/more/version.php | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/theme/more/db/upgrade.php b/theme/more/db/upgrade.php index 77d1e4b3f1d..e45d7dd5292 100644 --- a/theme/more/db/upgrade.php +++ b/theme/more/db/upgrade.php @@ -56,5 +56,19 @@ function xmldb_theme_more_upgrade($oldversion) { } + if ($oldversion < 2014032401) { + + // Set the default settings as they might already be set. + set_config('textcolor', '#333366', 'theme_more'); + set_config('linkcolor', '#FF6500', 'theme_more'); + set_config('backgroundrepeat', 'repeat', 'theme_more'); + set_config('contentbackground', '#FFFFFF', 'theme_more'); + set_config('secondarybackground', '#FFFFFF', 'theme_more'); + set_config('invert', 1, 'theme_more'); + set_config('backgroundimage', '/background.jpg', 'theme_more'); + + upgrade_plugin_savepoint(true, 2014032401, 'theme', 'more'); + } + return true; } diff --git a/theme/more/version.php b/theme/more/version.php index d119ebde4c8..cda496e692f 100644 --- a/theme/more/version.php +++ b/theme/more/version.php @@ -24,7 +24,7 @@ defined('MOODLE_INTERNAL') || die; -$plugin->version = 2014032400; +$plugin->version = 2014032401; $plugin->requires = 2013110500; $plugin->component = 'theme_more'; $plugin->dependencies = array(