Index: branches/liquidthreads/extensions/LqtModel.php |
— | — | @@ -288,7 +288,7 @@ |
289 | 289 | return Threads::where($where); |
290 | 290 | } |
291 | 291 | |
292 | | - private function bumpRevisionsOnAncestors($change_type, $change_object, $change_reason) { |
| 292 | + private function bumpRevisionsOnAncestors($change_type, $change_object, $change_reason, $timestamp) { |
293 | 293 | global $wgUser; // TODO global. |
294 | 294 | |
295 | 295 | $this->revisionNumber += 1; |
— | — | @@ -299,12 +299,16 @@ |
300 | 300 | $this->changeUserText = $wgUser->getName(); |
301 | 301 | |
302 | 302 | if( $this->hasSuperthread() ) |
303 | | - $this->superthread()->bumpRevisionsOnAncestors($change_type, $change_object, $change_reason); |
| 303 | + $this->superthread()->bumpRevisionsOnAncestors($change_type, $change_object, $change_reason, $timestamp); |
304 | 304 | $dbr =& wfGetDB( DB_MASTER ); |
305 | 305 | $res = $dbr->update( 'thread', |
306 | 306 | /* SET */ array('thread_revision' => $this->revisionNumber, |
307 | 307 | 'thread_change_type'=>$this->changeType, |
308 | | - 'thread_change_object'=>$this->changeObject), |
| 308 | + 'thread_change_object'=>$this->changeObject, |
| 309 | + 'thread_change_comment' => $this->changeComment, |
| 310 | + 'thread_change_user' => $this->changeUser, |
| 311 | + 'thread_change_user_text' => $this->changeUserText, |
| 312 | + 'thread_timestamp' => $timestamp), |
309 | 313 | /* WHERE */ array( 'thread_id' => $this->id ), |
310 | 314 | __METHOD__); |
311 | 315 | } |
— | — | @@ -327,15 +331,15 @@ |
328 | 332 | |
329 | 333 | function commitRevision($change_type, $change_object = null, $reason = "") { |
330 | 334 | global $wgUser; // TODO global. |
331 | | - |
| 335 | + /* |
332 | 336 | $this->changeComment = $reason; |
333 | 337 | $this->changeUser = $wgUser->getID(); |
334 | 338 | $this->changeUserText = $wgUser->getName(); |
335 | | - |
| 339 | + */ |
336 | 340 | // TODO open a transaction. |
337 | 341 | HistoricalThread::create( $this->double, $change_type, $change_object ); |
338 | 342 | |
339 | | - $this->bumpRevisionsOnAncestors($change_type, $change_object, $reason); |
| 343 | + $this->bumpRevisionsOnAncestors($change_type, $change_object, $reason, wfTimestampNow()); |
340 | 344 | self::setChangeOnDescendents($this->topmostThread(), $change_type, $change_object); |
341 | 345 | |
342 | 346 | /* SCHEMA changes must be reflected here. */ |
— | — | @@ -346,15 +350,15 @@ |
347 | 351 | 'thread_path' => $this->path, |
348 | 352 | 'thread_type' => $this->type, |
349 | 353 | 'thread_summary_page' => $this->summaryId, |
350 | | - 'thread_timestamp' => wfTimestampNow(), |
351 | | - 'thread_revision' => $this->revisionNumber, |
| 354 | +// 'thread_timestamp' => wfTimestampNow(), |
| 355 | +// 'thread_revision' => $this->revisionNumber, |
352 | 356 | 'thread_article_namespace' => $this->articleNamespace, |
353 | 357 | 'thread_article_title' => $this->articleTitle, |
354 | | - 'thread_change_type' => $this->changeType, |
355 | | - 'thread_change_object' => $this->changeObject, |
356 | | - 'thread_change_comment' => $this->changeComment, |
357 | | - 'thread_change_user' => $this->changeUser, |
358 | | - 'thread_change_user_text' => $this->changeUserText, |
| 358 | +// 'thread_change_type' => $this->changeType, |
| 359 | +// 'thread_change_object' => $this->changeObject, |
| 360 | +// 'thread_change_comment' => $this->changeComment, |
| 361 | +// 'thread_change_user' => $this->changeUser, |
| 362 | +// 'thread_change_user_text' => $this->changeUserText, |
359 | 363 | ), |
360 | 364 | /* WHERE */ array( 'thread_id' => $this->id, ), |
361 | 365 | __METHOD__); |