Index: trunk/extensions/LiquidThreads/classes/Thread.php |
— | — | @@ -148,6 +148,10 @@ |
149 | 149 | function setRoot( $article ) { |
150 | 150 | $this->rootId = $article->getId(); |
151 | 151 | $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 | + } |
152 | 156 | } |
153 | 157 | |
154 | 158 | function setRootId( $article ) { |