r98526 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98525‎ | r98526 | r98527 >
Date:15:29, 30 September 2011
Author:jeroendedauw
Status:resolved (Comments)
Tags:
Comment:
follow up to r98519
Modified paths:
  • /trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php
@@ -22,11 +22,13 @@
2323 $this->mTemplate = trim( $params['template'] );
2424 $this->mUserParam = trim( $params['userparam'] );
2525
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+ }
3133 }
3234
3335 public function getName() {
@@ -504,6 +506,7 @@
505507
506508 $params['lang'] = new Parameter( 'lang' );
507509 $params['lang']->setMessage( 'srf_paramdesc_calendarlang' );
 510+ $params['lang']->setDefault( false, false );
508511
509512 $params['template'] = new Parameter( 'template' );
510513 $params['template']->setDefault( '' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r98544Follow up to r98526;jeroendedauw18:30, 30 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98519follow up to r98488; fixing compat of calendar formatjeroendedauw14:38, 30 September 2011

Comments

Status & tagging log