From ea635d6bea76029b4ba72833671a8c977b57f815 Mon Sep 17 00:00:00 2001 From: predominant Date: Fri, 9 Apr 2010 20:41:28 +1000 Subject: [PATCH] Fix protected call for _build on CakeSchema, and associated references. --- cake/libs/model/cake_schema.php | 8 ++++---- cake/tests/lib/cake_test_fixture.php | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cake/libs/model/cake_schema.php b/cake/libs/model/cake_schema.php index 7ef7d8245..db8619c32 100644 --- a/cake/libs/model/cake_schema.php +++ b/cake/libs/model/cake_schema.php @@ -102,7 +102,7 @@ class CakeSchema extends Object { } $options = array_merge(get_object_vars($this), $options); - $this->_build($options); + $this->build($options); } /** @@ -111,7 +111,7 @@ class CakeSchema extends Object { * @param array $data loaded object properties * @return void */ - protected function _build($data) { + public function build($data) { $file = null; foreach ($data as $key => $val) { if (!empty($val)) { @@ -162,7 +162,7 @@ class CakeSchema extends Object { $options = array('path' => $options); } - $this->_build($options); + $this->build($options); extract(get_object_vars($this)); $class = $name .'Schema'; @@ -318,7 +318,7 @@ class CakeSchema extends Object { public function write($object, $options = array()) { if (is_object($object)) { $object = get_object_vars($object); - $this->_build($object); + $this->build($object); } if (is_array($object)) { diff --git a/cake/tests/lib/cake_test_fixture.php b/cake/tests/lib/cake_test_fixture.php index dffa4988e..ade734660 100644 --- a/cake/tests/lib/cake_test_fixture.php +++ b/cake/tests/lib/cake_test_fixture.php @@ -36,14 +36,12 @@ class CakeTestFixture extends Object { /** * Cake's DBO driver (e.g: DboMysql). * - * @access public */ public $db = null; /** * Full Table Name * - * @access public */ public $table = null; @@ -131,7 +129,7 @@ class CakeTestFixture extends Object { return false; } - $this->Schema->_build(array($this->table => $this->fields)); + $this->Schema->build(array($this->table => $this->fields)); return ( $db->execute($db->createSchema($this->Schema), array('log' => false)) !== false ); @@ -144,7 +142,7 @@ class CakeTestFixture extends Object { * @return boolean True on success, false on failure */ public function drop(&$db) { - $this->Schema->_build(array($this->table => $this->fields)); + $this->Schema->build(array($this->table => $this->fields)); return ( $db->execute($db->dropSchema($this->Schema), array('log' => false)) !== false );