Index: trunk/phase3/includes/Xml.php |
— | — | @@ -213,13 +213,13 @@ |
214 | 214 | } else { |
215 | 215 | $languages = Language::getLanguageNames( $customisedOnly ); |
216 | 216 | } |
217 | | - |
| 217 | + |
218 | 218 | // Make sure the site language is in the list; a custom language code might not have a |
219 | 219 | // defined name... |
220 | 220 | if( !array_key_exists( $wgLanguageCode, $languages ) ) { |
221 | 221 | $languages[$wgLanguageCode] = $wgLanguageCode; |
222 | 222 | } |
223 | | - |
| 223 | + |
224 | 224 | ksort( $languages ); |
225 | 225 | |
226 | 226 | /** |
Index: trunk/phase3/includes/logging/LogEntry.php |
— | — | @@ -495,6 +495,9 @@ |
496 | 496 | return $this->parameters; |
497 | 497 | } |
498 | 498 | |
| 499 | + /** |
| 500 | + * @return User |
| 501 | + */ |
499 | 502 | public function getPerformer() { |
500 | 503 | return $this->performer; |
501 | 504 | } |
Index: trunk/phase3/includes/specials/SpecialEditWatchlist.php |
— | — | @@ -297,9 +297,7 @@ |
298 | 298 | * Attempts to clean up broken items |
299 | 299 | */ |
300 | 300 | private function cleanupWatchlist() { |
301 | | - if ( count( $this->badItems ) ) { |
302 | | - $dbw = wfGetDB( DB_MASTER ); |
303 | | - } |
| 301 | + $dbw = wfGetDB( DB_MASTER ); |
304 | 302 | foreach ( $this->badItems as $row ) { |
305 | 303 | list( $title, $namespace, $dbKey ) = $row; |
306 | 304 | wfDebug( "User {$this->getUser()} has broken watchlist item ns($namespace):$dbKey, " |
Index: trunk/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -229,7 +229,7 @@ |
230 | 230 | } |
231 | 231 | |
232 | 232 | /** |
233 | | - * @return false|string wgVersion + HEAD sha1 stripped to the first 7 chars |
| 233 | + * @return bool|string wgVersion + HEAD sha1 stripped to the first 7 chars. False on failure |
234 | 234 | */ |
235 | 235 | private static function getVersionLinkedGit() { |
236 | 236 | global $wgVersion, $IP; |
— | — | @@ -387,6 +387,8 @@ |
388 | 388 | |
389 | 389 | /** |
390 | 390 | * Callback to sort extensions by type. |
| 391 | + * @param $a array |
| 392 | + * @param $b array |
391 | 393 | * @return int |
392 | 394 | */ |
393 | 395 | function compare( $a, $b ) { |
— | — | @@ -621,6 +623,7 @@ |
622 | 624 | * url The subversion URL of the directory |
623 | 625 | * repo-url The base URL of the repository |
624 | 626 | * viewvc-url A ViewVC URL pointing to the checked-out revision |
| 627 | + * @param $dir string |
625 | 628 | * @return array|bool |
626 | 629 | */ |
627 | 630 | public static function getSvnInfo( $dir ) { |
— | — | @@ -711,7 +714,7 @@ |
712 | 715 | |
713 | 716 | /** |
714 | 717 | * @param $dir String: directory of the git checkout |
715 | | - * @return false|String sha1 of commit HEAD points to |
| 718 | + * @return bool|String sha1 of commit HEAD points to |
716 | 719 | */ |
717 | 720 | public static function getGitHeadSha1( $dir ) { |
718 | 721 | $BASEDIR = "{$dir}/.git/"; |
— | — | @@ -722,19 +725,18 @@ |
723 | 726 | } |
724 | 727 | |
725 | 728 | preg_match( "/ref: (.*)/", |
726 | | - file_get_contents( $HEADfile), $m ); |
| 729 | + file_get_contents( $HEADfile), $m ); |
727 | 730 | |
728 | 731 | $REFfile = "{$BASEDIR}{$m[1]}"; |
729 | 732 | if( !file_exists( $REFfile ) ) { |
730 | 733 | return false; |
731 | 734 | } |
732 | 735 | |
733 | | - $sha1 = chop(file_get_contents( $REFfile )); |
| 736 | + $sha1 = rtrim( file_get_contents( $REFfile ) ); |
734 | 737 | |
735 | 738 | return $sha1; |
736 | 739 | } |
737 | 740 | |
738 | | - |
739 | 741 | function showEasterEgg() { |
740 | 742 | $rx = $rp = $xe = ''; |
741 | 743 | $alpha = array("", "kbQW", "\$\n()"); |
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php |
— | — | @@ -25,7 +25,6 @@ |
26 | 26 | * Implements Special:DeletedContributions to display archived revisions |
27 | 27 | * @ingroup SpecialPage |
28 | 28 | */ |
29 | | - |
30 | 29 | class DeletedContribsPager extends IndexPager { |
31 | 30 | public $mDefaultDirection = true; |
32 | 31 | var $messages, $target; |
— | — | @@ -54,9 +53,9 @@ |
55 | 54 | $user = $this->getUser(); |
56 | 55 | // Paranoia: avoid brute force searches (bug 17792) |
57 | 56 | if( !$user->isAllowed( 'deletedhistory' ) ) { |
58 | | - $conds[] = $this->mDb->bitAnd('ar_deleted',Revision::DELETED_USER) . ' = 0'; |
| 57 | + $conds[] = $this->mDb->bitAnd( 'ar_deleted', Revision::DELETED_USER ) . ' = 0'; |
59 | 58 | } elseif( !$user->isAllowed( 'suppressrevision' ) ) { |
60 | | - $conds[] = $this->mDb->bitAnd('ar_deleted',Revision::SUPPRESSED_USER) . |
| 59 | + $conds[] = $this->mDb->bitAnd( 'ar_deleted', Revision::SUPPRESSED_USER ) . |
61 | 60 | ' != ' . Revision::SUPPRESSED_USER; |
62 | 61 | } |
63 | 62 | return array( |
— | — | @@ -130,6 +129,7 @@ |
131 | 130 | * written by the target user. |
132 | 131 | * |
133 | 132 | * @todo This would probably look a lot nicer in a table. |
| 133 | + * @param $row |
134 | 134 | * @return string |
135 | 135 | */ |
136 | 136 | function formatRow( $row ) { |
— | — | @@ -346,6 +346,7 @@ |
347 | 347 | } else { |
348 | 348 | $user = Linker::link( $userObj->getUserPage(), htmlspecialchars( $userObj->getName() ) ); |
349 | 349 | } |
| 350 | + $links = ''; |
350 | 351 | $nt = $userObj->getUserPage(); |
351 | 352 | $id = $userObj->getID(); |
352 | 353 | $talk = $nt->getTalkPage(); |