Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -744,9 +744,9 @@ |
745 | 745 | $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action ) ); |
746 | 746 | $form .= "<fieldset><legend>" . wfMsgHtml( 'revreview-flag' ) . "</legend>\n"; |
747 | 747 | |
748 | | - if( $wgFlaggedRevsOverride ) |
| 748 | + if( $wgFlaggedRevsOverride ) { |
749 | 749 | $form .= '<p>'.wfMsgExt( 'revreview-text', array('parseinline') ).'</p>'; |
750 | | - |
| 750 | + } |
751 | 751 | $form .= Xml::hidden( 'title', $reviewtitle->getPrefixedText() ); |
752 | 752 | $form .= Xml::hidden( 'target', $wgTitle->getPrefixedText() ); |
753 | 753 | $form .= Xml::hidden( 'oldid', $id ); |
— | — | @@ -806,6 +806,8 @@ |
807 | 807 | } |
808 | 808 | } |
809 | 809 | $form .= Xml::hidden( 'imageParams', $imageParams ) . "\n"; |
| 810 | + # Pass this in if given; useful for new page patrol |
| 811 | + $form .= Xml::hidden( 'rcid', $wgRequest->getVal('rcid') ) . "\n"; |
810 | 812 | |
811 | 813 | # Special token to discourage fiddling... |
812 | 814 | $checkCode = FlaggedRevs::getValidationKey( $templateParams, $imageParams, $wgUser->getID() ); |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.php |
— | — | @@ -258,8 +258,9 @@ |
259 | 259 | $form .= $item; |
260 | 260 | } |
261 | 261 | # Hack, versioning params |
262 | | - $form .= Xml::hidden( 'templateParams', $this->templateParams ); |
263 | | - $form .= Xml::hidden( 'imageParams', $this->imageParams ); |
| 262 | + $form .= Xml::hidden( 'templateParams', $this->templateParams ) . "\n"; |
| 263 | + $form .= Xml::hidden( 'imageParams', $this->imageParams ) . "\n"; |
| 264 | + $form .= Xml::hidden( 'rcid', $this->rcid ) . "\n"; |
264 | 265 | # Special token to discourage fiddling... |
265 | 266 | $checkCode = FlaggedRevs::getValidationKey( $this->templateParams, $this->imageParams, $wgUser->getID() ); |
266 | 267 | $form .= Xml::hidden( 'validatedParams', $checkCode ); |
— | — | @@ -477,6 +478,16 @@ |
478 | 479 | 'rc_timestamp' => $dbw->timestamp( $rev->getTimestamp() ) ), |
479 | 480 | __METHOD__ |
480 | 481 | ); |
| 482 | + # New page patrol may be enabled. If so, the rc_id may be the first |
| 483 | + # edit and not this one. If it is different, mark it too. |
| 484 | + if( $this->rcid && $this->rcid != $rev->getId() ) { |
| 485 | + $dbw->update( 'recentchanges', |
| 486 | + array( 'rc_patrolled' => 1 ), |
| 487 | + array( 'rc_id' => $this->rcid, |
| 488 | + 'rc_type' => RC_NEW ), |
| 489 | + __METHOD__ |
| 490 | + ); |
| 491 | + } |
481 | 492 | $dbw->commit(); |
482 | 493 | |
483 | 494 | # Update the article review log |