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\
This commit is contained in:
Marc Würth 2013-02-08 14:41:57 +01:00
parent 431e610317
commit 514d9675d8
44 changed files with 118 additions and 113 deletions

16
.gitignore vendored
View file

@ -1,9 +1,21 @@
/app/Config # User specific & automatically generated files #
#################################################
/app/Config/database.php
/app/tmp /app/tmp
/lib/Cake/Console/Templates/skel/tmp/ /lib/Cake/Console/Templates/skel/tmp/
/plugins /plugins
/vendors /vendors
/build /build
/dist /dist
.DS_Store
/tags /tags
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db

View file

@ -20,9 +20,7 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
// @codingStandardsIgnoreStart /**
/*
* *
* Using the Schema command line utility * Using the Schema command line utility
* *
@ -30,9 +28,7 @@
* *
* cake schema run create i18n * cake schema run create i18n
*/ */
class i18nSchema extends CakeSchema { class I18nSchema extends CakeSchema {
// @codingStandardsIgnoreEnd
public $name = 'i18n'; public $name = 'i18n';

View file

@ -95,7 +95,7 @@
* *
* And uncomment the App.baseUrl below. But keep in mind * And uncomment the App.baseUrl below. But keep in mind
* that plugin assets such as images, CSS and Javascript files * 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 * To work around this issue you should either symlink or copy
* the plugin assets into you app's webroot directory. This is * the plugin assets into you app's webroot directory. This is
* recommended even when you are using mod_rewrite. Handling static * recommended even when you are using mod_rewrite. Handling static

View file

@ -18,13 +18,7 @@
* @package app.Config * @package app.Config
* @since CakePHP(tm) v 0.2.9 * @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @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. * Database configuration class.
* You can specify multiple configurations for production, development and testing. * You can specify multiple configurations for production, development and testing.
* *

View file

@ -18,13 +18,7 @@
* @package app.Config * @package app.Config
* @since CakePHP(tm) v 2.0.0 * @since CakePHP(tm) v 2.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @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. * Email configuration class.
* You can specify multiple configurations for production, development and testing. * You can specify multiple configurations for production, development and testing.
* *

View file

@ -13,7 +13,7 @@
# #
# @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) # @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
# @link http://cakephp.org CakePHP(tm) Project # @link http://cakephp.org CakePHP(tm) Project
# @package cake.Console # @package app.Console
# @since CakePHP(tm) v 1.2.0.5012 # @since CakePHP(tm) v 1.2.0.5012
# @license MIT License (http://www.opensource.org/licenses/mit-license.php) # @license MIT License (http://www.opensource.org/licenses/mit-license.php)
# #

View file

@ -23,10 +23,13 @@ $dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php';
if (function_exists('ini_set')) { if (function_exists('ini_set')) {
$root = dirname(dirname(dirname(__FILE__))); $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')); 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); trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
} }
unset($paths, $path, $dispatcher, $root, $ds); unset($paths, $path, $dispatcher, $root, $ds);

View file

@ -20,7 +20,6 @@
* @since CakePHP(tm) v 0.2.9 * @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
App::uses('Controller', 'Controller'); App::uses('Controller', 'Controller');
/** /**

View file

@ -19,7 +19,6 @@
* @since CakePHP(tm) v 0.2.9 * @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
App::uses('AppController', 'Controller'); App::uses('AppController', 'Controller');
/** /**

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @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 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @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 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @link http://cakephp.org CakePHP(tm) Project
* @package Cake.View.Errors * @package app.View.Errors
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
@ -26,7 +26,7 @@
); ?> ); ?>
</p> </p>
<?php <?php
if (Configure::read('debug') > 0 ): if (Configure::read('debug') > 0):
echo $this->element('exception_stack_trace'); echo $this->element('exception_stack_trace');
endif; endif;
?> ?>

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @link http://cakephp.org CakePHP(tm) Project
* @package Cake.View.Errors * @package app.View.Errors
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
@ -23,7 +23,7 @@
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?> <?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
</p> </p>
<?php <?php
if (Configure::read('debug') > 0 ): if (Configure::read('debug') > 0):
echo $this->element('exception_stack_trace'); echo $this->element('exception_stack_trace');
endif; endif;
?> ?>

View file

@ -20,7 +20,6 @@
* @since CakePHP(tm) v 0.2.9 * @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
App::uses('Helper', 'View'); App::uses('Helper', 'View');
/** /**

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @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 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
@ -20,10 +20,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html> <html>
<head> <head>
<title><?php echo $title_for_layout;?></title> <title><?php echo $title_for_layout; ?></title>
</head> </head>
<body> <body>
<?php echo $this->fetch('content');?> <?php echo $this->fetch('content'); ?>
<p>This email was sent using the <a href="http://cakephp.org">CakePHP Framework</a></p> <p>This email was sent using the <a href="http://cakephp.org">CakePHP Framework</a></p>
</body> </body>

View file

@ -12,11 +12,11 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @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 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
?> ?>
<?php echo $this->fetch('content');?> <?php echo $this->fetch('content'); ?>
This email was sent using the CakePHP Framework, http://cakephp.org. This email was sent using the CakePHP Framework, http://cakephp.org.

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @link http://cakephp.org CakePHP(tm) Project
* @package Cake.View.Layouts * @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @link http://cakephp.org CakePHP(tm) Project
* @package Cake.View.Layouts * @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @link http://cakephp.org CakePHP(tm) Project
* @package Cake.View.Layouts * @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @link http://cakephp.org CakePHP(tm) Project
* @package Cake.View.Layouts * @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @link http://cakephp.org CakePHP(tm) Project
* @package Cake.View.Pages * @package app.View.Pages
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */

View file

@ -39,6 +39,7 @@ if (!defined('DS')) {
if (!defined('ROOT')) { if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__)))); define('ROOT', dirname(dirname(dirname(__FILE__))));
} }
/** /**
* The actual directory name for the "app". * The actual directory name for the "app".
* *
@ -57,8 +58,11 @@ if (!defined('APP_DIR')) {
* cannot modify your include_path set this value. * cannot modify your include_path set this value.
* *
* Leaving this constant undefined will result in it being defined in Cake/bootstrap.php * 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. * Editing below this line should NOT be necessary.
@ -84,11 +88,11 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
if (function_exists('ini_set')) { if (function_exists('ini_set')) {
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); 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; $failed = true;
} }
} else { } 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; $failed = true;
} }
} }
@ -98,6 +102,8 @@ if (!empty($failed)) {
App::uses('Dispatcher', 'Routing'); App::uses('Dispatcher', 'Routing');
$Dispatcher = new Dispatcher(); $Dispatcher = new Dispatcher();
$Dispatcher->dispatch(new CakeRequest(), new CakeResponse()); $Dispatcher->dispatch(
new CakeRequest(),
new CakeResponse()
);

View file

@ -25,6 +25,7 @@ ini_set('display_errors', 1);
if (!defined('DS')) { if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR); define('DS', DIRECTORY_SEPARATOR);
} }
/** /**
* These defines should only be edited if you have cake installed in * These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed. * a directory layout other than the way it is distributed.
@ -38,6 +39,7 @@ if (!defined('DS')) {
if (!defined('ROOT')) { if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__)))); define('ROOT', dirname(dirname(dirname(__FILE__))));
} }
/** /**
* The actual directory name for the "app". * The actual directory name for the "app".
* *
@ -53,8 +55,11 @@ if (!defined('APP_DIR')) {
* need to cannot modify your include_path, you can set this path. * 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 * 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. * Editing below this line should not be necessary.
@ -72,11 +77,11 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
if (function_exists('ini_set')) { if (function_exists('ini_set')) {
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); 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; $failed = true;
} }
} else { } 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; $failed = true;
} }
} }

View file

@ -20,9 +20,7 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
// @codingStandardsIgnoreStart /**
/*
* *
* Using the Schema command line utility * Using the Schema command line utility
* *
@ -30,9 +28,7 @@
* *
* cake schema run create i18n * cake schema run create i18n
*/ */
class i18nSchema extends CakeSchema { class I18nSchema extends CakeSchema {
// @codingStandardsIgnoreEnd
public $name = 'i18n'; public $name = 'i18n';

View file

@ -95,7 +95,7 @@
* *
* And uncomment the App.baseUrl below. But keep in mind * And uncomment the App.baseUrl below. But keep in mind
* that plugin assets such as images, CSS and Javascript files * 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 * To work around this issue you should either symlink or copy
* the plugin assets into you app's webroot directory. This is * the plugin assets into you app's webroot directory. This is
* recommended even when you are using mod_rewrite. Handling static * recommended even when you are using mod_rewrite. Handling static

View file

@ -18,13 +18,7 @@
* @package app.Config * @package app.Config
* @since CakePHP(tm) v 0.2.9 * @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @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. * Database configuration class.
* You can specify multiple configurations for production, development and testing. * You can specify multiple configurations for production, development and testing.
* *

View file

@ -18,13 +18,7 @@
* @package app.Config * @package app.Config
* @since CakePHP(tm) v 2.0.0 * @since CakePHP(tm) v 2.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @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. * Email configuration class.
* You can specify multiple configurations for production, development and testing. * You can specify multiple configurations for production, development and testing.
* *

View file

@ -13,7 +13,7 @@
# #
# @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) # @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
# @link http://cakephp.org CakePHP(tm) Project # @link http://cakephp.org CakePHP(tm) Project
# @package cake.Console # @package app.Console
# @since CakePHP(tm) v 1.2.0.5012 # @since CakePHP(tm) v 1.2.0.5012
# @license MIT License (http://www.opensource.org/licenses/mit-license.php) # @license MIT License (http://www.opensource.org/licenses/mit-license.php)
# #

View file

@ -23,10 +23,13 @@ $dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php';
if (function_exists('ini_set')) { if (function_exists('ini_set')) {
$root = dirname(dirname(dirname(__FILE__))); $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')); 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); trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
} }
unset($paths, $path, $dispatcher, $root, $ds); unset($paths, $path, $dispatcher, $root, $ds);

View file

@ -20,7 +20,6 @@
* @since CakePHP(tm) v 0.2.9 * @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
App::uses('Controller', 'Controller'); App::uses('Controller', 'Controller');
/** /**

View file

@ -31,6 +31,13 @@ App::uses('AppController', 'Controller');
*/ */
class PagesController extends AppController { class PagesController extends AppController {
/**
* Controller name
*
* @var string
*/
public $name = 'Pages';
/** /**
* This controller does not use a model * This controller does not use a model
* *
@ -41,7 +48,8 @@ class PagesController extends AppController {
/** /**
* Displays a view * Displays a view
* *
* @param string What page to display * @param mixed What page to display
* @return void
*/ */
public function display() { public function display() {
$path = func_get_args(); $path = func_get_args();
@ -50,7 +58,7 @@ class PagesController extends AppController {
if (!$count) { if (!$count) {
$this->redirect('/'); $this->redirect('/');
} }
$page = $subpage = $title = null; $page = $subpage = $title_for_layout = null;
if (!empty($path[0])) { if (!empty($path[0])) {
$page = $path[0]; $page = $path[0];
@ -59,11 +67,9 @@ class PagesController extends AppController {
$subpage = $path[1]; $subpage = $path[1];
} }
if (!empty($path[$count - 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(compact('page', 'subpage', 'title_for_layout'));
$this->set('title_for_layout', $title);
$this->render(implode('/', $path)); $this->render(implode('/', $path));
} }
} }

View file

@ -21,6 +21,6 @@
$content = explode("\n", $content); $content = explode("\n", $content);
foreach ($content as $line): foreach ($content as $line):
echo '<p> ' . $line . '</p>'; echo '<p> ' . $line . "</p>\n";
endforeach; endforeach;
?> ?>

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @link http://cakephp.org CakePHP(tm) Project
* @package Cake.View.Errors * @package app.View.Errors
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @link http://cakephp.org CakePHP(tm) Project
* @package Cake.View.Errors * @package app.View.Errors
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */

View file

@ -18,12 +18,10 @@
*/ */
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html> <html>
<head> <head>
<title><?php echo $title_for_layout; ?></title> <title><?php echo $title_for_layout; ?></title>
</head> </head>
<body> <body>
<?php echo $this->fetch('content'); ?> <?php echo $this->fetch('content'); ?>

View file

@ -17,7 +17,6 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
?> ?>
<?php echo $this->fetch('content'); ?> <?php echo $this->fetch('content'); ?>
This email was sent using the CakePHP Framework, http://cakephp.org. This email was sent using the CakePHP Framework, http://cakephp.org.

View file

@ -16,13 +16,15 @@
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<?php echo $this->Html->charset(); ?> <?php echo $this->Html->charset(); ?>
<title> <title>
<?php echo __('CakePHP: the rapid development php framework:'); ?> <?php echo $cakeDescription ?>:
<?php echo $title_for_layout; ?> <?php echo $title_for_layout; ?>
</title> </title>
<?php <?php
@ -38,7 +40,7 @@
<body> <body>
<div id="container"> <div id="container">
<div id="header"> <div id="header">
<h1><?php echo $this->Html->link(__('CakePHP: the rapid development php framework'), 'http://cakephp.org'); ?></h1> <h1><?php echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1>
</div> </div>
<div id="content"> <div id="content">
@ -48,7 +50,7 @@
</div> </div>
<div id="footer"> <div id="footer">
<?php echo $this->Html->link( <?php echo $this->Html->link(
$this->Html->image('cake.power.gif', array('alt' => __('CakePHP: the rapid development php framework'), 'border' => '0')), $this->Html->image('cake.power.gif', array('alt' => $cakeDescription, 'border' => '0')),
'http://www.cakephp.org/', 'http://www.cakephp.org/',
array('target' => '_blank', 'escape' => false) array('target' => '_blank', 'escape' => false)
); );

View file

@ -16,13 +16,15 @@
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<?php echo $this->Html->charset(); ?> <?php echo $this->Html->charset(); ?>
<title> <title>
<?php echo __('CakePHP: the rapid development php framework:'); ?> <?php echo $cakeDescription ?>:
<?php echo $title_for_layout; ?> <?php echo $title_for_layout; ?>
</title> </title>
<?php <?php
@ -38,7 +40,7 @@
<body> <body>
<div id="container"> <div id="container">
<div id="header"> <div id="header">
<h1><?php echo $this->Html->link(__('CakePHP: the rapid development php framework'), 'http://cakephp.org'); ?></h1> <h1><?php echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1>
</div> </div>
<div id="content"> <div id="content">
@ -48,7 +50,7 @@
</div> </div>
<div id="footer"> <div id="footer">
<?php echo $this->Html->link( <?php echo $this->Html->link(
$this->Html->image('cake.power.gif', array('alt' => __('CakePHP: the rapid development php framework'), 'border' => '0')), $this->Html->image('cake.power.gif', array('alt' => $cakeDescription, 'border' => '0')),
'http://www.cakephp.org/', 'http://www.cakephp.org/',
array('target' => '_blank', 'escape' => false) array('target' => '_blank', 'escape' => false)
); );

View file

@ -24,7 +24,7 @@
<title><?php echo $page_title; ?></title> <title><?php echo $page_title; ?></title>
<?php if (Configure::read('debug') == 0) { ?> <?php if (Configure::read('debug') == 0) { ?>
<meta http-equiv="Refresh" content="<?php echo $pause?>;url=<?php echo $url?>"/> <meta http-equiv="Refresh" content="<?php echo $pause; ?>;url=<?php echo $url; ?>"/>
<?php } ?> <?php } ?>
<style><!-- <style><!--
P { text-align:center; font:bold 1.1em sans-serif } P { text-align:center; font:bold 1.1em sans-serif }
@ -33,6 +33,6 @@ A:HOVER { text-decoration: underline; color:#44E }
--></style> --></style>
</head> </head>
<body> <body>
<p><a href="<?php echo $url?>"><?php echo $message?></a></p> <p><a href="<?php echo $url; ?>"><?php echo $message; ?></a></p>
</body> </body>
</html> </html>

View file

@ -12,7 +12,7 @@
* *
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project * @link http://cakephp.org CakePHP(tm) Project
* @package Cake.View.Pages * @package app.View.Pages
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
@ -21,11 +21,10 @@ if (!Configure::read('debug')):
endif; endif;
App::uses('Debugger', 'Utility'); App::uses('Debugger', 'Utility');
?> ?>
<iframe src="http://cakephp.org/bake-banner" width="830" height="160" style="overflow:hidden; border:none;">
<p>For updates and important announcements, visit http://cakefest.org</p>
</iframe>
<h2><?php echo __d('cake_dev', 'Release Notes for CakePHP %s.', Configure::version()); ?></h2> <h2><?php echo __d('cake_dev', 'Release Notes for CakePHP %s.', Configure::version()); ?></h2>
<a href="http://cakephp.org/changelogs/<?php echo Configure::version(); ?>"><?php echo __d('cake_dev', 'Read the changelog'); ?> </a> <p>
<a href="http://cakephp.org/changelogs/<?php echo Configure::version(); ?>"><?php echo __d('cake_dev', 'Read the changelog'); ?> </a>
</p>
<?php <?php
if (Configure::read('debug') > 0): if (Configure::read('debug') > 0):
Debugger::checkSecurityKeys(); Debugger::checkSecurityKeys();

View file

@ -58,6 +58,9 @@ if (!defined('APP_DIR')) {
* cannot modify your include_path set this value. * cannot modify your include_path set this value.
* *
* Leaving this constant undefined will result in it being defined in Cake/bootstrap.php * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
*
* The following line differs from its sibling
* /app/webroot/index.php
*/ */
//define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__); //define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__);
@ -85,11 +88,11 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
if (function_exists('ini_set')) { if (function_exists('ini_set')) {
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); 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; $failed = true;
} }
} else { } 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; $failed = true;
} }
} }

View file

@ -55,6 +55,9 @@ if (!defined('APP_DIR')) {
* need to cannot modify your include_path, you can set this path. * 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 * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
*
* The following line differs from its sibling
* /app/webroot/test.php
*/ */
//define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__); //define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__);
@ -74,11 +77,11 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
if (function_exists('ini_set')) { if (function_exists('ini_set')) {
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); 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; $failed = true;
} }
} else { } 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; $failed = true;
} }
} }
@ -87,7 +90,7 @@ if (!empty($failed)) {
} }
if (Configure::read('debug') < 1) { if (Configure::read('debug') < 1) {
exit(__d('cake_dev', 'Debug setting does not allow access to this url.')); die(__d('cake_dev', 'Debug setting does not allow access to this url.'));
} }
require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php'; require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';