From 838dd9022db68b63667f32e3e1dae2dbf547fbc1 Mon Sep 17 00:00:00 2001 From: gwoo Date: Sun, 25 Nov 2007 18:49:41 +0000 Subject: [PATCH] updating shells for new App::import git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6078 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/console/libs/api.php | 12 +++++------- cake/console/libs/tasks/controller.php | 2 +- cake/console/libs/tasks/view.php | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/cake/console/libs/api.php b/cake/console/libs/api.php index eabce2c21..4b4018bb1 100644 --- a/cake/console/libs/api.php +++ b/cake/console/libs/api.php @@ -221,21 +221,19 @@ class ApiShell extends Shell { function __loadDependencies($element) { switch(low($element)) { case 'behavior': - loadModel(null); - loadBehavior(null); + App::import('Model', 'AppModel'); + App::import('Model', 'ModelBehavior'); break; case 'controller': - loadController(null); + App::import('Controller', 'AppController'); break; case 'component': - loadComponent(null); break; case 'helper': - uses('view'.DS.'helper'); - loadHelper(null); + App::import('Helper', 'AppHelper'); break; case 'model': - loadModel(null); + App::import('Model', 'ModelBehavior'); break; } } diff --git a/cake/console/libs/tasks/controller.php b/cake/console/libs/tasks/controller.php index cb1804015..4e16363f9 100644 --- a/cake/console/libs/tasks/controller.php +++ b/cake/console/libs/tasks/controller.php @@ -458,7 +458,7 @@ class ControllerTask extends Shell { */ function __bakeTest($className) { $out = 'TestObject = new {$className}Controller();\n"; diff --git a/cake/console/libs/tasks/view.php b/cake/console/libs/tasks/view.php index df64f94c5..e6b6861fa 100644 --- a/cake/console/libs/tasks/view.php +++ b/cake/console/libs/tasks/view.php @@ -1,4 +1,4 @@ -controllerName . 'Controller'; - if (!class_exists($this->controllerName . 'Controller') && !loadController($this->controllerName)) { + if (!class_exists($this->controllerName . 'Controller') && !App::import('Controller', $this->controllerName)) { $file = CONTROLLERS . $this->controllerPath . '_controller.php'; $shortPath = $this->shortPath($file); $this->err("The file '{$shortPath}' could not be found.\nIn order to bake a view, you'll need to first create the controller.");