diff --git a/lib/Cake/Model/Datasource/Database/Mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php index 70c51366c..0733bd2d8 100644 --- a/lib/Cake/Model/Datasource/Database/Mysql.php +++ b/lib/Cake/Model/Datasource/Database/Mysql.php @@ -681,7 +681,7 @@ class Mysql extends DboSource { * * @return boolean */ - public function supportNestedTransaction() { + public function nestedTransactionSupported() { return $this->nestedTransaction && version_compare($this->getVersion(), '4.1', '>='); } diff --git a/lib/Cake/Model/Datasource/Database/Postgres.php b/lib/Cake/Model/Datasource/Database/Postgres.php index 35f568aad..b997ecbb8 100644 --- a/lib/Cake/Model/Datasource/Database/Postgres.php +++ b/lib/Cake/Model/Datasource/Database/Postgres.php @@ -900,7 +900,7 @@ class Postgres extends DboSource { * * @return boolean */ - public function supportNestedTransaction() { + public function nestedTransactionSupported() { return $this->nestedTransaction && version_compare($this->getVersion(), '8.0', '>='); } diff --git a/lib/Cake/Model/Datasource/Database/Sqlite.php b/lib/Cake/Model/Datasource/Database/Sqlite.php index 419709892..1e1dd4f8a 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlite.php +++ b/lib/Cake/Model/Datasource/Database/Sqlite.php @@ -564,7 +564,7 @@ class Sqlite extends DboSource { * * @return boolean */ - public function supportNestedTransaction() { + public function nestedTransactionSupported() { return $this->nestedTransaction && version_compare($this->getVersion(), '3.6.8', '>='); } diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 0ba0eb3e2..145324e9e 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -2031,7 +2031,7 @@ class DboSource extends DataSource { * * @return boolean */ - public function supportNestedTransaction() { + public function nestedTransactionSupported() { return false; } @@ -2044,7 +2044,7 @@ class DboSource extends DataSource { */ public function begin() { if ($this->_transactionStarted) { - if ($this->supportNestedTransaction()) { + if ($this->nestedTransactionSupported()) { return $this->_beginNested(); } $this->_transactionNesting++; @@ -2092,7 +2092,7 @@ class DboSource extends DataSource { return $this->_connection->commit(); } - if ($this->supportNestedTransaction()) { + if ($this->nestedTransactionSupported()) { return $this->_commitNested(); } @@ -2134,7 +2134,7 @@ class DboSource extends DataSource { return $this->_connection->rollBack(); } - if ($this->supportNestedTransaction()) { + if ($this->nestedTransactionSupported()) { return $this->_rollbackNested(); } diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php index e0d4a1b93..dc89a0f2e 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php @@ -3588,7 +3588,7 @@ class MysqlTest extends CakeTestCase { public function testNestedTransaction() { $nested = $this->Dbo->nestedTransaction; $this->Dbo->nestedTransaction = true; - if ($this->Dbo->supportNestedTransaction() === false) { + if ($this->Dbo->nestedTransactionSupported() === false) { $this->Dbo->nestedTransaction = $nested; $this->skipIf(true, 'The MySQL server do not support nested transaction'); } diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php index eb249e4d3..e7612614f 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php @@ -915,7 +915,7 @@ class PostgresTest extends CakeTestCase { * @return void */ public function testNestedTransaction() { - $this->skipIf($this->Dbo->supportNestedTransaction() === false, 'The Postgres server do not support nested transaction'); + $this->skipIf($this->Dbo->nestedTransactionSupported() === false, 'The Postgres server do not support nested transaction'); $this->loadFixtures('Article'); $model = new Article(); diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php index a5a82cae1..f590cc7a0 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php @@ -389,7 +389,7 @@ class SqliteTest extends CakeTestCase { * @return void */ public function testNestedTransaction() { - $this->skipIf($this->Dbo->supportNestedTransaction() === false, 'The Sqlite version do not support nested transaction'); + $this->skipIf($this->Dbo->nestedTransactionSupported() === false, 'The Sqlite version do not support nested transaction'); $this->loadFixtures('User'); $model = new User(); diff --git a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php index 16952bb57..c126052a2 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php @@ -53,7 +53,7 @@ class DboTestSource extends DboSource { $this->_connection = $conn; } - public function supportNestedTransaction() { + public function nestedTransactionSupported() { return $this->nestedTransaction && $this->nestedSupport; }