*
* @param string $opt
* @return string
- * @static
- * @public
*/
- function getDefaultOption( $opt ) {
- $defOpts = User::getDefaultOptions();
+ public static function getDefaultOption( $opt ) {
+ $defOpts = self::getDefaultOptions();
if( isset( $defOpts[$opt] ) ) {
return $defOpts[$opt];
} else {
}
public function getDefaultOptions() {
- global $wgUser;
-
$opts = new FormOptions();
- $opts->add( 'days', (int)$wgUser->getDefaultOption('rcdays') );
- $opts->add( 'limit', (int)$wgUser->getDefaultOption('rclimit') );
+ $opts->add( 'days', (int)User::getDefaultOption( 'rcdays' ) );
+ $opts->add( 'limit', (int)User::getDefaultOption( 'rclimit' ) );
$opts->add( 'from', '' );
$opts->add( 'hideminor', false );
// Give precedence to subpage syntax
if ( $parameters !== null ) {
- $this->parseParameters( $this->par, $opts );
+ $this->parseParameters( $parameters, $opts );
}
$opts->validateIntBounds( 'limit', 0, 5000 );
$wgOut->setSquidMaxage( 10 );
$lastmod = $this->checkLastModified( $feedFormat );
- if ( !$lastmod ) {
+ if( $lastmod === false ){
return;
}