From b26a8917c1f6880e0e4750e00fcc73bb62451942 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 18 Jul 2007 07:18:08 +0000 Subject: [PATCH] Clean up and update documentation for Title::isAlwaysKnown() --- includes/Title.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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 ) ); } /** -- 2.20.1