https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103969

Revision: 103969
Author:   aaron
Date:     2011-11-22 22:24:57 +0000 (Tue, 22 Nov 2011)
Log Message:
-----------
Killed getLockResourcePaths() as storage paths now have the backend name (and 
the class name was overkill)

Modified Paths:
--------------
    branches/FileBackend/phase3/includes/filerepo/backend/FileBackend.php

Modified: branches/FileBackend/phase3/includes/filerepo/backend/FileBackend.php
===================================================================
--- branches/FileBackend/phase3/includes/filerepo/backend/FileBackend.php       
2011-11-22 22:06:51 UTC (rev 103968)
+++ branches/FileBackend/phase3/includes/filerepo/backend/FileBackend.php       
2011-11-22 22:24:57 UTC (rev 103969)
@@ -218,7 +218,7 @@
         * @return Status
         */
        final public function lockFiles( array $paths ) {
-               return $this->lockManager->lock( $this->getLockResourcePaths( 
$paths ) );
+               return $this->lockManager->lock( $paths );
        }
 
        /**
@@ -229,23 +229,8 @@
         * @return Status
         */
        final public function unlockFiles( array $paths ) {
-               return $this->lockManager->unlock( $this->getLockResourcePaths( 
$paths ) );
+               return $this->lockManager->unlock( $paths );
        }
-
-       /**
-        * Prefix a list of storage paths to use as resource paths to lock
-        *
-        * @param $paths Array
-        * @return Array 
-        */
-       private function getLockResourcePaths( array $paths ) {
-               $backendKey = get_class( $this ) . ':' . $this->getName();
-               $res = array();
-               foreach( $paths as $path ) {
-                       $res[] = "{$backendKey}:{$path}";
-               }
-               return $res;
-       }
 }
 
 /**
@@ -354,7 +339,7 @@
        }
 
        /**
-        * Split a storage path (e.g. "mwstore://container/path/to/object")
+        * Split a storage path (e.g. 
"mwstore://backend/container/path/to/object")
         * into a container name and a full object name within that container.
         *
         * @param $storagePath string


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to