r26383 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26382‎ | r26383 | r26384 >
Date:18:40, 3 October 2007
Author:david
Status:old
Tags:
Comment:
Possible fix for the history bug.
Modified paths:
  • /branches/liquidthreads/extensions/LqtModel.php (modified) (history)

Diff [purge]

Index: branches/liquidthreads/extensions/LqtModel.php
@@ -288,13 +288,18 @@
289289 return Threads::where($where);
290290 }
291291
292 - private function bumpRevisionsOnAncestors($change_type, $change_object) {
 292+ private function bumpRevisionsOnAncestors($change_type, $change_object, $change_reason) {
 293+ global $wgUser; // TODO global.
 294+
293295 $this->revisionNumber += 1;
294296 $this->setChangeType($change_type);
295297 $this->setChangeObject($change_object);
 298+ $this->changeComment = $change_reason;
 299+ $this->changeUser = $wgUser->getID();
 300+ $this->changeUserText = $wgUser->getName();
296301
297302 if( $this->hasSuperthread() )
298 - $this->superthread()->bumpRevisionsOnAncestors($change_type, $change_object);
 303+ $this->superthread()->bumpRevisionsOnAncestors($change_type, $change_object, $change_reason);
299304 $dbr =& wfGetDB( DB_MASTER );
300305 $res = $dbr->update( 'thread',
301306 /* SET */ array('thread_revision' => $this->revisionNumber,
@@ -330,7 +335,7 @@
331336 // TODO open a transaction.
332337 HistoricalThread::create( $this->double, $change_type, $change_object );
333338
334 - $this->bumpRevisionsOnAncestors($change_type, $change_object);
 339+ $this->bumpRevisionsOnAncestors($change_type, $change_object, $reason);
335340 self::setChangeOnDescendents($this->topmostThread(), $change_type, $change_object);
336341
337342 /* SCHEMA changes must be reflected here. */

Status & tagging log