Skip to content
This repository
Browse code

Remove unnecessary param when calling begin, commit and rollback on d…

…atasource.
  • Loading branch information...
commit 826374e57ca5dcc003b8e540da03ba67e11704c1 1 parent c718b10
Ivan Majnaric authored January 17, 2012

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. 12  lib/Cake/Model/Model.php
12  lib/Cake/Model/Model.php
@@ -2034,7 +2034,7 @@ public function saveMany($data = null, $options = array()) {
2034 2034
 
2035 2035
 		if ($options['atomic']) {
2036 2036
 			$db = $this->getDataSource();
2037  
-			$transactionBegun = $db->begin($this);
  2037
+			$transactionBegun = $db->begin();
2038 2038
 		}
2039 2039
 		$return = array();
2040 2040
 		foreach ($data as $key => $record) {
@@ -2055,12 +2055,12 @@ public function saveMany($data = null, $options = array()) {
2055 2055
 		}
2056 2056
 		if ($validates) {
2057 2057
 			if ($transactionBegun) {
2058  
-				return $db->commit($this) !== false;
  2058
+				return $db->commit() !== false;
2059 2059
 			} else {
2060 2060
 				return true;
2061 2061
 			}
2062 2062
 		}
2063  
-		$db->rollback($this);
  2063
+		$db->rollback();
2064 2064
 		return false;
2065 2065
 	}
2066 2066
 
@@ -2138,7 +2138,7 @@ public function saveAssociated($data = null, $options = array()) {
2138 2138
 		}
2139 2139
 		if ($options['atomic']) {
2140 2140
 			$db = $this->getDataSource();
2141  
-			$transactionBegun = $db->begin($this);
  2141
+			$transactionBegun = $db->begin();
2142 2142
 		}
2143 2143
 		$associations = $this->getAssociated();
2144 2144
 		$return = array();
@@ -2200,12 +2200,12 @@ public function saveAssociated($data = null, $options = array()) {
2200 2200
 		}
2201 2201
 		if ($validates) {
2202 2202
 			if ($transactionBegun) {
2203  
-				return $db->commit($this) !== false;
  2203
+				return $db->commit() !== false;
2204 2204
 			} else {
2205 2205
 				return true;
2206 2206
 			}
2207 2207
 		}
2208  
-		$db->rollback($this);
  2208
+		$db->rollback();
2209 2209
 		return false;
2210 2210
 	}
2211 2211
 

0 notes on commit 826374e

Please sign in to comment.
Something went wrong with that request. Please try again.