From 65684cdefdbe745594a0e4502dd283c0aaa054d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Renan=20Gonc=CC=A7alves?=
+
+ 1) Help me configure it
+ 2) I don't / can't use URL rewriting
+
+=')):
+ echo '';
+ echo __d('cake_dev', 'Your version of PHP is 5.4.3 or higher.');
+ echo '';
+ else:
+ echo '';
+ echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.4.3 or higher to use CakePHP.');
+ echo '';
+ endif;
+?>
+
+';
+ echo __d('cake_dev', 'Your version of PHP has mbstring extension loaded.');
+ echo '';
+ else:
+ echo '';
+ echo __d('cake_dev', 'Your version of PHP does NOT have the mbstring extension loaded.');
+ echo '';
+ endif;
+?>
+
';
- echo __d('cake_dev', 'The %s is being used for caching. To change the config edit APP/config/core.php ', ''. $settings['engine'] . 'Engine');
+ echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit APP/Config/cache.php', ''. $settings['engine'] . 'Engine');
echo '';
else:
echo '';
- 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 APP/Config/cache.php');
echo '';
endif;
?>
@@ -53,16 +97,16 @@ use Cake\Routing\Dispatcher,
';
- echo __d('cake_dev', 'Your database configuration file is present.');
+ echo __d('cake_dev', 'Your datasources configuration file is present.');
$filePresent = true;
echo '';
else:
echo '';
- echo __d('cake_dev', 'Your database configuration file is NOT present.');
+ echo __d('cake_dev', 'Your datasources configuration file is NOT present.');
echo '
-To change its layout, create: APP/views/layouts/default.ctp.
Html->link(
- sprintf('%s %s', __d('cake_dev', 'New'), __d('cake_dev', 'CakePHP 1.3 Docs')),
- 'http://book.cakephp.org/view/875/x1-3-Collection',
+ sprintf('%s %s', __d('cake_dev', 'New'), __d('cake_dev', 'CakePHP 2.0 Docs')),
+ 'http://book.cakephp.org/2.0/en/',
array('target' => '_blank', 'escape' => false)
);
?>
@@ -121,7 +167,7 @@ You can also add some CSS styles for your pages at: APP/webroot/css.');
Html->link(
__d('cake_dev', 'The 15 min Blog Tutorial'),
- 'http://book.cakephp.org/view/1528/Blog',
+ 'http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html',
array('target' => '_blank', 'escape' => false)
);
?>
@@ -142,7 +188,7 @@ You can also add some CSS styles for your pages at: APP/webroot/css.');
' . $settings['engine'];
- echo __d('cake', ' is being used to cache, to change this edit config/core.php ');
+ echo __d('cake', ' is being used to cache, to change this edit App/Config/cache.php ');
echo '
';
- echo __d('cake', 'Rename config/database.php.default to config/database.php');
+ echo __d('cake', 'Rename App/Config/datasources.default.php to App/Config/datasources.php');
endif;
?>
diff --git a/lib/Cake/Test/TestCase/Console/Command/Task/ExtractTaskTest.php b/lib/Cake/Test/TestCase/Console/Command/Task/ExtractTaskTest.php
index 6f97172ccbe..c07bdab986d 100644
--- a/lib/Cake/Test/TestCase/Console/Command/Task/ExtractTaskTest.php
+++ b/lib/Cake/Test/TestCase/Console/Command/Task/ExtractTaskTest.php
@@ -103,22 +103,22 @@ public function testExecute() {
$pattern = '/msgid "Your tmp directory is NOT writable."\nmsgstr ""\n/';
$this->assertRegExp($pattern, $result);
- $pattern = '/msgid "The %s is being used for caching. To change the config edit ';
- $pattern .= 'APP\/config\/core.php "\nmsgstr ""\n/';
+ $pattern = '/msgid "The %s is being used for core caching. To change the config edit ';
+ $pattern .= 'APP\/Config\/cache.php"\nmsgstr ""\n/';
$this->assertRegExp($pattern, $result);
$pattern = '/msgid "Your cache is NOT working. Please check ';
- $pattern .= 'the settings in APP\/config\/core.php"\nmsgstr ""\n/';
+ $pattern .= 'the settings in APP\/Config\/cache.php"\nmsgstr ""\n/';
$this->assertRegExp($pattern, $result);
- $pattern = '/msgid "Your database configuration file is present."\nmsgstr ""\n/';
+ $pattern = '/msgid "Your datasources configuration file is present."\nmsgstr ""\n/';
$this->assertRegExp($pattern, $result);
- $pattern = '/msgid "Your database configuration file is NOT present."\nmsgstr ""\n/';
+ $pattern = '/msgid "Your datasources configuration file is NOT present."\nmsgstr ""\n/';
$this->assertRegExp($pattern, $result);
- $pattern = '/msgid "Rename config\/database.php.default to ';
- $pattern .= 'config\/database.php"\nmsgstr ""\n/';
+ $pattern = '/msgid "Rename APP\/Config\/datasources.default.php to ';
+ $pattern .= 'APP\/Config\/datasources.php"\nmsgstr ""\n/';
$this->assertRegExp($pattern, $result);
$pattern = '/msgid "Cake is able to connect to the database."\nmsgstr ""\n/';
@@ -130,10 +130,13 @@ public function testExecute() {
$pattern = '/msgid "Editing this Page"\nmsgstr ""\n/';
$this->assertRegExp($pattern, $result);
- $pattern = '/msgid "To change the content of this page, create: APP\/views\/pages\/home\.ctp/';
+ $pattern = '/msgid "To change the content of this page, edit: APP\/View\/Pages\/home\.ctp/';
$this->assertRegExp($pattern, $result);
- $pattern = '/To change its layout, create: APP\/views\/layouts\/default\.ctp\./s';
+ $pattern = '/To change its layout, edit: APP\/View\/Layouts\/default\.ctp\./s';
+ $this->assertRegExp($pattern, $result);
+
+ $pattern = '/You can also add some CSS styles for your pages at: APP\/webroot\/css\."/';
$this->assertRegExp($pattern, $result);
// extract.ctp
@@ -149,7 +152,7 @@ public function testExecute() {
$this->assertRegExp($pattern, $result);
$pattern = '/\#: (\\\\|\/)extract\.ctp:14\n';
- $pattern .= '\#: (\\\\|\/)home\.ctp:101\n';
+ $pattern .= '\#: (\\\\|\/)home\.ctp:147\n';
$pattern .= 'msgid "Editing this Page"\nmsgstr ""/';
$this->assertRegExp($pattern, $result);
diff --git a/lib/Cake/Test/TestCase/Console/Command/Task/ProjectTaskTest.php b/lib/Cake/Test/TestCase/Console/Command/Task/ProjectTaskTest.php
index e74749f7ef6..cc89495e937 100644
--- a/lib/Cake/Test/TestCase/Console/Command/Task/ProjectTaskTest.php
+++ b/lib/Cake/Test/TestCase/Console/Command/Task/ProjectTaskTest.php
@@ -293,7 +293,7 @@ public function testGetPrefix() {
}
/**
- * test cakeAdmin() writing core.php
+ * test cakeAdmin() writing routes.php
*
* @return void
*/
diff --git a/lib/Cake/Test/TestCase/Error/ExceptionRendererTest.php b/lib/Cake/Test/TestCase/Error/ExceptionRendererTest.php
index 79c176f45b6..53067702a12 100644
--- a/lib/Cake/Test/TestCase/Error/ExceptionRendererTest.php
+++ b/lib/Cake/Test/TestCase/Error/ExceptionRendererTest.php
@@ -603,7 +603,7 @@ public static function testProvider() {
new Error\MissingDatasourceConfigException(array('config' => 'default')),
array(
'/
';
echo __d('cake_dev', 'Rename APP/Config/datasources.default.php to APP/Config/datasources.php');
echo '';
diff --git a/index.php b/index.php
index 6c71a20ba50..43e92a25ed2 100644
--- a/index.php
+++ b/index.php
@@ -4,8 +4,8 @@
*
* This file collects requests if:
* - no mod_rewrite is available or .htaccess files are not supported
- * - requires App.baseUrl to be uncommented in app/Config/core.php
- * - app/webroot is not set as a document root.
+ * - requires App.baseUrl to be uncommented in App/Config/app.php
+ * - App/webroot is not set as a document root.
*
* PHP 5
*
diff --git a/lib/Cake/Console/Command/BakeShell.php b/lib/Cake/Console/Command/BakeShell.php
index a733ba75963..42753fef68a 100644
--- a/lib/Cake/Console/Command/BakeShell.php
+++ b/lib/Cake/Console/Command/BakeShell.php
@@ -216,7 +216,7 @@ public function getOptionParser() {
'help' => __d('cake_console', 'Bake a new plugin folder in the path supplied or in current directory if no path is specified.'),
'parser' => $this->Plugin->getOptionParser()
))->addSubcommand('db_config', array(
- 'help' => __d('cake_console', 'Bake a database.php file in config directory.'),
+ 'help' => __d('cake_console', 'Bake a datasources.php file in config directory.'),
'parser' => $this->DbConfig->getOptionParser()
))->addSubcommand('model', array(
'help' => __d('cake_console', 'Bake a model.'),
diff --git a/lib/Cake/Console/Command/Task/DbConfigTask.php b/lib/Cake/Console/Command/Task/DbConfigTask.php
index b1e8aec1f4f..379df77888c 100644
--- a/lib/Cake/Console/Command/Task/DbConfigTask.php
+++ b/lib/Cake/Console/Command/Task/DbConfigTask.php
@@ -1,6 +1,6 @@
path . 'database.php';
+ $filename = $this->path . 'datasources.php';
$oldConfigs = array();
if (file_exists($filename)) {
@@ -344,7 +344,7 @@ public function bake($configs) {
}
$out .= "}\n";
- $filename = $this->path . 'database.php';
+ $filename = $this->path . 'datasources.php';
return $this->createFile($filename, $out);
}
diff --git a/lib/Cake/Console/Templates/skel/View/Pages/home.ctp b/lib/Cake/Console/Templates/skel/View/Pages/home.ctp
index 7a184523dd9..9dca51aa074 100644
--- a/lib/Cake/Console/Templates/skel/View/Pages/home.ctp
+++ b/lib/Cake/Console/Templates/skel/View/Pages/home.ctp
@@ -85,7 +85,7 @@ endif;
$settings = Cache::settings('_cake_model_');
if (!empty($settings)):
echo '';
- echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit APP/Config/cache.php ', ''. $settings['engine'] . 'Engine');
+ echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit APP/Config/cache.php', ''. $settings['engine'] . 'Engine');
echo '';
else:
echo '';
@@ -104,7 +104,7 @@ endif;
echo '';
else:
echo '';
- echo __d('cake_dev', 'Your datasouces configuration file is NOT present.');
+ echo __d('cake_dev', 'Your datasources configuration file is NOT present.');
echo '
';
echo __d('cake_dev', 'Rename APP/Config/datasources.default.php to APP/Config/datasources.php');
echo '';
diff --git a/lib/Cake/Controller/Component/AclComponent.php b/lib/Cake/Controller/Component/AclComponent.php
index 0fdee029b5f..ad01a67b6df 100644
--- a/lib/Cake/Controller/Component/AclComponent.php
+++ b/lib/Cake/Controller/Component/AclComponent.php
@@ -29,8 +29,8 @@
* Access Control List factory class.
*
* Uses a strategy pattern to allow custom ACL implementations to be used with the same component interface.
- * You can define by changing `Configure::write('Acl.classname', 'DbAcl');` in your core.php. Concrete ACL
- * implementations should extend `AclBase` and implement the methods it defines.
+ * You can define by changing `Configure::write('Acl.classname', 'DbAcl');` in your App/Config/acl.php.
+ * Concrete ACL implementations should extend `AclBase` and implement the methods it defines.
*
* @package Cake.Controller.Component
* @link http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html
diff --git a/lib/Cake/Error/ErrorHandler.php b/lib/Cake/Error/ErrorHandler.php
index 2bb19a7db05..c5e4652116f 100644
--- a/lib/Cake/Error/ErrorHandler.php
+++ b/lib/Cake/Error/ErrorHandler.php
@@ -68,7 +68,7 @@
* #### Logging exceptions
*
* Using the built-in exception handling, you can log all the exceptions
- * that are dealt with by ErrorHandler by setting `Exception.log` to true in your core.php.
+ * that are dealt with by ErrorHandler by setting `Exception.log` to true in your App/Config/error.php.
* Enabling this will log every exception to Log and the configured loggers.
*
* ### PHP errors
@@ -76,7 +76,7 @@
* Error handler also provides the built in features for handling php errors (trigger_error).
* While in debug mode, errors will be output to the screen using debugger. While in production mode,
* errors will be logged to Log. You can control which errors are logged by setting
- * `Error.level` in your core.php.
+ * `Error.level` in your App/Config/error.php.
*
* #### Logging errors
*
diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php
index b8753fbf00f..158dc64460c 100644
--- a/lib/Cake/Error/ExceptionRenderer.php
+++ b/lib/Cake/Error/ExceptionRenderer.php
@@ -54,7 +54,7 @@
* #### Using a subclass of ExceptionRenderer
*
* Using a subclass of ExceptionRenderer gives you full control over how Exceptions are rendered, you
- * can configure your class in your core.php, with `Configure::write('Exception.renderer', 'MyClass');`
+ * can configure your class in your App/Config/error.php, with `Configure::write('Exception.renderer', 'MyClass');`
* You should place any custom exception renderers in `app/Lib/Error`.
*
* @package Cake.Error
diff --git a/lib/Cake/Error/MissingDatasourceConfigException.php b/lib/Cake/Error/MissingDatasourceConfigException.php
index 44504e52034..15616b945a5 100644
--- a/lib/Cake/Error/MissingDatasourceConfigException.php
+++ b/lib/Cake/Error/MissingDatasourceConfigException.php
@@ -25,6 +25,6 @@
*/
class MissingDatasourceConfigException extends Exception {
- protected $_messageTemplate = 'The datasource configuration "%s" was not found in database.php';
+ protected $_messageTemplate = 'The datasource configuration "%s" was not found in datasources.php';
}
diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php
index 0896330c811..3945116a70c 100644
--- a/lib/Cake/Model/Model.php
+++ b/lib/Cake/Model/Model.php
@@ -52,7 +52,7 @@ class Model extends Object implements EventListener {
/**
* The name of the DataSource connection that this Model uses
*
- * The value must be an attribute name that you defined in `app/Config/database.php`
+ * The value must be an attribute name that you defined in `App/Config/datasources.php`
* or created using `ConnectionManager::create()`.
*
* @var string
@@ -3187,7 +3187,7 @@ public function getAffectedRows() {
/**
* Sets the DataSource to which this model is bound.
*
- * @param string $dataSource The name of the DataSource, as defined in app/Config/database.php
+ * @param string $dataSource The name of the DataSource, as defined in App/Config/datasources.php
* @return void
* @throws MissingConnectionException
*/
diff --git a/lib/Cake/Test/TestApp/View/Pages/home.ctp b/lib/Cake/Test/TestApp/View/Pages/home.ctp
index 147d6b4957e..1d87b1f792d 100644
--- a/lib/Cake/Test/TestApp/View/Pages/home.ctp
+++ b/lib/Cake/Test/TestApp/View/Pages/home.ctp
@@ -15,14 +15,58 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-use Cake\Routing\Dispatcher,
- Cake\Cache\Cache,
- Cake\Model\ConnectionManager,
- Cake\Utility\Validation,
- Cake\Core\Configure;
+use Cake\Core\Configure;
+use Cake\Utility\Debugger;
+use Cake\Cache\Cache;
+use Cake\Model\ConnectionManager;
+use Cake\Utility\Validation;
+use Cake\Error;
+
+if (Configure::read('debug') == 0):
+ throw new Error\NotFoundException();
+endif;
?>
+
-
+
+ 0):
+ // Debugger::checkSecurityKeys();
+endif;
+?>
+
';
- echo __d('cake_dev', 'Rename config/database.php.default to config/database.php');
+ echo __d('cake_dev', 'Rename APP/Config/datasources.default.php to APP/Config/datasources.php');
echo '';
endif;
?>
@@ -71,7 +115,7 @@ use Cake\Routing\Dispatcher,
if (isset($filePresent)):
try {
$connected = ConnectionManager::getDataSource('default');
- } catch (Exception $e) {
+ } catch (Exception $connectionError) {
$connected = false;
}
?>
@@ -84,6 +128,8 @@ if (isset($filePresent)):
else:
echo '';
echo __d('cake_dev', 'Cake is NOT able to connect to the database.');
+ echo '
';
+ echo $connectionError->getMessage();
echo '';
endif;
?>
@@ -92,17 +138,17 @@ if (isset($filePresent)):
';
- __('PCRE has not been compiled with Unicode support.');
- echo '
';
- __('Recompile PCRE with Unicode support by adding --enable-unicode-properties
when configuring');
+ echo __d('cake_dev', 'PCRE has not been compiled with Unicode support.');
+ echo '
';
+ echo __d('cake_dev', 'Recompile PCRE with Unicode support by adding --enable-unicode-properties
when configuring');
echo '
+echo __d('cake_dev', 'To change the content of this page, edit: APP/View/Pages/home.ctp.
+To change its layout, edit: APP/View/Layouts/default.ctp.
You can also add some CSS styles for your pages at: APP/webroot/css.');
?>
';
@@ -57,7 +57,7 @@ use Cake\Core\Configure;
echo __d('cake', 'NOT working.');
echo '
';
if (is_writable(TMP)):
- echo __d('cake', 'Edit: config/core.php to insure you have the newset version of this file and the variable $cakeCache set properly');
+ echo __d('cake', 'Edit: App/Config/cache.php to insure you have the newset version of this file and the variable $cakeCache set properly');
endif;
endif;
?>
@@ -66,15 +66,15 @@ use Cake\Core\Configure;
Missing Datasource Configuration<\/h2>/',
- '/The datasource configuration default<\/em> was not found in database.php/'
+ '/The datasource configuration default<\/em> was not found in datasources.php/'
),
500
),
diff --git a/lib/Cake/View/Errors/missing_database.ctp b/lib/Cake/View/Errors/missing_database.ctp
index a8c892e83d6..a348538f1c0 100644
--- a/lib/Cake/View/Errors/missing_database.ctp
+++ b/lib/Cake/View/Errors/missing_database.ctp
@@ -23,7 +23,7 @@
: - +
: diff --git a/lib/Cake/View/Errors/missing_datasource_config.ctp b/lib/Cake/View/Errors/missing_datasource_config.ctp index 3bc6ff78745..eb3cee687b5 100644 --- a/lib/Cake/View/Errors/missing_datasource_config.ctp +++ b/lib/Cake/View/Errors/missing_datasource_config.ctp @@ -19,7 +19,7 @@
: - ' . $config . ''); ?> + ' . $config . ''); ?>
: