/**
* Expand a string of the form jquery.foo,bar|jquery.ui.baz,quux to
- * an array of module names like array( 'jquery.foo', 'jquery.bar',
- * 'jquery.ui.baz', 'jquery.ui.quux' )
+ * an array of module names like [ 'jquery.foo', 'jquery.bar',
+ * 'jquery.ui.baz', 'jquery.ui.quux' ]
* @param string $modules Packed module name list
* @return array Array of module names
*/
} else {
// We have a prefix and a bunch of suffixes
$prefix = substr( $group, 0, $pos ); // 'foo'
- $suffixes = explode( ',', substr( $group, $pos + 1 ) ); // array( 'bar', 'baz' )
+ $suffixes = explode( ',', substr( $group, $pos + 1 ) ); // [ 'bar', 'baz' ]
foreach ( $suffixes as $suffix ) {
$retval[] = "$prefix.$suffix";
}
// Stricter version of RequestContext::sanitizeLangCode()
if ( !Language::isValidBuiltInCode( $lang ) ) {
wfDebug( "Invalid user language code\n" );
- global $wgLanguageCode;
- $lang = $wgLanguageCode;
+ $lang = $this->getResourceLoader()->getConfig()->get( 'LanguageCode' );
}
$this->language = $lang;
}
*/
public function msg() {
return call_user_func_array( 'wfMessage', func_get_args() )
- ->inLanguage( $this->getLanguage() );
+ ->inLanguage( $this->getLanguage() )
+ // Use a dummy title because there is no real title
+ // for this endpoint, and the cache won't vary on it
+ // anyways.
+ ->title( Title::newFromText( 'Dwimmerlaik' ) );
}
/**
/**
* @see ResourceLoaderModule::getVersionHash
- * @see OutputPage::makeResourceLoaderLink
+ * @see ResourceLoaderClientHtml::makeLoad
* @return string|null
*/
public function getVersion() {