mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
correct paths to Config dir
This commit is contained in:
parent
f3bd0faa94
commit
fe2ec74b0e
5 changed files with 9 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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.'),
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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})) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue