Revision: 52551 Author: werdna Date: 2009-06-29 16:33:56 +0000 (Mon, 29 Jun 2009)
Log Message: ----------- Fix bizarre handling of $thread->article() calls, wasn't considering the possibility of new threads properly. Modified Paths: -------------- trunk/extensions/LiquidThreads/classes/LqtThread.php Modified: trunk/extensions/LiquidThreads/classes/LqtThread.php =================================================================== --- trunk/extensions/LiquidThreads/classes/LqtThread.php 2009-06-29 16:29:43 UTC (rev 52550) +++ trunk/extensions/LiquidThreads/classes/LqtThread.php 2009-06-29 16:33:56 UTC (rev 52551) @@ -557,14 +557,18 @@ function article() { if ( $this->article ) return $this->article; - $title = Title::newFromID( $this->articleId ); - if ( $title ) { - $a = new Article( $title ); + if ( !is_null( $this->articleId ) ) { + $title = Title::newFromID( $this->articleId ); + if ( $title ) { + $article = new Article( $title ); + } } - if ( isset( $a ) && $a->exists() ) { - return $a; + if ( isset( $article ) && $article->exists() ) { + $this->article = $article; + return $article; } else { - return new Article( Title::makeTitle( $this->articleNamespace, $this->articleTitle ) ); + $title = Title::makeTitle( $this->articleNamespace, $this->articleTitle ); + return new Article( $title ); } } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs