Index: branches/liquidthreads/extensions/LqtExtension.php |
— | — | @@ -513,8 +513,25 @@ |
514 | 514 | } |
515 | 515 | |
516 | 516 | function showThread( $thread ) { |
| 517 | + global $wgLang; # TODO global. |
| 518 | + |
517 | 519 | $this->showThreadHeading( $thread ); |
518 | 520 | |
| 521 | + if ($thread->type() == Threads::TYPE_MOVED) { |
| 522 | + $revision = Revision::newFromTitle( $thread->title() ); |
| 523 | + $target = Title::newFromRedirect( $revision->getText() ); |
| 524 | + $t_thread = Threads::withRoot( new Article( $target ) ); |
| 525 | + $p = new Parser(); $sig = $p->getUserSig( $thread->root()->originalAuthor() ); |
| 526 | + |
| 527 | + $this->output->addHTML( "This thread is a placeholder indicating that a thread, <a href=\"{$target->getFullURL()}\">{$target->getText()}</a>, was removed from this page to another talk page. This move was made by " ); |
| 528 | + $this->output->addWikitext( $sig, false ); |
| 529 | + $this->output->addHTML( " at " ); |
| 530 | + $this->output->addHTML( $wgLang->timeanddate($thread->timestamp()) ); |
| 531 | + $this->output->addHTML( "." ); |
| 532 | + |
| 533 | + return; |
| 534 | + } |
| 535 | + |
519 | 536 | $timestamp = new Date($thread->timestamp()); |
520 | 537 | if( $thread->summary() ) { |
521 | 538 | $this->showSummary($thread); |
Index: branches/liquidthreads/extensions/LqtModel.php |
— | — | @@ -170,6 +170,7 @@ |
171 | 171 | |
172 | 172 | protected $id; |
173 | 173 | protected $revisionNumber; |
| 174 | + protected $type; |
174 | 175 | |
175 | 176 | /* Only used by $double to be saved into a historical thread. */ |
176 | 177 | protected $rootRevision; |
— | — | @@ -327,7 +328,9 @@ |
328 | 329 | $this->path = $line->thread_path; |
329 | 330 | $this->timestamp = $line->thread_timestamp; |
330 | 331 | $this->revisionNumber = $line->thread_revision; |
| 332 | + $this->type = $line->thread_type; |
331 | 333 | $this->replies = $children; |
| 334 | + |
332 | 335 | |
333 | 336 | $this->double = clone $this; |
334 | 337 | |
— | — | @@ -500,6 +503,10 @@ |
501 | 504 | function timestamp() { |
502 | 505 | return $this->timestamp; |
503 | 506 | } |
| 507 | + |
| 508 | + function type() { |
| 509 | + return $this->type; |
| 510 | + } |
504 | 511 | } |
505 | 512 | |
506 | 513 | /** Module of factory methods. */ |