Index: branches/liquidthreads/extensions/LqtModel.php |
— | — | @@ -288,13 +288,18 @@ |
289 | 289 | return Threads::where($where); |
290 | 290 | } |
291 | 291 | |
292 | | - private function bumpRevisionsOnAncestors($change_type, $change_object) { |
| 292 | + private function bumpRevisionsOnAncestors($change_type, $change_object, $change_reason) { |
| 293 | + global $wgUser; // TODO global. |
| 294 | + |
293 | 295 | $this->revisionNumber += 1; |
294 | 296 | $this->setChangeType($change_type); |
295 | 297 | $this->setChangeObject($change_object); |
| 298 | + $this->changeComment = $change_reason; |
| 299 | + $this->changeUser = $wgUser->getID(); |
| 300 | + $this->changeUserText = $wgUser->getName(); |
296 | 301 | |
297 | 302 | if( $this->hasSuperthread() ) |
298 | | - $this->superthread()->bumpRevisionsOnAncestors($change_type, $change_object); |
| 303 | + $this->superthread()->bumpRevisionsOnAncestors($change_type, $change_object, $change_reason); |
299 | 304 | $dbr =& wfGetDB( DB_MASTER ); |
300 | 305 | $res = $dbr->update( 'thread', |
301 | 306 | /* SET */ array('thread_revision' => $this->revisionNumber, |
— | — | @@ -330,7 +335,7 @@ |
331 | 336 | // TODO open a transaction. |
332 | 337 | HistoricalThread::create( $this->double, $change_type, $change_object ); |
333 | 338 | |
334 | | - $this->bumpRevisionsOnAncestors($change_type, $change_object); |
| 339 | + $this->bumpRevisionsOnAncestors($change_type, $change_object, $reason); |
335 | 340 | self::setChangeOnDescendents($this->topmostThread(), $change_type, $change_object); |
336 | 341 | |
337 | 342 | /* SCHEMA changes must be reflected here. */ |