mirror of
https://github.com/brmlab/brmsklad.git
synced 2025-08-06 08:03:39 +02:00
Upgrade CakePHP from 2.2.5 to 2.9.5
This commit is contained in:
parent
5a580df460
commit
235a541597
793 changed files with 60746 additions and 23753 deletions
|
@ -4,19 +4,18 @@
|
|||
*
|
||||
* Used by bake to create new Model files.
|
||||
*
|
||||
* 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.Console.Templates.default.classes
|
||||
* @since CakePHP(tm) v 1.3
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
echo "<?php\n";
|
||||
|
@ -37,7 +36,7 @@ foreach (array('hasOne', 'belongsTo', 'hasMany', 'hasAndBelongsToMany') as $asso
|
|||
*/
|
||||
class <?php echo $name ?> extends <?php echo $plugin; ?>AppModel {
|
||||
|
||||
<?php if ($useDbConfig != 'default'): ?>
|
||||
<?php if ($useDbConfig !== 'default'): ?>
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
|
@ -48,9 +47,9 @@ class <?php echo $name ?> extends <?php echo $plugin; ?>AppModel {
|
|||
<?php endif;
|
||||
|
||||
if ($useTable && $useTable !== Inflector::tableize($name)):
|
||||
$table = "'$useTable'";
|
||||
echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n";
|
||||
echo "\tpublic \$useTable = $table;\n\n";
|
||||
$table = "'$useTable'";
|
||||
echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n";
|
||||
echo "\tpublic \$useTable = $table;\n\n";
|
||||
endif;
|
||||
|
||||
if ($primaryKey !== 'id'): ?>
|
||||
|
@ -73,6 +72,16 @@ if ($displayField): ?>
|
|||
|
||||
<?php endif;
|
||||
|
||||
if (!empty($actsAs)): ?>
|
||||
/**
|
||||
* Behaviors
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $actsAs = array(<?php echo "\n\t"; foreach ($actsAs as $behavior): echo "\t"; var_export($behavior); echo ",\n\t"; endforeach; ?>);
|
||||
|
||||
<?php endif;
|
||||
|
||||
if (!empty($validate)):
|
||||
echo "/**\n * Validation rules\n *\n * @var array\n */\n";
|
||||
echo "\tpublic \$validate = array(\n";
|
||||
|
@ -97,7 +106,7 @@ foreach ($associations as $assoc):
|
|||
if (!empty($assoc)):
|
||||
?>
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
// The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
<?php
|
||||
break;
|
||||
endif;
|
||||
|
@ -168,8 +177,6 @@ if (!empty($associations['hasAndBelongsToMany'])):
|
|||
$out .= "\t\t\t'limit' => '',\n";
|
||||
$out .= "\t\t\t'offset' => '',\n";
|
||||
$out .= "\t\t\t'finderQuery' => '',\n";
|
||||
$out .= "\t\t\t'deleteQuery' => '',\n";
|
||||
$out .= "\t\t\t'insertQuery' => ''\n";
|
||||
$out .= "\t\t)";
|
||||
if ($i + 1 < $habtmCount) {
|
||||
$out .= ",";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue