Index: trunk/phase3/includes/Title.php |
— | — | @@ -1030,16 +1030,12 @@ |
1031 | 1031 | * @param bool $doExpensiveQueries Set this to false to avoid doing unnecessary queries. |
1032 | 1032 | * @return array Array of arrays of the arguments to wfMsg to explain permissions problems. |
1033 | 1033 | */ |
1034 | | - public function getUserPermissionsErrors( $action, $user = null, $doExpensiveQueries = true ) { |
| 1034 | + public function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true ) { |
1035 | 1035 | $errors = $this->getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries ); |
1036 | 1036 | |
1037 | 1037 | global $wgContLang; |
1038 | 1038 | global $wgLang; |
1039 | 1039 | |
1040 | | - # Be kinder to people who forget to supply a user, assuming they mean $wgUser |
1041 | | - if (!$user) |
1042 | | - $user = $wgUser; |
1043 | | - |
1044 | 1040 | if ( wfReadOnly() && $action != 'read' ) { |
1045 | 1041 | global $wgReadOnly; |
1046 | 1042 | $errors[] = array( 'readonlytext', $wgReadOnly ); |
— | — | @@ -1071,7 +1067,7 @@ |
1072 | 1068 | $link = '[[' . $wgContLang->getNsText( NS_USER ) . ":{$name}|{$name}]]"; |
1073 | 1069 | $blockid = $block->mId; |
1074 | 1070 | $blockExpiry = $user->mBlock->mExpiry; |
1075 | | - $blockTimestamp = $wgLang->timeanddate( wfTimestamp( TS_MW, $wgUser->mBlock->mTimestamp ), true ); |
| 1071 | + $blockTimestamp = $wgLang->timeanddate( wfTimestamp( TS_MW, $user->mBlock->mTimestamp ), true ); |
1076 | 1072 | |
1077 | 1073 | if ( $blockExpiry == 'infinity' ) { |
1078 | 1074 | // Entry in database (table ipblocks) is 'infinity' but 'ipboptions' uses 'infinite' or 'indefinite' |