* Made messages used in Special:Preferences either plain text or wikitext (toggles)
* Replaced {{SERVER}}{{localurl:xxx}} with {{fullurl:xxx}} in localisation files
* Fix regression in Special:Watchlist text header
+* (bug 7510) Update article counts etc on undelete
== Languages updated ==
wfProfileOut( __METHOD__ );
}
+
+ /**
+ * Perform article updates on a special page creation.
+ *
+ * @param Revision $rev
+ *
+ * @fixme This is a shitty interface function. Kill it and replace the
+ * other shitty functions like editUpdates and such so it's not needed
+ * anymore.
+ */
+ function createUpdates( $rev ) {
+ $this->mGoodAdjustment = $this->isCountable( $rev->getText() );
+ $this->mTotalAdjustment = 1;
+ $this->editUpdates( $rev->getText(), $rev->getComment(),
+ $rev->isMinor(), wfTimestamp(), $rev->getId(), true );
+ }
/**
* Generate the navigation links when browsing through an article revisions
if( $revision ) {
# FIXME: Update latest if newer as well...
if( $newid ) {
- # FIXME: update article count if changed...
+ // Attach the latest revision to the page...
$article->updateRevisionOn( $dbw, $revision, $previousRevId );
-
- # Finally, clean up the link tables
- $options = new ParserOptions;
- $parserOutput = $wgParser->parse( $revision->getText(), $this->title, $options,
- true, true, $newRevId );
- $u = new LinksUpdate( $this->title, $parserOutput );
- $u->doUpdate();
-
- #TODO: SearchUpdate, etc.
+
+ // Update site stats, link tables, etc
+ $article->createUpdates( $revision );
}
if( $newid ) {