dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6349a32
)
Use member variable defaults for SkinTemplate
author
Aryeh Gregor
<simetrical@users.mediawiki.org>
Mon, 20 Jul 2009 00:33:23 +0000
(
00:33
+0000)
committer
Aryeh Gregor
<simetrical@users.mediawiki.org>
Mon, 20 Jul 2009 00:33:23 +0000
(
00:33
+0000)
includes/SkinTemplate.php
patch
|
blob
|
history
skins/Modern.php
patch
|
blob
|
history
skins/MonoBook.php
patch
|
blob
|
history
skins/MySkin.php
patch
|
blob
|
history
skins/Simple.php
patch
|
blob
|
history
skins/Vector.php
patch
|
blob
|
history
diff --git
a/includes/SkinTemplate.php
b/includes/SkinTemplate.php
index
f520927
..
c47b5c3
100644
(file)
--- a/
includes/SkinTemplate.php
+++ b/
includes/SkinTemplate.php
@@
-70,39
+70,25
@@
class SkinTemplate extends Skin {
*/
/**
*/
/**
- * Name of our skin,
set in initPage()
- *
It probably need to be all lower case
.
+ * Name of our skin,
it probably needs to be all lower case. Child classes
+ *
should override the default
.
*/
*/
- var $skinname;
+ var $skinname
= 'monobook'
;
/**
/**
- * Stylesheets set to use
- *
Sub directory in ./skins/ where various stylesheets are located
+ * Stylesheets set to use
. Subdirectory in skins/ where various stylesheets
+ *
are located. Child classes should override the default.
*/
*/
- var $stylename;
+ var $stylename
= 'monobook'
;
/**
/**
- * For QuickTemplate, the name of the subclass which
- *
will actually fill the template
.
+ * For QuickTemplate, the name of the subclass which
will actually fill the
+ *
template. Child classes should override the default
.
*/
*/
- var $template;
+ var $template
= 'QuickTemplate'
;
/**#@-*/
/**#@-*/
- /**
- * Setup the base parameters...
- * Child classes should override this to set the name,
- * style subdirectory, and template filler callback.
- *
- * @param $out OutputPage
- */
- function initPage( OutputPage $out ) {
- parent::initPage( $out );
- $this->skinname = 'monobook';
- $this->stylename = 'monobook';
- $this->template = 'QuickTemplate';
- }
-
/**
* Add specific styles for this skin
*
/**
* Add specific styles for this skin
*
diff --git
a/skins/Modern.php
b/skins/Modern.php
index
c49342e
..
db1206e
100644
(file)
--- a/
skins/Modern.php
+++ b/
skins/Modern.php
@@
-16,6
+16,9
@@
if( !defined( 'MEDIAWIKI' ) )
* @ingroup Skins
*/
class SkinModern extends SkinTemplate {
* @ingroup Skins
*/
class SkinModern extends SkinTemplate {
+ var $skinname = $stylename = 'modern',
+ $template = 'ModernTemplate';
+
/*
* We don't like the default getPoweredBy, the icon clashes with the
* skin L&F.
/*
* We don't like the default getPoweredBy, the icon clashes with the
* skin L&F.
@@
-25,13
+28,6
@@
class SkinModern extends SkinTemplate {
return "<div class='mw_poweredby'>Powered by MediaWiki $wgVersion</div>";
}
return "<div class='mw_poweredby'>Powered by MediaWiki $wgVersion</div>";
}
- function initPage( OutputPage $out ) {
- parent::initPage( $out );
- $this->skinname = 'modern';
- $this->stylename = 'modern';
- $this->template = 'ModernTemplate';
- }
-
function setupSkinUserCss( OutputPage $out ){
// Do not call parent::setupSkinUserCss(), we have our own print style
$out->addStyle( 'common/shared.css', 'screen' );
function setupSkinUserCss( OutputPage $out ){
// Do not call parent::setupSkinUserCss(), we have our own print style
$out->addStyle( 'common/shared.css', 'screen' );
diff --git
a/skins/MonoBook.php
b/skins/MonoBook.php
index
2c8c157
..
4c23244
100644
(file)
--- a/
skins/MonoBook.php
+++ b/
skins/MonoBook.php
@@
-20,13
+20,9
@@
if( !defined( 'MEDIAWIKI' ) )
*/
class SkinMonoBook extends SkinTemplate {
/** Using monobook. */
*/
class SkinMonoBook extends SkinTemplate {
/** Using monobook. */
- function initPage( OutputPage $out ) {
- parent::initPage( $out );
- $this->skinname = 'monobook';
- $this->stylename = 'monobook';
- $this->template = 'MonoBookTemplate';
+ var $skinname = $stylename = 'monobook',
+ $template = 'MonoBookTemplate';
- }
function setupSkinUserCss( OutputPage $out ) {
global $wgHandheldStyle;
function setupSkinUserCss( OutputPage $out ) {
global $wgHandheldStyle;
diff --git
a/skins/MySkin.php
b/skins/MySkin.php
index
fac2b72
..
81667bb
100644
(file)
--- a/
skins/MySkin.php
+++ b/
skins/MySkin.php
@@
-15,10
+15,6
@@
if( !defined( 'MEDIAWIKI' ) )
* @ingroup Skins
*/
class SkinMySkin extends SkinTemplate {
* @ingroup Skins
*/
class SkinMySkin extends SkinTemplate {
- function initPage( OutputPage $out ) {
- parent::initPage( $out );
- $this->skinname = 'myskin';
- $this->stylename = 'myskin';
- $this->template = 'MonoBookTemplate';
- }
+ var $skinname = $stylename = 'myskin',
+ $template = 'MonoBookTemplate';
}
}
diff --git
a/skins/Simple.php
b/skins/Simple.php
index
2690f78
..
fa8079a
100644
(file)
--- a/
skins/Simple.php
+++ b/
skins/Simple.php
@@
-18,12
+18,8
@@
require_once( dirname(__FILE__) . '/MonoBook.php' );
* @ingroup Skins
*/
class SkinSimple extends SkinTemplate {
* @ingroup Skins
*/
class SkinSimple extends SkinTemplate {
- function initPage( OutputPage $out ) {
- parent::initPage( $out );
- $this->skinname = 'simple';
- $this->stylename = 'simple';
- $this->template = 'MonoBookTemplate';
- }
+ var $skinname = $stylename = 'simple',
+ $template = 'MonoBookTemplate';
function setupSkinUserCss( OutputPage $out ){
$out->addStyle( 'simple/main.css', 'screen' );
function setupSkinUserCss( OutputPage $out ){
$out->addStyle( 'simple/main.css', 'screen' );
diff --git
a/skins/Vector.php
b/skins/Vector.php
index
58b3e48
..
5007a5f
100644
(file)
--- a/
skins/Vector.php
+++ b/
skins/Vector.php
@@
-18,6
+18,8
@@
if( !defined( 'MEDIAWIKI' ) )
class SkinVector extends SkinTemplate {
/* Functions */
class SkinVector extends SkinTemplate {
/* Functions */
+ var $skinname = $stylename = 'vector',
+ $template = 'VectorTemplate';
/**
* Initializes output page and sets up skin-specific parameters
/**
* Initializes output page and sets up skin-specific parameters
@@
-27,9
+29,6
@@
class SkinVector extends SkinTemplate {
global $wgStylePath, $wgJsMimeType, $wgStyleVersion;
parent::initPage( $out );
global $wgStylePath, $wgJsMimeType, $wgStyleVersion;
parent::initPage( $out );
- $this->skinname = 'vector';
- $this->stylename = 'vector';
- $this->template = 'VectorTemplate';
// Append skin-specific styles
$out->addStyle( 'vector/main-rtl.css', 'screen', '', 'rtl' );
// Append skin-specific styles
$out->addStyle( 'vector/main-rtl.css', 'screen', '', 'rtl' );