From: Alexandre Emsenhuber Date: Tue, 17 Jun 2008 08:41:07 +0000 (+0000) Subject: * Force ints for limit and days options, i get exceptions that they are not int ... X-Git-Tag: 1.31.0-rc.0~46975 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=a64f8eb77df14c6c11ad754eace4ad36a3a786d9;p=lhc%2Fweb%2Fwiklou.git * Force ints for limit and days options, i get exceptions that they are not int ($wgUser->getOption() seems to return a string) * Fix XHTML error --- diff --git a/includes/specials/Recentchanges.php b/includes/specials/Recentchanges.php index 2c61f1e8a6..24761930a3 100644 --- a/includes/specials/Recentchanges.php +++ b/includes/specials/Recentchanges.php @@ -15,8 +15,8 @@ class SpecialRecentChanges extends SpecialPage { $opts = new FormOptions(); - $opts->add( 'days', $wgUser->getDefaultOption('rcdays') ); - $opts->add( 'limit', $wgUser->getDefaultOption('rclimit') ); + $opts->add( 'days', (int)$wgUser->getDefaultOption('rcdays') ); + $opts->add( 'limit', (int)$wgUser->getDefaultOption('rclimit') ); $opts->add( 'from', '' ); $opts->add( 'hideminor', false ); @@ -39,8 +39,8 @@ class SpecialRecentChanges extends SpecialPage { global $wgUser, $wgRequest; $opts = $this->getDefaultOptions(); - $opts['days'] = $wgUser->getOption( 'rcdays', $opts['days'] ); - $opts['limit'] = $wgUser->getOption( 'rclimit', $opts['limit'] ); + $opts['days'] = (int)$wgUser->getOption( 'rcdays', $opts['days'] ); + $opts['limit'] = (int)$wgUser->getOption( 'rclimit', $opts['limit'] ); $opts['hideminor'] = $wgUser->getOption( 'hideminor', $opts['hideminor'] ); $opts->fetchValuesFromRequest( $wgRequest ); @@ -336,7 +336,7 @@ class SpecialRecentChanges extends SpecialPage { $panel = array(); $panel[] = rcOptionsPanel( $defaults, $nondefaults ); - $panel[] = '
'; + $panel[] = '
'; $extraOpts = array(); $extraOpts['namespace'] = $this->namespaceFilterForm( $opts );