diff --git a/cake/libs/controller/scaffold.php b/cake/libs/controller/scaffold.php index a5c3d755101..a281083db1d 100644 --- a/cake/libs/controller/scaffold.php +++ b/cake/libs/controller/scaffold.php @@ -462,9 +462,7 @@ protected function _associations() { * @package cake * @subpackage cake.cake.libs.controller */ -if (!class_exists('ThemeView')) { - App::import('View', 'Theme'); -} +App::import('View', 'Theme'); /** * ScaffoldView provides specific view file loading features for scaffolded views. diff --git a/cake/libs/view/theme.php b/cake/libs/view/theme.php index 5706f9ba471..834fed18206 100644 --- a/cake/libs/view/theme.php +++ b/cake/libs/view/theme.php @@ -17,6 +17,7 @@ * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::import('View', 'View'); /** * Theme view class diff --git a/cake/tests/cases/libs/controller/scaffold.test.php b/cake/tests/cases/libs/controller/scaffold.test.php index 100ed67b8ba..65de0bb1b1c 100644 --- a/cake/tests/cases/libs/controller/scaffold.test.php +++ b/cake/tests/cases/libs/controller/scaffold.test.php @@ -17,7 +17,8 @@ * @since CakePHP(tm) v 1.2.0.5436 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ -App::import('Core', 'Scaffold'); +App::import('Core', 'Scaffold', false); +App::import('Core', 'Controller', false); /** * ScaffoldMockController class @@ -789,7 +790,7 @@ function testScaffoldChangingViewProperty() { $this->Controller->theme = 'test_theme'; $this->Controller->view = 'Theme'; $this->Controller->constructClasses(); - $Scaffold =& new TestScaffoldMock($this->Controller, array()); + $Scaffold =& new TestScaffoldMock($this->Controller, $this->Controller->request); $this->assertEqual($this->Controller->view, 'Scaffold'); }