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 "Add support for 'hu-formal'"
[lhc/web/wiklou.git]
/
includes
/
externalstore
/
ExternalStoreDB.php
diff --git
a/includes/externalstore/ExternalStoreDB.php
b/includes/externalstore/ExternalStoreDB.php
index
6bb1618
..
b43bd21
100644
(file)
--- a/
includes/externalstore/ExternalStoreDB.php
+++ b/
includes/externalstore/ExternalStoreDB.php
@@
-92,9
+92,8
@@
class ExternalStoreDB extends ExternalStoreMedium {
public function store( $location, $data ) {
$dbw = $this->getMaster( $location );
public function store( $location, $data ) {
$dbw = $this->getMaster( $location );
- $id = $dbw->nextSequenceValue( 'blob_blob_id_seq' );
$dbw->insert( $this->getTable( $dbw ),
$dbw->insert( $this->getTable( $dbw ),
- [ 'blob_
id' => $id, 'blob_
text' => $data ],
+ [ 'blob_text' => $data ],
__METHOD__ );
$id = $dbw->insertId();
if ( !$id ) {
__METHOD__ );
$id = $dbw->insertId();
if ( !$id ) {
@@
-104,6
+103,10
@@
class ExternalStoreDB extends ExternalStoreMedium {
return "DB://$location/$id";
}
return "DB://$location/$id";
}
+ public function isReadOnly( $location ) {
+ return ( $this->getLoadBalancer( $location )->getReadOnlyReason() !== false );
+ }
+
/**
* Get a LoadBalancer for the specified cluster
*
/**
* Get a LoadBalancer for the specified cluster
*