Merge "Whitelist the <wbr> element."
[lhc/web/wiklou.git] / includes / externalstore / ExternalStoreMwstore.php
index 35b3494..0911cca 100644 (file)
@@ -28,6 +28,7 @@
  * and fully qualified with a global "wikiId" prefix in the configuration.
  *
  * @ingroup ExternalStorage
+ * @since 1.21
  */
 class ExternalStoreMwstore extends ExternalStoreMedium {
        /**
@@ -54,14 +55,14 @@ class ExternalStoreMwstore extends ExternalStoreMedium {
                        // Get three random base 36 characters to act as shard directories
                        $rand = wfBaseConvert( mt_rand( 0, 46655 ), 10, 36, 3 );
                        // Make sure ID is roughly lexicographically increasing for performance
-                       $id = str_pad( UIDGenerator::getTimestampedID128( 32 ), 26, '0', STR_PAD_LEFT );
-                       // Segregate items by wiki ID for the sake of book keeping
+                       $id = str_pad( UIDGenerator::newTimestampedUID128( 32 ), 26, '0', STR_PAD_LEFT );
+                       // 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}";
 
-                       $be->prepare( array( 'dir' => dirname( $url ) ) );
+                       $be->prepare( array( 'dir' => dirname( $url ), 'noAccess' => 1, 'noListing' => 1 ) );
                        if ( $be->create( array( 'dst' => $url, 'content' => $data ) )->isOK() ) {
                                return $url;
                        }