Permalink
Browse files

Merged branch 'MDL-27801_MOODLE_20_STABLE' of git://github.com/kordan…

…/moodle.git with changes
  • Loading branch information...
2 parents d65a2b2 + ec441b6 commit 79121602c45da2cac7641908005a9e6b919c109e Sam Hemelryk committed Jun 13, 2011
Showing with 28 additions and 15 deletions.
  1. +25 −12 theme/formal_white/db/install.php
  2. +2 −2 theme/formal_white/style/core.css
  3. +1 −1 theme/formal_white/style/formal_white.css
@@ -48,20 +48,33 @@
defined('MOODLE_INTERNAL') || die();
function xmldb_theme_formal_white_install() {
- $currentsetting = get_config('theme_formal_white');
- // Remove all the useless settings of the first pre-release
- // Remove backgroundcolor
- unset_config('backgroundcolor', 'theme_formal_white');
- // Remove regionwidth
- unset_config('regionwidth', 'theme_formal_white');
- // Remove alwayslangmenu
- unset_config('alwayslangmenu', 'theme_formal_white');
+ // We need here to check whether or not the theme has been installed.
+ // If it has been installed then we need to change the name of the settings to the new names.
+ // If it is not installed it won't have any settings yet and we won't need to worry about this.
+ $currentsetting = get_config('theme_formal_white');
+ if (!empty($currentsetting)) {
+ // Remove the settings that are no longer used by this theme
+ // Remove regionwidth
+ unset_config('regionwidth', 'theme_formal_white');
+ // 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 (!empty($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 (!empty($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');
+ }
+ }
return true;
}
@@ -194,8 +194,8 @@ input[type="radio"] {
-----------------------*/
.userinfobox {
-border-color: #ddd;
-padding: 0
+ border-color: #ddd;
+ padding: 0
}
.userinfobox .content {
@@ -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;}

0 comments on commit 7912160

Please sign in to comment.