Skip to content
Permalink
Browse files

Redo commits on 2.next branch

  • Loading branch information...
joezidell-saleswarp committed May 12, 2017
1 parent 68432f7 commit 70ead28a1d798ea06b043559893597aab50606d5
Showing with 72 additions and 51 deletions.
  1. +4 −4 app/View/Pages/home.ctp
  2. +7 −0 app/webroot/index.php
  3. +7 −0 app/webroot/test.php
  4. +1 −1 lib/Cake/Config/routes.php
  5. +2 −2 lib/Cake/Configure/IniReader.php
  6. +2 −2 lib/Cake/Configure/PhpReader.php
  7. +1 −1 lib/Cake/Console/Command/AclShell.php
  8. +1 −1 lib/Cake/Console/Command/ConsoleShell.php
  9. +1 −1 lib/Cake/Console/Command/SchemaShell.php
  10. +1 −1 lib/Cake/Console/Command/Task/DbConfigTask.php
  11. +1 −1 lib/Cake/Console/Command/Task/PluginTask.php
  12. +3 −3 lib/Cake/Console/Command/Task/ProjectTask.php
  13. +1 −1 lib/Cake/Console/ShellDispatcher.php
  14. +4 −4 lib/Cake/Console/Templates/skel/View/Pages/home.ctp
  15. +1 −1 lib/Cake/Controller/Component/Acl/IniAcl.php
  16. +1 −1 lib/Cake/Controller/Component/Acl/PhpAcl.php
  17. +4 −4 lib/Cake/Core/Configure.php
  18. +1 −1 lib/Cake/Model/CakeSchema.php
  19. +1 −1 lib/Cake/Model/ConnectionManager.php
  20. +1 −1 lib/Cake/Network/Email/CakeEmail.php
  21. +1 −1 lib/Cake/Routing/Router.php
  22. +3 −3 lib/Cake/Test/Case/Console/Command/SchemaShellTest.php
  23. +2 −2 lib/Cake/Test/Case/Console/Command/Task/DbConfigTaskTest.php
  24. +1 −1 lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php
  25. +2 −2 lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
  26. +3 −3 lib/Cake/Test/test_app/View/Pages/home.ctp
  27. +1 −1 lib/Cake/Test/test_app/View/Posts/test_nocache_tags.ctp
  28. +2 −2 lib/Cake/Utility/Debugger.php
  29. +3 −3 lib/Cake/View/Helper/HtmlHelper.php
  30. +2 −2 lib/Cake/basics.php
  31. +7 −0 lib/Cake/bootstrap.php
