Update RelPath calls
authorReedy <reedy@wikimedia.org>
Sun, 21 Jan 2018 04:33:38 +0000 (04:33 +0000)
committerReedy <reedy@wikimedia.org>
Sun, 21 Jan 2018 04:34:18 +0000 (04:34 +0000)
Bug: T182273
Change-Id: Ifd04e3b3ab72cc56bef48a1fc18fccb34b0af618

includes/OutputPage.php
includes/resourceloader/ResourceLoaderModule.php

index e8b000e..c17d50f 100644 (file)
@@ -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 );
        }
 
index 4deb7fa..a6ec72a 100644 (file)
@@ -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 );
        }