From: Kunal Mehta Date: Tue, 13 Sep 2016 04:32:53 +0000 (-0700) Subject: Add WikiPage::isLocal() X-Git-Tag: 1.31.0-rc.0~5618^2 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=5176e6d069b4bd293c8c32188f8d4ad91f1c8104;p=lhc%2Fweb%2Fwiklou.git Add WikiPage::isLocal() WikiFilePage has a isLocal() function which indicates whether the file is local or not. To better support other remote content, add this method to the base WikiPage class. It only returns true currently, since all content represented by WikiPage is local. Change-Id: Ia39c405af4d131d919a57512e72a112bd65cc461 --- diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 938f292887..f25dff0433 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3706,4 +3706,15 @@ class WikiPage implements Page, IDBAccessObject { Hooks::run( 'WikiPageDeletionUpdates', [ $this, $content, &$updates ] ); return $updates; } + + /** + * Whether this content displayed on this page + * comes from the local database + * + * @since 1.28 + * @return bool + */ + public function isLocal() { + return true; + } }