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 "Fix gallery rearrange on resize with missing images"
[lhc/web/wiklou.git]
/
includes
/
externalstore
/
ExternalStoreDB.php
diff --git
a/includes/externalstore/ExternalStoreDB.php
b/includes/externalstore/ExternalStoreDB.php
index
5774a24
..
952bf63
100644
(file)
--- a/
includes/externalstore/ExternalStoreDB.php
+++ b/
includes/externalstore/ExternalStoreDB.php
@@
-96,9
+96,6
@@
class ExternalStoreDB extends ExternalStoreMedium {
if ( !$id ) {
throw new MWException( __METHOD__ . ': no insert ID' );
}
if ( !$id ) {
throw new MWException( __METHOD__ . ': no insert ID' );
}
- if ( $dbw->getFlag( DBO_TRX ) ) {
- $dbw->commit( __METHOD__ );
- }
return "DB://$cluster/$id";
}
return "DB://$cluster/$id";
}
@@
-134,7
+131,10
@@
class ExternalStoreDB extends ExternalStoreMedium {
wfDebug( "writable external store\n" );
}
wfDebug( "writable external store\n" );
}
- return $lb->getConnection( DB_SLAVE, array(), $wiki );
+ $db = $lb->getConnection( DB_SLAVE, array(), $wiki );
+ $db->clearFlag( DBO_TRX ); // sanity
+
+ return $db;
}
/**
}
/**
@@
-147,7
+147,10
@@
class ExternalStoreDB extends ExternalStoreMedium {
$wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false;
$lb = $this->getLoadBalancer( $cluster );
$wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false;
$lb = $this->getLoadBalancer( $cluster );
- return $lb->getConnection( DB_MASTER, array(), $wiki );
+ $db = $lb->getConnection( DB_MASTER, array(), $wiki );
+ $db->clearFlag( DBO_TRX ); // sanity
+
+ return $db;
}
/**
}
/**
@@
-282,6
+285,10
@@
class ExternalStoreDB extends ExternalStoreMedium {
}
}
}
}
+ /**
+ * @param string $url
+ * @return array
+ */
protected function parseURL( $url ) {
$path = explode( '/', $url );
protected function parseURL( $url ) {
$path = explode( '/', $url );