From 2a60ac8d72975854596d1f25b8842f73f381fac3 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 11 Oct 2007 12:31:46 +0000 Subject: [PATCH] (bug 11612) Days to show in recent changes cannot be larger than 7 --- RELEASE-NOTES | 1 + includes/SpecialPreferences.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f0a23a18a0..b7b4ff4d15 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -97,6 +97,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 11620) Add call to User::isValidEmailAddr during accout creation. * (bug 11629) If $wgEmailConfirmToEdit is true, require people to supply an email address when registering. +* (bug 11612) Days to show in recent changes cannot be larger than 7 === API changes in 1.12 === diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index 851eda25f4..fb8c01a1cc 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -207,7 +207,7 @@ class PreferencesForm { function savePreferences() { global $wgUser, $wgOut, $wgParser; global $wgEnableUserEmail, $wgEnableEmail; - global $wgEmailAuthentication; + global $wgEmailAuthentication, $wgRCMaxAge; global $wgAuth, $wgEmailConfirmToEdit; @@ -275,7 +275,7 @@ class PreferencesForm { $wgUser->setOption( 'contextlines', $this->validateIntOrNull( $this->mSearchLines ) ); $wgUser->setOption( 'contextchars', $this->validateIntOrNull( $this->mSearchChars ) ); $wgUser->setOption( 'rclimit', $this->validateIntOrNull( $this->mRecent ) ); - $wgUser->setOption( 'rcdays', $this->validateInt( $this->mRecentDays, 1, 7 ) ); + $wgUser->setOption( 'rcdays', $this->validateInt($this->mRecentDays, 1, ceil($wgRCMaxAge / (3600*24)))); $wgUser->setOption( 'wllimit', $this->validateIntOrNull( $this->mWatchlistEdits, 0, 1000 ) ); $wgUser->setOption( 'rows', $this->validateInt( $this->mRows, 4, 1000 ) ); $wgUser->setOption( 'cols', $this->validateInt( $this->mCols, 4, 1000 ) ); -- 2.20.1