Index: trunk/phase3/skins/MonoBook.php |
— | — | @@ -54,11 +54,6 @@ |
55 | 55 | class MonoBookTemplate extends BaseTemplate { |
56 | 56 | |
57 | 57 | /** |
58 | | - * @var Skin |
59 | | - */ |
60 | | - var $skin; |
61 | | - |
62 | | - /** |
63 | 58 | * Template filter callback for MonoBook skin. |
64 | 59 | * Takes an associative array of data set from a SkinTemplate-based |
65 | 60 | * class, and a wrapper for MediaWiki's localization database, and |
— | — | @@ -67,8 +62,6 @@ |
68 | 63 | * @access private |
69 | 64 | */ |
70 | 65 | function execute() { |
71 | | - $this->skin = $this->data['skin']; |
72 | | - |
73 | 66 | // Suppress warnings to prevent notices about missing indexes in $this->data |
74 | 67 | wfSuppressWarnings(); |
75 | 68 | |
— | — | @@ -111,12 +104,11 @@ |
112 | 105 | </div> |
113 | 106 | </div> |
114 | 107 | <div class="portlet" id="p-logo"> |
115 | | - <?php |
116 | | - $logoAttribs = array() + Linker::tooltipAndAccesskeyAttribs('p-logo'); |
117 | | - $logoAttribs['style'] = "background-image: url({$this->data['logopath']});"; |
118 | | - $logoAttribs['href'] = $this->data['nav_urls']['mainpage']['href']; |
119 | | - echo Html::element( 'a', $logoAttribs ); |
120 | | - ?> |
| 108 | +<?php |
| 109 | + echo Html::element( 'a', array( |
| 110 | + 'href' => $this->data['nav_urls']['mainpage']['href'], |
| 111 | + 'style' => "background-image: url({$this->data['logopath']});" ) |
| 112 | + + Linker::tooltipAndAccesskeyAttribs('p-logo') ); ?> |
121 | 113 | |
122 | 114 | </div> |
123 | 115 | <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script> |
— | — | @@ -139,7 +131,7 @@ |
140 | 132 | foreach ( $validFooterIcons as $blockName => $footerIcons ) { ?> |
141 | 133 | <div id="f-<?php echo htmlspecialchars($blockName); ?>ico"> |
142 | 134 | <?php foreach ( $footerIcons as $icon ) { ?> |
143 | | - <?php echo $this->skin->makeFooterIcon( $icon ); ?> |
| 135 | + <?php echo $this->getSkin()->makeFooterIcon( $icon ); ?> |
144 | 136 | |
145 | 137 | <?php } |
146 | 138 | ?> |
— | — | @@ -227,25 +219,8 @@ |
228 | 220 | <div class="pBody"> |
229 | 221 | <ul><?php |
230 | 222 | foreach($this->data['content_actions'] as $key => $tab) { |
231 | | - $linkAttribs = array( 'href' => $tab['href'] ); |
232 | | - |
233 | | - if( isset( $tab["tooltiponly"] ) && $tab["tooltiponly"] ) { |
234 | | - $title = Linker::titleAttrib( "ca-$key" ); |
235 | | - if ( $title !== false ) { |
236 | | - $linkAttribs['title'] = $title; |
237 | | - } |
238 | | - } else { |
239 | | - $linkAttribs += Linker::tooltipAndAccesskeyAttribs( "ca-$key" ); |
240 | | - } |
241 | | - $linkHtml = Html::element( 'a', $linkAttribs, $tab['text'] ); |
242 | | - |
243 | | - /* Surround with a <li> */ |
244 | | - $liAttribs = array( 'id' => Sanitizer::escapeId( "ca-$key" ) ); |
245 | | - if( $tab['class'] ) { |
246 | | - $liAttribs['class'] = $tab['class']; |
247 | | - } |
248 | | - echo ' |
249 | | - ' . Html::rawElement( 'li', $liAttribs, $linkHtml ); |
| 223 | + echo ' |
| 224 | + ' . $this->makeListItem( $key, $tab ); |
250 | 225 | } ?> |
251 | 226 | |
252 | 227 | </ul> |