From 62d66bc3ad33a3bcf0487572901c6be75104ff15 Mon Sep 17 00:00:00 2001 From: AD7six Date: Sun, 17 Apr 2011 12:05:56 +0200 Subject: [PATCH] remove MODELS constant --- lib/Cake/Console/Command/Task/ModelTask.php | 12 ++++++++++-- lib/Cake/bootstrap.php | 5 ----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/Cake/Console/Command/Task/ModelTask.php b/lib/Cake/Console/Command/Task/ModelTask.php index 70f6dff99..9aa5df18a 100644 --- a/lib/Cake/Console/Command/Task/ModelTask.php +++ b/lib/Cake/Console/Command/Task/ModelTask.php @@ -30,12 +30,12 @@ App::uses('Validation', 'Utility'); class ModelTask extends BakeTask { /** - * path to MODELS directory + * path to Model directory * * @var string * @access public */ - public $path = MODELS; + public $path = null; /** * tasks @@ -69,6 +69,14 @@ class ModelTask extends BakeTask { */ protected $_validations = array(); +/** + * Override initialize + * + */ + public function initialize() { + $this->path = App::path('Model'); + } + /** * Execution method always used for tasks * diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index 5df50e5aa..b8fd392d3 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -48,11 +48,6 @@ if (!defined('APP')) { define('APP', ROOT.DS.APP_DIR.DS); } -/** - * Path to the application's models directory. - */ - define('MODELS', APP.'Model'.DS); - /** * Path to model behaviors directory. */