r54529 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54528‎ | r54529 | r54530 >
Date:16:31, 6 August 2009
Author:werdna
Status:deferred
Tags:
Comment:
Only discard information in the Article object if it's not the correct Article_LQT_Compat class. Give a warning that useful information is being discarded.
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -632,7 +632,10 @@
633633 global $wgOut;
634634
635635 // Load compatibility layer for older versions
636 - $post = new Article_LQT_Compat( $post->getTitle() );
 636+ if ( !($post instanceof Article_LQT_Compat) ) {
 637+ wfWarn( "No article compatibility layer loaded, inefficiently duplicating information." );
 638+ $post = new Article_LQT_Compat( $post->getTitle() );
 639+ }
637640
638641 $parserOutput = $post->getParserOutput( $oldid );
639642 $wgOut->addParserOutputNoText( $parserOutput );

Status & tagging log