Index: trunk/phase3/maintenance/generateSitemap.php |
— | — | @@ -133,7 +133,6 @@ |
134 | 134 | */ |
135 | 135 | public function __construct() { |
136 | 136 | parent::__construct(); |
137 | | - global $wgDBname; |
138 | 137 | $this->mDescription = "Creates a sitemap for the site"; |
139 | 138 | $this->addOption( 'fspath', 'The file system path to save to, e.g. /tmp/sitemap; defaults to current directory', false, true ); |
140 | 139 | $this->addOption( 'urlpath', 'The URL path corresponding to --fspath, prepended to filenames in the index; defaults to an empty string', false, true ); |
Index: trunk/phase3/maintenance/language/languages.inc |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | /** |
90 | 90 | * Load the language file. |
91 | 91 | * |
92 | | - * @param $code The language code. |
| 92 | + * @param $code string The language code. |
93 | 93 | */ |
94 | 94 | protected function loadFile( $code ) { |
95 | 95 | if ( isset( $this->mRawMessages[$code] ) && |
Index: trunk/phase3/includes/api/ApiImport.php |
— | — | @@ -176,6 +176,14 @@ |
177 | 177 | class ApiImportReporter extends ImportReporter { |
178 | 178 | private $mResultArr = array(); |
179 | 179 | |
| 180 | + /** |
| 181 | + * @param $title Title |
| 182 | + * @param $origTitle Title |
| 183 | + * @param $revisionCount int |
| 184 | + * @param $successCount int |
| 185 | + * @param $pageInfo |
| 186 | + * @return void |
| 187 | + */ |
180 | 188 | function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) { |
181 | 189 | // Add a result entry |
182 | 190 | $r = array(); |
Index: trunk/phase3/includes/ChangesList.php |
— | — | @@ -37,7 +37,10 @@ |
38 | 38 | * @var Skin |
39 | 39 | */ |
40 | 40 | public $skin; |
| 41 | + |
41 | 42 | protected $watchlist = false; |
| 43 | + |
| 44 | + protected $message = array(); |
42 | 45 | |
43 | 46 | /** |
44 | 47 | * Changeslist contructor |
— | — | @@ -53,7 +56,7 @@ |
54 | 57 | * Some users might want to use an enhanced list format, for instance |
55 | 58 | * |
56 | 59 | * @param $user User to fetch the list class for |
57 | | - * @return ChangesList derivative |
| 60 | + * @return ChangesList|EnhancedChangesList|OldChangesList derivative |
58 | 61 | */ |
59 | 62 | public static function newFromUser( $user ) { |
60 | 63 | global $wgRequest; |
— | — | @@ -111,7 +114,7 @@ |
112 | 115 | * unpatrolled edit. By default in English it will contain "N", "m", "b", |
113 | 116 | * "!" respectively, plus it will have an appropriate title and class. |
114 | 117 | * |
115 | | - * @param $key String: 'newpage', 'unpatrolled', 'minor', or 'bot' |
| 118 | + * @param $flag String: 'newpage', 'unpatrolled', 'minor', or 'bot' |
116 | 119 | * @return String: Raw HTML |
117 | 120 | */ |
118 | 121 | public static function flag( $flag ) { |
— | — | @@ -160,7 +163,7 @@ |
161 | 164 | * Show formatted char difference |
162 | 165 | * @param $old Integer: bytes |
163 | 166 | * @param $new Integer: bytes |
164 | | - * @returns String |
| 167 | + * @return String |
165 | 168 | */ |
166 | 169 | public static function showCharacterDifference( $old, $new ) { |
167 | 170 | global $wgRCChangedSizeThreshold, $wgLang, $wgMiserMode; |
— | — | @@ -638,6 +641,9 @@ |
639 | 642 | * Format a line for enhanced recentchange (aka with javascript and block of lines). |
640 | 643 | * |
641 | 644 | * @param $baseRC RecentChange |
| 645 | + * @param $watched bool |
| 646 | + * |
| 647 | + * @return string |
642 | 648 | */ |
643 | 649 | public function recentChangesLine( &$baseRC, $watched = false ) { |
644 | 650 | global $wgLang, $wgUser; |
— | — | @@ -1201,6 +1207,8 @@ |
1202 | 1208 | /** |
1203 | 1209 | * If enhanced RC is in use, this function takes the previously cached |
1204 | 1210 | * RC lines, arranges them, and outputs the HTML |
| 1211 | + * |
| 1212 | + * @return string |
1205 | 1213 | */ |
1206 | 1214 | protected function recentChangesBlock() { |
1207 | 1215 | if( count ( $this->rc_cache ) == 0 ) { |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -80,6 +80,11 @@ |
81 | 81 | return self::listPages( $dbr, $conds ); |
82 | 82 | } |
83 | 83 | |
| 84 | + /** |
| 85 | + * @param $dbr DatabaseBase |
| 86 | + * @param $condition |
| 87 | + * @return bool|ResultWrapper |
| 88 | + */ |
84 | 89 | protected static function listPages( $dbr, $condition ) { |
85 | 90 | return $dbr->resultObject( |
86 | 91 | $dbr->select( |
— | — | @@ -981,7 +986,7 @@ |
982 | 987 | $targetQuery = array( 'oldid' => $rev->getId() ); |
983 | 988 | } |
984 | 989 | // Add show/hide deletion links if available |
985 | | - $del .= $this->revDeleteLink( $rev ); |
| 990 | + $del = $this->revDeleteLink( $rev ); |
986 | 991 | return |
987 | 992 | '<div id="mw-diff-' . $prefix . 'title1"><strong>' . |
988 | 993 | $sk->link( |
Index: trunk/phase3/includes/specials/SpecialWatchlist.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | |
41 | 41 | // Add feed links |
42 | 42 | $wlToken = $wgUser->getOption( 'watchlisttoken' ); |
43 | | - if (!$wlToken) { |
| 43 | + if ( !$wlToken ) { |
44 | 44 | $wlToken = sha1( mt_rand() . microtime( true ) ); |
45 | 45 | $wgUser->setOption( 'watchlisttoken', $wlToken ); |
46 | 46 | $wgUser->saveSettings(); |
— | — | @@ -82,7 +82,8 @@ |
83 | 83 | ); |
84 | 84 | $wgOut->setSubtitle( $sub ); |
85 | 85 | |
86 | | - if( ( $mode = SpecialEditWatchlist::getMode( $wgRequest, $par ) ) !== false ) { |
| 86 | + $mode = SpecialEditWatchlist::getMode( $wgRequest, $par ); |
| 87 | + if( $mode !== false ) { |
87 | 88 | # TODO: localise? |
88 | 89 | switch( $mode ){ |
89 | 90 | case SpecialEditWatchlist::EDIT_CLEAR: |
— | — | @@ -100,7 +101,7 @@ |
101 | 102 | } |
102 | 103 | |
103 | 104 | $uid = $wgUser->getId(); |
104 | | - if( ($wgEnotifWatchlist || $wgShowUpdatedMarker) && $wgRequest->getVal( 'reset' ) && |
| 105 | + if( ( $wgEnotifWatchlist || $wgShowUpdatedMarker ) && $wgRequest->getVal( 'reset' ) && |
105 | 106 | $wgRequest->wasPosted() ) |
106 | 107 | { |
107 | 108 | $wgUser->clearAllNotifications( $uid ); |
— | — | @@ -172,7 +173,7 @@ |
173 | 174 | $days = $defaults['days']; # default cutoff for shortlisters |
174 | 175 | } |
175 | 176 | } else { |
176 | | - $days = floatval($days); |
| 177 | + $days = floatval( $days ); |
177 | 178 | } |
178 | 179 | |
179 | 180 | // Dump everything here |
— | — | @@ -284,7 +285,7 @@ |
285 | 286 | if ( $usePage || $rollbacker ) { |
286 | 287 | $tables[] = 'page'; |
287 | 288 | $join_conds['page'] = array('LEFT JOIN','rc_cur_id=page_id'); |
288 | | - if ($rollbacker) { |
| 289 | + if ( $rollbacker ) { |
289 | 290 | $fields[] = 'page_latest'; |
290 | 291 | } |
291 | 292 | } |
— | — | @@ -309,7 +310,7 @@ |
310 | 311 | } elseif( $days > 0 ) { |
311 | 312 | $wlInfo = wfMsgExt( 'wlnote', 'parseinline', |
312 | 313 | $wgLang->formatNum( $numRows ), |
313 | | - $wgLang->formatNum( round($days*24) ) |
| 314 | + $wgLang->formatNum( round( $days * 24 ) ) |
314 | 315 | ) . '<br />'; |
315 | 316 | } |
316 | 317 | |
— | — | @@ -396,7 +397,7 @@ |
397 | 398 | $updated = false; |
398 | 399 | } |
399 | 400 | |
400 | | - if ($wgRCShowWatchingUsers && $wgUser->getOption( 'shownumberswatching' )) { |
| 401 | + if ( $wgRCShowWatchingUsers && $wgUser->getOption( 'shownumberswatching' ) ) { |
401 | 402 | $rc->numberofWatchingusers = $dbr->selectField( 'watchlist', |
402 | 403 | 'COUNT(*)', |
403 | 404 | array( |
— | — | @@ -434,7 +435,7 @@ |
435 | 436 | |
436 | 437 | $sk = $wgUser->getSkin(); |
437 | 438 | $title = Title::newFromText( $wgContLang->specialPage( $page ) ); |
438 | | - $options['days'] = ($h / 24.0); |
| 439 | + $options['days'] = ( $h / 24.0 ); |
439 | 440 | |
440 | 441 | return $sk->linkKnown( |
441 | 442 | $title, |
— | — | @@ -450,7 +451,7 @@ |
451 | 452 | $sk = $wgUser->getSkin(); |
452 | 453 | $title = Title::newFromText( $wgContLang->specialPage( $page ) ); |
453 | 454 | $options['days'] = $d; |
454 | | - $message = ($d ? $wgLang->formatNum( $d ) : wfMsgHtml( 'watchlistall2' ) ); |
| 455 | + $message = ( $d ? $wgLang->formatNum( $d ) : wfMsgHtml( 'watchlistall2' ) ); |
455 | 456 | |
456 | 457 | return $sk->linkKnown( |
457 | 458 | $title, |
— | — | @@ -462,6 +463,8 @@ |
463 | 464 | |
464 | 465 | /** |
465 | 466 | * Returns html |
| 467 | + * |
| 468 | + * @return string |
466 | 469 | */ |
467 | 470 | protected static function cutoffLinks( $days, $page = 'Watchlist', $options = array() ) { |
468 | 471 | global $wgLang; |