Remove unnecessary break statement after return statement.
[lhc/web/wiklou.git] / skins / Simple.php
1 <?php
2 /**
3 * Simple: A lightweight skin with a simple white-background sidebar and no
4 * top bar.
5 *
6 * @file
7 * @ingroup Skins
8 */
9
10 if( !defined( 'MEDIAWIKI' ) )
11 die( -1 );
12
13 /** */
14 require_once( dirname(__FILE__) . '/MonoBook.php' );
15
16 /**
17 * Inherit main code from SkinTemplate, set the CSS and template filter.
18 * @ingroup Skins
19 */
20 class SkinSimple extends SkinTemplate {
21 var $skinname = 'simple', $stylename = 'simple',
22 $template = 'MonoBookTemplate', $useHeadElement = true;
23
24 /**
25 * @param $out OutputPage
26 */
27 function setupSkinUserCss( OutputPage $out ) {
28 parent::setupSkinUserCss( $out );
29
30 $out->addModuleStyles( 'skins.simple' );
31
32 /* Add some userprefs specific CSS styling */
33 $rules = array();
34 $underline = "";
35
36 if ( $this->getUser()->getOption( 'underline' ) < 2 ) {
37 $underline = "text-decoration: " . $this->getUser()->getOption( 'underline' ) ? 'underline !important' : 'none' . ";";
38 }
39
40 /* Also inherits from resourceloader */
41 if( !$this->getUser()->getOption( 'highlightbroken' ) ) {
42 $rules[] = "a.new, a.stub { color: inherit; text-decoration: inherit;}";
43 $rules[] = "a.new:after { color: #CC2200; $underline;}";
44 $rules[] = "a.stub:after { $underline; }";
45 }
46 $style = implode( "\n", $rules );
47 $out->addInlineStyle( $style, 'flip' );
48
49 }
50 }