From 50dd5fa84e2ab8e5b167e62de6ecfb9a74704883 Mon Sep 17 00:00:00 2001
From: Mark Story
Date: Sun, 7 Apr 2013 21:47:14 -0400
Subject: [PATCH] Update home pages.
Code changes are required now that 3.0-database has been merged.
Update ExtractTask tests as line numbers have changed.
---
App/View/Pages/home.ctp | 9 +--
.../Templates/skel/View/Pages/home.ctp | 8 +-
lib/Cake/Test/TestApp/View/Pages/home.ctp | 76 ++++++++++---------
.../Console/Command/Task/ExtractTaskTest.php | 8 +-
4 files changed, 49 insertions(+), 52 deletions(-)
diff --git a/App/View/Pages/home.ctp b/App/View/Pages/home.ctp
index f6c83d0ae45..31f690cd2e7 100644
--- a/App/View/Pages/home.ctp
+++ b/App/View/Pages/home.ctp
@@ -16,13 +16,13 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+use Cake\Cache\Cache;
use Cake\Core\Configure;
use Cake\Core\Plugin;
+use Cake\Model\ConnectionManager;
+use Cake\Error;
use Cake\Utility\Debugger;
-use Cake\Cache\Cache;
-use Cake\Model\Datasource\Database\Connection;
use Cake\Utility\Validation;
-use Cake\Error;
if (Configure::read('debug') == 0):
throw new Error\NotFoundException();
@@ -115,8 +115,7 @@ endif;
connect();
} catch (Exception $connectionError) {
$connected = false;
diff --git a/lib/Cake/Console/Templates/skel/View/Pages/home.ctp b/lib/Cake/Console/Templates/skel/View/Pages/home.ctp
index 6c96ad2a707..d947ad8e0b2 100644
--- a/lib/Cake/Console/Templates/skel/View/Pages/home.ctp
+++ b/lib/Cake/Console/Templates/skel/View/Pages/home.ctp
@@ -16,12 +16,13 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-use Cake\Core\Configure;
-use Cake\Utility\Debugger;
use Cake\Cache\Cache;
+use Cake\Core\Configure;
+use Cake\Core\Plugin;
use Cake\Model\ConnectionManager;
-use Cake\Utility\Validation;
use Cake\Error;
+use Cake\Utility\Debugger;
+use Cake\Utility\Validation;
if (Configure::read('debug') == 0):
throw new Error\NotFoundException();
@@ -115,6 +116,7 @@ endif;
if (isset($filePresent)):
try {
$connected = ConnectionManager::getDataSource('default');
+ $connected = $connection->connect();
} catch (Exception $connectionError) {
$connected = false;
$errorMsg = $connectionError->getMessage();
diff --git a/lib/Cake/Test/TestApp/View/Pages/home.ctp b/lib/Cake/Test/TestApp/View/Pages/home.ctp
index ed418f404bb..8130c679ade 100644
--- a/lib/Cake/Test/TestApp/View/Pages/home.ctp
+++ b/lib/Cake/Test/TestApp/View/Pages/home.ctp
@@ -12,34 +12,29 @@
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
- * @package cake.libs.view.templates.pages
+ * @package app.View.Pages
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-use Cake\Core\Configure;
-use Cake\Utility\Debugger;
use Cake\Cache\Cache;
+use Cake\Core\Configure;
+use Cake\Core\Plugin;
use Cake\Model\ConnectionManager;
-use Cake\Utility\Validation;
use Cake\Error;
+use Cake\Utility\Debugger;
+use Cake\Utility\Validation;
if (Configure::read('debug') == 0):
throw new Error\NotFoundException();
endif;
?>
-
-
- 0):
- // Debugger::checkSecurityKeys();
-endif;
-?>
+
- 1) Help me configure it
+ 1) Help me configure it
2) I don't / can't use URL rewriting
@@ -113,38 +108,31 @@ endif;
?>
';
+ echo __d('cake_dev', 'Recompile PCRE with Unicode support by adding --enable-unicode-properties
when configuring');
+ echo '
isConnected()):
+ if (Plugin::loaded('DebugKit')):
echo '';
- echo __d('cake_dev', 'Cake is able to connect to the database.');
+ echo __d('cake_dev', 'DebugKit plugin is present');
echo '';
else:
echo '';
- echo __d('cake_dev', 'Cake is NOT able to connect to the database.');
- echo '
';
- echo $connectionError->getMessage();
+ echo __d('cake_dev', 'DebugKit is not installed. It will help you inspect and debug different aspects of your application.');
+ echo '
';
+ echo __d('cake_dev', 'You can install it from %s', $this->Html->link('github', 'https://github.com/cakephp/debug_kit'));
echo '';
endif;
?>
--enable-unicode-properties
when configuring');
- echo '';
- }
-?>
+
+ +
+
@@ -189,12 +191,12 @@ You can also add some CSS styles for your pages at: APP/webroot/css.');