From: Rob Church Date: Wed, 18 Jul 2007 07:18:08 +0000 (+0000) Subject: Clean up and update documentation for Title::isAlwaysKnown() X-Git-Tag: 1.31.0-rc.0~52036 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=b26a8917c1f6880e0e4750e00fcc73bb62451942;p=lhc%2Fweb%2Fwiklou.git Clean up and update documentation for Title::isAlwaysKnown() --- diff --git a/includes/Title.php b/includes/Title.php index fa02564c18..7a459bd618 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2474,16 +2474,15 @@ class Title { } /** - * Should a link should be displayed as a known link, just based on its title? + * Do we know that this title definitely exists, or should we otherwise + * consider that it exists? * - * Currently, a self-link with a fragment and special pages are in - * this category. System messages that have defined default values are also - * always known. + * @return bool */ public function isAlwaysKnown() { - return ( $this->isExternal() || - ( 0 == $this->mNamespace && "" == $this->mDbkeyform ) || - ( NS_MEDIAWIKI == $this->mNamespace && wfMsgWeirdKey( $this->mDbkeyform ) ) ); + return $this->isExternal() + || ( $this->mNamespace == NS_MAIN && $this->mDbkeyform == '' ) + || ( $this->mNamespace == NS_MEDIAWIKI && wfMsgWeirdKey( $this->mDbkeyform ) ); } /**