From fe2ec74b0e707a0560b49450638947eeb273619b Mon Sep 17 00:00:00 2001 From: AD7six Date: Mon, 16 May 2011 21:52:25 +0200 Subject: [PATCH] correct paths to Config dir --- lib/Cake/Console/Command/BakeShell.php | 2 +- lib/Cake/Console/Command/SchemaShell.php | 2 +- lib/Cake/Model/CakeSchema.php | 2 +- lib/Cake/Network/Email/CakeEmail.php | 4 ++-- lib/Cake/basics.php | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Cake/Console/Command/BakeShell.php b/lib/Cake/Console/Command/BakeShell.php index 650b52314..554ee554c 100644 --- a/lib/Cake/Console/Command/BakeShell.php +++ b/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; } diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index d03b58f37..5ba2c98f0 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/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.'), diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index e26218c22..afb159d0f 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/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); diff --git a/lib/Cake/Network/Email/CakeEmail.php b/lib/Cake/Network/Email/CakeEmail.php index 39c7af289..8602cf9c3 100644 --- a/lib/Cake/Network/Email/CakeEmail.php +++ b/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})) { diff --git a/lib/Cake/basics.php b/lib/Cake/basics.php index e197d55b2..d8c688f18 100644 --- a/lib/Cake/basics.php +++ b/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;