From: Kunal Mehta Date: Tue, 13 Sep 2016 04:27:25 +0000 (-0700) Subject: WikiPage: Use Title::isKnown() in hasViewableContent() X-Git-Tag: 1.31.0-rc.0~5622^2 X-Git-Url: http://git.cyclocoop.org/%27.parametre_url%28%20%20%20generer_action_auteur%28%27charger_plugin%27%2C%20%27update_flux%27%29%2C%27update_flux%27%2C%20%27oui%27%29.%27?a=commitdiff_plain;h=25ec0cc39aa083dd6a050939ad3df5a409a81989;p=lhc%2Fweb%2Fwiklou.git 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 --- 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(); } /**