Permalink
Browse files

BUG Transaction stub methods for better cross 2.x and 3.x compat

The transactionStart() naming is 3.x, and used by some modules
which are otherwise still 2.x compatible.

Specifically, this was added to avoid branching the payment module
into separate 2.x and 3.x compatible branches.
  • Loading branch information...
1 parent 56ad1d0 commit a8a10f8a1a55bb1bdc22fa137c239f62e41613c6 @chillu chillu committed Feb 26, 2013
Showing with 16 additions and 0 deletions.
  1. +16 −0 core/model/MySQLDatabase.php
@@ -918,6 +918,14 @@ public function supportsExtensions($extensions=Array('partitions', 'tablespaces'
else
return false;
}
+
+ /**
+ * Forwards compatible NO-OP method for better cross release
+ * compatibility of modules (2.x and 3.x).
+ */
+ public function transactionStart($transaction_mode=false, $session_characteristics=false) {
+ // NO-OP
+ }
/*
* Start a prepared transaction
@@ -942,6 +950,14 @@ public function transactionSavepoint($savepoint){
public function transactionRollback($savepoint=false){
//Transactions not set up for MySQL yet
}
+
+ /**
+ * Forwards compatible NO-OP method for better cross release
+ * compatibility of modules (2.x and 3.x).
+ */
+ public function transactionEnd($transaction_mode=false, $session_characteristics=false) {
+ // NO-OP
+ }
/*
* Commit everything inside this transaction so far

0 comments on commit a8a10f8

Please sign in to comment.