Index: trunk/phase3/includes/SpecialImport.php |
— | — | @@ -211,6 +211,9 @@ |
212 | 212 | if( $pageId == 0 ) { |
213 | 213 | # must create the page... |
214 | 214 | $pageId = $article->insertOn( $dbw ); |
| 215 | + $created = true; |
| 216 | + } else { |
| 217 | + $created = false; |
215 | 218 | } |
216 | 219 | |
217 | 220 | # FIXME: Check for exact conflicts |
— | — | @@ -232,8 +235,27 @@ |
233 | 236 | 'minor_edit' => $this->minor, |
234 | 237 | ) ); |
235 | 238 | $revId = $revision->insertOn( $dbw ); |
236 | | - $article->updateIfNewerOn( $dbw, $revision ); |
| 239 | + $changed = $article->updateIfNewerOn( $dbw, $revision ); |
237 | 240 | |
| 241 | + if( $created ) { |
| 242 | + wfDebug( __METHOD__ . ": running onArticleCreate\n" ); |
| 243 | + Article::onArticleCreate( $this->title ); |
| 244 | + } else { |
| 245 | + if( $changed ) { |
| 246 | + wfDebug( __METHOD__ . ": running onArticleEdit\n" ); |
| 247 | + Article::onArticleEdit( $this->title ); |
| 248 | + } |
| 249 | + } |
| 250 | + if( $created || $changed ) { |
| 251 | + wfDebug( __METHOD__ . ": running edit updates\n" ); |
| 252 | + $article->editUpdates( |
| 253 | + $this->getText(), |
| 254 | + $this->getComment(), |
| 255 | + $this->minor, |
| 256 | + $this->timestamp, |
| 257 | + $revId ); |
| 258 | + } |
| 259 | + |
238 | 260 | return true; |
239 | 261 | } |
240 | 262 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -573,6 +573,7 @@ |
574 | 574 | * (bug 672) Add MathAfterTexvc hook |
575 | 575 | * Update to Piedmontese localization (pms) |
576 | 576 | * dumpBackup can optionally compress via dbzip2 |
| 577 | +* (bug 2483) Run link updates on change via XML import |
577 | 578 | |
578 | 579 | |
579 | 580 | == Compatibility == |