Index: branches/liquidthreads/extensions/LqtModel.php |
— | — | @@ -204,12 +204,23 @@ |
205 | 205 | return $results; |
206 | 206 | } |
207 | 207 | |
| 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 | + |
208 | 219 | function commitRevision() { |
209 | 220 | // TODO open a transaction. |
210 | 221 | HistoricalThread::create( $this->double ); |
211 | 222 | |
212 | | - $this->revisionNumber += 1; |
213 | | - |
| 223 | + $this->bumpRevisions(); |
| 224 | + |
214 | 225 | $dbr =& wfGetDB( DB_MASTER ); |
215 | 226 | $res = $dbr->update( 'thread', |
216 | 227 | /* SET */array( 'thread_root' => $this->rootId, |