Index: trunk/extensions/LiquidThreads/classes/Thread.php |
— | — | @@ -555,6 +555,11 @@ |
556 | 556 | |
557 | 557 | global $wgParser, $wgOut, $wgTitle; |
558 | 558 | |
| 559 | + $setTitle = false; |
| 560 | + if ( !$wgOut->getTitle() ) { |
| 561 | + $setTitle = true; |
| 562 | + } |
| 563 | + |
559 | 564 | // Parser gets antsy about parser options here if it hasn't parsed anything before. |
560 | 565 | $wgParser->clearState(); |
561 | 566 | $wgParser->setTitle( $wgTitle ); |
— | — | @@ -574,9 +579,14 @@ |
575 | 580 | $fancysig = $signatureDataCache[$uid]['fancysig']; |
576 | 581 | |
577 | 582 | // Generate signature from Parser |
| 583 | + |
| 584 | + if ( $setTitle ) { |
| 585 | + $user_t = Title::makeTitleSafe( NS_USER, $name ); |
| 586 | + $wgOut->setTitle( $user_t ); |
| 587 | + } |
578 | 588 | |
579 | 589 | $sig = $wgParser->getUserSig( $user, $nickname, $fancysig ); |
580 | | - $sig = $wgOut->parseInline( $sig ); |
| 590 | + $sig = $wgOut->parse( $sig ); |
581 | 591 | |
582 | 592 | // Save into LqtView for later use. |
583 | 593 | LqtView::$userSignatureCache[$name] = $sig; |