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

@ -5,19 +5,18 @@
* This file is application-wide model file. You can put all
* application-wide model-related methods here.
*
* 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 Cake.Model
* @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
*/
App::uses('Model', 'Model');

View file

@ -4,26 +4,25 @@
*
* Behavior to simplify manipulating a model's bindings when doing a find operation
*
* 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 Cake.Test.test_app.Model.Behavior
* @package Cake.Test.TestApp.Model.Behavior
* @since CakePHP(tm) v 1.2.0.5669
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
/**
* Behavior to allow for dynamic and atomic manipulation of a Model's associations used for a find call. Most useful for limiting
* the amount of associations and data returned.
*
* @package Cake.Test.test_app.Model.Behavior
* @package Cake.Test.TestApp.Model.Behavior
*/
class PersisterOneBehaviorBehavior extends ModelBehavior {
}

View file

@ -4,26 +4,25 @@
*
* Behavior to simplify manipulating a model's bindings when doing a find operation
*
* 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 Cake.Test.test_app.Model.Behavior
* @package Cake.Test.TestApp.Model.Behavior
* @since CakePHP(tm) v 1.2.0.5669
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
/**
* Behavior to allow for dynamic and atomic manipulation of a Model's associations used for a find call. Most useful for limiting
* the amount of associations and data returned.
*
* @package Cake.Test.test_app.Model.Behavior
* @package Cake.Test.TestApp.Model.Behavior
*/
class PersisterTwoBehaviorBehavior extends ModelBehavior {
}

View file

@ -2,26 +2,32 @@
/**
* Test App Comment Model
*
*
*
* PHP 5
*
* CakePHP : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc.
* 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.
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP Project
* @package Cake.Test.test_app.Model
* @package Cake.Test.TestApp.Model
* @since CakePHP v 1.2.0.7726
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
/**
* Comment Model
*
* @package Cake.Test.TestApp.Model
*/
class Comment extends AppModel {
/**
* Table name
*
* @var string
*/
public $useTable = 'comments';
public $name = 'Comment';
}

View file

@ -1,5 +1,6 @@
<?php
App::uses('TestSource', 'TestPlugin.Model/Datasource');
class TestLocalDriver extends TestSource {
}

View file

@ -1,7 +1,6 @@
<?php
/**
* Test suite app/Model/Datasource/Session session handler
*
*/
App::uses('CakeSessionHandlerInterface', 'Model/Datasource/Session');
@ -13,18 +12,23 @@ class TestAppLibSession implements CakeSessionHandlerInterface {
}
public function close() {
return true;
}
public function read($id) {
return '';
}
public function write($id, $data) {
return true;
}
public function destroy($id) {
return true;
}
public function gc($expires = null) {
return true;
}
}

View file

@ -0,0 +1,45 @@
<?php
/**
* Test App Extract Model
*
* CakePHP : Rapid Development Framework (http://cakephp.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 (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP Project
* @package Cake.Test.TestApp.Model
* @since CakePHP v 2.4
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
/**
* Extract
*
* For testing Console i18n validation message extraction with quotes
*
* @package Cake.Test.TestApp.Model
*/
class Extract extends AppModel {
public $useTable = false;
public $validate = array(
'title' => array(
'custom' => array(
'rule' => array('custom', '.*'),
'allowEmpty' => true,
'required' => false,
'message' => 'double "quoted" validation'
),
'between' => array(
'rule' => array('lengthBetween', 5, 15),
'message' => "single 'quoted' validation"
)
),
);
}

View file

@ -2,28 +2,29 @@
/**
* Test App Comment Model
*
*
*
* PHP 5
*
* CakePHP : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc.
* 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.
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP Project
* @package Cake.Test.test_app.Model
* @package Cake.Test.TestApp.Model
* @since CakePHP v 1.2.0.7726
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
/**
* PersisterOne
*
* @package Cake.Test.TestApp.Model
*/
class PersisterOne extends AppModel {
public $useTable = 'posts';
public $name = 'PersisterOne';
public $actsAs = array('PersisterOneBehavior', 'TestPlugin.TestPluginPersisterOne');
public $hasMany = array('Comment', 'TestPlugin.TestPluginComment');
@ -37,7 +38,7 @@ class PersisterOne extends AppModel {
'message' => 'Post title is required'
),
'between' => array(
'rule' => array('between', 5, 15),
'rule' => array('lengthBetween', 5, 15),
'message' => array('You may enter up to %s chars (minimum is %s chars)', 14, 6)
)
),

View file

@ -2,28 +2,29 @@
/**
* Test App Comment Model
*
*
*
* PHP 5
*
* CakePHP : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc.
* 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.
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP Project
* @package Cake.Test.test_app.Model
* @package Cake.Test.TestApp.Model
* @since CakePHP v 1.2.0.7726
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
/**
* PersisterTwo
*
* @package Cake.Test.TestApp.Model
*/
class PersisterTwo extends AppModel {
public $useTable = 'posts';
public $name = 'PersisterTwo';
public $actsAs = array('PersisterOneBehavior', 'TestPlugin.TestPluginPersisterOne');
public $hasMany = array('Comment', 'TestPlugin.TestPluginComment');

View file

@ -2,26 +2,27 @@
/**
* Test App Comment Model
*
*
*
* PHP 5
*
* CakePHP : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc.
* 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.
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP Project
* @package Cake.Test.test_app.Model
* @package Cake.Test.TestApp.Model
* @since CakePHP v 1.2.0.7726
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
/**
* Post
*
* @package Cake.Test.TestApp.Model
*/
class Post extends AppModel {
public $useTable = 'posts';
public $name = 'Post';
}