Index: trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php |
— | — | @@ -22,11 +22,13 @@ |
23 | 23 | $this->mTemplate = trim( $params['template'] ); |
24 | 24 | $this->mUserParam = trim( $params['userparam'] ); |
25 | 25 | |
26 | | - global $wgLang; |
27 | | - // store the actual user's language, so we can revert |
28 | | - // back to it after printing the calendar |
29 | | - $this->mRealUserLang = clone ( $wgLang ); |
30 | | - $wgLang = Language::factory( trim( $params['lang'] ) ); |
| 26 | + if ( $params['userparam'] !== false ) { |
| 27 | + global $wgLang; |
| 28 | + // store the actual user's language, so we can revert |
| 29 | + // back to it after printing the calendar |
| 30 | + $this->mRealUserLang = clone ( $wgLang ); |
| 31 | + $wgLang = Language::factory( trim( $params['lang'] ) ); |
| 32 | + } |
31 | 33 | } |
32 | 34 | |
33 | 35 | public function getName() { |
— | — | @@ -504,6 +506,7 @@ |
505 | 507 | |
506 | 508 | $params['lang'] = new Parameter( 'lang' ); |
507 | 509 | $params['lang']->setMessage( 'srf_paramdesc_calendarlang' ); |
| 510 | + $params['lang']->setDefault( false, false ); |
508 | 511 | |
509 | 512 | $params['template'] = new Parameter( 'template' ); |
510 | 513 | $params['template']->setDefault( '' ); |