Index: trunk/phase3/includes/User.php |
— | — | @@ -434,10 +434,21 @@ |
435 | 435 | if ( ! isset( $this->mSkin ) ) { |
436 | 436 | $skinNames = Skin::getSkinNames(); |
437 | 437 | $s = $this->getOption( "skin" ); |
438 | | - if ( "" == $s ) { $s = 0; } |
| 438 | + if ( "" == $s ) { $s = 'standard'; } |
439 | 439 | |
440 | | - if ( $s >= count( $skinNames ) ) { $sn = "SkinStandard"; } |
441 | | - else $sn = "Skin" . $skinNames[$s]; |
| 440 | + if ( !isset( $skinNames[$s] ) ) { |
| 441 | + $fallback = array( |
| 442 | + 'standard' => "Standard", |
| 443 | + 'nostalgia' => "Nostalgia", |
| 444 | + 'cologneblue' => "Cologne Blue"); |
| 445 | + if(is_int($s) && isset( $fallback[$s]) ){ |
| 446 | + $sn = $fallback[$s]; |
| 447 | + } else { |
| 448 | + $sn = "SkinStandard"; |
| 449 | + } |
| 450 | + } else { |
| 451 | + $sn = "Skin" . $skinNames[$s]; |
| 452 | + } |
442 | 453 | $this->mSkin = new $sn; |
443 | 454 | } |
444 | 455 | return $this->mSkin; |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -9,15 +9,17 @@ |
10 | 10 | # Language class has internationalized names |
11 | 11 | # |
12 | 12 | /* private */ $wgValidSkinNames = array( |
13 | | - "Standard", "Nostalgia", "CologneBlue" |
| 13 | + 'standard' => "Standard", |
| 14 | + 'nostalgia' => "Nostalgia", |
| 15 | + 'cologneblue' => "CologneBlue" |
14 | 16 | ); |
15 | 17 | if( $wgUseSmarty ) { |
16 | | - $wgValidSkinNames[] = "Smarty"; |
17 | | - $wgValidSkinNames[] = "Montparnasse"; |
| 18 | + $wgValidSkinNames['smarty'] = "Smarty"; |
| 19 | + $wgValidSkinNames['montparnasse'] = "Montparnasse"; |
18 | 20 | } |
19 | 21 | if( $wgUsePHPTal ) { |
20 | 22 | #$wgValidSkinNames[] = "PHPTal"; |
21 | | - $wgValidSkinNames[] = "DaVinci"; |
| 23 | + $wgValidSkinNames['davinci'] = "DaVinci"; |
22 | 24 | } |
23 | 25 | |
24 | 26 | include_once( "RecentChange.php" ); |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | "quickbar" => 1, "underline" => 1, "hover" => 1, |
84 | 84 | "cols" => 80, "rows" => 25, "searchlimit" => 20, |
85 | 85 | "contextlines" => 5, "contextchars" => 50, |
86 | | - "skin" => 0, "math" => 1, "rcdays" => 7, "rclimit" => 50, |
| 86 | + "skin" => 'standard', "math" => 1, "rcdays" => 7, "rclimit" => 50, |
87 | 87 | "highlightbroken" => 1, "stubthreshold" => 0, |
88 | 88 | "previewontop" => 1, "editsection"=>0,"editsectiononrightclick"=>0, "showtoc"=>1, |
89 | 89 | "showtoolbar" =>1, |
— | — | @@ -94,7 +94,12 @@ |
95 | 95 | ); |
96 | 96 | |
97 | 97 | /* private */ $wgSkinNamesEn = array( |
98 | | - "Standard", "Nostalgia", "Cologne Blue", "Paddington", "Montparnasse", "DaVinci" |
| 98 | + 'standard' => "Standard", |
| 99 | + 'nostalgia' => "Nostalgia", |
| 100 | + 'cologneblue' => "Cologne Blue", |
| 101 | + 'smarty' => "Paddington", |
| 102 | + 'montparnasse' => "Montparnasse", |
| 103 | + 'davinci' => "DaVinci" |
99 | 104 | ); |
100 | 105 | |
101 | 106 | /* private */ $wgMathNamesEn = array( |