X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fexternalstore%2FExternalStoreDB.php;h=cac16b6a90a650b9b0f66de6dfa62faffea3ae3c;hb=e5ef0fd0c6607dd34f6dee69d716b159662a0a34;hp=75f7ccdfabe2c62507d4ae75388643dd19d55415;hpb=4021a60eabf190ea0558f949f1231f0b46d9b94c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/externalstore/ExternalStoreDB.php b/includes/externalstore/ExternalStoreDB.php index 75f7ccdfab..cac16b6a90 100644 --- a/includes/externalstore/ExternalStoreDB.php +++ b/includes/externalstore/ExternalStoreDB.php @@ -106,7 +106,9 @@ class ExternalStoreDB extends ExternalStoreMedium { } public function isReadOnly( $location ) { - return ( $this->getLoadBalancer( $location )->getReadOnlyReason() !== false ); + $lb = $this->getLoadBalancer( $location ); + $domainId = $this->getDomainId( $lb->getServerInfo( $lb->getWriterIndex() ) ); + return ( $lb->getReadOnlyReason( $domainId ) !== false ); } /** @@ -166,7 +168,7 @@ class ExternalStoreDB extends ExternalStoreMedium { * @return string|bool Database domain ID or false */ private function getDomainId( array $server ) { - if ( isset( $this->params['wiki'] ) ) { + if ( isset( $this->params['wiki'] ) && $this->params['wiki'] !== false ) { return $this->params['wiki']; // explicit domain }