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 "Remove "@author Umherirrender" annotations"
[lhc/web/wiklou.git]
/
includes
/
libs
/
rdbms
/
database
/
DatabasePostgres.php
diff --git
a/includes/libs/rdbms/database/DatabasePostgres.php
b/includes/libs/rdbms/database/DatabasePostgres.php
index
fd0956a
..
bdac06c
100644
(file)
--- a/
includes/libs/rdbms/database/DatabasePostgres.php
+++ b/
includes/libs/rdbms/database/DatabasePostgres.php
@@
-1370,6
+1370,13
@@
SQL;
return false;
}
return false;
}
+ public function serverIsReadOnly() {
+ $res = $this->query( "SHOW default_transaction_read_only", __METHOD__ );
+ $row = $this->fetchObject( $res );
+
+ return $row ? ( strtolower( $row->default_transaction_read_only ) === 'on' ) : false;
+ }
+
/**
* @param string $lockName
* @return string Integer
/**
* @param string $lockName
* @return string Integer