Index: trunk/phase3/includes/Article.php |
— | — | @@ -2056,9 +2056,6 @@ |
2057 | 2057 | Article::onArticleEdit( $this->mTitle ); |
2058 | 2058 | # Update links tables, site stats, etc. |
2059 | 2059 | $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, $changed ); |
2060 | | - |
2061 | | - $extraQuery = ''; # Give extensions a chance to modify URL query on update |
2062 | | - wfRunHooks( 'ArticleUpdateBeforeRedirect', array( $this, &$sectionanchor, &$extraQuery ) ); |
2063 | 2060 | } else { |
2064 | 2061 | # Create new article |
2065 | 2062 | $status->value['new'] = true; |
— | — | @@ -2138,20 +2135,23 @@ |
2139 | 2136 | &$redirect) ); |
2140 | 2137 | |
2141 | 2138 | # Watch or unwatch the page |
2142 | | - if ( $watchthis == true) { |
| 2139 | + if ( $watchthis === true ) { |
2143 | 2140 | if ( !$this->mTitle->userIsWatching() ) { |
2144 | 2141 | $dbw->begin(); |
2145 | 2142 | $this->doWatch(); |
2146 | 2143 | $dbw->commit(); |
2147 | 2144 | } |
2148 | | - } elseif ($watchthis == false) { |
| 2145 | + } elseif ( $watchthis === false ) { |
2149 | 2146 | if ( $this->mTitle->userIsWatching() ) { |
2150 | 2147 | $dbw->begin(); |
2151 | 2148 | $this->doUnwatch(); |
2152 | 2149 | $dbw->commit(); |
2153 | 2150 | } |
2154 | 2151 | } |
2155 | | - |
| 2152 | + |
| 2153 | + # Give extensions a chance to modify URL query on update |
| 2154 | + $extraQuery = ''; |
| 2155 | + wfRunHooks( 'ArticleUpdateBeforeRedirect', array( $this, &$sectionanchor, &$extraQuery ) ); |
2156 | 2156 | if ( $redirect ) { |
2157 | 2157 | if ( $sectionanchor || $extraQuery ) { |
2158 | 2158 | $this->doRedirect( $this->isRedirect( $text ), $sectionanchor, $extraQuery ); |