From 5176e6d069b4bd293c8c32188f8d4ad91f1c8104 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 12 Sep 2016 21:32:53 -0700 Subject: [PATCH] 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 --- includes/page/WikiPage.php | 11 +++++++++++ 1 file changed, 11 insertions(+) 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; + } } -- 2.20.1