Browse Source

Added App::uses to the PluginAppController and PluginAppModel bake templates

jroberts0001 13 years ago
parent
commit
e8647d77eb
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/Cake/Console/Command/Task/PluginTask.php

+ 2 - 0
lib/Cake/Console/Command/Task/PluginTask.php

@@ -145,6 +145,7 @@ class PluginTask extends AppShell {
 			$controllerFileName = $plugin . 'AppController.php';
 
 			$out = "<?php\n\n";
+			$out .= "App::uses('AppController', 'Controller');\n\n";
 			$out .= "class {$plugin}AppController extends AppController {\n\n";
 			$out .= "}\n\n";
 			$this->createFile($this->path . $plugin . DS . 'Controller' . DS . $controllerFileName, $out);
@@ -152,6 +153,7 @@ class PluginTask extends AppShell {
 			$modelFileName = $plugin . 'AppModel.php';
 
 			$out = "<?php\n\n";
+			$out .= "App::uses('AppModel', 'Model');\n\n";
 			$out .= "class {$plugin}AppModel extends AppModel {\n\n";
 			$out .= "}\n\n";
 			$this->createFile($this->path . $plugin . DS . 'Model' . DS . $modelFileName, $out);