r22011 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22010‎ | r22011 | r22012 >
Date:21:08, 8 May 2007
Author:brion
Status:old
Tags:
Comment:
Merge trunk rr22010
* (bug 9808) Fix regression that ignored user 'rclimit' option for Special:Contributions
Modified paths:
  • /branches/REL1_10/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_10/phase3/includes/Pager.php (modified) (history)

Diff [purge]

Index: branches/REL1_10/phase3/includes/Pager.php
@@ -72,17 +72,18 @@
7373 public $mResult;
7474
7575 function __construct() {
76 - global $wgRequest;
 76+ global $wgRequest, $wgUser;
7777 $this->mRequest = $wgRequest;
78 -
 78+
7979 # NB: the offset is quoted, not validated. It is treated as an arbitrary string
8080 # to support the widest variety of index types. Be careful outputting it into
8181 # HTML!
8282 $this->mOffset = $this->mRequest->getText( 'offset' );
83 - $this->mLimit = $this->mRequest->getInt( 'limit', $this->mDefaultLimit );
84 - if ( $this->mLimit <= 0 || $this->mLimit > 50000 ) {
85 - $this->mLimit = $this->mDefaultLimit;
86 - }
 83+
 84+ # Use consistent behavior for the limit options
 85+ $this->mDefaultLimit = intval( $wgUser->getOption( 'rclimit' ) );
 86+ list( $this->mLimit, /* $offset */ ) = $this->mRequest->getLimitOffset();
 87+
8788 $this->mIsBackwards = ( $this->mRequest->getVal( 'dir' ) == 'prev' );
8889 $this->mIndexField = $this->getIndexField();
8990 $this->mDb = wfGetDB( DB_SLAVE );
Index: branches/REL1_10/phase3/RELEASE-NOTES
@@ -3,6 +3,12 @@
44 Security reminder: MediaWiki does not require PHP's register_globals
55 setting since version 1.2.0. If you have it on, turn it *off* if you can.
66
 7+== MediaWiki 1.10 ==
 8+
 9+Changes since 1.10.0rc2:
 10+
 11+* (bug 9808) Fix regression that ignored user 'rclimit' option for Special:Contributions
 12+
713 == MediaWiki 1.10.0rc2 ==
814
915 May 4, 2007
@@ -10,7 +16,7 @@
1117 THIS IS A RELEASE CANDIDATE MADE AVAILABLE FOR TESTING!
1218 A FINAL 1.10.0 RELEASE WILL APPEAR WITHIN A FEW DAYS.
1319
14 -Changes since 1.10.0RC1:
 20+Changes since 1.10.0rc1:
1521 * Various l10n fixes and updates
1622 * Fix for upgrade of page_restrictions table
1723 * (bug 9780) Fix normalization of titles with initial colon followed by whitespace
@@ -18,7 +24,7 @@
1925 * Avoid cyclic stub problems when authorization hooks do funny things with
2026 the user and the database at load time
2127
22 -== MediaWiki 1.10.0RC1 ==
 28+== MediaWiki 1.10.0rc1 ==
2329
2430 April 30, 2007
2531

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r22010* (bug 9808) Fix regression that ignored user 'rclimit' option for Special:Co...brion20:58, 8 May 2007