From 75f250ec55448853b13ad708fd777ec3e23b1ab8 Mon Sep 17 00:00:00 2001 From: Reedy Date: Sun, 21 Jan 2018 04:33:38 +0000 Subject: [PATCH] Update RelPath calls Bug: T182273 Change-Id: Ifd04e3b3ab72cc56bef48a1fc18fccb34b0af618 --- includes/OutputPage.php | 3 ++- includes/resourceloader/ResourceLoaderModule.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index e8b000e8fe..c17d50f96e 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -23,6 +23,7 @@ use MediaWiki\Logger\LoggerFactory; use MediaWiki\MediaWikiServices; use MediaWiki\Session\SessionManager; +use Wikimedia\RelPath; use WrappedString\WrappedString; use WrappedString\WrappedStringList; @@ -3818,7 +3819,7 @@ class OutputPage extends ContextSource { $remotePathPrefix = $remotePath = $uploadPath; } - $path = RelPath\getRelativePath( $path, $remotePath ); + $path = RelPath::getRelativePath( $path, $remotePath ); return self::transformFilePath( $remotePathPrefix, $localDir, $path ); } diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php index 4deb7fa988..a6ec72a99f 100644 --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@ -26,6 +26,7 @@ use MediaWiki\MediaWikiServices; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; +use Wikimedia\RelPath; use Wikimedia\ScopedCallback; /** @@ -527,7 +528,7 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface { public static function getRelativePaths( array $filePaths ) { global $IP; return array_map( function ( $path ) use ( $IP ) { - return RelPath\getRelativePath( $path, $IP ); + return RelPath::getRelativePath( $path, $IP ); }, $filePaths ); } @@ -541,7 +542,7 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface { public static function expandRelativePaths( array $filePaths ) { global $IP; return array_map( function ( $path ) use ( $IP ) { - return RelPath\joinPath( $IP, $path ); + return RelPath::joinPath( $IP, $path ); }, $filePaths ); } -- 2.20.1