r57663 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57662‎ | r57663 | r57664 >
Date:11:10, 13 October 2009
Author:werdna
Status:deferred
Tags:
Comment:
Fix dumping of discussion threading data by setting a title when precaching user signature data.
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/Thread.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/Thread.php
@@ -555,6 +555,11 @@
556556
557557 global $wgParser, $wgOut, $wgTitle;
558558
 559+ $setTitle = false;
 560+ if ( !$wgOut->getTitle() ) {
 561+ $setTitle = true;
 562+ }
 563+
559564 // Parser gets antsy about parser options here if it hasn't parsed anything before.
560565 $wgParser->clearState();
561566 $wgParser->setTitle( $wgTitle );
@@ -574,9 +579,14 @@
575580 $fancysig = $signatureDataCache[$uid]['fancysig'];
576581
577582 // Generate signature from Parser
 583+
 584+ if ( $setTitle ) {
 585+ $user_t = Title::makeTitleSafe( NS_USER, $name );
 586+ $wgOut->setTitle( $user_t );
 587+ }
578588
579589 $sig = $wgParser->getUserSig( $user, $nickname, $fancysig );
580 - $sig = $wgOut->parseInline( $sig );
 590+ $sig = $wgOut->parse( $sig );
581591
582592 // Save into LqtView for later use.
583593 LqtView::$userSignatureCache[$name] = $sig;

Follow-up revisions

RevisionCommit summaryAuthorDate
r57664Merge r57663werdna11:11, 13 October 2009

Status & tagging log