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->Socket = new CakeSocket($config);
|
||||||
$this->assertTrue($this->Socket->connect());
|
$this->assertTrue($this->Socket->connect());
|
||||||
$this->assertFalse($this->Socket->read(1024 * 1024));
|
$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);
|
$config = array('host' => 'cakephp.org', 'port' => 80, 'timeout' => 20);
|
||||||
$this->Socket = new CakeSocket($config);
|
$this->Socket = new CakeSocket($config);
|
||||||
|
|
|
@ -482,9 +482,9 @@ class FileTest extends CakeTestCase {
|
||||||
$assertLine = $assertLine->traceMethod();
|
$assertLine = $assertLine->traceMethod();
|
||||||
$shortPath = substr($tmpFile, strlen(ROOT));
|
$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);
|
$this->_reporter->paintSkip($message);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -11,42 +11,51 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @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
|
* @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)
|
||||||
*/
|
*/
|
||||||
$this->loadHelper('Html');
|
$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">
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<?php echo $this->Html->charset();?>
|
<?php echo $this->Html->charset(); ?>
|
||||||
<title>
|
<title>
|
||||||
<?php __d('cake', 'CakePHP: the rapid development php framework:'); ?>
|
<?php echo $cakeDescription ?>:
|
||||||
<?php echo $title_for_layout;?>
|
<?php echo $title_for_layout; ?>
|
||||||
</title>
|
</title>
|
||||||
|
<?php
|
||||||
|
echo $this->Html->meta('icon');
|
||||||
|
|
||||||
<?php echo $this->Html->css('cake.generic');?>
|
echo $this->Html->css('cake.generic');
|
||||||
<?php echo $scripts_for_layout;?>
|
|
||||||
|
echo $scripts_for_layout;
|
||||||
|
?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="header">
|
<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>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
||||||
<?php echo $content_for_layout;?>
|
<?php echo $this->Session->flash(); ?>
|
||||||
|
|
||||||
|
<?php echo $content_for_layout; ?>
|
||||||
|
|
||||||
</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'=> __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/',
|
'http://www.cakephp.org/',
|
||||||
array('target'=>'_blank'), null, false
|
array('target' => '_blank', 'escape' => false)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php echo $this->element('sql_dump'); ?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,74 +1,171 @@
|
||||||
<h2>Sweet, "Test App" got Baked by CakePHP!</h2>
|
|
||||||
<p>
|
|
||||||
<?php
|
<?php
|
||||||
if (is_writable(TMP)):
|
/**
|
||||||
echo '<span class="notice success">';
|
*
|
||||||
echo __d('cake', 'Your tmp directory is writable.');
|
* PHP 5
|
||||||
echo '</span>';
|
*
|
||||||
else:
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
echo '<span class="notice">';
|
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
echo __d('cake', 'Your tmp directory is NOT writable.');
|
*
|
||||||
echo '</span>';
|
* Licensed under The MIT License
|
||||||
endif;
|
* 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_developer', 'Your tmp directory is writable.');
|
||||||
|
echo '</span>';
|
||||||
|
else:
|
||||||
|
echo '<span class="notice">';
|
||||||
|
echo __d('cake_developer', 'Your tmp directory is NOT writable.');
|
||||||
|
echo '</span>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$settings = array();
|
$settings = Cache::settings();
|
||||||
if (!empty($settings)):
|
if (!empty($settings)):
|
||||||
echo '<span class="notice success">';
|
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>';
|
echo '</span>';
|
||||||
else:
|
else:
|
||||||
echo '<span class="notice">';
|
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>';
|
echo '</span>';
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$filePresent = null;
|
$filePresent = null;
|
||||||
if (file_exists(CONFIGS . 'database.php')):
|
if (file_exists(CONFIGS.'database.php')):
|
||||||
echo '<span class="notice success">';
|
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;
|
$filePresent = true;
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
else:
|
else:
|
||||||
echo '<span class="notice">';
|
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 '<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>';
|
echo '</span>';
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($filePresent)):
|
if (isset($filePresent)):
|
||||||
if (!class_exists('ConnectionManager')) {
|
App::uses('ConnectionManager', 'Model');
|
||||||
require LIBS . 'model' . DS . 'connection_manager.php';
|
try {
|
||||||
|
$connected = ConnectionManager::getDataSource('default');
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$connected = false;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
if (true):
|
if ($connected && $connected->isConnected()):
|
||||||
echo '<span class="notice success">';
|
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>';
|
echo '</span>';
|
||||||
else:
|
else:
|
||||||
echo '<span class="notice">';
|
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>';
|
echo '</span>';
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php endif;?>
|
<?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>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
echo __d('cake', 'To change the content of this page, edit: %s
|
echo __d('cake_developer', 'To change the content of this page, create: APP/views/pages/home.ctp.<br />
|
||||||
To change its layout, edit: %s
|
To change its layout, create: APP/views/layouts/default.ctp.<br />
|
||||||
You can also add some CSS styles for your pages at: %s',
|
You can also add some CSS styles for your pages at: APP/webroot/css.');
|
||||||
APP . 'views' . DS . 'pages' . DS . 'home.ctp.<br />', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css');
|
|
||||||
?>
|
?>
|
||||||
</p>
|
</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