From 6f5de764d27f07fb341eec8a2c67b70084b55e87 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 11 Mar 2011 16:41:14 +1300 Subject: [PATCH] API CHANGE Renamed transactions methods from endTransaction() to transactionEnd(), startTransaction() to transactionStart() to comply with new sapphire trunk API --- code/MSSQLDatabase.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/code/MSSQLDatabase.php b/code/MSSQLDatabase.php index 8a1c04d..4c54894 100644 --- a/code/MSSQLDatabase.php +++ b/code/MSSQLDatabase.php @@ -1474,11 +1474,18 @@ class MSSQLDatabase extends SS_Database { else return false; } + + /** + * @deprecated Use transactionStart() (method required for 2.4.x) + */ + public function startTransaction($transaction_mode=false, $session_characteristics=false){ + $this->transactionStart($transaction_mode, $session_characteristics); + } /** * Start transaction. READ ONLY not supported. */ - public function startTransaction($transaction_mode=false, $session_characteristics=false){ + public function transactionStart($transaction_mode=false, $session_characteristics=false){ if($this->mssql) { DB::query('BEGIN TRANSACTION'); } else { @@ -1511,11 +1518,18 @@ class MSSQLDatabase extends SS_Database { } } } + + /** + * @deprecated Use transactionEnd() (method required for 2.4.x) + */ + public function endTransaction(){ + $this->transactionEnd(); + } /** * Commit everything inside this transaction so far */ - public function endTransaction(){ + public function transactionEnd(){ if($this->mssql) { DB::query('COMMIT TRANSACTION'); } else {