Skip to content

Commit

Permalink
CakePHP 2.10.6 にアップデート / PHP 7.1 に対応
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Jan 7, 2018
1 parent 81ed3e2 commit 3a07092
Show file tree
Hide file tree
Showing 739 changed files with 13,490 additions and 6,901 deletions.
10 changes: 5 additions & 5 deletions app/Config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
* You should also use this file to include any files that provide global functions/constants
* that your application uses.
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://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
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @package app.Config
* @since CakePHP(tm) v 0.10.8.2117
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @license https://opensource.org/licenses/mit-license.php MIT License
*/

// Setup a 'default' cache configuration for use in the application.
Expand Down
20 changes: 14 additions & 6 deletions app/Config/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
*
* Use it to configure core behavior of Cake.
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://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
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @package app.Config
* @since CakePHP(tm) v 0.2.9
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @license https://opensource.org/licenses/mit-license.php MIT License
*/

//setLocale(LC_ALL, 'deu');
Expand Down Expand Up @@ -121,10 +121,17 @@
* for any URL generation inside the application, set the following
* configuration variable to the http(s) address to your domain. This
* will override the automatic detection of full base URL and can be
* useful when generating links from the CLI (e.g. sending emails)
* useful when generating links from the CLI (e.g. sending emails).
* If the application runs in a subfolder, you should also set App.base.
*/
//Configure::write('App.fullBaseUrl', 'http://example.com');

/**
* The base directory the app resides in. Should be used if the
* application runs in a subfolder and App.fullBaseUrl is set.
*/
//Configure::write('App.base', '/my_app');

/**
* Web path to the public images directory under webroot.
* If not set defaults to 'img/'
Expand Down Expand Up @@ -206,6 +213,7 @@
*
* - `Session.cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'
* - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP
* - `Session.useForwardsCompatibleTimeout` - Whether or not to make timeout 3.x compatible.
* - `Session.cookieTimeout` - The number of minutes you want session cookies to live for.
* - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions? You might want to set the
* value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX
Expand Down
10 changes: 5 additions & 5 deletions app/Config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
* Routes are very important mechanism that allows you to freely connect
* different URLs to chosen controllers and their actions (functions).
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://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
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @package app.Config
* @since CakePHP(tm) v 0.2.9
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @license https://opensource.org/licenses/mit-license.php MIT License
*/

// CUSTOMIZE DELETE 2015/03/27 n1215
Expand Down
19 changes: 12 additions & 7 deletions app/webroot/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
/**
* The Front Controller for handling every request
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://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
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @package app.webroot
* @since CakePHP(tm) v 0.2.9
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @license https://opensource.org/licenses/mit-license.php MIT License
*/
// CUSTOMIZE ADD 2012/10/27 ryuring
// >>>
Expand Down Expand Up @@ -119,18 +119,23 @@
// CUSTOMIZE MODIFY 2014/03/23 ryuring
// webroot 配置の絡みがあるので webroot 固定とする
// >>>
//define('WEBROOT_DIR', basename(dirname($fileName)));
//define('WEBROOT_DIR', basename(dirname(__FILE__)));
// ---
define('WEBROOT_DIR', 'webroot');
// <<<
}
if (!defined('WWW_ROOT')) {
// CUSTOMIZE MODIFY 201X/XX/XX ryuring
// >>>
//define('WWW_ROOT', dirname(__FILE__) . DS);
// ---
define('WWW_ROOT', dirname($fileName) . DS);
// <<<
}

// For the built-in server
if (PHP_SAPI === 'cli-server') {
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
if ($_SERVER['PHP_SELF'] !== '/' . basename(__FILE__) && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
return false;
}
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
Expand Down
17 changes: 12 additions & 5 deletions app/webroot/test.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
/**
* Web Access Frontend for TestSuite
*
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* CakePHP(tm) Tests <https://book.cakephp.org/2.0/en/development/testing.html>
* Copyright (c) Cake Software Foundation, Inc. (https://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://book.cakephp.org/2.0/en/development/testing.html
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://book.cakephp.org/2.0/en/development/testing.html
* @package app.webroot
* @since CakePHP(tm) v 1.2.0.4433
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @license https://opensource.org/licenses/mit-license.php MIT License
*/

set_time_limit(0);
Expand Down Expand Up @@ -46,6 +46,13 @@
define('APP_DIR', basename(dirname(dirname(__FILE__))));
}

