From b376e4bbdad708f5beaa298a65a0628b5d5a7312 Mon Sep 17 00:00:00 2001 From: addshore Date: Fri, 26 Jan 2018 16:57:13 -0800 Subject: [PATCH] Remove deprecated PreparedEdit properties The following properties of PreparedEdit were deprecated in 1.21 and have been removed: * PreparedEdit->newText * PreparedEdit->oldText * PreparedEdit->pst These have no use left in core or extensions. Change-Id: Ic48c817aaf3fbb6d5f33678fcb4843180f0bc9fb --- RELEASE-NOTES-1.31 | 4 ++++ includes/edit/PreparedEdit.php | 23 ----------------------- includes/page/WikiPage.php | 9 --------- 3 files changed, 4 insertions(+), 32 deletions(-) diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31 index 6a10a86a07..264113e18a 100644 --- a/RELEASE-NOTES-1.31 +++ b/RELEASE-NOTES-1.31 @@ -186,6 +186,10 @@ changes to languages because of Phabricator reports. * The driver 'mysql' for MySQL, deprecated in MediaWiki 1.30, has been removed. The driver has been deprecated since PHP 5.5 and was removed in PHP 7.0. The default driver for MySQL has been 'mysqli' since MediaWiki 1.22. +* The following properties of PreparedEdit were deprecated in 1.21 and have been removed: + * PreparedEdit->newText + * PreparedEdit->oldText + * PreparedEdit->pst == Compatibility == MediaWiki 1.31 requires PHP 5.5.9 or later. Although HHVM 3.18.5 or later is supported, diff --git a/includes/edit/PreparedEdit.php b/includes/edit/PreparedEdit.php index 62624f4d91..910d221a7c 100644 --- a/includes/edit/PreparedEdit.php +++ b/includes/edit/PreparedEdit.php @@ -87,27 +87,4 @@ class PreparedEdit { */ public $oldContent; - /** - * $newContent in text form - * - * @var string - * @deprecated since 1.21 - */ - public $newText; - - /** - * $oldContent in text from - * - * @var string - * @deprecated since 1.21 - */ - public $oldText; - - /** - * $pstContent in text form - * - * @var string - * @deprecated since 1.21 - */ - public $pst; } diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index d403ab5810..a7f53df8be 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2128,15 +2128,6 @@ class WikiPage implements Page, IDBAccessObject { $edit->newContent = $content; $edit->oldContent = $this->getContent( Revision::RAW ); - // NOTE: B/C for hooks! don't use these fields! - $edit->newText = $edit->newContent - ? ContentHandler::getContentText( $edit->newContent ) - : ''; - $edit->oldText = $edit->oldContent - ? ContentHandler::getContentText( $edit->oldContent ) - : ''; - $edit->pst = $edit->pstContent ? $edit->pstContent->serialize( $serialFormat ) : ''; - if ( $edit->output ) { $edit->output->setCacheTime( wfTimestampNow() ); } -- 2.20.1