r57564 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57563‎ | r57564 | r57565 >
Date:15:48, 9 October 2009
Author:werdna
Status:deferred
Tags:
Comment:
LiquidThreads: update article ID when moved from one page to another. Should fix issues on thread moving found on the labs wiki
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/Thread.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/Thread.php
@@ -288,18 +288,21 @@
289289
290290 $new_articleNamespace = $title->getNamespace();
291291 $new_articleTitle = $title->getDBkey();
 292+ $new_articleID = $title->getArticleID();
292293
293294 // Update on *all* subthreads.
294295 $dbr->update( 'thread',
295296 array(
296297 'thread_article_namespace' => $new_articleNamespace,
297298 'thread_article_title' => $new_articleTitle,
 299+ 'thread_article_id' => $new_articleID,
298300 ),
299301 array( 'thread_ancestor' => $this->id() ),
300302 __METHOD__ );
301303
302304 $this->articleNamespace = $new_articleNamespace;
303305 $this->articleTitle = $new_articleTitle;
 306+ $this->articleId = $new_articleID;
304307 $this->commitRevision( Threads::CHANGE_MOVED_TALKPAGE, null, $reason );
305308
306309 # Log the move

Status & tagging log