@@ -58,19 +58,19 @@ endif;
$settings = Cache::settings();
if (!empty($settings)):
echo '<span class="notice success">';
echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>' . $settings['engine'] . 'Engine</em>', 'APP/Config/core.php');
echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>' . $settings['engine'] . 'Engine</em>', CONFIG . 'core.php');
echo '</span>';
else:
echo '<span class="notice">';
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', 'APP/Config/core.php');
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', CONFIG . 'core.php');
echo '</span>';
endif;
?>
</p>
<p>
<?php
$filePresent = null;
if (file_exists(APP . 'Config' . DS . 'database.php')):
if (file_exists(CONFIG . 'database.php')):
echo '<span class="notice success">';
echo __d('cake_dev', 'Your database configuration file is present.');
$filePresent = true;
@@ -79,7 +79,7 @@ endif;
echo '<span class="notice">';
echo __d('cake_dev', 'Your database configuration file is NOT present.');
echo '<br/>';
echo __d('cake_dev', 'Rename %s to %s', 'APP/Config/database.php.default', 'APP/Config/database.php');
echo __d('cake_dev', 'Rename %s to %s', CONFIG . 'database.php.default', CONFIG . 'database.php');
echo '</span>';
endif;
?>
@@ -43,6 +43,13 @@
define('APP_DIR', basename(dirname(dirname(__FILE__))));
}
/**
* Config Directory
*/
if (!defined('CONFIG')) {
define('CONFIG', ROOT . DS . APP_DIR . DS . 'Config' . DS);
}
/**
* The absolute path to the "cake" directory, WITHOUT a trailing DS.
*
@@ -46,6 +46,13 @@
define('APP_DIR', basename(dirname(dirname(__FILE__))));
}
/**
* Config Directory
*/
if (!defined('CONFIG')) {
define('CONFIG', ROOT . DS . APP_DIR . DS . 'Config' . DS);
}
/**
* The absolute path to the "Cake" directory, WITHOUT a trailing DS.
*
@@ -38,7 +38,7 @@
* - `/:controller'
* - `/:controller/:action/*'
*
* You can disable the connection of default routes by deleting the require inside APP/Config/routes.php.
* You can disable the connection of default routes by deleting the require inside CONFIG/routes.php.
*/
$prefixes = Router::prefixes();
@@ -73,13 +73,13 @@ class IniReader implements ConfigReaderInterface {
* Build and construct a new ini file parser. The parser can be used to read
* ini files that are on the filesystem.
*
* @param string $path Path to load ini config files from. Defaults to APP . 'Config' . DS
* @param string $path Path to load ini config files from. Defaults to CONFIG
* @param string $section Only get one section, leave null to parse and fetch
* all sections in the ini file.
*/
public function __construct($path = null, $section = null) {
if (!$path) {
$path = APP . 'Config' . DS;
$path = CONFIG;
}
$this->_path = $path;
$this->_section = $section;
@@ -38,11 +38,11 @@ class PhpReader implements ConfigReaderInterface {
/**
* Constructor for PHP Config file reading.
*
* @param string $path The path to read config files from. Defaults to APP . 'Config' . DS
* @param string $path The path to read config files from. Defaults to CONFIG
*/
public function __construct($path = null) {
if (!$path) {
$path = APP . 'Config' . DS;
$path = CONFIG;
}
$this->_path = $path;
}
@@ -89,7 +89,7 @@ public function startup() {
$this->args = null;
return $this->DbConfig->execute();
}
require_once APP . 'Config' . DS . 'database.php';
require_once CONFIG . 'database.php';
if (!in_array($this->command, array('initdb'))) {
$collection = new ComponentCollection();
@@ -501,7 +501,7 @@ protected function _loadRoutes() {
extract(Router::getNamedExpressions());
//@codingStandardsIgnoreStart
if (!@include APP . 'Config' . DS . 'routes.php') {
if (!@include CONFIG . 'routes.php') {
//@codingStandardsIgnoreEnd
return false;
}
@@ -476,7 +476,7 @@ public function getOptionParser() {
);
$path = array(
'help' => __d('cake_console', 'Path to read and write schema.php'),
'default' => APP . 'Config' . DS . 'Schema'
'default' => CONFIG . 'Schema'
);
$file = array(
'help' => __d('cake_console', 'File name to read and write.'),
@@ -64,7 +64,7 @@ class DbConfigTask extends AppShell {
* @return void
*/
public function initialize() {
$this->path = APP . 'Config' . DS;
$this->path = CONFIG;
}
/**
@@ -45,7 +45,7 @@ class PluginTask extends AppShell {
*/
public function initialize() {
$this->path = current(App::path('plugins'));
$this->bootstrap = APP . 'Config' . DS . 'bootstrap.php';
$this->bootstrap = CONFIG . 'bootstrap.php';
}
/**
@@ -79,14 +79,14 @@ public function execute() {
if ($this->securitySalt($path) === true) {
$this->out(__d('cake_console', ' * Random hash key created for \'Security.salt\''));
} else {
$this->err(__d('cake_console', 'Unable to generate random hash for \'Security.salt\', you should change it in %s', APP . 'Config' . DS . 'core.php'));
$this->err(__d('cake_console', 'Unable to generate random hash for \'Security.salt\', you should change it in %s', CONFIG . 'core.php'));
$success = false;
}
if ($this->securityCipherSeed($path) === true) {
$this->out(__d('cake_console', ' * Random seed created for \'Security.cipherSeed\''));
} else {
$this->err(__d('cake_console', 'Unable to generate random seed for \'Security.cipherSeed\', you should change it in %s', APP . 'Config' . DS . 'core.php'));
$this->err(__d('cake_console', 'Unable to generate random seed for \'Security.cipherSeed\', you should change it in %s', CONFIG . 'core.php'));
$success = false;
}
@@ -362,7 +362,7 @@ protected function _replaceCorePath($filename, $hardCode) {
* @return bool Success
*/
public function cakeAdmin($name) {
$path = (empty($this->configPath)) ? APP . 'Config' . DS : $this->configPath;
$path = (empty($this->configPath)) ? CONFIG : $this->configPath;
$File = new File($path . 'core.php');
$contents = $File->read();
if (preg_match('%(\s*[/]*Configure::write\(\'Routing.prefixes\',[\s\'a-z,\)\(]*\);)%', $contents, $match)) {
@@ -144,7 +144,7 @@ protected function _bootstrap() {
$boot = file_exists(ROOT . DS . APP_DIR . DS . 'Config' . DS . 'bootstrap.php');
require CORE_PATH . 'Cake' . DS . 'bootstrap.php';
if (!file_exists(APP . 'Config' . DS . 'core.php')) {
if (!file_exists(CONFIG . 'core.php')) {
include_once CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'Config' . DS . 'core.php';
App::build();
}
@@ -62,19 +62,19 @@ endif;
$settings = Cache::settings();
if (!empty($settings)):
echo '<span class="notice success">';
echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>' . $settings['engine'] . 'Engine</em>', 'APP/Config/core.php');
echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>' . $settings['engine'] . 'Engine</em>', CONFIG . 'core.php');
echo '</span>';
else:
echo '<span class="notice">';
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', 'APP/Config/core.php');
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', CONFIG . 'core.php');
echo '</span>';
endif;
?>
</p>
<p>
<?php
$filePresent = null;
if (file_exists(APP . 'Config' . DS . 'database.php')):
if (file_exists(CONFIG . 'database.php')):
echo '<span class="notice success">';
echo __d('cake_dev', 'Your database configuration file is present.');
$filePresent = true;
@@ -83,7 +83,7 @@ endif;
echo '<span class="notice">';
echo __d('cake_dev', 'Your database configuration file is NOT present.');
echo '<br/>';
echo __d('cake_dev', 'Rename %s to %s', 'APP/Config/database.php.default', 'APP/Config/database.php');
echo __d('cake_dev', 'Rename %s to %s', CONFIG . 'database.php.default', CONFIG . 'database.php');
echo '</span>';
endif;
?>
@@ -94,7 +94,7 @@ public function inherit($aro, $aco, $action = "*") {
*/
public function check($aro, $aco, $action = null) {
if (!$this->config) {
$this->config = $this->readConfigFile(APP . 'Config' . DS . 'acl.ini.php');
$this->config = $this->readConfigFile(CONFIG . 'acl.ini.php');
}
$aclConfig = $this->config;
@@ -69,7 +69,7 @@ class PhpAcl extends CakeObject implements AclInterface {
public function __construct() {
$this->options = array(
'policy' => static::DENY,
'config' => APP . 'Config' . DS . 'acl.php',
'config' => CONFIG . 'acl.php',
);
}
@@ -69,10 +69,10 @@ public static function bootstrap($boot = true) {
if ($boot) {
static::_appDefaults();
if (!include APP . 'Config' . DS . 'core.php') {
if (!include CONFIG . 'core.php') {
trigger_error(__d('cake_dev',
"Can't find application core file. Please create %s, and make sure it is readable by PHP.",
APP . 'Config' . DS . 'core.php'),
CONFIG . 'core.php'),
E_USER_ERROR
);
}
@@ -95,10 +95,10 @@ public static function bootstrap($boot = true) {
}
static::_setErrorHandlers($error, $exception);
if (!include APP . 'Config' . DS . 'bootstrap.php') {
if (!include CONFIG . 'bootstrap.php') {
trigger_error(__d('cake_dev',
"Can't find application bootstrap file. Please create %s, and make sure it is readable by PHP.",
APP . 'Config' . DS . 'bootstrap.php'),
CONFIG . 'bootstrap.php'),
E_USER_ERROR
);
}
@@ -90,7 +90,7 @@ public function __construct($options = array()) {
}
if (empty($options['path'])) {
$this->path = APP . 'Config' . DS . 'Schema';
$this->path = CONFIG . 'Schema';
}
$options = array_merge(get_object_vars($this), $options);
@@ -64,7 +64,7 @@ class ConnectionManager {
* @return void
*/
protected static function _init() {
include_once APP . 'Config' . DS . 'database.php';
include_once CONFIG . 'database.php';
if (class_exists('DATABASE_CONFIG')) {
static::$config = new DATABASE_CONFIG();
}
@@ -1241,7 +1241,7 @@ protected function _applyConfig($config) {
if (is_string($config)) {
if (!$this->_configInstance) {
if (!class_exists($this->_configClass) && !config('email')) {
throw new ConfigureException(__d('cake_dev', '%s not found.', APP . 'Config' . DS . 'email.php'));
throw new ConfigureException(__d('cake_dev', '%s not found.', CONFIG . 'email.php'));
}
$this->_configInstance = new $this->_configClass();
}
@@ -1281,7 +1281,7 @@ public static function setExtensions($extensions, $merge = true) {
*/
protected static function _loadRoutes() {
static::$initialized = true;
include APP . 'Config' . DS . 'routes.php';
include CONFIG . 'routes.php';
}
}
@@ -147,7 +147,7 @@ public function testStartup() {
$this->assertEquals('TestSchema', $this->Shell->Schema->name);
$this->assertEquals('test_schema.php', $this->Shell->Schema->file);
$this->assertEquals('default', $this->Shell->Schema->connection);
$this->assertEquals(APP . 'Config' . DS . 'Schema', $this->Shell->Schema->path);
$this->assertEquals(CONFIG . 'Schema', $this->Shell->Schema->path);
$this->Shell->Schema = null;
$this->Shell->params = array(
@@ -169,7 +169,7 @@ public function testStartup() {
*/
public function testView() {
$this->Shell->startup();
$this->Shell->Schema->path = APP . 'Config' . DS . 'Schema';
$this->Shell->Schema->path = CONFIG . 'Schema';
$this->Shell->params['file'] = 'i18n.php';
$this->Shell->expects($this->once())->method('_stop');
$this->Shell->expects($this->once())->method('out');
@@ -485,7 +485,7 @@ public function testCreateWithTableArgs() {
$this->Shell->params = array(
'connection' => 'test',
'name' => 'I18n',
'path' => APP . 'Config' . DS . 'Schema'
'path' => CONFIG . 'Schema'
);
$this->Shell->args = array('I18n', 'i18n');
$this->Shell->startup();
@@ -44,7 +44,7 @@ public function setUp() {
array($out, $out, $in)
);
$this->Task->path = APP . 'Config' . DS;
$this->Task->path = CONFIG;
}
/**
@@ -79,7 +79,7 @@ public function testGetConfig() {
public function testInitialize() {
$this->Task->initialize();
$this->assertFalse(empty($this->Task->path));
$this->assertEquals(APP . 'Config' . DS, $this->Task->path);
$this->assertEquals(CONFIG, $this->Task->path);
}
/**
@@ -312,7 +312,7 @@ public function testGetPrefix() {
* @return void
*/
public function testCakeAdmin() {
$File = new File(APP . 'Config' . DS . 'core.php');
$File = new File(CONFIG . 'core.php');
$contents = $File->read();
$File = new File(TMP . 'tests' . DS . 'core.php');
$File->write($contents);
@@ -153,7 +153,7 @@ public function setUp() {
parent::setUp();
$this->_configFileExists = true;
$emailConfig = new File(APP . 'Config' . DS . 'email.php');
$emailConfig = new File(CONFIG . 'email.php');
if (!$emailConfig->exists()) {
$this->_configFileExists = false;
$emailConfig->create();
@@ -176,7 +176,7 @@ public function tearDown() {
App::build();
if (!$this->_configFileExists) {
unlink(APP . 'Config' . DS . 'email.php');
unlink(CONFIG . 'email.php');
}
}
@@ -16,19 +16,19 @@
$settings = Cache::settings();
if (!empty($settings)):
echo '<span class="notice success">';
echo __d('cake_dev', 'The %s is being used for caching. To change the config edit APP/config/core.php ', '<em>'. $settings['engine'] . 'Engine</em>');
echo __d('cake_dev', 'The %s is being used for caching. To change the config edit %s/core.php ', '<em>'. $settings['engine'] . 'Engine</em>', CONFIG);
echo '</span>';
else:
echo '<span class="notice">';
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in APP/config/core.php');
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s/core.php', CONFIG);
echo '</span>';
endif;
?>
</p>
<p>
<?php
$filePresent = null;
if (file_exists(APP . 'Config' . DS . 'database.php')):
if (file_exists(CONFIG . 'database.php')):
echo '<span class="notice success">';
echo __d('cake_dev', 'Your database configuration file is present.');
$filePresent = true;
@@ -47,7 +47,7 @@
<?php
echo __d('cake', 'Your database configuration file is ');
$filePresent = null;
if (file_exists(APP . 'Config' . 'database.php')):
if (file_exists(CONFIG . 'database.php')):
echo __d('cake', 'present.');
$filePresent = true;
else:
Oops, something went wrong.

0 comments on commit 70ead28

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.