mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
correct tests to use correct language domains.
updated test_app default.ctp and home.ctp to be (almost) identical to the files shipped in the core
This commit is contained in:
parent
52f3d75df3
commit
7fa52710f3
4 changed files with 179 additions and 73 deletions
|
@ -174,7 +174,7 @@ class CakeSocketTest extends CakeTestCase {
|
|||
$this->Socket = new CakeSocket($config);
|
||||
$this->assertTrue($this->Socket->connect());
|
||||
$this->assertFalse($this->Socket->read(1024 * 1024));
|
||||
$this->assertEqual($this->Socket->lastError(), '2: ' . __d('cake', 'Connection timed out'));
|
||||
$this->assertEqual($this->Socket->lastError(), '2: ' . __d('cake_error', 'Connection timed out'));
|
||||
|
||||
$config = array('host' => 'cakephp.org', 'port' => 80, 'timeout' => 20);
|
||||
$this->Socket = new CakeSocket($config);
|
||||
|
|
|
@ -482,7 +482,7 @@ class FileTest extends CakeTestCase {
|
|||
$assertLine = $assertLine->traceMethod();
|
||||
$shortPath = substr($tmpFile, strlen(ROOT));
|
||||
|
||||
$message = __d('cake', '[FileTest] Skipping %s because "%s" not writeable!', $caller, $shortPath).$assertLine;
|
||||
$message = __d('cake_developer', '[FileTest] Skipping %s because "%s" not writeable!', $caller, $shortPath).$assertLine;
|
||||
$this->_reporter->paintSkip($message);
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -11,42 +11,51 @@
|
|||
*
|
||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package cake.libs.view.templates.pages
|
||||
* @package cake.libs.view.templates.layouts
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
$this->loadHelper('Html');
|
||||
|
||||
$cakeDescription = __d('cake_developer', 'CakePHP: the rapid development php framework');
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<?php echo $this->Html->charset();?>
|
||||
<?php echo $this->Html->charset(); ?>
|
||||
<title>
|
||||
<?php __d('cake', 'CakePHP: the rapid development php framework:'); ?>
|
||||
<?php echo $title_for_layout;?>
|
||||
<?php echo $cakeDescription ?>:
|
||||
<?php echo $title_for_layout; ?>
|
||||
</title>
|
||||
<?php
|
||||
echo $this->Html->meta('icon');
|
||||
|
||||
<?php echo $this->Html->css('cake.generic');?>
|
||||
<?php echo $scripts_for_layout;?>
|
||||
echo $this->Html->css('cake.generic');
|
||||
|
||||
echo $scripts_for_layout;
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<h1><?php echo $this->Html->link(__d('cake', 'CakePHP: the rapid development php framework'), 'http://cakephp.org');?></h1>
|
||||
<h1><?php echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1>
|
||||
</div>
|
||||
<div id="content">
|
||||
|
||||
<?php echo $content_for_layout;?>
|
||||
<?php echo $this->Session->flash(); ?>
|
||||
|
||||
<?php echo $content_for_layout; ?>
|
||||
|
||||
</div>
|
||||
<div id="footer">
|
||||
<?php echo $this->Html->link(
|
||||
$this->Html->image('cake.power.gif', array('alt'=> __d('cake', "CakePHP: the rapid development php framework"), 'border'=>"0")),
|
||||
$this->Html->image('cake.power.gif', array('alt'=> $cakeDescription, 'border' => '0')),
|
||||
'http://www.cakephp.org/',
|
||||
array('target'=>'_blank'), null, false
|
||||
array('target' => '_blank', 'escape' => false)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $this->element('sql_dump'); ?>
|
||||
</body>
|
||||
</html>
|
|
@ -1,74 +1,171 @@
|
|||
<h2>Sweet, "Test App" got Baked by CakePHP!</h2>
|
||||
<p>
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package cake.libs.view.templates.pages
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
if (Configure::read('debug') == 0):
|
||||
throw new NotFoundException();
|
||||
endif;
|
||||
App::uses('Debugger', 'Utility');
|
||||
?>
|
||||
<h2><?php echo __d('cake_developer', 'Release Notes for CakePHP %s.', Configure::version()); ?></h2>
|
||||
<a href="http://cakephp.org/changelogs/1.3.6"><?php __d('cake_developer', 'Read the changelog'); ?> </a>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0):
|
||||
Debugger::checkSecurityKeys();
|
||||
endif;
|
||||
?>
|
||||
<p>
|
||||
<?php
|
||||
if (is_writable(TMP)):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake', 'Your tmp directory is writable.');
|
||||
echo __d('cake_developer', 'Your tmp directory is writable.');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
echo __d('cake', 'Your tmp directory is NOT writable.');
|
||||
echo __d('cake_developer', 'Your tmp directory is NOT writable.');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
$settings = array();
|
||||
<?php
|
||||
$settings = Cache::settings();
|
||||
if (!empty($settings)):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake', 'The %s is being used for caching. To change the config edit APP/config/core.php ', '<em>'. $settings['engine'] . 'Engine</em>');
|
||||
echo __d('cake_developer', 'The %s is being used for caching. To change the config edit APP/config/core.php ', '<em>'. $settings['engine'] . 'Engine</em>');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
echo __d('cake', 'Your cache is NOT working. Please check the settings in APP/config/core.php');
|
||||
echo __d('cake_developer', 'Your cache is NOT working. Please check the settings in APP/config/core.php');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
<?php
|
||||
$filePresent = null;
|
||||
if (file_exists(CONFIGS . 'database.php')):
|
||||
if (file_exists(CONFIGS.'database.php')):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake', 'Your database configuration file is present.');
|
||||
echo __d('cake_developer', 'Your database configuration file is present.');
|
||||
$filePresent = true;
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
echo __d('cake', 'Your database configuration file is NOT present.');
|
||||
echo __d('cake_developer', 'Your database configuration file is NOT present.');
|
||||
echo '<br/>';
|
||||
echo __d('cake', 'Rename config/database.php.default to config/database.php');
|
||||
echo __d('cake_developer', 'Rename config/database.php.default to config/database.php');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
if (!empty($filePresent)):
|
||||
if (!class_exists('ConnectionManager')) {
|
||||
require LIBS . 'model' . DS . 'connection_manager.php';
|
||||
if (isset($filePresent)):
|
||||
App::uses('ConnectionManager', 'Model');
|
||||
try {
|
||||
$connected = ConnectionManager::getDataSource('default');
|
||||
} catch (Exception $e) {
|
||||
$connected = false;
|
||||
}
|
||||
?>
|
||||
<p>
|
||||
<?php
|
||||
if (true):
|
||||
<?php
|
||||
if ($connected && $connected->isConnected()):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake', 'Cake is able to connect to the database.');
|
||||
echo __d('cake_developer', 'Cake is able to connect to the database.');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
echo __d('cake', 'Cake is NOT able to connect to the database.');
|
||||
echo __d('cake_developer', 'Cake is NOT able to connect to the database.');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
?>
|
||||
</p>
|
||||
<?php endif;?>
|
||||
<h3><?php echo __d('cake', 'Editing this Page') ?></h3>
|
||||
<?php
|
||||
App::uses('Validation', 'Utility');
|
||||
if (!Validation::alphaNumeric('cakephp')) {
|
||||
echo '<p><span class="notice">';
|
||||
__('PCRE has not been compiled with Unicode support.');
|
||||
echo '<br/>';
|
||||
__('Recompile PCRE with Unicode support by adding <code>--enable-unicode-properties</code> when configuring');
|
||||
echo '</span></p>';
|
||||
}
|
||||
?>
|
||||
<h3><?php echo __d('cake_developer', 'Editing this Page'); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
echo __d('cake', 'To change the content of this page, edit: %s
|
||||
To change its layout, edit: %s
|
||||
You can also add some CSS styles for your pages at: %s',
|
||||
APP . 'views' . DS . 'pages' . DS . 'home.ctp.<br />', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css');
|
||||
echo __d('cake_developer', 'To change the content of this page, create: APP/views/pages/home.ctp.<br />
|
||||
To change its layout, create: APP/views/layouts/default.ctp.<br />
|
||||
You can also add some CSS styles for your pages at: APP/webroot/css.');
|
||||
?>
|
||||
</p>
|
||||
|
||||
<h3><?php echo __d('cake_developer', 'Getting Started'); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
echo $this->Html->link(
|
||||
sprintf('<strong>%s</strong> %s', __d('cake_developer', 'New'), __d('cake_developer', 'CakePHP 1.3 Docs')),
|
||||
'http://book.cakephp.org/view/875/x1-3-Collection',
|
||||
array('target' => '_blank', 'escape' => false)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
echo $this->Html->link(
|
||||
__d('cake_developer', 'The 15 min Blog Tutorial'),
|
||||
'http://book.cakephp.org/view/1528/Blog',
|
||||
array('target' => '_blank', 'escape' => false)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<h3><?php echo __d('cake_developer', 'More about Cake'); ?></h3>
|
||||
<p>
|
||||
<?php echo __d('cake_developer', 'CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php echo __d('cake_developer', 'Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://cakefoundation.org/"><?php echo __d('cake_developer', 'Cake Software Foundation'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'Promoting development related to CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://www.cakephp.org"><?php echo __d('cake_developer', 'CakePHP'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'The Rapid Development Framework'); ?></li></ul></li>
|
||||
<li><a href="http://book.cakephp.org"><?php echo __d('cake_developer', 'CakePHP Documentation'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'Your Rapid Development Cookbook'); ?></li></ul></li>
|
||||
<li><a href="http://api.cakephp.org"><?php echo __d('cake_developer', 'CakePHP API'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'Quick Reference'); ?></li></ul></li>
|
||||
<li><a href="http://bakery.cakephp.org"><?php echo __d('cake_developer', 'The Bakery'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'Everything CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://live.cakephp.org"><?php echo __d('cake_developer', 'The Show'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'The Show is a live and archived internet radio broadcast CakePHP-related topics and answer questions live via IRC, Skype, and telephone.'); ?></li></ul></li>
|
||||
<li><a href="http://groups.google.com/group/cake-php"><?php echo __d('cake_developer', 'CakePHP Google Group'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'Community mailing list'); ?></li></ul></li>
|
||||
<li><a href="irc://irc.freenode.net/cakephp">irc.freenode.net #cakephp</a>
|
||||
<ul><li><?php echo __d('cake_developer', 'Live chat about CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://github.com/cakephp/"><?php echo __d('cake_developer', 'CakePHP Code'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'For the Development of CakePHP Git repository, Downloads'); ?></li></ul></li>
|
||||
<li><a href="http://cakephp.lighthouseapp.com/"><?php echo __d('cake_developer', 'CakePHP Lighthouse'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'CakePHP Tickets, Wiki pages, Roadmap'); ?></li></ul></li>
|
||||
<li><a href="http://www.cakeforge.org"><?php echo __d('cake_developer', 'CakeForge'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'Open Development for CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://astore.amazon.com/cakesoftwaref-20/"><?php echo __d('cake_developer', 'Book Store'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'Recommended Software Books'); ?></li></ul></li>
|
||||
<li><a href="http://www.cafepress.com/cakefoundation"><?php echo __d('cake_developer', 'CakePHP gear'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_developer', 'Get your own CakePHP gear - Doughnate to Cake'); ?></li></ul></li>
|
||||
</ul>
|
Loading…
Reference in a new issue