http://www.mediawiki.org/wiki/Special:Code/MediaWiki/71866

Revision: 71866
Author:   werdna
Date:     2010-08-29 03:02:17 +0000 (Sun, 29 Aug 2010)

Log Message:
-----------
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: trunk/extensions/LiquidThreads/classes/Thread.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/Thread.php   2010-08-29 02:08:11 UTC 
(rev 71865)
+++ trunk/extensions/LiquidThreads/classes/Thread.php   2010-08-29 03:02:17 UTC 
(rev 71866)
@@ -148,6 +148,10 @@
        function setRoot( $article ) {
                $this->rootId = $article->getId();
                $this->root = $article;
+               
+               if ( $article->getTitle()->getNamespace() != NS_LQT_THREAD ) {
+                       throw new MWException( "Attempt to set thread root to a 
non-Thread page" );
+               }
        }
 
        function setRootId( $article ) {



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to