Index: trunk/phase3/includes/Article.php |
— | — | @@ -2068,12 +2068,16 @@ |
2069 | 2069 | return $this->mPage->doDeleteArticle( $reason, $suppress, $id, $commit, $error ); |
2070 | 2070 | } |
2071 | 2071 | |
2072 | | - public function doRollback( $fromP, $summary, $token, $bot, &$resultDetails ) { |
2073 | | - return $this->mPage->doRollback( $fromP, $summary, $token, $bot, $resultDetails ); |
| 2072 | + public function doRollback( $fromP, $summary, $token, $bot, &$resultDetails, User $user = null ) { |
| 2073 | + global $wgUser; |
| 2074 | + $user = is_null( $user ) ? $wgUser : $user; |
| 2075 | + return $this->mPage->doRollback( $fromP, $summary, $token, $bot, $resultDetails, $user ); |
2074 | 2076 | } |
2075 | 2077 | |
2076 | | - public function commitRollback( $fromP, $summary, $bot, &$resultDetails ) { |
2077 | | - return $this->mPage->commitRollback( $fromP, $summary, $bot, $resultDetails ); |
| 2078 | + public function commitRollback( $fromP, $summary, $bot, &$resultDetails, User $guser = null ) { |
| 2079 | + global $wgUser; |
| 2080 | + $guser = is_null( $guser ) ? $wgUser : $guser; |
| 2081 | + return $this->mPage->commitRollback( $fromP, $summary, $bot, $resultDetails, $guser ); |
2078 | 2082 | } |
2079 | 2083 | |
2080 | 2084 | // ****** B/C functions for static methods ( __callStatic is PHP>=5.3 ) ****** // |
Index: trunk/phase3/includes/WikiPage.php |
— | — | @@ -1694,11 +1694,8 @@ |
1695 | 1695 | * OutputPage::showPermissionsErrorPage(). |
1696 | 1696 | */ |
1697 | 1697 | public function doRollback( |
1698 | | - $fromP, $summary, $token, $bot, &$resultDetails, User $user = null |
| 1698 | + $fromP, $summary, $token, $bot, &$resultDetails, User $user |
1699 | 1699 | ) { |
1700 | | - global $wgUser; |
1701 | | - $user = is_null( $user ) ? $wgUser : $user; |
1702 | | - |
1703 | 1700 | $resultDetails = null; |
1704 | 1701 | |
1705 | 1702 | # Check permissions |
— | — | @@ -1737,9 +1734,8 @@ |
1738 | 1735 | * @param $resultDetails Array: contains result-specific array of additional values |
1739 | 1736 | * @param $guser User The user performing the rollback |
1740 | 1737 | */ |
1741 | | - public function commitRollback( $fromP, $summary, $bot, &$resultDetails, User $guser = null ) { |
1742 | | - global $wgUseRCPatrol, $wgUser, $wgContLang; |
1743 | | - $guser = is_null( $guser ) ? $wgUser : $guser; |
| 1738 | + public function commitRollback( $fromP, $summary, $bot, &$resultDetails, User $guser ) { |
| 1739 | + global $wgUseRCPatrol, $wgContLang; |
1744 | 1740 | |
1745 | 1741 | $dbw = wfGetDB( DB_MASTER ); |
1746 | 1742 | |