/**
* Config Directory
*/
if (!defined('CONFIG')) {
define('CONFIG', ROOT . DS . APP_DIR . DS . 'Config' . DS);
}

/**
* The absolute path to the "Cake" directory, WITHOUT a trailing DS.
*
Expand Down
10 changes: 5 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
* - requires App.baseUrl to be uncommented in app/Config/core.php
* - app/webroot is not set as a document root.
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://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
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since CakePHP(tm) v 0.2.9
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @license https://opensource.org/licenses/mit-license.php MIT License
*/

/**
Expand Down
25 changes: 13 additions & 12 deletions lib/Baser/Controller/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,10 @@ public function admin_write_page_files() {
/**
* ビューを表示する
*
* @param mixed
* @return void
* @throws ForbiddenException When a directory traversal attempt.
* @throws NotFoundException When the view file could not be found
* or MissingViewException in debug mode.
*/
public function display() {
// CUSTOMIZE DELETE 2016/10/05 ryuring
Expand All @@ -273,28 +275,27 @@ public function display() {

$urlTmp = preg_replace('/^\//', '', $urlTmp);
$path = explode('/', $urlTmp);

// <<<

$count = count($path);
if (!$count) {
$this->redirect('/');
return $this->redirect('/');
}
if (in_array('..', $path, true) || in_array('.', $path, true)) {
throw new ForbiddenException();
}
$page = $subpage = $titleForLayout = null;
$page = $subpage = $title_for_layout = null;

if (!empty($path[0])) {
$page = $path[0];
}
if (!empty($path[1])) {
$subpage = $path[1];
}
if (!empty($path[$count - 1])) {
$titleForLayout = Inflector::humanize($path[$count - 1]);
$title_for_layout = Inflector::humanize($path[$count - 1]);
}
// <<<

$this->set([
'page' => $page,
'subpage' => $subpage,
'title_for_layout' => $titleForLayout
]);
$this->set(compact('page', 'subpage', 'title_for_layout'));

// CUSTOMIZE ADD 2014/07/02 ryuring
// >>>
Expand Down
2 changes: 1 addition & 1 deletion lib/Baser/Event/BcContentsEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @package Baser.Event
*/
class BcContentsEventListener extends Object implements CakeEventListener {
class BcContentsEventListener extends CakeObject implements CakeEventListener {

/**
* Implemented Events
Expand Down
2 changes: 1 addition & 1 deletion lib/Baser/Event/BcControllerEventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 《イベント名の命名規則》
* Controller.ControllerName.eventName
*/
class BcControllerEventDispatcher extends Object implements CakeEventListener {
class BcControllerEventDispatcher extends CakeObject implements CakeEventListener {

/**
* implementedEvents
Expand Down
2 changes: 1 addition & 1 deletion lib/Baser/Event/BcEventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* 登録されたイベントリスナーが存在しない場合には、falseを を返す。
* 存在する場合には、生成された CakeEvent を返す。
*/
class BcEventDispatcher extends Object {
class BcEventDispatcher extends CakeObject {

/**
* dispatch
Expand Down
2 changes: 1 addition & 1 deletion lib/Baser/Event/BcEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* public function beforeRender($event) {}
*
*/
class BcEventListener extends Object implements CakeEventListener {
class BcEventListener extends CakeObject implements CakeEventListener {

/**
* 登録イベント
Expand Down
2 changes: 1 addition & 1 deletion lib/Baser/Event/BcModelEventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 《イベント名の命名規則》
* Model.ModelName.eventName
*/
class BcModelEventDispatcher extends Object implements CakeEventListener {
class BcModelEventDispatcher extends CakeObject implements CakeEventListener {

/**
* implementedEvents
Expand Down
2 changes: 1 addition & 1 deletion lib/Baser/Event/BcShortCodeEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @package Baser.Event
*/
class BcShortCodeEventListener extends Object implements CakeEventListener {
class BcShortCodeEventListener extends CakeObject implements CakeEventListener {

/**
* Implemented Events
Expand Down
2 changes: 1 addition & 1 deletion lib/Baser/Event/BcViewEventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 《イベント名の命名規則》
* View.ControllerName.eventName
*/
class BcViewEventDispatcher extends Object implements CakeEventListener {
class BcViewEventDispatcher extends CakeObject implements CakeEventListener {

public function implementedEvents() {
return [
Expand Down
Loading

0 comments on commit 3a07092

Please sign in to comment.