From ec441b6dd0e343e97e6f59d9f855a43519e2a218 Mon Sep 17 00:00:00 2001 From: kordan Date: Thu, 9 Jun 2011 22:05:32 +0200 Subject: [PATCH] MDL-27801 fix for MOODLE_20_STABLE --- theme/formal_white/db/install.php | 23 ++++++++++++++++++----- theme/formal_white/style/core.css | 4 ++-- theme/formal_white/style/formal_white.css | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/theme/formal_white/db/install.php b/theme/formal_white/db/install.php index 5efe9ca1faf..f1f0290b21d 100644 --- a/theme/formal_white/db/install.php +++ b/theme/formal_white/db/install.php @@ -58,10 +58,23 @@ function xmldb_theme_formal_white_install() { // Remove alwayslangmenu unset_config('alwayslangmenu', 'theme_formal_white'); - // Create a new config setting called lblockcolumnbgc and give it blockcolumnbgc's value. - set_config('lblockcolumnbgc', $currentsetting->blockcolumnbgc, 'theme_formal_white'); - // Remove blockcolumnbgc - unset_config('blockcolumnbgc', 'theme_formal_white'); - + // previous releases of formal_white them were not equipped with version number + // so I can not know if a theme specific variable exists or not. + // This is the reason why I try to use them both. + if (isset($currentsetting->backgroundcolor)) { + // Create a new config setting called lblockcolumnbgc and give it backgroundcolor's value. + set_config('lblockcolumnbgc', $currentsetting->backgroundcolor, 'theme_formal_white'); + // Remove backgroundcolor + unset_config('backgroundcolor', 'theme_formal_white'); + } elseif (isset($currentsetting->blockcolumnbgc)) { + // Create a new config setting called lblockcolumnbgc and give it blockcolumnbgc's value. + set_config('lblockcolumnbgc', $currentsetting->blockcolumnbgc, 'theme_formal_white'); + // Remove blockcolumnbgc + unset_config('blockcolumnbgc', 'theme_formal_white'); + } else { + // Create a new config setting called lblockcolumnbgc and give it the default value. + set_config('lblockcolumnbgc', '#E3DFD4', 'theme_formal_white'); + } + return true; } \ No newline at end of file diff --git a/theme/formal_white/style/core.css b/theme/formal_white/style/core.css index 45e9560954c..c41162a6d8a 100644 --- a/theme/formal_white/style/core.css +++ b/theme/formal_white/style/core.css @@ -194,8 +194,8 @@ input[type="radio"] { -----------------------*/ .userinfobox { -border-color: #ddd; -padding: 0 + border-color: #ddd; + padding: 0 } .userinfobox .content { diff --git a/theme/formal_white/style/formal_white.css b/theme/formal_white/style/formal_white.css index 1a1585d711a..ee2736b499a 100644 --- a/theme/formal_white/style/formal_white.css +++ b/theme/formal_white/style/formal_white.css @@ -70,7 +70,7 @@ h1.headerheading {margin:14px 11px 8px 11px;float:left;font-size:200%;} .breadcrumb {margin-left:0.8em;} /* generalbox */ -.generalbox {border-color:#E3DFD4;} +.generalbox {border-color:#E3DFD4;padding:1em;} /* generalbox */ #page-admin-setting-manageauths .generalbox {border:none;}