Make LocalFile check early if the revision store is available
[lhc/web/wiklou.git] / includes / Storage / SqlBlobStore.php
index b890e5a..0ff7c13 100644 (file)
@@ -590,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 );
+       }
 }