$this->mainPrefsForm( '' );
}
}
-
- /**
+ /**
* @access private
*/
function validateInt( &$val, $min=0, $max=0x7fffffff ) {
}
}
+ /**
+ * @access private
+ */
+ function validateDate( &$val, $min = 0, $max = 0, $max=0x7fffffff ) {
+ if ( ( sprintf('%d', $val) === $val && $val >= $min && $val <= $max ) || $val == 'ISO 8601' )
+ return $val;
+ else
+ return 0;
+ }
+
/**
* Used to validate the user inputed timezone before saving it as
* 'timeciorrection', will return '00:00' if fed bogus data.
if( $wgUseTeX ) {
$wgUser->setOption( 'math', $this->mMath );
}
- $wgUser->setOption( 'date', $this->validateInt( $this->mDate, 0, 10 ) );
+ $wgUser->setOption( 'date', $this->validateDate( $this->mDate, 0, 10 ) );
$wgUser->setOption( 'searchlimit', $this->validateIntOrNull( $this->mSearch ) );
$wgUser->setOption( 'contextlines', $this->validateIntOrNull( $this->mSearchLines ) );
$wgUser->setOption( 'contextchars', $this->validateIntOrNull( $this->mSearchChars ) );