From 25ec0cc39aa083dd6a050939ad3df5a409a81989 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 12 Sep 2016 21:27:25 -0700 Subject: [PATCH] WikiPage: Use Title::isKnown() in hasViewableContent() The current implementation of hasViewableContent() is basically the same as Title::isKnown(), except that it switched the order of isAlwaysKnown() and exists(). (Also it used WikiPage::exists() instead of Title::exists(), but they're functionality equivalent). This will make refactoring Title::isAlwaysKnown() easier in the future as there is one less caller. Change-Id: I698f08fb0f3e6c3bc702ec7d523d7eda063e18ca --- includes/page/WikiPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 938f292887..fcc77a06dd 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -460,7 +460,7 @@ class WikiPage implements Page, IDBAccessObject { * @return bool */ public function hasViewableContent() { - return $this->exists() || $this->mTitle->isAlwaysKnown(); + return $this->mTitle->isKnown(); } /** -- 2.20.1