* Reject malformed addresses in X-Forwarded-For entries
* (bug 3359) Add hooks on completion of file upload
* (bug 5559) Improve detection of ImageMagick [patch: Greg Turnquist]
+* (bug 5475) New pages feeds ignore "limit" argument
== Compatibility ==
}
/**
- * Yay, more global functions!
+ * Obtain the offset and limit values from the request string;
+ * used in special pages
+ *
+ * @param $deflimit Default limit if none supplied
+ * @param $optionname Name of a user preference to check against
+ * @return array
+ *
*/
function wfCheckLimits( $deflimit = 50, $optionname = 'rclimit' ) {
global $wgRequest;
/**
* Similar to above, but packaging in a syndicated feed instead of a web page
*/
- function doFeed( $class = '' ) {
+ function doFeed( $class = '', $limit = 50 ) {
global $wgFeedClasses;
if( isset($wgFeedClasses[$class]) ) {
$dbr =& wfGetDB( DB_SLAVE );
$sql = $this->getSQL() . $this->getOrder();
- $sql = $dbr->limitResult( $sql, 50, 0 );
+ $sql = $dbr->limitResult( $sql, $limit, 0 );
$res = $dbr->query( $sql, 'QueryPage::doFeed' );
while( $obj = $dbr->fetchObject( $res ) ) {
$item = $this->feedResult( $obj );
$npp = new NewPagesPage( $namespace );
- if ( ! $npp->doFeed( $wgRequest->getVal( 'feed' ) ) )
+ if ( ! $npp->doFeed( $wgRequest->getVal( 'feed' ), $limit ) )
$npp->doQuery( $offset, $limit, $shownavigation );
}