mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-07 12:02:41 +00:00
Replacing config string in favor of Config
This commit is contained in:
parent
d24aca34f1
commit
eea981940e
17 changed files with 66 additions and 66 deletions
|
@ -64,7 +64,7 @@ class DbConfigTask extends Shell {
|
|||
* @var string
|
||||
*/
|
||||
public function initialize() {
|
||||
$this->path = APP . 'config' . DS;
|
||||
$this->path = APP . 'Config' . DS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -103,7 +103,7 @@ class PluginTask extends Shell {
|
|||
if (strtolower($looksGood) == 'y') {
|
||||
$Folder = new Folder($this->path . $pluginPath);
|
||||
$directories = array(
|
||||
'config' . DS . 'schema',
|
||||
'Config' . DS . 'schema',
|
||||
'Model' . DS . 'Behavior',
|
||||
'Model' . DS . 'Datasource',
|
||||
'Console' . DS . 'Command' . DS . 'Task',
|
||||
|
|
|
@ -60,7 +60,7 @@ class ProjectTask extends Shell {
|
|||
|
||||
if ($project) {
|
||||
$response = false;
|
||||
while ($response == false && is_dir($project) === true && file_exists($project . 'config' . 'core.php')) {
|
||||
while ($response == false && is_dir($project) === true && file_exists($project . 'Config' . 'core.php')) {
|
||||
$prompt = __d('cake_console', '<warning>A project already exists in this location:</warning> %s Overwrite?', $project);
|
||||
$response = $this->in($prompt, array('y','n'), 'n');
|
||||
if (strtolower($response) === 'n') {
|
||||
|
@ -236,7 +236,7 @@ class ProjectTask extends Shell {
|
|||
* @return boolean Success
|
||||
*/
|
||||
public function securitySalt($path) {
|
||||
$File = new File($path . 'config' . DS . 'core.php');
|
||||
$File = new File($path . 'Config' . DS . 'core.php');
|
||||
$contents = $File->read();
|
||||
if (preg_match('/([\s]*Configure::write\(\'Security.salt\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
|
||||
$string = Security::generateAuthKey();
|
||||
|
@ -256,7 +256,7 @@ class ProjectTask extends Shell {
|
|||
* @return boolean Success
|
||||
*/
|
||||
public function securityCipherSeed($path) {
|
||||
$File = new File($path . 'config' . DS . 'core.php');
|
||||
$File = new File($path . 'Config' . DS . 'core.php');
|
||||
$contents = $File->read();
|
||||
if (preg_match('/([\s]*Configure::write\(\'Security.cipherSeed\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
|
||||
if (!class_exists('Security')) {
|
||||
|
|
|
@ -129,11 +129,11 @@ class ShellDispatcher {
|
|||
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');
|
||||
$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')) {
|
||||
include_once CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'templates' . DS . 'skel' . DS . 'config' . DS . 'core.php';
|
||||
if (!file_exists(APP_PATH . '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();
|
||||
}
|
||||
require_once CONSOLE_LIBS . 'ConsoleErrorHandler.php';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue