r103969 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103968‎ | r103969 | r103970 >
Date:22:24, 22 November 2011
Author:aaron
Status:deferred
Tags:
Comment:
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) (history)

Diff [purge]

Index: branches/FileBackend/phase3/includes/filerepo/backend/FileBackend.php
@@ -218,7 +218,7 @@
219219 * @return Status
220220 */
221221 final public function lockFiles( array $paths ) {
222 - return $this->lockManager->lock( $this->getLockResourcePaths( $paths ) );
 222+ return $this->lockManager->lock( $paths );
223223 }
224224
225225 /**
@@ -229,23 +229,8 @@
230230 * @return Status
231231 */
232232 final public function unlockFiles( array $paths ) {
233 - return $this->lockManager->unlock( $this->getLockResourcePaths( $paths ) );
 233+ return $this->lockManager->unlock( $paths );
234234 }
235 -
236 - /**
237 - * Prefix a list of storage paths to use as resource paths to lock
238 - *
239 - * @param $paths Array
240 - * @return Array
241 - */
242 - private function getLockResourcePaths( array $paths ) {
243 - $backendKey = get_class( $this ) . ':' . $this->getName();
244 - $res = array();
245 - foreach( $paths as $path ) {
246 - $res[] = "{$backendKey}:{$path}";
247 - }
248 - return $res;
249 - }
250235 }
251236
252237 /**
@@ -354,7 +339,7 @@
355340 }
356341
357342 /**
358 - * Split a storage path (e.g. "mwstore://container/path/to/object")
 343+ * Split a storage path (e.g. "mwstore://backend/container/path/to/object")
359344 * into a container name and a full object name within that container.
360345 *
361346 * @param $storagePath string

Status & tagging log