From: withoutaname Date: Thu, 17 Jul 2014 08:10:50 +0000 (-0700) Subject: Remove deprecated HistoryPage class X-Git-Tag: 1.31.0-rc.0~14856 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=071353c89afc914ca2f4fa1d62b4e8213a22c1dd;p=lhc%2Fweb%2Fwiklou.git Remove deprecated HistoryPage class Change-Id: I3db4d5a1a2c574a73e2fcfe1fd1da49f3570e4b6 --- diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index d76cd29a76..0e23f58a60 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -299,6 +299,7 @@ changes to languages because of Bugzilla reports. * WatchlistEditor - Use SpecialEditWatchlist directly * FormatExif - Use FormatMetadata directly * RevertFileAction - Use RevertAction directly +* HistoryPage - Use HistoryAction directly == Compatibility == diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 127f2cd4d3..86bd9d3c80 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -205,7 +205,6 @@ $wgAutoloadLocalClasses = array( 'FormlessAction' => 'includes/actions/FormlessAction.php', 'FormAction' => 'includes/actions/FormAction.php', 'HistoryAction' => 'includes/actions/HistoryAction.php', - 'HistoryPage' => 'includes/actions/HistoryAction.php', 'HistoryPager' => 'includes/actions/HistoryAction.php', 'InfoAction' => 'includes/actions/InfoAction.php', 'MarkpatrolledAction' => 'includes/actions/MarkpatrolledAction.php', diff --git a/includes/Pager.php b/includes/Pager.php index 5f054601a8..c7de8c1ea0 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -69,7 +69,7 @@ interface Pager { * last page depending on the dir parameter. * * Subclassing the pager to implement concrete functionality should be fairly - * simple, please see the examples in HistoryPage.php and + * simple, please see the examples in HistoryAction.php and * SpecialBlockList.php. You just need to override formatRow(), * getQueryInfo() and getIndexField(). Don't forget to call the parent * constructor if you override it. diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index c946184b88..2ca9d9a279 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -214,7 +214,7 @@ class HistoryAction extends FormlessAction { * * @param int $limit The limit number of revisions to get * @param int $offset - * @param int $direction Either HistoryPage::DIR_PREV or HistoryPage::DIR_NEXT + * @param int $direction Either self::DIR_PREV or self::DIR_NEXT * @return ResultWrapper */ function fetchRevisions( $limit, $offset, $direction ) { @@ -225,9 +225,9 @@ class HistoryAction extends FormlessAction { $dbr = wfGetDB( DB_SLAVE ); - if ( $direction == HistoryPage::DIR_PREV ) { + if ( $direction === self::DIR_PREV ) { list( $dirs, $oper ) = array( "ASC", ">=" ); - } else { /* $direction == HistoryPage::DIR_NEXT */ + } else { /* $direction === self::DIR_NEXT */ list( $dirs, $oper ) = array( "DESC", "<=" ); } @@ -273,7 +273,7 @@ class HistoryAction extends FormlessAction { $limit = $request->getInt( 'limit', 10 ); $limit = min( max( $limit, 1 ), $wgFeedLimit ); - $items = $this->fetchRevisions( $limit, 0, HistoryPage::DIR_NEXT ); + $items = $this->fetchRevisions( $limit, 0, self::DIR_NEXT ); // Generate feed elements enclosed between header and footer. $feed->outHeader(); @@ -879,18 +879,3 @@ class HistoryPager extends ReverseChronologicalPager { return $this->preventClickjacking; } } - -/** - * Backwards-compatibility alias - */ -class HistoryPage extends HistoryAction { - // @codingStandardsIgnoreStart Needed "useless" override to make it public. - public function __construct( Page $article ) { - parent::__construct( $article ); - } - // @codingStandardsIgnoreEnd - - public function history() { - $this->onView(); - } -} diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php index a212915378..7d476e95f5 100644 --- a/includes/actions/RawAction.php +++ b/includes/actions/RawAction.php @@ -5,7 +5,7 @@ * Copyright © 2004 Gabriel Wicke * http://wikidev.net/ * - * Based on HistoryPage and SpecialExport + * Based on HistoryAction and SpecialExport * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by