Index: trunk/phase3/skins/Vector.php |
— | — | @@ -8,8 +8,9 @@ |
9 | 9 | * @ingroup Skins |
10 | 10 | */ |
11 | 11 | |
12 | | -if( !defined( 'MEDIAWIKI' ) ) |
| 12 | +if( !defined( 'MEDIAWIKI' ) ) { |
13 | 13 | die( -1 ); |
| 14 | +} |
14 | 15 | |
15 | 16 | /** |
16 | 17 | * SkinTemplate class for Vector skin |
— | — | @@ -27,7 +28,7 @@ |
28 | 29 | */ |
29 | 30 | public function initPage( OutputPage $out ) { |
30 | 31 | global $wgLocalStylePath; |
31 | | - |
| 32 | + |
32 | 33 | parent::initPage( $out ); |
33 | 34 | |
34 | 35 | // Append CSS which includes IE only behavior fixes for hover support - |
— | — | @@ -41,14 +42,13 @@ |
42 | 43 | } |
43 | 44 | |
44 | 45 | /** |
45 | | - * Load skin and user css files in the correct order |
| 46 | + * Load skin and user CSS files in the correct order |
46 | 47 | * fixes bug 22916 |
47 | 48 | * @param $out OutputPage object |
48 | 49 | */ |
49 | | - |
50 | 50 | function setupSkinUserCss( OutputPage $out ){ |
51 | 51 | global $wgVectorExtraStyles; |
52 | | - |
| 52 | + |
53 | 53 | parent::setupSkinUserCss( $out ); |
54 | 54 | |
55 | 55 | // Append skin-specific styles |
— | — | @@ -88,7 +88,6 @@ |
89 | 89 | |
90 | 90 | // Checks if page is some kind of content |
91 | 91 | if( $this->iscontent ) { |
92 | | - |
93 | 92 | // Gets page objects for the related namespaces |
94 | 93 | $subjectPage = $this->mTitle->getSubjectPage(); |
95 | 94 | $talkPage = $this->mTitle->getTalkPage(); |
— | — | @@ -151,7 +150,7 @@ |
152 | 151 | ? wfMsg( 'vector-view-edit' ) |
153 | 152 | : wfMsg( 'vector-view-create' ), |
154 | 153 | 'href' => |
155 | | - $this->mTitle->getLocalUrl( $this->editUrlOptions() ) |
| 154 | + $this->mTitle->getLocalURL( $this->editUrlOptions() ) |
156 | 155 | ); |
157 | 156 | // Checks if this is a current rev of talk page and we should show a new |
158 | 157 | // section link |
— | — | @@ -163,7 +162,7 @@ |
164 | 163 | $links['views']['addsection'] = array( |
165 | 164 | 'class' => 'collapsible ' . ( $section == 'new' ? 'selected' : false ), |
166 | 165 | 'text' => wfMsg( 'vector-action-addsection' ), |
167 | | - 'href' => $this->mTitle->getLocalUrl( |
| 166 | + 'href' => $this->mTitle->getLocalURL( |
168 | 167 | 'action=edit§ion=new' |
169 | 168 | ) |
170 | 169 | ); |
— | — | @@ -176,7 +175,7 @@ |
177 | 176 | 'class' => ( $action == 'edit' ) ? 'selected' : false, |
178 | 177 | 'text' => wfMsg( 'vector-view-viewsource' ), |
179 | 178 | 'href' => |
180 | | - $this->mTitle->getLocalUrl( $this->editUrlOptions() ) |
| 179 | + $this->mTitle->getLocalURL( $this->editUrlOptions() ) |
181 | 180 | ); |
182 | 181 | } |
183 | 182 | wfProfileOut( __METHOD__ . '-edit' ); |
— | — | @@ -187,17 +186,17 @@ |
188 | 187 | if ( $this->mTitle->exists() ) { |
189 | 188 | // Adds history view link |
190 | 189 | $links['views']['history'] = array( |
191 | | - 'class' => 'collapsible ' . ( ($action == 'history') ? 'selected' : false ), |
| 190 | + 'class' => 'collapsible ' . ( ( $action == 'history' ) ? 'selected' : false ), |
192 | 191 | 'text' => wfMsg( 'vector-view-history' ), |
193 | | - 'href' => $this->mTitle->getLocalUrl( 'action=history' ), |
| 192 | + 'href' => $this->mTitle->getLocalURL( 'action=history' ), |
194 | 193 | 'rel' => 'archives', |
195 | 194 | ); |
196 | 195 | |
197 | 196 | if( $wgUser->isAllowed( 'delete' ) ) { |
198 | 197 | $links['actions']['delete'] = array( |
199 | | - 'class' => ($action == 'delete') ? 'selected' : false, |
| 198 | + 'class' => ( $action == 'delete' ) ? 'selected' : false, |
200 | 199 | 'text' => wfMsg( 'vector-action-delete' ), |
201 | | - 'href' => $this->mTitle->getLocalUrl( 'action=delete' ) |
| 200 | + 'href' => $this->mTitle->getLocalURL( 'action=delete' ) |
202 | 201 | ); |
203 | 202 | } |
204 | 203 | if ( $this->mTitle->quickUserCan( 'move' ) ) { |
— | — | @@ -208,7 +207,7 @@ |
209 | 208 | 'class' => $this->mTitle->isSpecial( 'Movepage' ) ? |
210 | 209 | 'selected' : false, |
211 | 210 | 'text' => wfMsg( 'vector-action-move' ), |
212 | | - 'href' => $moveTitle->getLocalUrl() |
| 211 | + 'href' => $moveTitle->getLocalURL() |
213 | 212 | ); |
214 | 213 | } |
215 | 214 | |
— | — | @@ -216,22 +215,22 @@ |
217 | 216 | $this->mTitle->getNamespace() !== NS_MEDIAWIKI && |
218 | 217 | $wgUser->isAllowed( 'protect' ) |
219 | 218 | ) { |
220 | | - if ( !$this->mTitle->isProtected() ){ |
| 219 | + if ( !$this->mTitle->isProtected() ) { |
221 | 220 | $links['actions']['protect'] = array( |
222 | | - 'class' => ($action == 'protect') ? |
| 221 | + 'class' => ( $action == 'protect' ) ? |
223 | 222 | 'selected' : false, |
224 | 223 | 'text' => wfMsg( 'vector-action-protect' ), |
225 | 224 | 'href' => |
226 | | - $this->mTitle->getLocalUrl( 'action=protect' ) |
| 225 | + $this->mTitle->getLocalURL( 'action=protect' ) |
227 | 226 | ); |
228 | 227 | |
229 | 228 | } else { |
230 | 229 | $links['actions']['unprotect'] = array( |
231 | | - 'class' => ($action == 'unprotect') ? |
| 230 | + 'class' => ( $action == 'unprotect' ) ? |
232 | 231 | 'selected' : false, |
233 | 232 | 'text' => wfMsg( 'vector-action-unprotect' ), |
234 | 233 | 'href' => |
235 | | - $this->mTitle->getLocalUrl( 'action=unprotect' ) |
| 234 | + $this->mTitle->getLocalURL( 'action=unprotect' ) |
236 | 235 | ); |
237 | 236 | } |
238 | 237 | } |
— | — | @@ -250,7 +249,7 @@ |
251 | 250 | array( 'parsemag' ), |
252 | 251 | $wgLang->formatNum( $n ) |
253 | 252 | ), |
254 | | - 'href' => $undelTitle->getLocalUrl( |
| 253 | + 'href' => $undelTitle->getLocalURL( |
255 | 254 | 'target=' . urlencode( $this->thispage ) |
256 | 255 | ) |
257 | 256 | ); |
— | — | @@ -263,20 +262,20 @@ |
264 | 263 | ) { |
265 | 264 | if ( !$this->mTitle->getRestrictions( 'create' ) ) { |
266 | 265 | $links['actions']['protect'] = array( |
267 | | - 'class' => ($action == 'protect') ? |
| 266 | + 'class' => ( $action == 'protect' ) ? |
268 | 267 | 'selected' : false, |
269 | 268 | 'text' => wfMsg( 'vector-action-protect' ), |
270 | 269 | 'href' => |
271 | | - $this->mTitle->getLocalUrl( 'action=protect' ) |
| 270 | + $this->mTitle->getLocalURL( 'action=protect' ) |
272 | 271 | ); |
273 | 272 | |
274 | 273 | } else { |
275 | 274 | $links['actions']['unprotect'] = array( |
276 | | - 'class' => ($action == 'unprotect') ? |
| 275 | + 'class' => ( $action == 'unprotect' ) ? |
277 | 276 | 'selected' : false, |
278 | 277 | 'text' => wfMsg( 'vector-action-unprotect' ), |
279 | 278 | 'href' => |
280 | | - $this->mTitle->getLocalUrl( 'action=unprotect' ) |
| 279 | + $this->mTitle->getLocalURL( 'action=unprotect' ) |
281 | 280 | ); |
282 | 281 | } |
283 | 282 | } |
— | — | @@ -304,7 +303,7 @@ |
305 | 304 | $links[$place][$mode] = array( |
306 | 305 | 'class' => $class . ( ( $action == 'watch' || $action == 'unwatch' ) ? ' selected' : false ), |
307 | 306 | 'text' => wfMsg( $mode ), // uses 'watch' or 'unwatch' message |
308 | | - 'href' => $this->mTitle->getLocalUrl( 'action=' . $mode ) |
| 307 | + 'href' => $this->mTitle->getLocalURL( 'action=' . $mode ) |
309 | 308 | ); |
310 | 309 | } |
311 | 310 | // This is instead of SkinTemplateTabs - which uses a flat array |
— | — | @@ -707,7 +706,7 @@ |
708 | 707 | <div id="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>"> |
709 | 708 | <?php if ( $wgVectorShowVariantName ): ?> |
710 | 709 | <h4> |
711 | | - <?php foreach ($this->data['variant_urls'] as $key => $link ): ?> |
| 710 | + <?php foreach ( $this->data['variant_urls'] as $key => $link ): ?> |
712 | 711 | <?php if ( stripos( $link['attributes'], 'selected' ) !== false ): ?> |
713 | 712 | <?php echo htmlspecialchars( $link['text'] ) ?> |
714 | 713 | <?php endif; ?> |
— | — | @@ -717,7 +716,7 @@ |
718 | 717 | <h5><span><?php $this->msg('variants') ?></span><a href="#"></a></h5> |
719 | 718 | <div class="menu"> |
720 | 719 | <ul<?php $this->html('userlangattributes') ?>> |
721 | | - <?php foreach ($this->data['variant_urls'] as $key => $link ): ?> |
| 720 | + <?php foreach ( $this->data['variant_urls'] as $key => $link ): ?> |
722 | 721 | <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li> |
723 | 722 | <?php endforeach; ?> |
724 | 723 | </ul> |
— | — | @@ -730,7 +729,7 @@ |
731 | 730 | <div id="p-views" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) echo ' emptyPortlet'; ?>"> |
732 | 731 | <h5><?php $this->msg('views') ?></h5> |
733 | 732 | <ul<?php $this->html('userlangattributes') ?>> |
734 | | - <?php foreach ($this->data['view_urls'] as $key => $link ): ?> |
| 733 | + <?php foreach ( $this->data['view_urls'] as $key => $link ): ?> |
735 | 734 | <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ? '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : '<span>'.htmlspecialchars( $link['text'] ).'</span>') ?></a></li> |
736 | 735 | <?php endforeach; ?> |
737 | 736 | </ul> |