Upgrade CakePHP from 2.2.5 to 2.9.5

This commit is contained in:
Brm Ko 2017-02-26 15:29:44 +01:00
parent 5a580df460
commit 235a541597
793 changed files with 60746 additions and 23753 deletions

View file

@ -1,6 +1,6 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

View file

@ -1,19 +1,18 @@
@charset "utf-8";
/**
*
* Generic CSS for CakePHP
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* 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 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.webroot.css
* @since CakePHP(tm)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
* {
@ -84,7 +83,7 @@ p {
line-height:20px;
background: #003d4c url('../img/cake.icon.png') no-repeat left;
color: #fff;
padding: 0px 30px;
padding: 0 30px;
}
#header h1 a {
color: #fff;
@ -109,6 +108,9 @@ p {
padding: 6px 10px;
text-align: right;
}
#header a, #footer a {
color: #fff;
}
/** containers **/
div.form,
@ -169,7 +171,7 @@ td.actions {
white-space: nowrap;
}
table td.actions a {
margin: 0px 6px;
margin: 0 6px;
padding:2px 5px;
}
@ -331,7 +333,7 @@ option {
input[type=checkbox] {
clear: left;
float: left;
margin: 0px 6px 7px 2px;
margin: 0 6px 7px 2px;
width: auto;
}
div.checkbox label {
@ -360,7 +362,7 @@ form .submit input[type=submit] {
background-image: -moz-linear-gradient(top, #76BF6B, #3B8230);
border-color: #2d6324;
color: #fff;
text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px;
text-shadow: rgba(0, 0, 0, 0.5) 0 -1px 0;
padding: 8px 10px;
}
form .submit input[type=submit]:hover {
@ -522,11 +524,11 @@ input[type=submit],
-moz-border-radius: 4px;
border-radius: 4px;
text-decoration: none;
text-shadow: #fff 0px 1px 0px;
text-shadow: #fff 0 1px 0;
min-width: 0;
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 1px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 1px rgba(0, 0, 0, 0.2);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 1px rgba(0, 0, 0, 0.2);
-webkit-user-select: none;
user-select: none;
}
@ -546,7 +548,7 @@ input[type=submit]:active,
background-image: -ms-linear-gradient(top, #dfdfdf, #eee);
background-image: -o-linear-gradient(top, #dfdfdf, #eee);
background-image: linear-gradient(top, #dfdfdf, #eee);
text-shadow: #eee 0px 1px 0px;
text-shadow: #eee 0 1px 0;
-moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
@ -622,15 +624,15 @@ pre {
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
margin: 0px 4px 10px 2px;
margin: 0 4px 10px 2px;
font-family: sans-serif;
font-size: 14px;
line-height: 14px;
display: inline-block;
text-decoration: none;
-moz-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3);
-webkit-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3);
box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3);
-moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.3);
-webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.3);
box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.3);
}
.cake-code-dump pre {
position: relative;
@ -642,13 +644,13 @@ pre {
.cake-stack-trace pre {
color: #000;
background-color: #F0F0F0;
margin: 0px 0 10px 0;
margin: 0 0 10px 0;
padding: 1em;
overflow: auto;
text-shadow: none;
}
.cake-stack-trace li {
padding: 10px 5px 0px;
padding: 10px 5px 0;
margin: 0 0 4px 0;
font-family: monospace;
border: 1px solid #bbb;
@ -704,7 +706,7 @@ pre {
}
.code-coverage-results div.start {
border:1px solid #aaa;
border-width:1px 1px 0px 1px;
border-width:1px 1px 0 1px;
margin-top:30px;
padding-top:5px;
}

View file

@ -1,23 +1,21 @@
<?php
/**
* Index
*
* The Front Controller for handling every request
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* 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 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.webroot
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
/**
* Use the DS to separate the directories in other defines
*/
@ -26,14 +24,13 @@ if (!defined('DS')) {
}
/**
* These defines should only be edited if you have cake installed in
* These defines should only be edited if you have CakePHP installed in
* a directory layout other than the way it is distributed.
* When using custom settings be sure to use the DS and do not add a trailing DS.
*/
/**
* The full path to the directory which holds "app", WITHOUT a trailing DS.
*
*/
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
@ -41,7 +38,6 @@ if (!defined('ROOT')) {
/**
* The actual directory name for the "app".
*
*/
if (!defined('APP_DIR')) {
define('APP_DIR', basename(dirname(dirname(__FILE__))));
@ -53,17 +49,29 @@ if (!defined('APP_DIR')) {
* Un-comment this line to specify a fixed path to CakePHP.
* This should point at the directory containing `Cake`.
*
* For ease of development CakePHP uses PHP's include_path. If you
* For ease of development CakePHP uses PHP's include_path. If you
* cannot modify your include_path set this value.
*
* 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__);
/**
* This auto-detects CakePHP as a composer installed library.
* You may remove this if you are not planning to use composer (not recommended, though).
*/
$vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) {
define('CAKE_CORE_INCLUDE_PATH', $vendorPath);
}
/**
* Editing below this line should NOT be necessary.
* Change at your own risk.
*
*/
if (!defined('WEBROOT_DIR')) {
define('WEBROOT_DIR', basename(dirname(__FILE__)));
@ -72,6 +80,14 @@ if (!defined('WWW_ROOT')) {
define('WWW_ROOT', dirname(__FILE__) . DS);
}
// For the built-in server
if (PHP_SAPI === 'cli-server') {
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
return false;
}
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
if (function_exists('ini_set')) {
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
@ -79,13 +95,11 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
if (!include 'Cake' . DS . 'bootstrap.php') {
$failed = true;
}
} else {
if (!include CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php') {
$failed = true;
}
} elseif (!include CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php') {
$failed = true;
}
if (!empty($failed)) {
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
App::uses('Dispatcher', 'Routing');
@ -93,5 +107,5 @@ App::uses('Dispatcher', 'Routing');
$Dispatcher = new Dispatcher();
$Dispatcher->dispatch(
new CakeRequest(),
new CakeResponse(array('charset' => Configure::read('App.encoding')))
new CakeResponse()
);

View file

@ -2,22 +2,14 @@
/**
* Web Access Frontend for TestSuite
*
* PHP 5
*
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://book.cakephp.org/2.0/en/development/testing.html
* @package app.webroot
* @since CakePHP(tm) v 1.2.0.4433
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
set_time_limit(0);
ini_set('display_errors', 1);
/**
* Use the DS to separate the directories in other defines
*/
@ -26,14 +18,13 @@ if (!defined('DS')) {
}
/**
* These defines should only be edited if you have cake installed in
* These defines should only be edited if you have CakePHP installed in
* a directory layout other than the way it is distributed.
* When using custom settings be sure to use the DS and do not add a trailing DS.
*/
/**
* The full path to the directory which holds "app", WITHOUT a trailing DS.
*
*/
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
@ -41,7 +32,6 @@ if (!defined('ROOT')) {
/**
* The actual directory name for the "app".
*
*/
if (!defined('APP_DIR')) {
define('APP_DIR', basename(dirname(dirname(__FILE__))));
@ -50,17 +40,29 @@ if (!defined('APP_DIR')) {
/**
* The absolute path to the "Cake" directory, WITHOUT a trailing DS.
*
* For ease of development CakePHP uses PHP's include_path. If you
* For ease of development CakePHP uses PHP's include_path. If you
* 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
*
* The following line differs from its sibling
* /app/webroot/test.php
*/
//define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__);
/**
* This auto-detects CakePHP as a composer installed library.
* You may remove this if you are not planning to use composer (not recommended, though).
*/
$vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) {
define('CAKE_CORE_INCLUDE_PATH', $vendorPath);
}
/**
* Editing below this line should not be necessary.
* Change at your own risk.
*
*/
if (!defined('WEBROOT_DIR')) {
define('WEBROOT_DIR', basename(dirname(__FILE__)));
@ -82,11 +84,11 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
}
}
if (!empty($failed)) {
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
if (Configure::read('debug') < 1) {
die(__d('cake_dev', 'Debug setting does not allow access to this url.'));
throw new NotFoundException(__d('cake_dev', 'Debug setting does not allow access to this URL.'));
}
require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';