WikiPage::prepareTextForEdit() was removed
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index f016494..51d9c6a 100644 (file)
@@ -2076,22 +2076,6 @@ class WikiPage implements Page, IDBAccessObject {
                return $options;
        }
 
-       /**
-        * Prepare text which is about to be saved.
-        * Returns a stdClass with source, pst and output members
-        *
-        * @param string $text
-        * @param int|null $revid
-        * @param User|null $user
-        * @deprecated since 1.21: use prepareContentForEdit instead.
-        * @return object
-        */
-       public function prepareTextForEdit( $text, $revid = null, User $user = null ) {
-               wfDeprecated( __METHOD__, '1.21' );
-               $content = ContentHandler::makeContent( $text, $this->getTitle() );
-               return $this->prepareContentForEdit( $content, $revid, $user );
-       }
-
        /**
         * Prepare content which is about to be saved.
         * Returns a stdClass with source, pst and output members
@@ -3519,28 +3503,6 @@ class WikiPage implements Page, IDBAccessObject {
                return $result;
        }
 
-       /**
-        * Return an applicable autosummary if one exists for the given edit.
-        * @param string|null $oldtext The previous text of the page.
-        * @param string|null $newtext The submitted text of the page.
-        * @param int $flags Bitmask: a bitmask of flags submitted for the edit.
-        * @return string An appropriate autosummary, or an empty string.
-        *
-        * @deprecated since 1.21, use ContentHandler::getAutosummary() instead
-        */
-       public static function getAutosummary( $oldtext, $newtext, $flags ) {
-               // NOTE: stub for backwards-compatibility. assumes the given text is
-               // wikitext. will break horribly if it isn't.
-
-               wfDeprecated( __METHOD__, '1.21' );
-
-               $handler = ContentHandler::getForModelID( CONTENT_MODEL_WIKITEXT );
-               $oldContent = is_null( $oldtext ) ? null : $handler->unserializeContent( $oldtext );
-               $newContent = is_null( $newtext ) ? null : $handler->unserializeContent( $newtext );
-
-               return $handler->getAutosummary( $oldContent, $newContent, $flags );
-       }
-
        /**
         * Auto-generates a deletion reason
         *
@@ -3749,4 +3711,30 @@ class WikiPage implements Page, IDBAccessObject {
        public function isLocal() {
                return true;
        }
+
+       /**
+        * The display name for the site this content
+        * come from. If a subclass overrides isLocal(),
+        * this could return something other than the
+        * current site name
+        *
+        * @since 1.28
+        * @return string
+        */
+       public function getWikiDisplayName() {
+               global $wgSitename;
+               return $wgSitename;
+       }
+
+       /**
+        * Get the source URL for the content on this page,
+        * typically the canonical URL, but may be a remote
+        * link if the content comes from another site
+        *
+        * @since 1.28
+        * @return string
+        */
+       public function getSourceURL() {
+               return $this->getTitle()->getCanonicalURL();
+       }
 }