Index: trunk/phase3/includes/Article.php |
— | — | @@ -2161,6 +2161,22 @@ |
2162 | 2162 | |
2163 | 2163 | wfProfileOut( __METHOD__ ); |
2164 | 2164 | } |
| 2165 | + |
| 2166 | + /** |
| 2167 | + * Perform article updates on a special page creation. |
| 2168 | + * |
| 2169 | + * @param Revision $rev |
| 2170 | + * |
| 2171 | + * @fixme This is a shitty interface function. Kill it and replace the |
| 2172 | + * other shitty functions like editUpdates and such so it's not needed |
| 2173 | + * anymore. |
| 2174 | + */ |
| 2175 | + function createUpdates( $rev ) { |
| 2176 | + $this->mGoodAdjustment = $this->isCountable( $rev->getText() ); |
| 2177 | + $this->mTotalAdjustment = 1; |
| 2178 | + $this->editUpdates( $rev->getText(), $rev->getComment(), |
| 2179 | + $rev->isMinor(), wfTimestamp(), $rev->getId(), true ); |
| 2180 | + } |
2165 | 2181 | |
2166 | 2182 | /** |
2167 | 2183 | * Generate the navigation links when browsing through an article revisions |
Index: trunk/phase3/includes/SpecialUndelete.php |
— | — | @@ -350,17 +350,11 @@ |
351 | 351 | if( $revision ) { |
352 | 352 | # FIXME: Update latest if newer as well... |
353 | 353 | if( $newid ) { |
354 | | - # FIXME: update article count if changed... |
| 354 | + // Attach the latest revision to the page... |
355 | 355 | $article->updateRevisionOn( $dbw, $revision, $previousRevId ); |
356 | | - |
357 | | - # Finally, clean up the link tables |
358 | | - $options = new ParserOptions; |
359 | | - $parserOutput = $wgParser->parse( $revision->getText(), $this->title, $options, |
360 | | - true, true, $newRevId ); |
361 | | - $u = new LinksUpdate( $this->title, $parserOutput ); |
362 | | - $u->doUpdate(); |
363 | | - |
364 | | - #TODO: SearchUpdate, etc. |
| 356 | + |
| 357 | + // Update site stats, link tables, etc |
| 358 | + $article->createUpdates( $revision ); |
365 | 359 | } |
366 | 360 | |
367 | 361 | if( $newid ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -275,6 +275,7 @@ |
276 | 276 | * Made messages used in Special:Preferences either plain text or wikitext (toggles) |
277 | 277 | * Replaced {{SERVER}}{{localurl:xxx}} with {{fullurl:xxx}} in localisation files |
278 | 278 | * Fix regression in Special:Watchlist text header |
| 279 | +* (bug 7510) Update article counts etc on undelete |
279 | 280 | |
280 | 281 | |
281 | 282 | == Languages updated == |