X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FStorage%2FSqlBlobStore.php;h=0ff7c1334393da13677c05d997d2dda6fc4d3d9c;hb=a2c8c2969420a0f150c03f76e3a0bf9028fcda43;hp=031cb587ed617082e1f0107ab08a789e3ff3556c;hpb=9bf44d08f938cc9a85dc647b8a00665d5bd01fb6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Storage/SqlBlobStore.php b/includes/Storage/SqlBlobStore.php index 031cb587ed..0ff7c13343 100644 --- a/includes/Storage/SqlBlobStore.php +++ b/includes/Storage/SqlBlobStore.php @@ -299,7 +299,6 @@ class SqlBlobStore implements IDBAccessObject, BlobStore { list( $schema, $id, ) = self::splitBlobAddress( $blobAddress ); //TODO: MCR: also support 'ex' schema with ExternalStore URLs, plus flags encoded in the URL! - //TODO: MCR: also support 'ar' schema for content blobs in old style archive rows! if ( $schema === 'tt' ) { $textId = intval( $id ); } else { @@ -591,4 +590,11 @@ class SqlBlobStore implements IDBAccessObject, BlobStore { return [ $schema, $id, $parameters ]; } + public function isReadOnly() { + if ( $this->useExternalStore && ExternalStore::defaultStoresAreReadOnly() ) { + return true; + } + + return ( $this->getDBLoadBalancer()->getReadOnlyReason() !== false ); + } }