Remove functions deprecated since 1.21 from EditPage.php
authorwithoutaname <drevitchi@gmail.com>
Tue, 22 Jul 2014 00:13:45 +0000 (17:13 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Wed, 30 Jul 2014 16:02:43 +0000 (09:02 -0700)
Specifically functions getContent(), getPreloadedText(), mergeChangesInto()
and setPreloadedText().

Change-Id: I5a258b4f060b1a3ae1218b8a8f424f2c9e8f146e

RELEASE-NOTES-1.24
includes/EditPage.php

index f59df05..79fa3bb 100644 (file)
@@ -284,6 +284,8 @@ changes to languages because of Bugzilla reports.
 * Removed File::getPropsFromPath(). (deprecated since 1.19)
 * Removed functions blockedPage(), noCreatePermission(), readOnlyPage() and
   userNotLoggedInPage() from EditPage.php. (deprecated since 1.19)
+* Removed functions getContent(), getPreloadedText(), mergeChangesInto() and
+  setPreloadedText() from EditPage.php. (deprecated since 1.21)
 
 ==== Renamed classes ====
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
index 5aea2fc..6454cfa 100644 (file)
@@ -958,29 +958,6 @@ class EditPage {
                return true;
        }
 
-       /**
-        * Fetch initial editing page content.
-        *
-        * @param string|bool $def_text
-        * @return string|bool String on success, $def_text for invalid sections
-        * @private
-        * @deprecated since 1.21, get WikiPage::getContent() instead.
-        */
-       function getContent( $def_text = false ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
-
-               if ( $def_text !== null && $def_text !== false && $def_text !== '' ) {
-                       $def_content = $this->toEditContent( $def_text );
-               } else {
-                       $def_content = false;
-               }
-
-               $content = $this->getContentObject( $def_content );
-
-               // Note: EditPage should only be used with text based content anyway.
-               return $this->toEditText( $content );
-       }
-
        /**
         * @param Content|null $def_content The default value to return
         *
@@ -1168,20 +1145,6 @@ class EditPage {
                }
        }
 
-       /**
-        * Use this method before edit() to preload some text into the edit box
-        *
-        * @param string $text
-        * @deprecated since 1.21, use setPreloadedContent() instead.
-        */
-       public function setPreloadedText( $text ) {
-               ContentHandler::deprecated( __METHOD__, "1.21" );
-
-               $content = $this->toEditContent( $text );
-
-               $this->setPreloadedContent( $content );
-       }
-
        /**
         * Use this method before edit() to preload some content into the edit box
         *
@@ -1193,25 +1156,6 @@ class EditPage {
                $this->mPreloadContent = $content;
        }
 
-       /**
-        * Get the contents to be preloaded into the box, either set by
-        * an earlier setPreloadText() or by loading the given page.
-        *
-        * @param string $preload Representing the title to preload from.
-        *
-        * @return string
-        *
-        * @deprecated since 1.21, use getPreloadedContent() instead
-        */
-       protected function getPreloadedText( $preload ) {
-               ContentHandler::deprecated( __METHOD__, "1.21" );
-
-               $content = $this->getPreloadedContent( $preload );
-               $text = $this->toEditText( $content );
-
-               return $text;
-       }
-
        /**
         * Get the contents to be preloaded into the box, either set by
         * an earlier setPreloadText() or by loading the given page.
@@ -2002,28 +1946,6 @@ class EditPage {
                }
        }
 
-       /**
-        * Attempts to merge text content with base and current revisions
-        *
-        * @param string $editText
-        *
-        * @return bool
-        * @deprecated since 1.21, use mergeChangesIntoContent() instead
-        */
-       function mergeChangesInto( &$editText ) {
-               ContentHandler::deprecated( __METHOD__, "1.21" );
-
-               $editContent = $this->toEditContent( $editText );
-
-               $ok = $this->mergeChangesIntoContent( $editContent );
-
-               if ( $ok ) {
-                       $editText = $this->toEditText( $editContent );
-                       return true;
-               }
-               return false;
-       }
-
        /**
         * Attempts to do 3-way merge of edit content with a base revision
         * and current content, in case of edit conflict, in whichever way appropriate