dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Enable configuration to supply options for Special:Search form"
[lhc/web/wiklou.git]
/
includes
/
externalstore
/
ExternalStoreDB.php
diff --git
a/includes/externalstore/ExternalStoreDB.php
b/includes/externalstore/ExternalStoreDB.php
index
75f7ccd
..
cac16b6
100644
(file)
--- a/
includes/externalstore/ExternalStoreDB.php
+++ b/
includes/externalstore/ExternalStoreDB.php
@@
-106,7
+106,9
@@
class ExternalStoreDB extends ExternalStoreMedium {
}
public function isReadOnly( $location ) {
}
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 ) {
* @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
}
return $this->params['wiki']; // explicit domain
}