Index: trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php |
— | — | @@ -54,7 +54,10 @@ |
55 | 55 | * latest revision to be the approved one - don't bother logging |
56 | 56 | * the approval, though; the log is reserved for manual approvals. |
57 | 57 | */ |
58 | | - static public function setLatestAsApproved( &$article ) { |
| 58 | + static public function setLatestAsApproved( &$article , &$user, $text, |
| 59 | + $summary, $flags, $unused1, $unused2, &$flags, $revision, |
| 60 | + &$status, $baseRevId ) { |
| 61 | + |
59 | 62 | $title = $article->getTitle(); |
60 | 63 | if ( ! $title->userCan( 'approverevisions' ) ) { |
61 | 64 | return true; |
— | — | @@ -76,12 +79,8 @@ |
77 | 80 | return true; |
78 | 81 | } |
79 | 82 | } |
80 | | - // the rev ID is actually passed in via the hook, but it's |
81 | | - // at the end of a very long set of parameters, so for the |
82 | | - // sake of sanity we'll just re-get it here instead |
83 | | - $latestRevisionID = $title->getLatestRevID(); |
84 | 83 | // save approval without logging |
85 | | - ApprovedRevs::saveApprovedRevIDInDB( $title, $latestRevisionID ); |
| 84 | + ApprovedRevs::saveApprovedRevIDInDB( $title, $revision->getID() ); |
86 | 85 | return true; |
87 | 86 | } |
88 | 87 | |