Index: trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php |
— | — | @@ -48,14 +48,15 @@ |
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
52 | | - * If the user saving this page has approval power, automatically |
53 | | - * set this latest revision to be the approved one - don't bother |
54 | | - * logging the approval, though; the log is reserved for manual |
55 | | - * approvals. |
| 52 | + * If this page already has an approved revision, and the user |
| 53 | + * saving this page has approval power, automatically set this |
| 54 | + * latest revision to be the approved one - don't bother logging |
| 55 | + * the approval, though; the log is reserved for manual approvals. |
56 | 56 | */ |
57 | 57 | static public function setLatestAsApproved( &$article ) { |
58 | 58 | $title = $article->getTitle(); |
59 | | - if ( ! ApprovedRevs::pageIsApprovable( $title ) ) { |
| 59 | + $approvedRevID = ApprovedRevs::getApprovedRevID( $title ); |
| 60 | + if ( empty( $approvedRevID ) ) { |
60 | 61 | return true; |
61 | 62 | } |
62 | 63 | if ( $title->userCan( 'approverevisions' ) ) { |