r107980: added missing dir param to FileBackendShardListIterator
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 27 Jan 2012 18:21:58 +0000 (18:21 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 27 Jan 2012 18:21:58 +0000 (18:21 +0000)
includes/filerepo/backend/FileBackend.php

index 92d9795..3e8ba88 100644 (file)
@@ -1255,14 +1255,15 @@ abstract class FileBackend extends FileBackendBase {
         * @see FileBackendBase::clearCache()
         */
        final public function clearCache( array $paths = null ) {
+               if ( is_array( $paths ) ) {
+                       $paths = array_map( 'FileBackend::normalizeStoragePath', $paths );
+                       $paths = array_filter( $paths, 'strlen' ); // remove nulls
+               }
                if ( $paths === null ) {
                        $this->cache = array();
                } else {
                        foreach ( $paths as $path ) {
-                               $path = self::normalizeStoragePath( $path );
-                               if ( $path !== null ) {
-                                       unset( $this->cache[$path] );
-                               }
+                               unset( $this->cache[$path] );
                        }
                }
                $this->doClearCache( $paths );