- $flags & EDIT_MINOR, null, null, &$flags, $revision, &$status, $baseRevId ) );
+ $flags & EDIT_MINOR, &$watchthis, null, &$flags, $revision, &$status, $baseRevId,
+ &$redirect) );
+
+ # Watch or unwatch the page
+ if ( $watchthis === true ) {
+ if ( !$this->mTitle->userIsWatching() ) {
+ $dbw->begin();
+ $this->doWatch();
+ $dbw->commit();
+ }
+ } elseif ( $watchthis === false ) {
+ if ( $this->mTitle->userIsWatching() ) {
+ $dbw->begin();
+ $this->doUnwatch();
+ $dbw->commit();
+ }
+ }
+
+ # Give extensions a chance to modify URL query on update
+ $extraQuery = '';
+
+ wfRunHooks( 'ArticleUpdateBeforeRedirect', array( $this, &$sectionanchor, &$extraQuery ) );
+
+ if ( $redirect ) {
+ if ( $sectionanchor || $extraQuery ) {
+ $this->doRedirect( $this->isRedirect( $text ), $sectionanchor, $extraQuery );
+ } else {
+ $this->doRedirect( $this->isRedirect( $text ) );
+ }
+ }