From: Aryeh Gregor Date: Fri, 10 Jul 2009 02:13:02 +0000 (+0000) Subject: Finish cross-skin unification of X-Git-Tag: 1.31.0-rc.0~41018 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=7dccaf159b2fd18b2761b1fd48b6b17ac5888072;p=lhc%2Fweb%2Fwiklou.git Finish cross-skin unification of Vector and Modern are now using $wgOut->headElement(), finishing the work that r52864 started. -80 lines net. --- diff --git a/skins/Modern.php b/skins/Modern.php index 6f24cc3e3b..c49342eca4 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -56,48 +56,21 @@ class ModernTemplate extends QuickTemplate { * @access private */ function execute() { - global $wgRequest; + global $wgRequest, $wgOut; $this->skin = $skin = $this->data['skin']; $action = $wgRequest->getText( 'action' ); // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings(); -?> -data['xhtmlnamespaces'] as $tag => $ns) { - ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> - - - html('headlinks') ?> - <?php $this->text('pagetitle') ?> - html('csslinks') ?> - - - data ); ?> - - - -html('headscripts') ?> -data['jsvarurl' ]) { ?> - - -data['pagecss' ]) { ?> - -data['usercss' ]) { ?> - -data['userjs' ]) { ?> - -data['userjsprev']) { ?> - -data['trackbackhtml']) print $this->data['trackbackhtml']; ?> - -data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" + $wgOut->addScript( << + +HTML + ); + + echo $wgOut->headElement( $this->skin ); +?>data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" data['body_onload' ]) { ?> onload="text('body_onload') ?>" class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>"> diff --git a/skins/MonoBook.php b/skins/MonoBook.php index d380e2ae06..ad859a09ea 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -72,6 +72,7 @@ class MonoBookTemplate extends QuickTemplate { wfSuppressWarnings(); $path = htmlspecialchars( $wgStylePath ); + # FIXME: What is this? Should it apply to all skins? $wgOut->addScript( << diff --git a/skins/Vector.php b/skins/Vector.php index bb697d6e96..94ccbb0be2 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -67,7 +67,7 @@ class VectorTemplate extends QuickTemplate { * Outputs the entire contents of the XHTML page */ public function execute() { - global $wgRequest, $wgUseTwoButtonsSearchForm; + global $wgRequest, $wgUseTwoButtonsSearchForm, $wgOut; $this->skin = $this->data['skin']; $action = $wgRequest->getText( 'action' ); @@ -159,63 +159,9 @@ class VectorTemplate extends QuickTemplate { } // Begin content output -?> -data['xhtmlnamespaces'] as $tag => $ns): ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> - - - <?php $this->text('pagetitle') ?> - - html('headlinks') ?> - - - html('csslinks') ?> - - - - - - - data ); ?> - - - - - - html('headscripts') ?> - - data['jsvarurl']): ?> - - - - - data['pagecss']): ?> - - - - - data['usercss']): ?> - - - - - data['userjs']): ?> - - - - - data['userjsprev']): ?> - - - - - data['trackbackhtml']): ?> - - data['trackbackhtml']; ?> - - - - data['body_ondblclick']): ?> ondblclick="text('body_ondblclick') ?>" data['body_onload']): ?> onload="text('body_onload') ?>" class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>"> + + echo $wgOut->headElement( $this->skin ); +?> data['body_ondblclick']): ?> ondblclick="text('body_ondblclick') ?>" data['body_onload']): ?> onload="text('body_onload') ?>" class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>">