diff --git a/app/Config/Schema/i18n.php b/app/Config/Schema/i18n.php index c876f1b1a..3176aa2f0 100644 --- a/app/Config/Schema/i18n.php +++ b/app/Config/Schema/i18n.php @@ -29,10 +29,22 @@ class I18nSchema extends CakeSchema { public $name = 'i18n'; +/** + * Before callback. + * + * @param array $event Schema object properties + * @return boolean Should process continue + */ public function before($event = array()) { return true; } +/** + * After callback. + * + * @param array $event Schema object properties + * @return void + */ public function after($event = array()) { } diff --git a/app/Config/Schema/sessions.php b/app/Config/Schema/sessions.php index 14ff2c6d4..6157c34e7 100644 --- a/app/Config/Schema/sessions.php +++ b/app/Config/Schema/sessions.php @@ -28,10 +28,22 @@ class SessionsSchema extends CakeSchema { public $name = 'Sessions'; +/** + * Before callback. + * + * @param array $event Schema object properties + * @return boolean Should process continue + */ public function before($event = array()) { return true; } +/** + * After callback. + * + * @param array $event Schema object properties + * @return void + */ public function after($event = array()) { } diff --git a/app/View/Emails/html/default.ctp b/app/View/Emails/html/default.ctp index 63874c1cc..7588ed31c 100644 --- a/app/View/Emails/html/default.ctp +++ b/app/View/Emails/html/default.ctp @@ -20,4 +20,3 @@ $content = explode("\n", $content); foreach ($content as $line): echo '
' . $line . "
\n"; endforeach; -?> \ No newline at end of file diff --git a/app/View/Emails/text/default.ctp b/app/View/Emails/text/default.ctp index 7f8832498..b5a370af4 100644 --- a/app/View/Emails/text/default.ctp +++ b/app/View/Emails/text/default.ctp @@ -14,4 +14,4 @@ * @license http://www.opensource.org/licenses/mit-license.php MIT License */ ?> - \ No newline at end of file + 0): echo $this->element('exception_stack_trace'); endif; -?> diff --git a/app/View/Errors/error500.ctp b/app/View/Errors/error500.ctp index e36b5033a..1f54bf8c3 100644 --- a/app/View/Errors/error500.ctp +++ b/app/View/Errors/error500.ctp @@ -23,4 +23,3 @@ if (Configure::read('debug') > 0): echo $this->element('exception_stack_trace'); endif; -?> diff --git a/app/View/Layouts/Emails/html/default.ctp b/app/View/Layouts/Emails/html/default.ctp index 8e5d62c8d..fee3c386e 100644 --- a/app/View/Layouts/Emails/html/default.ctp +++ b/app/View/Layouts/Emails/html/default.ctp @@ -17,7 +17,7 @@ -+ Html->link($message, $url); ?> +
diff --git a/app/View/Layouts/js/default.ctp b/app/View/Layouts/js/default.ctp index 7239b5dae..f694538e4 100644 --- a/app/View/Layouts/js/default.ctp +++ b/app/View/Layouts/js/default.ctp @@ -1,2 +1,2 @@ - +fetch('script'); ?> diff --git a/app/View/Layouts/rss/default.ctp b/app/View/Layouts/rss/default.ctp index 26d875eda..60a53659f 100644 --- a/app/View/Layouts/rss/default.ctp +++ b/app/View/Layouts/rss/default.ctp @@ -3,7 +3,7 @@ if (!isset($channel)): $channel = array(); endif; if (!isset($channel['title'])): - $channel['title'] = $title_for_layout; + $channel['title'] = $this->fetch('title'); endif; echo $this->Rss->document( @@ -11,4 +11,3 @@ echo $this->Rss->document( array(), $channel, $this->fetch('content') ) ); -?> diff --git a/app/View/Layouts/xml/default.ctp b/app/View/Layouts/xml/default.ctp index fbd5ee0c3..80a4d65f0 100644 --- a/app/View/Layouts/xml/default.ctp +++ b/app/View/Layouts/xml/default.ctp @@ -1 +1 @@ -fetch('content'); ?> +fetch('content'); diff --git a/app/View/Pages/home.ctp b/app/View/Pages/home.ctp index 0a028702e..c3f98b106 100644 --- a/app/View/Pages/home.ctp +++ b/app/View/Pages/home.ctp @@ -13,79 +13,75 @@ App::uses('Debugger', 'Utility'); ?>- + Html->link(__d('cake_dev', 'Read the changelog'), 'http://cakephp.org/changelogs/' . Configure::version()); ?>
0): Debugger::checkSecurityKeys(); endif; ?> - -- - 1) Help me configure it - 2) I don't / can't use URL rewriting -
- + ++ + 1) Help me configure it + 2) I don't / can't use URL rewriting +
+=')): +if (version_compare(PHP_VERSION, '5.2.8', '>=')): + echo ''; + echo __d('cake_dev', 'Your version of PHP is 5.2.8 or higher.'); + echo ''; +else: + echo ''; + echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.8 or higher to use CakePHP.'); + echo ''; +endif; +?> +
++ '; - echo __d('cake_dev', 'Your version of PHP is 5.2.8 or higher.'); + echo __d('cake_dev', 'Your tmp directory is writable.'); echo ''; else: echo ''; - echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.8 or higher to use CakePHP.'); + echo __d('cake_dev', 'Your tmp directory is NOT writable.'); echo ''; endif; -?> -
-- '; - echo __d('cake_dev', 'Your tmp directory is writable.'); - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Your tmp directory is NOT writable.'); - echo ''; - endif; ?>
'; - echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', ''. $settings['engine'] . 'Engine', 'APP/Config/core.php'); - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', 'APP/Config/core.php'); - echo ''; - endif; + $settings = Cache::settings(); + if (!empty($settings)): + echo ''; + echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '' . $settings['engine'] . 'Engine', 'APP/Config/core.php'); + echo ''; + else: + echo ''; + echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', 'APP/Config/core.php'); + echo ''; + endif; ?>
';
- echo __d('cake_dev', 'Your database configuration file is present.');
- $filePresent = true;
- echo '';
- else:
- echo '';
- echo __d('cake_dev', 'Your database configuration file is NOT present.');
- echo '
';
- echo __d('cake_dev', 'Rename %s to %s', 'APP/Config/database.php.default', 'APP/Config/database.php');
- echo '';
- endif;
+ $filePresent = null;
+ if (file_exists(APP . 'Config' . DS . 'database.php')):
+ echo '';
+ echo __d('cake_dev', 'Your database configuration file is present.');
+ $filePresent = true;
+ echo '';
+ else:
+ echo '';
+ echo __d('cake_dev', 'Your database configuration file is NOT present.');
+ echo '
';
+ echo __d('cake_dev', 'Rename %s to %s', 'APP/Config/database.php.default', 'APP/Config/database.php');
+ echo '';
+ endif;
?>
- isConnected()):
- echo '';
- echo __d('cake_dev', 'CakePHP is able to connect to the database.');
- echo '';
- else:
- echo '';
- echo __d('cake_dev', 'CakePHP is NOT able to connect to the database.');
- echo '
';
- echo $errorMsg;
- echo '';
- endif;
?>
-
+ isConnected()):
+ echo '';
+ echo __d('cake_dev', 'CakePHP is able to connect to the database.');
+ echo '';
+ else:
+ echo '';
+ echo __d('cake_dev', 'CakePHP is NOT able to connect to the database.');
+ echo '
';
+ echo $errorMsg;
+ echo '';
+ endif;
+ ?>
+
--enable-unicode-properties
when configuring');
- echo '';
- endif;
+endif;
+
+App::uses('Validation', 'Utility');
+if (!Validation::alphaNumeric('cakephp')):
+ echo '';
+ 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', 'DebugKit plugin is present');
- echo '';
- else:
- echo '';
- 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;
+ if (CakePlugin::loaded('DebugKit')):
+ echo '';
+ echo __d('cake_dev', 'DebugKit plugin is present');
+ echo '';
+ else:
+ echo '';
+ 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;
?>
Html->link( - 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) - ); + echo $this->Html->link( + 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) + ); ?>
Html->link( - __d('cake_dev', 'The 15 min Blog Tutorial'), - 'http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html', - array('target' => '_blank', 'escape' => false) - ); + echo $this->Html->link( + __d('cake_dev', 'The 15 min Blog Tutorial'), + 'http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html', + array('target' => '_blank', 'escape' => false) + ); ?>
diff --git a/lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp b/lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp index 771865397..e6e63cab8 100644 --- a/lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp +++ b/lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp @@ -9,7 +9,7 @@ Html->charset(); ?> -