r24109 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24108‎ | r24109 | r24110 >
Date:06:29, 15 July 2007
Author:david
Status:old
Tags:
Comment:
revisions work properly on subthreads, although the method is screwed up
Modified paths:
  • /branches/liquidthreads/extensions/LqtModel.php (modified) (history)

Diff [purge]

Index: branches/liquidthreads/extensions/LqtModel.php
@@ -204,12 +204,23 @@
205205 return $results;
206206 }
207207
 208+ private function bumpRevisions() {
 209+ $this->revisionNumber += 1;
 210+ if( $this->hasSuperthread() )
 211+ $this->superthread()->bumpRevisions();
 212+ $dbr =& wfGetDB( DB_MASTER );
 213+ $res = $dbr->update( 'thread',
 214+ /* SET */ array('thread_revision' => $this->revisionNumber),
 215+ /* WHERE */ array( 'thread_id' => $this->id ),
 216+ __METHOD__);
 217+ }
 218+
208219 function commitRevision() {
209220 // TODO open a transaction.
210221 HistoricalThread::create( $this->double );
211222
212 - $this->revisionNumber += 1;
213 -
 223+ $this->bumpRevisions();
 224+
214225 $dbr =& wfGetDB( DB_MASTER );
215226 $res = $dbr->update( 'thread',
216227 /* SET */array( 'thread_root' => $this->rootId,

Status & tagging log