if ( !is_null( $params['lang'] ) && $params['lang'] != $wgLang->getCode() ) {
$oldLang = $wgLang; // Keep $wgLang for restore later
$wgLang = Language::factory( $params['lang'] );
+ } else if ( is_null( $params['lang'] ) ) {
+ // Language not determined by URL but by user preferences, so don't cache
+ $this->getMain()->setVaryCookie();
}
$prop = array_flip( (array)$params['prop'] );
}
// Get all requested messages and print the result
- $messages = array();
$skip = !is_null( $params['from'] );
$result = $this->getResult();
foreach ( $messages_target as $message ) {