From 514d9675d8202e335a8318af951055c453376a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=BCrth?= Date: Fri, 8 Feb 2013 14:41:57 +0100 Subject: [PATCH] Updated .gitignore, synced app & skel Added some good practice rules from https://help.github.com/articles/ignoring-files to gitignore Changed .gitignore to only ignore /app/Config/database.php instead of all files in /app/Config/ (helps to keep it in sync with its skel folder!) Brought \app\ and \lib\Cake\Console\Templates\skel\ in sync Fixed various @package annotations in \app\ Fixed various @package annotations in \lib\Cake\Console\Templates\skel\ --- .gitignore | 16 +++++++++++++-- app/Config/Schema/i18n.php | 8 ++------ app/Config/core.php | 2 +- app/Config/database.php.default | 6 ------ app/Config/email.php.default | 6 ------ app/Console/cake | 2 +- app/Console/cake.bat | 2 +- app/Console/cake.php | 5 ++++- app/Controller/AppController.php | 5 ++--- app/Controller/PagesController.php | 1 - app/View/Emails/html/default.ctp | 2 +- app/View/Emails/text/default.ctp | 2 +- app/View/Errors/error400.ctp | 4 ++-- app/View/Errors/error500.ctp | 4 ++-- app/View/Helper/AppHelper.php | 1 - app/View/Layouts/Emails/html/default.ctp | 6 +++--- app/View/Layouts/Emails/text/default.ctp | 4 ++-- app/View/Layouts/ajax.ctp | 2 +- app/View/Layouts/default.ctp | 2 +- app/View/Layouts/error.ctp | 2 +- app/View/Layouts/flash.ctp | 2 +- app/View/Pages/home.ctp | 2 +- app/webroot/index.php | 20 ++++++++++++------- app/webroot/test.php | 15 +++++++++----- .../Templates/skel/Config/Schema/i18n.php | 8 ++------ .../Console/Templates/skel/Config/core.php | 2 +- .../skel/Config/database.php.default | 6 ------ .../Templates/skel/Config/email.php.default | 6 ------ lib/Cake/Console/Templates/skel/Console/cake | 2 +- .../Console/Templates/skel/Console/cake.bat | 2 +- .../Console/Templates/skel/Console/cake.php | 5 ++++- .../skel/Controller/AppController.php | 5 ++--- .../skel/Controller/PagesController.php | 18 +++++++++++------ .../skel/View/Emails/html/default.ctp | 2 +- .../Templates/skel/View/Errors/error400.ctp | 2 +- .../Templates/skel/View/Errors/error500.ctp | 2 +- .../skel/View/Layouts/Emails/html/default.ctp | 4 +--- .../skel/View/Layouts/Emails/text/default.ctp | 1 - .../Templates/skel/View/Layouts/default.ctp | 8 +++++--- .../Templates/skel/View/Layouts/error.ctp | 8 +++++--- .../Templates/skel/View/Layouts/flash.ctp | 4 ++-- .../Templates/skel/View/Pages/home.ctp | 9 ++++----- .../Console/Templates/skel/webroot/index.php | 7 +++++-- .../Console/Templates/skel/webroot/test.php | 9 ++++++--- 44 files changed, 118 insertions(+), 113 deletions(-) diff --git a/.gitignore b/.gitignore index de4f6ff0b..4a1adb886 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,21 @@ -/app/Config +# User specific & automatically generated files # +################################################# +/app/Config/database.php /app/tmp /lib/Cake/Console/Templates/skel/tmp/ /plugins /vendors /build /dist -.DS_Store /tags + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +Icon? +ehthumbs.db +Thumbs.db \ No newline at end of file diff --git a/app/Config/Schema/i18n.php b/app/Config/Schema/i18n.php index 7f2deab11..eba67b1cb 100644 --- a/app/Config/Schema/i18n.php +++ b/app/Config/Schema/i18n.php @@ -20,9 +20,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -// @codingStandardsIgnoreStart - -/* +/** * * Using the Schema command line utility * @@ -30,9 +28,7 @@ * * cake schema run create i18n */ -class i18nSchema extends CakeSchema { - -// @codingStandardsIgnoreEnd +class I18nSchema extends CakeSchema { public $name = 'i18n'; diff --git a/app/Config/core.php b/app/Config/core.php index 9fb0719a4..ab18ae5c9 100644 --- a/app/Config/core.php +++ b/app/Config/core.php @@ -95,7 +95,7 @@ * * And uncomment the App.baseUrl below. But keep in mind * that plugin assets such as images, CSS and Javascript files - * will not work without url rewriting + * will not work without url rewriting! * To work around this issue you should either symlink or copy * the plugin assets into you app's webroot directory. This is * recommended even when you are using mod_rewrite. Handling static diff --git a/app/Config/database.php.default b/app/Config/database.php.default index 588383e90..69dd26e87 100644 --- a/app/Config/database.php.default +++ b/app/Config/database.php.default @@ -18,13 +18,7 @@ * @package app.Config * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) - */ -/** - * In this file you set up your database connection details. * - * @package cake.config - */ -/** * Database configuration class. * You can specify multiple configurations for production, development and testing. * diff --git a/app/Config/email.php.default b/app/Config/email.php.default index da24f3588..7e8c6b490 100644 --- a/app/Config/email.php.default +++ b/app/Config/email.php.default @@ -18,13 +18,7 @@ * @package app.Config * @since CakePHP(tm) v 2.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) - */ -/** - * In this file you set up your send email details. * - * @package cake.config - */ -/** * Email configuration class. * You can specify multiple configurations for production, development and testing. * diff --git a/app/Console/cake b/app/Console/cake index dead9602f..00d47a9f6 100755 --- a/app/Console/cake +++ b/app/Console/cake @@ -13,7 +13,7 @@ # # @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) # @link http://cakephp.org CakePHP(tm) Project -# @package cake.Console +# @package app.Console # @since CakePHP(tm) v 1.2.0.5012 # @license MIT License (http://www.opensource.org/licenses/mit-license.php) # diff --git a/app/Console/cake.bat b/app/Console/cake.bat index e38a95e5f..3837875ad 100644 --- a/app/Console/cake.bat +++ b/app/Console/cake.bat @@ -11,7 +11,7 @@ :: :: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) :: @link http://cakephp.org CakePHP(tm) Project -:: @package app.Console +:: @package app.Console :: @since CakePHP(tm) v 2.0 :: @license MIT License (http://www.opensource.org/licenses/mit-license.php) :: diff --git a/app/Console/cake.php b/app/Console/cake.php index 32ee025e1..878f77473 100644 --- a/app/Console/cake.php +++ b/app/Console/cake.php @@ -23,10 +23,13 @@ $dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php'; if (function_exists('ini_set')) { $root = dirname(dirname(dirname(__FILE__))); + + // the following line differs from its sibling + // /lib/Cake/Console/Templates/skel/Console/cake.php ini_set('include_path', $root . $ds . 'lib' . PATH_SEPARATOR . ini_get('include_path')); } -if (!include ($dispatcher)) { +if (!include($dispatcher)) { trigger_error('Could not locate CakePHP core files.', E_USER_ERROR); } unset($paths, $path, $dispatcher, $root, $ds); diff --git a/app/Controller/AppController.php b/app/Controller/AppController.php index eef027c43..343c37fe9 100644 --- a/app/Controller/AppController.php +++ b/app/Controller/AppController.php @@ -20,7 +20,6 @@ * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ - App::uses('Controller', 'Controller'); /** @@ -29,8 +28,8 @@ App::uses('Controller', 'Controller'); * Add your application-wide methods in the class below, your controllers * will inherit them. * - * @package app.Controller - * @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller + * @package app.Controller + * @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller */ class AppController extends Controller { } diff --git a/app/Controller/PagesController.php b/app/Controller/PagesController.php index 89c72ab2b..8b99a035a 100644 --- a/app/Controller/PagesController.php +++ b/app/Controller/PagesController.php @@ -19,7 +19,6 @@ * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ - App::uses('AppController', 'Controller'); /** diff --git a/app/View/Emails/html/default.ctp b/app/View/Emails/html/default.ctp index 9e60bddb1..e4a57c1ab 100644 --- a/app/View/Emails/html/default.ctp +++ b/app/View/Emails/html/default.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Emails.html + * @package app.View.Emails.html * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/app/View/Emails/text/default.ctp b/app/View/Emails/text/default.ctp index 01f77b0c5..27e5c5cf7 100644 --- a/app/View/Emails/text/default.ctp +++ b/app/View/Emails/text/default.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Emails.text + * @package app.View.Emails.text * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/app/View/Errors/error400.ctp b/app/View/Errors/error400.ctp index 8ca2ff9af..0527ff569 100644 --- a/app/View/Errors/error400.ctp +++ b/app/View/Errors/error400.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Errors + * @package app.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ @@ -26,7 +26,7 @@ ); ?>

