Browse Source

remove MODELS constant

AD7six 15 years ago
parent
commit
62d66bc3ad
2 changed files with 10 additions and 7 deletions
  1. 10 2
      lib/Cake/Console/Command/Task/ModelTask.php
  2. 0 5
      lib/Cake/bootstrap.php

+ 10 - 2
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
@@ -70,6 +70,14 @@ class ModelTask extends BakeTask {
 	protected $_validations = array();
 
 /**
+ * Override initialize
+ *
+ */
+	public function initialize() {
+		$this->path = App::path('Model');
+	}
+
+/**
  * Execution method always used for tasks
  *
  */

+ 0 - 5
lib/Cake/bootstrap.php

@@ -49,11 +49,6 @@ if (!defined('APP')) {
 }
 
 /**
- * Path to the application's models directory.
- */
-	define('MODELS', APP.'Model'.DS);
-
-/**
  * Path to model behaviors directory.
  */
 	define('BEHAVIORS', MODELS.'Behavior'.DS);