* Previously it would always fetch the whole content,
which is silly since followRedirect() uses the redirect
table to avoid loading the text. The initializeArticle()
uses isRedirect() and then possibly followRedirect(). It
makes no sense for the former to fetch all the text anway.
* The time fetching the text showed up on xenon flamegraphs.
Change-Id: I2dc216f36d3a0ea2285e64122b4d07bd9c8ae703
* @return bool
*/
public function isRedirect() {
- $content = $this->getContent();
- if ( !$content ) {
- return false;
+ if ( !$this->mDataLoaded ) {
+ $this->loadPageData();
}
- return $content->isRedirect();
+ return (bool)$this->mIsRedirect;
}
/**