Index: trunk/phase3/includes/Article.php |
— | — | @@ -667,18 +667,14 @@ |
668 | 668 | */ |
669 | 669 | public function isRedirect( $text = false ) { |
670 | 670 | if ( $text === false ) { |
671 | | - if ( $this->mDataLoaded ) { |
672 | | - return $this->mIsRedirect; |
| 671 | + if ( !$this->mDataLoaded ) { |
| 672 | + $this->loadPageData(); |
673 | 673 | } |
674 | 674 | |
675 | | - // Apparently loadPageData was never called |
676 | | - $this->loadContent(); |
677 | | - $titleObj = Title::newFromRedirectRecurse( $this->fetchContent() ); |
| 675 | + return (bool)$this->mIsRedirect; |
678 | 676 | } else { |
679 | | - $titleObj = Title::newFromRedirect( $text ); |
| 677 | + return Title::newFromRedirect( $text ) !== null; |
680 | 678 | } |
681 | | - |
682 | | - return $titleObj !== null; |
683 | 679 | } |
684 | 680 | |
685 | 681 | /** |