From: Reedy Date: Sun, 21 Jan 2018 04:33:38 +0000 (+0000) Subject: Update RelPath calls X-Git-Tag: 1.31.0-rc.0~850 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=75f250ec55448853b13ad708fd777ec3e23b1ab8 Update RelPath calls Bug: T182273 Change-Id: Ifd04e3b3ab72cc56bef48a1fc18fccb34b0af618 --- 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 ); }