From a64f8eb77df14c6c11ad754eace4ad36a3a786d9 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 17 Jun 2008 08:41:07 +0000 Subject: [PATCH] * 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 --- includes/specials/Recentchanges.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 ); -- 2.20.1