Index: trunk/phase3/skins/CologneBlue.php |
— | — | @@ -7,8 +7,9 @@ |
8 | 8 | * @ingroup Skins |
9 | 9 | */ |
10 | 10 | |
11 | | -if( !defined( 'MEDIAWIKI' ) ) |
| 11 | +if( !defined( 'MEDIAWIKI' ) ) { |
12 | 12 | die( -1 ); |
| 13 | +} |
13 | 14 | |
14 | 15 | /** |
15 | 16 | * @todo document |
— | — | @@ -46,7 +47,9 @@ |
47 | 48 | $s .= '<font size="-1"><span id="langlinks">'; |
48 | 49 | $s .= str_replace( '<br />', '', $this->otherLanguages() ); |
49 | 50 | $cat = $this->getCategoryLinks(); |
50 | | - if( $cat ) $s .= "<br />$cat\n"; |
| 51 | + if( $cat ) { |
| 52 | + $s .= "<br />$cat\n"; |
| 53 | + } |
51 | 54 | $s .= '<br />' . $this->pageTitleLinks(); |
52 | 55 | $s .= '</span></font>'; |
53 | 56 | |
— | — | @@ -110,20 +113,20 @@ |
111 | 114 | |
112 | 115 | if ( 2 == $qb ) { # Right |
113 | 116 | $s .= "#quickbar { position: absolute; right: 4px; }\n" . |
114 | | - "#article { margin-left: 4px; margin-right: 148px; }\n"; |
115 | | - } else if ( 1 == $qb ) { |
| 117 | + "#article { margin-left: 4px; margin-right: 148px; }\n"; |
| 118 | + } elseif ( 1 == $qb ) { |
116 | 119 | $s .= "#quickbar { position: absolute; left: 4px; }\n" . |
117 | | - "#article { margin-left: 148px; margin-right: 4px; }\n"; |
118 | | - } else if ( 3 == $qb ) { # Floating left |
| 120 | + "#article { margin-left: 148px; margin-right: 4px; }\n"; |
| 121 | + } elseif ( 3 == $qb ) { # Floating left |
119 | 122 | $s .= "#quickbar { position:absolute; left:4px } \n" . |
120 | | - "#topbar { margin-left: 148px }\n" . |
121 | | - "#article { margin-left:148px; margin-right: 4px; } \n" . |
122 | | - "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE |
123 | | - } else if ( 4 == $qb ) { # Floating right |
| 123 | + "#topbar { margin-left: 148px }\n" . |
| 124 | + "#article { margin-left:148px; margin-right: 4px; } \n" . |
| 125 | + "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE |
| 126 | + } elseif ( 4 == $qb ) { # Floating right |
124 | 127 | $s .= "#quickbar { position: fixed; right: 4px; } \n" . |
125 | | - "#topbar { margin-right: 148px }\n" . |
126 | | - "#article { margin-right: 148px; margin-left: 4px; } \n" . |
127 | | - "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;} \n"; # Hides from IE |
| 128 | + "#topbar { margin-right: 148px }\n" . |
| 129 | + "#article { margin-right: 148px; margin-left: 4px; } \n" . |
| 130 | + "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;} \n"; # Hides from IE |
128 | 131 | } |
129 | 132 | return $s; |
130 | 133 | } |
— | — | @@ -242,8 +245,8 @@ |
243 | 246 | |
244 | 247 | $s .= $this->menuHead( 'qbpageoptions' ); |
245 | 248 | $s .= $this->talkLink() |
246 | | - . $sep . $this->commentLink() |
247 | | - . $sep . $this->printableLink(); |
| 249 | + . $sep . $this->commentLink() |
| 250 | + . $sep . $this->printableLink(); |
248 | 251 | if ( $wgUser->isLoggedIn() ) { |
249 | 252 | $s .= $sep . $this->watchThisPage(); |
250 | 253 | } |
— | — | @@ -251,9 +254,9 @@ |
252 | 255 | $s .= $sep; |
253 | 256 | |
254 | 257 | $s .= $this->menuHead( 'qbpageinfo' ) |
255 | | - . $this->historyLink() |
256 | | - . $sep . $this->whatLinksHere() |
257 | | - . $sep . $this->watchPageLinksLink(); |
| 258 | + . $this->historyLink() |
| 259 | + . $sep . $this->whatLinksHere() |
| 260 | + . $sep . $this->watchPageLinksLink(); |
258 | 261 | |
259 | 262 | if( $tns == NS_USER || $tns == NS_USER_TALK ) { |
260 | 263 | $id = User::idFromName( $this->mTitle->getText() ); |
— | — | @@ -278,35 +281,33 @@ |
279 | 282 | array( 'known', 'noclasses' ) |
280 | 283 | ); |
281 | 284 | if ( $wgUser->getNewtalk() ) { |
282 | | - $tl .= " *"; |
| 285 | + $tl .= ' *'; |
283 | 286 | } |
284 | 287 | |
285 | 288 | $s .= $this->link( |
286 | | - $wgUser->getUserPage(), |
287 | | - wfMsg( 'mypage' ), |
288 | | - array(), |
289 | | - array(), |
290 | | - array( 'known', 'noclasses' ) |
291 | | - ) |
292 | | - . $sep . $tl |
293 | | - . $sep . $this->specialLink( 'watchlist' ) |
294 | | - . $sep . $this->link( |
295 | | - SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), |
296 | | - wfMsg( 'mycontris' ), |
297 | | - array(), |
298 | | - array(), |
299 | | - array( 'known', 'noclasses' ) |
300 | | - ) |
301 | | - . $sep . $this->specialLink( 'preferences' ) |
302 | | - . $sep . $this->specialLink( 'userlogout' ); |
| 289 | + $wgUser->getUserPage(), |
| 290 | + wfMsg( 'mypage' ), |
| 291 | + array(), |
| 292 | + array(), |
| 293 | + array( 'known', 'noclasses' ) |
| 294 | + ) . $sep . $tl . $sep . $this->specialLink( 'watchlist' ) |
| 295 | + . $sep . |
| 296 | + $this->link( |
| 297 | + SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), |
| 298 | + wfMsg( 'mycontris' ), |
| 299 | + array(), |
| 300 | + array(), |
| 301 | + array( 'known', 'noclasses' ) |
| 302 | + ) . $sep . $this->specialLink( 'preferences' ) |
| 303 | + . $sep . $this->specialLink( 'userlogout' ); |
303 | 304 | } else { |
304 | 305 | $s .= $this->specialLink( 'userlogin' ); |
305 | 306 | } |
306 | 307 | |
307 | 308 | $s .= $this->menuHead( 'qbspecialpages' ) |
308 | | - . $this->specialLink( 'newpages' ) |
309 | | - . $sep . $this->specialLink( 'listfiles' ) |
310 | | - . $sep . $this->specialLink( 'statistics' ); |
| 309 | + . $this->specialLink( 'newpages' ) |
| 310 | + . $sep . $this->specialLink( 'listfiles' ) |
| 311 | + . $sep . $this->specialLink( 'statistics' ); |
311 | 312 | if ( $wgUser->isLoggedIn() && $wgEnableUploads ) { |
312 | 313 | $s .= $sep . $this->specialLink( 'upload' ); |
313 | 314 | } |
— | — | @@ -315,7 +316,7 @@ |
316 | 317 | |
317 | 318 | if( $wgSiteSupportPage ) { |
318 | 319 | $s .= $sep . '<a href="' . htmlspecialchars( $wgSiteSupportPage ) . '" class="internal">' |
319 | | - . wfMsg( 'sitesupport' ) . '</a>'; |
| 320 | + . wfMsg( 'sitesupport' ) . '</a>'; |
320 | 321 | } |
321 | 322 | |
322 | 323 | $s .= $sep . $this->link( |
— | — | @@ -330,12 +331,12 @@ |
331 | 332 | return $s; |
332 | 333 | } |
333 | 334 | |
334 | | - function menuHead( $key ){ |
| 335 | + function menuHead( $key ) { |
335 | 336 | $s = "\n<h6>" . wfMsg( $key ) . "</h6>"; |
336 | 337 | return $s; |
337 | 338 | } |
338 | 339 | |
339 | | - function searchForm( $label = '' ){ |
| 340 | + function searchForm( $label = '' ) { |
340 | 341 | global $wgRequest, $wgUseTwoButtonsSearchForm; |
341 | 342 | |
342 | 343 | $search = $wgRequest->getText( 'search' ); |
— | — | @@ -346,13 +347,14 @@ |
347 | 348 | } |
348 | 349 | |
349 | 350 | $s .= "<input type='text' id=\"searchInput{$this->searchboxes}\" class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\"" |
350 | | - . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" /><br />" |
351 | | - . "<input type='submit' id=\"searchGoButton{$this->searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . htmlspecialchars( wfMsg( 'searcharticle' ) ) . "\" />"; |
| 351 | + . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" /><br />" |
| 352 | + . "<input type='submit' id=\"searchGoButton{$this->searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . htmlspecialchars( wfMsg( 'searcharticle' ) ) . "\" />"; |
352 | 353 | |
353 | | - if( $wgUseTwoButtonsSearchForm ) |
| 354 | + if( $wgUseTwoButtonsSearchForm ) { |
354 | 355 | $s .= "<input type='submit' id=\"mw-searchButton{$this->searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( 'search' ) ) . "\" />\n"; |
355 | | - else |
| 356 | + } else { |
356 | 357 | $s .= '<div><a href="' . $action . '" rel="search">' . wfMsg( 'powersearch-legend' ) . "</a></div>\n"; |
| 358 | + } |
357 | 359 | |
358 | 360 | $s .= '</form>'; |
359 | 361 | |
Index: trunk/phase3/skins/Standard.php |
— | — | @@ -6,21 +6,15 @@ |
7 | 7 | * @ingroup Skins |
8 | 8 | */ |
9 | 9 | |
10 | | -if( !defined( 'MEDIAWIKI' ) ) |
| 10 | +if( !defined( 'MEDIAWIKI' ) ) { |
11 | 11 | die( -1 ); |
| 12 | +} |
12 | 13 | |
13 | 14 | /** |
14 | 15 | * @todo document |
15 | 16 | * @ingroup Skins |
16 | 17 | */ |
17 | 18 | class SkinStandard extends Skin { |
18 | | - /* |
19 | | - * OutputPage |
20 | | - */ |
21 | | - function outputPage( OutputPage $out ) { |
22 | | - global $wgStylePath; |
23 | | - parent::outputPage( $out ); |
24 | | - } |
25 | 19 | |
26 | 20 | /** |
27 | 21 | * |
— | — | @@ -28,7 +22,7 @@ |
29 | 23 | function setupSkinUserCss( OutputPage $out ){ |
30 | 24 | if ( 3 == $this->qbSetting() ) { # Floating left |
31 | 25 | $out->addStyle( 'common/quickbar.css' ); |
32 | | - } else if ( 4 == $this->qbSetting() ) { # Floating right |
| 26 | + } elseif ( 4 == $this->qbSetting() ) { # Floating right |
33 | 27 | $out->addStyle( 'common/quickbar-right.css' ); |
34 | 28 | } |
35 | 29 | parent::setupSkinUserCss( $out ); |
— | — | @@ -43,15 +37,15 @@ |
44 | 38 | |
45 | 39 | if ( 2 == $qb ) { # Right |
46 | 40 | $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " . |
47 | | - "border-left: 2px solid #000000; }\n" . |
48 | | - "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }\n"; |
49 | | - } else if ( 1 == $qb || 3 == $qb ) { |
| 41 | + "border-left: 2px solid #000000; }\n" . |
| 42 | + "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }\n"; |
| 43 | + } elseif ( 1 == $qb || 3 == $qb ) { |
50 | 44 | $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " . |
51 | | - "border-right: 1px solid gray; }\n" . |
52 | | - "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }\n"; |
53 | | - } else if ( 4 == $qb) { |
| 45 | + "border-right: 1px solid gray; }\n" . |
| 46 | + "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }\n"; |
| 47 | + } elseif ( 4 == $qb ) { |
54 | 48 | $s .= "#quickbar { border-right: 1px solid gray; }\n" . |
55 | | - "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }\n"; |
| 49 | + "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }\n"; |
56 | 50 | } |
57 | 51 | return $s; |
58 | 52 | } |
— | — | @@ -71,10 +65,12 @@ |
72 | 66 | $qb = $this->qbSetting(); |
73 | 67 | $shove = ( $qb != 0 ); |
74 | 68 | $left = ( $qb == 1 || $qb == 3 ); |
75 | | - if( $wgContLang->isRTL() ) $left = !$left; |
| 69 | + if( $wgContLang->isRTL() ) { |
| 70 | + $left = !$left; |
| 71 | + } |
76 | 72 | |
77 | 73 | if ( $shove && $left ) { # Left |
78 | | - $s .= $this->getQuickbarCompensator(); |
| 74 | + $s .= $this->getQuickbarCompensator(); |
79 | 75 | } |
80 | 76 | wfProfileOut( __METHOD__ . '-2' ); |
81 | 77 | wfProfileIn( __METHOD__ . '-3' ); |
— | — | @@ -87,7 +83,7 @@ |
88 | 84 | $this->aboutLink(), |
89 | 85 | $this->specialLink( 'recentchanges' ), |
90 | 86 | $this->searchForm() ) ) |
91 | | - . '<br /><span id="pagestats">' . $this->pageStats() . '</span>'; |
| 87 | + . '<br /><span id="pagestats">' . $this->pageStats() . '</span>'; |
92 | 88 | |
93 | 89 | $s .= '</td>'; |
94 | 90 | if ( $shove && !$left ) { # Right |
— | — | @@ -229,14 +225,14 @@ |
230 | 226 | article with "Watch this article" checkbox disabled, the article is transparently |
231 | 227 | unwatched. Therefore we do not show the "Watch this page" link in edit mode |
232 | 228 | */ |
233 | | - if ( $wgUser->isLoggedIn() && $articleExists) { |
234 | | - if( $action != 'edit' && $action != 'submit' ){ |
| 229 | + if ( $wgUser->isLoggedIn() && $articleExists ) { |
| 230 | + if( $action != 'edit' && $action != 'submit' ) { |
235 | 231 | $s .= $sep . $this->watchThisPage(); |
236 | 232 | } |
237 | 233 | if ( $this->mTitle->userCan( 'edit' ) ) |
238 | 234 | $s .= $sep . $this->moveThisPage(); |
239 | 235 | } |
240 | | - if ( $wgUser->isAllowed( 'delete' ) and $articleExists ) { |
| 236 | + if ( $wgUser->isAllowed( 'delete' ) && $articleExists ) { |
241 | 237 | $s .= $sep . $this->deleteThisPage() . |
242 | 238 | $sep . $this->protectThisPage(); |
243 | 239 | } |
— | — | @@ -244,14 +240,16 @@ |
245 | 241 | if( $articleExists && $action != 'history' ) { |
246 | 242 | $s .= $sep . $this->historyLink(); |
247 | 243 | } |
248 | | - $s.= $sep . $this->whatLinksHere(); |
| 244 | + $s .= $sep . $this->whatLinksHere(); |
249 | 245 | |
250 | 246 | if( $wgOut->isArticleRelated() ) { |
251 | 247 | $s .= $sep . $this->watchPageLinksLink(); |
252 | 248 | } |
253 | 249 | |
254 | | - if ( NS_USER == $this->mTitle->getNamespace() |
255 | | - || $this->mTitle->getNamespace() == NS_USER_TALK ) { |
| 250 | + if ( |
| 251 | + NS_USER == $this->mTitle->getNamespace() || |
| 252 | + $this->mTitle->getNamespace() == NS_USER_TALK |
| 253 | + ) { |
256 | 254 | |
257 | 255 | $id = User::idFromName( $this->mTitle->getText() ); |
258 | 256 | $ip = User::isIP( $this->mTitle->getText() ); |
Index: trunk/phase3/skins/Nostalgia.php |
— | — | @@ -6,8 +6,9 @@ |
7 | 7 | * @ingroup Skins |
8 | 8 | */ |
9 | 9 | |
10 | | -if( !defined( 'MEDIAWIKI' ) ) |
| 10 | +if( !defined( 'MEDIAWIKI' ) ) { |
11 | 11 | die( -1 ); |
| 12 | +} |
12 | 13 | |
13 | 14 | /** |
14 | 15 | * @todo document |
— | — | @@ -40,10 +41,14 @@ |
41 | 42 | $s .= $this->pageTitleLinks(); |
42 | 43 | |
43 | 44 | $ol = $this->otherLanguages(); |
44 | | - if( $ol ) $s .= '<br />' . $ol; |
| 45 | + if( $ol ) { |
| 46 | + $s .= '<br />' . $ol; |
| 47 | + } |
45 | 48 | |
46 | 49 | $cat = $this->getCategoryLinks(); |
47 | | - if( $cat ) $s .= '<br />' . $cat; |
| 50 | + if( $cat ) { |
| 51 | + $s .= '<br />' . $cat; |
| 52 | + } |
48 | 53 | |
49 | 54 | $s .= "<br clear='all' /></div><hr />\n</div>\n"; |
50 | 55 | $s .= "\n<div id='article'>"; |
— | — | @@ -104,8 +109,8 @@ |
105 | 110 | $s .= $this->bottomLinks(); |
106 | 111 | $s .= "\n<br />" . $this->pageStats(); |
107 | 112 | $s .= "\n<br />" . $this->mainPageLink() |
108 | | - . " | " . $this->aboutLink() |
109 | | - . " | " . $this->searchForm(); |
| 113 | + . ' | ' . $this->aboutLink() |
| 114 | + . ' | ' . $this->searchForm(); |
110 | 115 | |
111 | 116 | $s .= "\n</div>\n</div>\n"; |
112 | 117 | |