Skip to content

Commit

Permalink
Fix issue 4116 and also merge both versions of home.ctp
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Sep 30, 2013
1 parent 06a89f1 commit 1c6a379
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 24 deletions.
33 changes: 16 additions & 17 deletions app/View/Pages/home.ctp
Expand Up @@ -3,23 +3,15 @@
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

This comment has been minimized.

Copy link
@ravage84

ravage84 Oct 2, 2013

Member

Did I miss something? Since when do we strip out these sections of the file DocBlock?
Just checked some files in the upstream/master, all still have it... 😕

This comment has been minimized.

Copy link
@ADmad

ADmad Oct 2, 2013

Member

They were removed from files in app skeleton used by bake and we keep the files in app folder synced with that.

This comment has been minimized.

Copy link
@renan
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Pages
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/

if (!Configure::read('debug')):
throw new NotFoundException();
endif;

App::uses('Debugger', 'Utility');
?>
<h2><?php echo __d('cake_dev', 'Release Notes for CakePHP %s.', Configure::version()); ?></h2>
Expand All @@ -31,11 +23,17 @@ if (Configure::read('debug') > 0):
Debugger::checkSecurityKeys();
endif;
?>
<?php
if (file_exists(WWW_ROOT . 'css' . DS . 'cake.generic.css')):
?>
<p id="url-rewriting-warning" style="background-color:#e32; color:#fff;">
<?php echo __d('cake_dev', 'URL rewriting is not properly configured on your server.'); ?>
1) <a target="_blank" href="http://book.cakephp.org/2.0/en/installation/url-rewriting.html" style="color:#fff;">Help me configure it</a>
2) <a target="_blank" href="http://book.cakephp.org/2.0/en/development/configuration.html#cakephp-core-configuration" style="color:#fff;">I don't / can't use URL rewriting</a>
</p>
<?php
endif;
?>
<p>
<?php
if (version_compare(PHP_VERSION, '5.2.8', '>=')):
Expand Down Expand Up @@ -67,11 +65,11 @@ endif;
$settings = Cache::settings();
if (!empty($settings)):
echo '<span class="notice success">';
echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit APP/Config/core.php ', '<em>' . $settings['engine'] . 'Engine</em>');
echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>'. $settings['engine'] . 'Engine</em>', 'APP/Config/core.php');
echo '</span>';
else:
echo '<span class="notice">';
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 %s', 'APP/Config/core.php');
echo '</span>';
endif;
?>
Expand All @@ -88,7 +86,7 @@ endif;
echo '<span class="notice">';
echo __d('cake_dev', 'Your database configuration file is NOT present.');
echo '<br/>';
echo __d('cake_dev', 'Rename APP/Config/database.php.default to APP/Config/database.php');
echo __d('cake_dev', 'Rename %s to %s', 'APP/Config/database.php.default', 'APP/Config/database.php');
echo '</span>';
endif;
?>
Expand Down Expand Up @@ -155,9 +153,10 @@ if (isset($filePresent)):
<h3><?php echo __d('cake_dev', 'Editing this Page'); ?></h3>
<p>
<?php
echo __d('cake_dev', 'To change the content of this page, edit: APP/View/Pages/home.ctp.<br />
To change its layout, edit: APP/View/Layouts/default.ctp.<br />
You can also add some CSS styles for your pages at: APP/webroot/css.');
echo __d('cake_dev', 'To change the content of this page, edit: %s.<br />
To change its layout, edit: %s.<br />
You can also add some CSS styles for your pages at: %s.',
'APP/View/Pages/home.ctp', 'APP/View/Layouts/default.ctp', 'APP/webroot/css');
?>
</p>

Expand Down Expand Up @@ -206,11 +205,11 @@ You can also add some CSS styles for your pages at: APP/webroot/css.');
<ul>
<li><a href="http://cakefoundation.org/"><?php echo __d('cake_dev', 'Cake Software Foundation'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Promoting development related to CakePHP'); ?></li></ul></li>
<li><a href="http://www.cakephp.org"><?php echo __d('cake_dev', 'CakePHP'); ?> </a>
<li><a href="http://www.cakephp.org">CakePHP</a>
<ul><li><?php echo __d('cake_dev', 'The Rapid Development Framework'); ?></li></ul></li>
<li><a href="http://book.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Documentation'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Your Rapid Development Cookbook'); ?></li></ul></li>
<li><a href="http://api.cakephp.org/"><?php echo __d('cake_dev', 'CakePHP API'); ?> </a>
<li><a href="http://api.cakephp.org"><?php echo __d('cake_dev', 'CakePHP API'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Quick Reference'); ?></li></ul></li>
<li><a href="http://bakery.cakephp.org"><?php echo __d('cake_dev', 'The Bakery'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Everything CakePHP'); ?></li></ul></li>
Expand Down
20 changes: 13 additions & 7 deletions lib/Cake/Console/Templates/skel/View/Pages/home.ctp
Expand Up @@ -23,11 +23,17 @@ if (Configure::read('debug') > 0):
Debugger::checkSecurityKeys();
endif;
?>
<?php
if (file_exists(WWW_ROOT . 'css' . DS . 'cake.generic.css')):
?>
<p id="url-rewriting-warning" style="background-color:#e32; color:#fff;">
<?php echo __d('cake_dev', 'URL rewriting is not properly configured on your server.'); ?>
1) <a target="_blank" href="http://book.cakephp.org/2.0/en/installation/url-rewriting.html" style="color:#fff;">Help me configure it</a>
2) <a target="_blank" href="http://book.cakephp.org/2.0/en/development/configuration.html#cakephp-core-configuration" style="color:#fff;">I don't / can't use URL rewriting</a>
</p>
<?php
endif;
?>
<p>
<?php
if (version_compare(PHP_VERSION, '5.2.8', '>=')):
Expand Down Expand Up @@ -93,12 +99,12 @@ if (isset($filePresent)):
} catch (Exception $connectionError) {
$connected = false;
$errorMsg = $connectionError->getMessage();
if (method_exists($connectionError, 'getAttributes')) {
if (method_exists($connectionError, 'getAttributes')):
$attributes = $connectionError->getAttributes();
if (isset($errorMsg['message'])) {
if (isset($errorMsg['message'])):
$errorMsg .= '<br />' . $attributes['message'];
}
}
endif;
endif;
}
?>
<p>
Expand All @@ -119,13 +125,13 @@ if (isset($filePresent)):
<?php endif; ?>
<?php
App::uses('Validation', 'Utility');
if (!Validation::alphaNumeric('cakephp')) {
if (!Validation::alphaNumeric('cakephp')):
echo '<p><span class="notice">';
echo __d('cake_dev', 'PCRE has not been compiled with Unicode support.');
echo '<br/>';
echo __d('cake_dev', 'Recompile PCRE with Unicode support by adding %s when configuring', '<code>--enable-unicode-properties</code>');
echo __d('cake_dev', 'Recompile PCRE with Unicode support by adding <code>--enable-unicode-properties</code> when configuring');
echo '</span></p>';
}
endif;
?>

<p>
Expand Down

0 comments on commit 1c6a379

Please sign in to comment.