From 14d2728ea69f972f1f981251708cbb0396e5f92c Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Thu, 9 Feb 2012 01:34:20 +0000 Subject: [PATCH] put in r110285 again now that 1.19 branched --- includes/Title.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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; } /** -- 2.20.1