Browse Source

Removing APP_PATH it is always the same as APP.
Fixing a typo in index.php.

Mark Story 14 years ago
parent
commit
6e2870c706

+ 0 - 6
index.php

@@ -37,10 +37,4 @@
 		define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');
 	}
 
-/**
- * Set the include path or define app and core path
- */
-	define('APP_PATH', ROOT . DS . APP_DIR . DS);
-	define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
-
 	require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php';

+ 1 - 1
lib/Cake/Console/Command/CommandListShell.php

@@ -45,7 +45,7 @@ class CommandListShell extends Shell {
 		if (empty($this->params['xml'])) {
 			$this->out(__d('cake_console', "<info>Current Paths:</info>"), 2);
 			$this->out(" -app: ". APP_DIR);
-			$this->out(" -working: " . rtrim(APP_PATH, DS));
+			$this->out(" -working: " . rtrim(APP, DS));
 			$this->out(" -root: " . rtrim(ROOT, DS));
 			$this->out(" -core: " . rtrim(CORE_PATH, DS));
 			$this->out("");

+ 1 - 1
lib/Cake/Console/Command/Task/ProjectTask.php

@@ -50,7 +50,7 @@ class ProjectTask extends Shell {
 
 		while (!$project) {
 			$prompt = __d('cake_console', "What is the path to the project you want to bake?");
-			$project = $this->in($prompt, null, APP_PATH . 'myapp');
+			$project = $this->in($prompt, null, APP . 'myapp');
 		}
 
 		if ($project && !Folder::isAbsolute($project) && isset($_SERVER['PWD'])) {

+ 1 - 1
lib/Cake/Console/Shell.php

@@ -206,7 +206,7 @@ class Shell extends Object {
 		$this->out(__d('cake_console', '<info>Welcome to CakePHP %s Console</info>', 'v' . Configure::version()));
 		$this->hr();
 		$this->out(__d('cake_console', 'App : %s', APP_DIR));
-		$this->out(__d('cake_console', 'Path: %s', APP_PATH));
+		$this->out(__d('cake_console', 'Path: %s', APP));
 		$this->hr();
 	}
 

+ 3 - 3
lib/Cake/Console/ShellDispatcher.php

@@ -122,15 +122,15 @@ class ShellDispatcher {
 	private function __bootstrap() {
 		define('ROOT', $this->params['root']);
 		define('APP_DIR', $this->params['app']);
-		define('APP_PATH', $this->params['working'] . DS);
-		define('WWW_ROOT', APP_PATH . $this->params['webroot'] . DS);
+		define('APP', $this->params['working'] . DS);
+		define('WWW_ROOT', APP . $this->params['webroot'] . DS);
 		if (!is_dir(ROOT . DS . APP_DIR . DS . 'tmp')) {
 			define('TMP', CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'tmp' . DS);
 		}
 		$boot = file_exists(ROOT . DS . APP_DIR . DS . 'Config' . DS . 'bootstrap.php');
 		require CORE_PATH . 'Cake' . DS . 'bootstrap.php';
 
-		if (!file_exists(APP_PATH . 'Config' . DS . 'core.php')) {
+		if (!file_exists(APP . 'Config' . DS . 'core.php')) {
 			include_once CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'Config' . DS . 'core.php';
 			App::build();
 		}

+ 0 - 4
lib/Cake/bootstrap.php

@@ -31,10 +31,6 @@ if (!defined('CORE_PATH')) {
 	define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
 }
 
-if (!defined('APP_PATH')) {
-	define('APP_PATH', ROOT . DS . APP_DIR . DS);
-}
-
 if (!defined('WEBROOT_DIR')) {
 	define('WEBROOT_DIR', 'webroot');
 }