Merge "Fix 'Tags' padding to keep it farther from the edge and document the source...
[lhc/web/wiklou.git] / includes / filerepo / LocalRepo.php
index 76043d5..9a6ef22 100644 (file)
@@ -22,6 +22,7 @@
  * @ingroup FileRepo
  */
 
+use MediaWiki\MediaWikiServices;
 use Wikimedia\Rdbms\ResultWrapper;
 use Wikimedia\Rdbms\Database;
 use Wikimedia\Rdbms\IDatabase;
@@ -200,7 +201,7 @@ class LocalRepo extends FileRepo {
                }
 
                $method = __METHOD__;
-               $redirDbKey = ObjectCache::getMainWANInstance()->getWithSetCallback(
+               $redirDbKey = MediaWikiServices::getInstance()->getMainWANObjectCache()->getWithSetCallback(
                        $memcKey,
                        $expiry,
                        function ( $oldValue, &$ttl, array &$setOpts ) use ( $method, $title ) {
@@ -506,7 +507,7 @@ class LocalRepo extends FileRepo {
        function getSharedCacheKey( /*...*/ ) {
                $args = func_get_args();
 
-               return call_user_func_array( 'wfMemcKey', $args );
+               return wfMemcKey( ...$args );
        }
 
        /**
@@ -520,7 +521,7 @@ class LocalRepo extends FileRepo {
                if ( $key ) {
                        $this->getMasterDB()->onTransactionPreCommitOrIdle(
                                function () use ( $key ) {
-                                       ObjectCache::getMainWANInstance()->delete( $key );
+                                       MediaWikiServices::getInstance()->getMainWANObjectCache()->delete( $key );
                                },
                                __METHOD__
                        );
@@ -589,7 +590,7 @@ class LocalRepo extends FileRepo {
                        wfDebug( __METHOD__ . ": skipped because storage uses sha1 paths\n" );
                        return Status::newGood();
                } else {
-                       return call_user_func_array( 'parent::' . $function, $args );
+                       return parent::$function( ...$args );
                }
        }
 }