Index: trunk/phase3/includes/Pager.php |
— | — | @@ -72,17 +72,18 @@ |
73 | 73 | public $mResult; |
74 | 74 | |
75 | 75 | function __construct() { |
76 | | - global $wgRequest; |
| 76 | + global $wgRequest, $wgUser; |
77 | 77 | $this->mRequest = $wgRequest; |
78 | | - |
| 78 | + |
79 | 79 | # NB: the offset is quoted, not validated. It is treated as an arbitrary string |
80 | 80 | # to support the widest variety of index types. Be careful outputting it into |
81 | 81 | # HTML! |
82 | 82 | $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 | + |
87 | 88 | $this->mIsBackwards = ( $this->mRequest->getVal( 'dir' ) == 'prev' ); |
88 | 89 | $this->mIndexField = $this->getIndexField(); |
89 | 90 | $this->mDb = wfGetDB( DB_SLAVE ); |