0 ): +if (Configure::read('debug') > 0): echo $this->element('exception_stack_trace'); endif; ?> diff --git a/app/View/Errors/error500.ctp b/app/View/Errors/error500.ctp index 927dcc9cd..5524d3adc 100644 --- a/app/View/Errors/error500.ctp +++ b/app/View/Errors/error500.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Errors + * @package app.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ @@ -23,7 +23,7 @@

0 ): +if (Configure::read('debug') > 0): echo $this->element('exception_stack_trace'); endif; ?> diff --git a/app/View/Helper/AppHelper.php b/app/View/Helper/AppHelper.php index b45dee633..8eded6196 100644 --- a/app/View/Helper/AppHelper.php +++ b/app/View/Helper/AppHelper.php @@ -20,7 +20,6 @@ * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ - App::uses('Helper', 'View'); /** diff --git a/app/View/Layouts/Emails/html/default.ctp b/app/View/Layouts/Emails/html/default.ctp index bdbc6a716..6d87630f4 100644 --- a/app/View/Layouts/Emails/html/default.ctp +++ b/app/View/Layouts/Emails/html/default.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Layouts.Emails.html + * @package app.View.Layouts.Email.html * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ @@ -20,10 +20,10 @@ - <?php echo $title_for_layout;?> + <?php echo $title_for_layout; ?> - fetch('content');?> + fetch('content'); ?>

This email was sent using the CakePHP Framework

diff --git a/app/View/Layouts/Emails/text/default.ctp b/app/View/Layouts/Emails/text/default.ctp index 45ae6a5dc..dcc0049f4 100644 --- a/app/View/Layouts/Emails/text/default.ctp +++ b/app/View/Layouts/Emails/text/default.ctp @@ -12,11 +12,11 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Layouts.Emails.text + * @package app.View.Layouts.Email.text * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -fetch('content');?> +fetch('content'); ?> This email was sent using the CakePHP Framework, http://cakephp.org. diff --git a/app/View/Layouts/ajax.ctp b/app/View/Layouts/ajax.ctp index 4fbc3ec1b..3a3db322b 100644 --- a/app/View/Layouts/ajax.ctp +++ b/app/View/Layouts/ajax.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Layouts + * @package app.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/app/View/Layouts/default.ctp b/app/View/Layouts/default.ctp index 1e9a898e6..3a13589ca 100644 --- a/app/View/Layouts/default.ctp +++ b/app/View/Layouts/default.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Layouts + * @package app.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/app/View/Layouts/error.ctp b/app/View/Layouts/error.ctp index 1e9a898e6..3a13589ca 100644 --- a/app/View/Layouts/error.ctp +++ b/app/View/Layouts/error.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Layouts + * @package app.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/app/View/Layouts/flash.ctp b/app/View/Layouts/flash.ctp index b786e1b6e..c188dfe47 100644 --- a/app/View/Layouts/flash.ctp +++ b/app/View/Layouts/flash.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Layouts + * @package app.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/app/View/Pages/home.ctp b/app/View/Pages/home.ctp index 18f55ddec..9f3d2587c 100644 --- a/app/View/Pages/home.ctp +++ b/app/View/Pages/home.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Pages + * @package app.View.Pages * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/app/webroot/index.php b/app/webroot/index.php index 3e8eea91f..467b0652a 100644 --- a/app/webroot/index.php +++ b/app/webroot/index.php @@ -39,6 +39,7 @@ if (!defined('DS')) { if (!defined('ROOT')) { define('ROOT', dirname(dirname(dirname(__FILE__)))); } + /** * The actual directory name for the "app". * @@ -53,12 +54,15 @@ if (!defined('APP_DIR')) { * Un-comment this line to specify a fixed path to CakePHP. * This should point at the directory containing `Cake`. * - * For ease of development CakePHP uses PHP's include_path. If you + * For ease of development CakePHP uses PHP's include_path. If you * cannot modify your include_path set this value. * * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php + * + * The following line differs from its sibling + * /lib/Cake/Console/Templates/skel/webroot/index.php */ - //define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); +//define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); /** * Editing below this line should NOT be necessary. @@ -84,20 +88,22 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) { if (function_exists('ini_set')) { ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); } - if (!include ('Cake' . DS . 'bootstrap.php')) { + if (!include('Cake' . DS . 'bootstrap.php')) { $failed = true; } } else { - if (!include (CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) { + if (!include(CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) { $failed = true; } } if (!empty($failed)) { - trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); + trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } App::uses('Dispatcher', 'Routing'); - $Dispatcher = new Dispatcher(); -$Dispatcher->dispatch(new CakeRequest(), new CakeResponse()); +$Dispatcher->dispatch( + new CakeRequest(), + new CakeResponse() +); diff --git a/app/webroot/test.php b/app/webroot/test.php index 213367b34..3c22d99b3 100644 --- a/app/webroot/test.php +++ b/app/webroot/test.php @@ -25,6 +25,7 @@ ini_set('display_errors', 1); if (!defined('DS')) { define('DS', DIRECTORY_SEPARATOR); } + /** * These defines should only be edited if you have cake installed in * a directory layout other than the way it is distributed. @@ -38,6 +39,7 @@ if (!defined('DS')) { if (!defined('ROOT')) { define('ROOT', dirname(dirname(dirname(__FILE__)))); } + /** * The actual directory name for the "app". * @@ -49,12 +51,15 @@ if (!defined('APP_DIR')) { /** * The absolute path to the "Cake" directory, WITHOUT a trailing DS. * - * For ease of development CakePHP uses PHP's include_path. If you + * For ease of development CakePHP uses PHP's include_path. If you * need to cannot modify your include_path, you can set this path. * * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php + * + * The following line differs from its sibling + * /lib/Cake/Console/Templates/skel/webroot/test.php */ - //define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); +//define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); /** * Editing below this line should not be necessary. @@ -72,16 +77,16 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) { if (function_exists('ini_set')) { ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); } - if (!include ('Cake' . DS . 'bootstrap.php')) { + if (!include('Cake' . DS . 'bootstrap.php')) { $failed = true; } } else { - if (!include (CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) { + if (!include(CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) { $failed = true; } } if (!empty($failed)) { - trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); + trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } if (Configure::read('debug') < 1) { diff --git a/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php b/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php index 7f2deab11..eba67b1cb 100644 --- a/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php +++ b/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php @@ -20,9 +20,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -// @codingStandardsIgnoreStart - -/* +/** * * Using the Schema command line utility * @@ -30,9 +28,7 @@ * * cake schema run create i18n */ -class i18nSchema extends CakeSchema { - -// @codingStandardsIgnoreEnd +class I18nSchema extends CakeSchema { public $name = 'i18n'; diff --git a/lib/Cake/Console/Templates/skel/Config/core.php b/lib/Cake/Console/Templates/skel/Config/core.php index 9fb0719a4..ab18ae5c9 100644 --- a/lib/Cake/Console/Templates/skel/Config/core.php +++ b/lib/Cake/Console/Templates/skel/Config/core.php @@ -95,7 +95,7 @@ * * And uncomment the App.baseUrl below. But keep in mind * that plugin assets such as images, CSS and Javascript files - * will not work without url rewriting + * will not work without url rewriting! * To work around this issue you should either symlink or copy * the plugin assets into you app's webroot directory. This is * recommended even when you are using mod_rewrite. Handling static diff --git a/lib/Cake/Console/Templates/skel/Config/database.php.default b/lib/Cake/Console/Templates/skel/Config/database.php.default index 588383e90..69dd26e87 100644 --- a/lib/Cake/Console/Templates/skel/Config/database.php.default +++ b/lib/Cake/Console/Templates/skel/Config/database.php.default @@ -18,13 +18,7 @@ * @package app.Config * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) - */ -/** - * In this file you set up your database connection details. * - * @package cake.config - */ -/** * Database configuration class. * You can specify multiple configurations for production, development and testing. * diff --git a/lib/Cake/Console/Templates/skel/Config/email.php.default b/lib/Cake/Console/Templates/skel/Config/email.php.default index da24f3588..7e8c6b490 100644 --- a/lib/Cake/Console/Templates/skel/Config/email.php.default +++ b/lib/Cake/Console/Templates/skel/Config/email.php.default @@ -18,13 +18,7 @@ * @package app.Config * @since CakePHP(tm) v 2.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) - */ -/** - * In this file you set up your send email details. * - * @package cake.config - */ -/** * Email configuration class. * You can specify multiple configurations for production, development and testing. * diff --git a/lib/Cake/Console/Templates/skel/Console/cake b/lib/Cake/Console/Templates/skel/Console/cake index dead9602f..00d47a9f6 100644 --- a/lib/Cake/Console/Templates/skel/Console/cake +++ b/lib/Cake/Console/Templates/skel/Console/cake @@ -13,7 +13,7 @@ # # @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) # @link http://cakephp.org CakePHP(tm) Project -# @package cake.Console +# @package app.Console # @since CakePHP(tm) v 1.2.0.5012 # @license MIT License (http://www.opensource.org/licenses/mit-license.php) # diff --git a/lib/Cake/Console/Templates/skel/Console/cake.bat b/lib/Cake/Console/Templates/skel/Console/cake.bat index e38a95e5f..3837875ad 100644 --- a/lib/Cake/Console/Templates/skel/Console/cake.bat +++ b/lib/Cake/Console/Templates/skel/Console/cake.bat @@ -11,7 +11,7 @@ :: :: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) :: @link http://cakephp.org CakePHP(tm) Project -:: @package app.Console +:: @package app.Console :: @since CakePHP(tm) v 2.0 :: @license MIT License (http://www.opensource.org/licenses/mit-license.php) :: diff --git a/lib/Cake/Console/Templates/skel/Console/cake.php b/lib/Cake/Console/Templates/skel/Console/cake.php index de9261da7..f29eda457 100644 --- a/lib/Cake/Console/Templates/skel/Console/cake.php +++ b/lib/Cake/Console/Templates/skel/Console/cake.php @@ -23,10 +23,13 @@ $dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php'; if (function_exists('ini_set')) { $root = dirname(dirname(dirname(__FILE__))); + + // the following line differs from its sibling + // /app/Console/cake.php ini_set('include_path', $root . PATH_SEPARATOR . __CAKE_PATH__ . PATH_SEPARATOR . ini_get('include_path')); } -if (!include $dispatcher) { +if (!include($dispatcher)) { trigger_error('Could not locate CakePHP core files.', E_USER_ERROR); } unset($paths, $path, $dispatcher, $root, $ds); diff --git a/lib/Cake/Console/Templates/skel/Controller/AppController.php b/lib/Cake/Console/Templates/skel/Controller/AppController.php index eef027c43..343c37fe9 100644 --- a/lib/Cake/Console/Templates/skel/Controller/AppController.php +++ b/lib/Cake/Console/Templates/skel/Controller/AppController.php @@ -20,7 +20,6 @@ * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ - App::uses('Controller', 'Controller'); /** @@ -29,8 +28,8 @@ App::uses('Controller', 'Controller'); * Add your application-wide methods in the class below, your controllers * will inherit them. * - * @package app.Controller - * @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller + * @package app.Controller + * @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller */ class AppController extends Controller { } diff --git a/lib/Cake/Console/Templates/skel/Controller/PagesController.php b/lib/Cake/Console/Templates/skel/Controller/PagesController.php index c93061ea9..8b99a035a 100644 --- a/lib/Cake/Console/Templates/skel/Controller/PagesController.php +++ b/lib/Cake/Console/Templates/skel/Controller/PagesController.php @@ -31,6 +31,13 @@ App::uses('AppController', 'Controller'); */ class PagesController extends AppController { +/** + * Controller name + * + * @var string + */ + public $name = 'Pages'; + /** * This controller does not use a model * @@ -41,7 +48,8 @@ class PagesController extends AppController { /** * Displays a view * - * @param string What page to display + * @param mixed What page to display + * @return void */ public function display() { $path = func_get_args(); @@ -50,7 +58,7 @@ class PagesController extends AppController { if (!$count) { $this->redirect('/'); } - $page = $subpage = $title = null; + $page = $subpage = $title_for_layout = null; if (!empty($path[0])) { $page = $path[0]; @@ -59,11 +67,9 @@ class PagesController extends AppController { $subpage = $path[1]; } if (!empty($path[$count - 1])) { - $title = Inflector::humanize($path[$count - 1]); + $title_for_layout = Inflector::humanize($path[$count - 1]); } - $this->set(compact('page', 'subpage')); - $this->set('title_for_layout', $title); + $this->set(compact('page', 'subpage', 'title_for_layout')); $this->render(implode('/', $path)); } - } diff --git a/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp b/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp index 7e55afae5..e4a57c1ab 100644 --- a/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp +++ b/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp @@ -21,6 +21,6 @@ $content = explode("\n", $content); foreach ($content as $line): - echo '

