r71866 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71865‎ | r71866 | r71867 >
Date:03:02, 29 August 2010
Author:werdna
Status:deferred
Tags:
Comment:
Prevent threads from ever being given roots outside the thread namespace, it results in weird bugs
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/Thread.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/Thread.php
@@ -148,6 +148,10 @@
149149 function setRoot( $article ) {
150150 $this->rootId = $article->getId();
151151 $this->root = $article;
 152+
 153+ if ( $article->getTitle()->getNamespace() != NS_LQT_THREAD ) {
 154+ throw new MWException( "Attempt to set thread root to a non-Thread page" );
 155+ }
152156 }
153157
154158 function setRootId( $article ) {

Status & tagging log