From: Jeroen De Dauw Date: Thu, 9 Feb 2012 01:34:20 +0000 (+0000) Subject: put in r110285 again now that 1.19 branched X-Git-Tag: 1.31.0-rc.0~24841 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=14d2728ea69f972f1f981251708cbb0396e5f92c;p=lhc%2Fweb%2Fwiklou.git put in r110285 again now that 1.19 branched --- diff --git a/includes/Title.php b/includes/Title.php index b91c55c1d8..b7eea8b242 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4164,7 +4164,21 @@ class Title { * @return Bool */ public function isKnown() { - return $this->isAlwaysKnown() || $this->exists(); + $isKnown = null; + + /** + * Allows overriding default behaviour for determining if a page exists. + * If $isKnown is kept as null, regular checks happen. If it's + * a boolean, this value is returned by the isKnown method. + * + * @since 1.20 + * + * @param Title $title + * @param boolean|null $isKnown + */ + wfRunHooks( 'TitleIsKnown', array( $this, &$isKnown ) ); + + return is_null( $isKnown ) ? ( $this->isAlwaysKnown() || $this->exists() ) : $isKnown; } /**