X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fexternalstore%2FExternalStoreMwstore.php;h=89ac7345173aef973a2ac0d5023867f56a468c07;hb=8c1d27c1d7b4b3bea8fbb5bdd1bc4b7b14e0ac93;hp=f329b7347787ad35bb06eb0b0eab54cfe5c26cc9;hpb=96bf27f9aadd9a6a6c8e3d9ae876468689174195;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/externalstore/ExternalStoreMwstore.php b/includes/externalstore/ExternalStoreMwstore.php index f329b73477..89ac734517 100644 --- a/includes/externalstore/ExternalStoreMwstore.php +++ b/includes/externalstore/ExternalStoreMwstore.php @@ -84,8 +84,10 @@ class ExternalStoreMwstore extends ExternalStoreMedium { // Segregate items by wiki ID for the sake of bookkeeping $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : wfWikiID(); - $url = $be->getContainerStoragePath( 'data' ) . '/' . - rawurlencode( $wiki ) . "/{$rand[0]}/{$rand[1]}/{$rand[2]}/{$id}"; + $url = $be->getContainerStoragePath( 'data' ) . '/' . rawurlencode( $wiki ); + $url .= ( $be instanceof FSFileBackend ) + ? "/{$rand[0]}/{$rand[1]}/{$rand[2]}/{$id}" // keep directories small + : "/{$rand[0]}/{$rand[1]}/{$id}"; // container sharding is only 2-levels $be->prepare( array( 'dir' => dirname( $url ), 'noAccess' => 1, 'noListing' => 1 ) ); if ( $be->create( array( 'dst' => $url, 'content' => $data ) )->isOK() ) {