X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FArticle.php;h=0a4b5ee30e33cfc94550873507a8a48544a48b10;hb=39aa51bfbed8dd557d945d568963c2dad5429016;hp=1537ea66bf61803d460f87671711b165d1e520bc;hpb=1d00b757fc894d93624cd53121aa274118f17cb2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Article.php b/includes/Article.php index 1537ea66bf..0a4b5ee30e 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -90,7 +90,7 @@ class Article implements Page { /** * URL to redirect to or false if none - * @var string|false $mRedirectUrl + * @var string|bool $mRedirectUrl */ var $mRedirectUrl = false; // !< @@ -372,7 +372,7 @@ class Article implements Page { * uses this method to retrieve page text from the database, so the function * has to remain public for now. * - * @return string|bool string containing article contents, or false if null + * @return string|bool String containing article contents, or false if null * @deprecated since 1.21, use WikiPage::getContent() instead */ function fetchContent() { #BC cruft! @@ -386,6 +386,11 @@ class Article implements Page { $content = $this->fetchContentObject(); + if ( !$content ) { + wfProfileOut( __METHOD__ ); + return false; + } + // @todo Get rid of mContent everywhere! $this->mContent = ContentHandler::getContentText( $content ); ContentHandler::runLegacyHooks( 'ArticleAfterFetchContent', array( &$this, &$this->mContent ) ); @@ -865,7 +870,7 @@ class Article implements Page { * @param string $action The action= GET parameter * @param ParserOutput|null $pOutput * @return array The policy that should be set - * TODO: actions other than 'view' + * @todo: actions other than 'view' */ public function getRobotPolicy( $action, $pOutput = null ) { global $wgArticleRobotPolicies, $wgNamespaceRobotPolicies, $wgDefaultRobotPolicy; @@ -944,7 +949,7 @@ class Article implements Page { * Converts a String robot policy into an associative array, to allow * merging of several policies using array_merge(). * @param array|string $policy Returns empty array on null/false/'', transparent - * to already-converted arrays, converts String. + * to already-converted arrays, converts string. * @return array 'index' => \, 'follow' => \ */ public static function formatRobotPolicy( $policy ) {