Add WikiPage::isLocal()
authorKunal Mehta <legoktm@member.fsf.org>
Tue, 13 Sep 2016 04:32:53 +0000 (21:32 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 13 Sep 2016 04:56:06 +0000 (04:56 +0000)
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

index 938f292..f25dff0 100644 (file)
@@ -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;
+       }
 }