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 "Clean up handling of 'infinity'"
[lhc/web/wiklou.git]
/
includes
/
db
/
Database.php
diff --git
a/includes/db/Database.php
b/includes/db/Database.php
index
0c0248d
..
0bef28a
100644
(file)
--- a/
includes/db/Database.php
+++ b/
includes/db/Database.php
@@
-3525,7
+3525,11
@@
abstract class DatabaseBase implements IDatabase {
if ( !$this->mTrxLevel ) {
$this->begin( $fname );
$this->mTrxAutomatic = true;
if ( !$this->mTrxLevel ) {
$this->begin( $fname );
$this->mTrxAutomatic = true;
- $this->mTrxAutomaticAtomic = true;
+ // If DBO_TRX is set, a series of startAtomic/endAtomic pairs will result
+ // in all changes being in one transaction to keep requests transactional.
+ if ( !$this->getFlag( DBO_TRX ) ) {
+ $this->mTrxAutomaticAtomic = true;
+ }
}
$this->mTrxAtomicLevels->push( $fname );
}
$this->mTrxAtomicLevels->push( $fname );
@@
-4328,7
+4332,7
@@
abstract class DatabaseBase implements IDatabase {
* @return string
*/
public function decodeExpiry( $expiry, $format = TS_MW ) {
* @return string
*/
public function decodeExpiry( $expiry, $format = TS_MW ) {
- return ( $expiry == '' || $expiry == $this->getInfinity() )
+ return ( $expiry == '' || $expiry ==
'infinity' || $expiry ==
$this->getInfinity() )
? 'infinity'
: wfTimestamp( $format, $expiry );
}
? 'infinity'
: wfTimestamp( $format, $expiry );
}