Remove deprecated HistoryPage class
authorwithoutaname <drevitchi@gmail.com>
Thu, 17 Jul 2014 08:10:50 +0000 (01:10 -0700)
committerKrinkle <krinklemail@gmail.com>
Mon, 21 Jul 2014 04:54:40 +0000 (04:54 +0000)
Change-Id: I3db4d5a1a2c574a73e2fcfe1fd1da49f3570e4b6

RELEASE-NOTES-1.24
includes/AutoLoader.php
includes/Pager.php
includes/actions/HistoryAction.php
includes/actions/RawAction.php

index d76cd29..0e23f58 100644 (file)
@@ -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 ==
 
index 127f2cd..86bd9d3 100644 (file)
@@ -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',
index 5f05460..c7de8c1 100644 (file)
@@ -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.
index c946184..2ca9d9a 100644 (file)
@@ -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();
-       }
-}
index a212915..7d476e9 100644 (file)
@@ -5,7 +5,7 @@
  * Copyright © 2004 Gabriel Wicke <wicke@wikidev.net>
  * 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