Index: trunk/phase3/includes/api/ApiPatrol.php |
— | — | @@ -42,13 +42,15 @@ |
43 | 43 | * Patrols the article or provides the reason the patrol failed. |
44 | 44 | */ |
45 | 45 | public function execute() { |
| 46 | + global $wgUser; |
| 47 | + |
46 | 48 | $params = $this->extractRequestParams(); |
47 | 49 | |
48 | 50 | $rc = RecentChange::newFromID( $params['rcid'] ); |
49 | 51 | if ( !$rc instanceof RecentChange ) { |
50 | 52 | $this->dieUsageMsg( array( 'nosuchrcid', $params['rcid'] ) ); |
51 | 53 | } |
52 | | - $retval = RecentChange::markPatrolled( $params['rcid'] ); |
| 54 | + $retval = $rc->doMarkPatrolled( $wgUser ); |
53 | 55 | |
54 | 56 | if ( $retval ) { |
55 | 57 | $this->dieUsageMsg( reset( $retval ) ); |