' . $line . '

'; + echo '

' . $line . "

\n"; endforeach; ?> \ No newline at end of file diff --git a/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp b/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp index 4667a0551..0527ff569 100644 --- a/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp +++ b/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Errors + * @package app.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/skel/View/Errors/error500.ctp b/lib/Cake/Console/Templates/skel/View/Errors/error500.ctp index dcabf4374..5524d3adc 100644 --- a/lib/Cake/Console/Templates/skel/View/Errors/error500.ctp +++ b/lib/Cake/Console/Templates/skel/View/Errors/error500.ctp @@ -12,7 +12,7 @@ * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project - * @package Cake.View.Errors + * @package app.View.Errors * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp b/lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp index a3f49d219..6d87630f4 100644 --- a/lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp +++ b/lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp @@ -18,15 +18,13 @@ */ ?> - <?php echo $title_for_layout; ?> - fetch('content'); ?>

This email was sent using the CakePHP Framework

- + \ No newline at end of file diff --git a/lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp b/lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp index 7e385f61d..dcc0049f4 100644 --- a/lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp +++ b/lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp @@ -17,7 +17,6 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> - fetch('content'); ?> This email was sent using the CakePHP Framework, http://cakephp.org. diff --git a/lib/Cake/Console/Templates/skel/View/Layouts/default.ctp b/lib/Cake/Console/Templates/skel/View/Layouts/default.ctp index 8a1647972..3a13589ca 100644 --- a/lib/Cake/Console/Templates/skel/View/Layouts/default.ctp +++ b/lib/Cake/Console/Templates/skel/View/Layouts/default.ctp @@ -16,13 +16,15 @@ * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + +$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework'); ?> Html->charset(); ?> - <?php echo __('CakePHP: the rapid development php framework:'); ?> + <?php echo $cakeDescription ?>: <?php echo $title_for_layout; ?>
@@ -48,7 +50,7 @@