From 944e1fc0fe237a4ca6dfd1ceb2d8abbc88ed4bda Mon Sep 17 00:00:00 2001 From: resurtm Date: Mon, 13 May 2013 22:32:15 +0600 Subject: [PATCH] =?UTF-8?q?isOpAtomic=20=E2=86=92=20isOperationAtomic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yii/db/ActiveRecord.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yii/db/ActiveRecord.php b/yii/db/ActiveRecord.php index d11823d..8da2c90 100644 --- a/yii/db/ActiveRecord.php +++ b/yii/db/ActiveRecord.php @@ -688,7 +688,7 @@ class ActiveRecord extends Model return false; } $db = static::getDb(); - $transaction = $this->isOpAtomic(self::OP_INSERT) && $db->getTransaction() === null ? $db->beginTransaction() : null; + $transaction = $this->isOperationAtomic(self::OP_INSERT) && $db->getTransaction() === null ? $db->beginTransaction() : null; try { $result = $this->insertInternal($attributes); if ($transaction !== null) { @@ -798,7 +798,7 @@ class ActiveRecord extends Model return false; } $db = static::getDb(); - $transaction = $this->isOpAtomic(self::OP_UPDATE) && $db->getTransaction() === null ? $db->beginTransaction() : null; + $transaction = $this->isOperationAtomic(self::OP_UPDATE) && $db->getTransaction() === null ? $db->beginTransaction() : null; try { $result = $this->updateInternal($attributes); if ($transaction !== null) { @@ -905,7 +905,7 @@ class ActiveRecord extends Model public function delete() { $db = static::getDb(); - $transaction = $this->isOpAtomic(self::OP_DELETE) && $db->getTransaction() === null ? $db->beginTransaction() : null; + $transaction = $this->isOperationAtomic(self::OP_DELETE) && $db->getTransaction() === null ? $db->beginTransaction() : null; try { $result = false; if ($this->beforeDelete()) { @@ -1431,7 +1431,7 @@ class ActiveRecord extends Model * @param string $op possible values are ActiveRecord::INSERT, ActiveRecord::UPDATE and ActiveRecord::DELETE. * @return boolean whether given operation is atomic. Currently active scenario is taken into account. */ - private function isOpAtomic($op) + private function isOperationAtomic($op) { $scenario = $this->getScenario(); $scenarios = $this->scenarios();