From: Aaron Schulz Date: Wed, 14 May 2008 13:28:46 +0000 (+0000) Subject: * Treat offset as a string, so paging works X-Git-Tag: 1.31.0-rc.0~47636 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=93bb1562366397a67549e064672659ce1f12fc3c;p=lhc%2Fweb%2Fwiklou.git * Treat offset as a string, so paging works * PG offsets are not just digits --- diff --git a/includes/SpecialNewpages.php b/includes/SpecialNewpages.php index 4dfba8004d..00cb7f2521 100644 --- a/includes/SpecialNewpages.php +++ b/includes/SpecialNewpages.php @@ -35,7 +35,7 @@ class NewPagesForm { $opts->add( 'hidepatrolled', false ); $opts->add( 'hidebots', false ); $opts->add( 'limit', 50 ); - $opts->add( 'offset', 0 ); + $opts->add( 'offset', '' ); $opts->add( 'namespace', '0' ); $opts->add( 'username', '' ); $opts->add( 'feed', '' ); @@ -72,7 +72,8 @@ class NewPagesForm { $m = array(); if ( preg_match( '/^limit=(\d+)$/', $bit, $m ) ) $this->opts->setValue( 'limit', intval($m[1]) ); - if ( preg_match( '/^offset=(\d+)$/', $bit, $m ) ) + // PG offsets not just digits! + if ( preg_match( '/^offset=([^=]+)$/', $bit, $m ) ) $this->opts->setValue( 'offset', intval($m[1]) ); if ( preg_match( '/^namespace=(.*)$/', $bit, $m ) ) { $ns = $wgLang->getNsIndex( $m[1] );