From 1ebad72b0b45209ab04562716af0d1ff7b4efda6 Mon Sep 17 00:00:00 2001 From: withoutaname Date: Mon, 21 Jul 2014 17:13:45 -0700 Subject: [PATCH] Remove functions deprecated since 1.21 from EditPage.php Specifically functions getContent(), getPreloadedText(), mergeChangesInto() and setPreloadedText(). Change-Id: I5a258b4f060b1a3ae1218b8a8f424f2c9e8f146e --- RELEASE-NOTES-1.24 | 2 ++ includes/EditPage.php | 78 ------------------------------------------- 2 files changed, 2 insertions(+), 78 deletions(-) diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index f59df05424..79fa3bbb69 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -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 diff --git a/includes/EditPage.php b/includes/EditPage.php index 5aea2fc804..6454cfa0da 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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 -- 2.20.1