Add ExternalStoreMedium::isReadOnly() method
[lhc/web/wiklou.git] / includes / externalstore / ExternalStoreDB.php
index e5d36e1..b43bd21 100644 (file)
@@ -103,6 +103,10 @@ class ExternalStoreDB extends ExternalStoreMedium {
                return "DB://$location/$id";
        }
 
+       public function isReadOnly( $location ) {
+               return ( $this->getLoadBalancer( $location )->getReadOnlyReason() !== false );
+       }
+
        /**
         * Get a LoadBalancer for the specified cluster
         *