This way, they automatically bypass any stale client or server cache.
Remove an old wfExpandUrl() call that would interfere with
transformResourcePath()'s ability to recognise the path.
Expanding the url there wasn't needed anyway. Whether it's on a separate host
(eg. bits.wikimedia.org), or path-absolute, either way works as-is.
Bug: T90983
Change-Id: I64eb3291adcfc3733ef96690399c09c06e19b3aa
$remoteBasePath = (string)$options['remoteBasePath'];
}
$remoteBasePath = (string)$options['remoteBasePath'];
}
- // Make sure the remote base path is a complete valid URL,
- // but possibly protocol-relative to avoid cache pollution
- $remoteBasePath = wfExpandUrl( $remoteBasePath, PROTO_RELATIVE );
-
return [ $localBasePath, $remoteBasePath ];
}
return [ $localBasePath, $remoteBasePath ];
}
public function getScriptURLsForDebug( ResourceLoaderContext $context ) {
$urls = [];
foreach ( $this->getScriptFiles( $context ) as $file ) {
public function getScriptURLsForDebug( ResourceLoaderContext $context ) {
$urls = [];
foreach ( $this->getScriptFiles( $context ) as $file ) {
- $urls[] = $this->getRemotePath( $file );
+ $urls[] = OutputPage::transformResourcePath(
+ $this->getConfig(),
+ $this->getRemotePath( $file )
+ );
foreach ( $this->getStyleFiles( $context ) as $mediaType => $list ) {
$urls[$mediaType] = [];
foreach ( $list as $file ) {
foreach ( $this->getStyleFiles( $context ) as $mediaType => $list ) {
$urls[$mediaType] = [];
foreach ( $list as $file ) {
- $urls[$mediaType][] = $this->getRemotePath( $file );
+ $urls[$mediaType][] = OutputPage::transformResourcePath(
+ $this->getConfig(),
+ $this->getRemotePath( $file )
+ );