merged master
[lhc/web/wiklou.git] / includes / filerepo / FileRepo.php
index 1563a58..3159077 100644 (file)
@@ -113,10 +113,9 @@ class FileRepo {
                        ? $info['deletedHashLevels']
                        : $this->hashLevels;
                $this->transformVia404 = !empty( $info['transformVia404'] );
-               $this->zones = isset( $info['zones'] )
-                       ? $info['zones']
-                       : array();
+               $this->isPrivate = !empty( $info['isPrivate'] );
                // Give defaults for the basic zones...
+               $this->zones = isset( $info['zones'] ) ? $info['zones'] : array();
                foreach ( array( 'public', 'thumb', 'temp', 'deleted' ) as $zone ) {
                        if ( !isset( $this->zones[$zone]['container'] ) ) {
                                $this->zones[$zone]['container'] = "{$this->name}-{$zone}";
@@ -1163,7 +1162,7 @@ class FileRepo {
                list( $b, $container, $r ) = FileBackend::splitStoragePath( $path );
 
                $params = array( 'dir' => $path );
-               if ( $container === $this->zones['deleted']['container'] ) {
+               if ( $this->isPrivate || $container === $this->zones['deleted']['container'] ) {
                        # Take all available measures to prevent web accessibility of new deleted
                        # directories, in case the user has not configured offline storage
                        $params = array( 'noAccess' => true, 'noListing' => true ) + $params;