Browse Source

correct paths to Config dir

AD7six 15 years ago
parent
commit
fe2ec74b0e

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

@@ -68,7 +68,7 @@ class BakeShell extends Shell {
 		if (!is_dir($this->DbConfig->path)) {
 			$path = $this->Project->execute();
 			if (!empty($path)) {
-				$this->DbConfig->path = $path . 'config' . DS;
+				$this->DbConfig->path = $path . 'Config' . DS;
 			} else {
 				return false;
 			}

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

@@ -440,7 +440,7 @@ class SchemaShell extends Shell {
 		);
 		$path = array(
 			'help' => __d('cake_console', 'Path to read and write schema.php'),
-			'default' => APP . 'Config' . 'Schema'
+			'default' => APP . 'Config' . DS . 'Schema'
 		);
 		$file = array(
 			'help' => __d('cake_console', 'File name to read and write.'),

+ 1 - 1
lib/Cake/Model/CakeSchema.php

@@ -94,7 +94,7 @@ class CakeSchema extends Object {
 		}
 
 		if (empty($options['path'])) {
-			$this->path = APP . 'Config' . 'Schema';
+			$this->path = APP . 'Config' . DS . 'Schema';
 		}
 
 		$options = array_merge(get_object_vars($this), $options);

+ 2 - 2
lib/Cake/Network/Email/CakeEmail.php

@@ -890,7 +890,7 @@ class CakeEmail {
 	public function send($content = null) {
 		if (is_string($this->_config)) {
 			if (!config('email')) {
-				throw new SocketException(__d('cake', '%s not found.', APP . 'Config' . 'email.php'));
+				throw new SocketException(__d('cake', '%s not found.', APP . 'Config' . DS . 'email.php'));
 			}
 			$configs = new EmailConfig();
 			if (!isset($configs->{$this->_config})) {
@@ -971,7 +971,7 @@ class CakeEmail {
 
 		if (is_string($transportConfig)) {
 			if (!config('email')) {
-				throw new SocketException(__d('cake', '%s not found.', APP . 'Config' . 'email.php'));
+				throw new SocketException(__d('cake', '%s not found.', APP . 'Config' . DS . 'email.php'));
 			}
 			$configs = new EmailConfig();
 			if (!isset($configs->{$transportConfig})) {

+ 4 - 4
lib/Cake/basics.php

@@ -44,10 +44,10 @@
 function config() {
 	$args = func_get_args();
 	foreach ($args as $arg) {
-		if ($arg === 'database' && file_exists(APP . 'Config' . 'database.php')) {
-			include_once(APP . 'Config' . $arg . '.php');
-		} elseif (file_exists(APP . 'Config' . $arg . '.php')) {
-			include_once(APP . 'Config' . $arg . '.php');
+		if ($arg === 'database' && file_exists(APP . 'Config' . DS . 'database.php')) {
+			include_once(APP . 'Config' . DS . $arg . '.php');
+		} elseif (file_exists(APP . 'Config' . DS . $arg . '.php')) {
+			include_once(APP . 'Config' . DS . $arg . '.php');
 
 			if (count($args) == 1) {
 				return true;