mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-06 03:22:39 +00:00
Merging from sandboxes
[1079] Merged [1005] committed by nate but not added to core prior to release. Merged [1078] prior to modifying all developers sandboxes. [1081] adding view and template directories [1082] adding base files for view generator [1083] correcting all package and sub package tags for in doc blocks. Making sure every file in the core has doc block in them [1084] renaming working copy of latest release [1093] Added fix for associations using underscores if var $useTable is set in the associated models. This closes ticket #11. [1094] Fix for Ticket #24. The problem was tracked to a variable in View::_render(); $loadedHelpers was being assigned a reference when it when it should not have been. [1096] Initial work on controller components needs testing. Also added a work around for the basics.php uses(). Using the define DS where the files from the original version are now located in deeper libs directories. [1097] committing a few typos in the code I added [1098] reformatting code in component.php [1104] changed the test route and corrected a regex in inflector. [1111] removing the contructor from dispatcher, it is not needed [1112] Changes made for errors when a file is not present in webroot. Fixed the regex used in Router::parse(). Change the error layout template. [1113] Changes to Folder class to allow setting the permissions mode when constructing. This class needs to be refactored and move everything that is in the contructor out. The constructor should set the vars for use in other Folder::"methods"(). Will work on this at a later time. git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1114 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
dd5ad1537c
commit
d62b9ec65e
118 changed files with 2180 additions and 843 deletions
|
@ -23,7 +23,7 @@
|
|||
* @copyright Copyright (c) 2005, CakePHP Authors/Developers
|
||||
* @link https://trac.cakephp.org/wiki/Authors Authors/Developers
|
||||
* @package cake
|
||||
* @subpackage cake.libs
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.2.9
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
|
@ -76,7 +76,7 @@ uses('object');
|
|||
* </code>
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.libs
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.2.9
|
||||
*/
|
||||
class DBO extends Object
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* @copyright Copyright (c) 2005, CakePHP Authors/Developers
|
||||
* @link https://trac.cakephp.org/wiki/Authors Authors/Developers
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.2.9
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
|
@ -42,7 +42,7 @@ require_once(VENDORS.'adodb/adodb.inc.php');
|
|||
* Database abstraction implementation for the AdoDB library.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.2.9
|
||||
*/
|
||||
class DBO_AdoDB extends DBO
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
* @copyright Copyright (c) 2005, CakePHP Authors/Developers
|
||||
* @link https://trac.cakephp.org/wiki/Authors Authors/Developers
|
||||
* @package cake
|
||||
* @subpackage cake.libs
|
||||
* @since CakePHP v 0.2.9
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.10.0.1076
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
|
@ -48,8 +48,8 @@ config('database');
|
|||
* Creates DBO-descendant objects from a given db connection configuration
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @since CakePHP v 1.0.0.0
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.10.0.1076
|
||||
*
|
||||
*/
|
||||
class DboFactory extends Object
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* @copyright Copyright (c) 2005, CakePHP Authors/Developers
|
||||
* @link https://trac.cakephp.org/wiki/Authors Authors/Developers
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.2.9
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
|
@ -37,7 +37,7 @@
|
|||
* All implementations override this class.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.2.9
|
||||
*/
|
||||
class DBO_generic extends DBO
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* @copyright Copyright (c) 2005, CakePHP Authors/Developers
|
||||
* @link https://trac.cakephp.org/wiki/Authors Authors/Developers
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.2.9
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
|
@ -43,7 +43,7 @@ uses('model'.DS.'dbo'.DS.'dbo');
|
|||
* Long description for class
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.2.9
|
||||
*/
|
||||
class DBO_MySQL extends DBO
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* @copyright Copyright (c) 2005, CakePHP Authors/Developers
|
||||
* @link https://trac.cakephp.org/wiki/Authors Authors/Developers
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.2.9
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
|
@ -44,7 +44,7 @@ vendor('Pear/DB');
|
|||
* Long description for class
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.2.9
|
||||
*/
|
||||
class DBO_Pear extends DBO
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* @copyright Copyright (c) 2005, CakePHP Authors/Developers
|
||||
* @link https://trac.cakephp.org/wiki/Authors Authors/Developers
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.9.1.114
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
|
@ -42,7 +42,7 @@ uses('model'.DS.'dbo'.DS.'dbo');
|
|||
* Long description for class
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.9.1.114
|
||||
*/
|
||||
class DBO_Postgres extends DBO
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* @copyright Copyright (c) 2005, CakePHP Authors/Developers
|
||||
* @link https://trac.cakephp.org/wiki/Authors Authors/Developers
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.9.0
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
|
@ -42,7 +42,7 @@ uses('model'.DS.'dbo'.DS.'dbo');
|
|||
* Long description for class
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.libs.dbo
|
||||
* @subpackage cake.cake.libs.model.dbo
|
||||
* @since CakePHP v 0.9.0
|
||||
*/
|
||||
class DBO_SQLite extends DBO
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* @copyright Copyright (c) 2005, CakePHP Authors/Developers
|
||||
* @link https://trac.cakephp.org/wiki/Authors Authors/Developers
|
||||
* @package cake
|
||||
* @subpackage cake.libs
|
||||
* @subpackage cake.cake.libs.model
|
||||
* @since CakePHP v 0.2.9
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
|
@ -40,14 +40,14 @@ uses('object', 'class_registry', 'validators', 'inflector');
|
|||
/**
|
||||
* Short description for class
|
||||
*
|
||||
* DBO-backed object data model, loosely based on RoR concepts (www.rubyonrails.com).
|
||||
* DBO-backed object data model.
|
||||
* Automatically selects a database table name based on a pluralized lowercase object class name
|
||||
* (i.e. class 'User' => table 'users'; class 'Man' => table 'men')
|
||||
* The table is required to have at least 'id auto_increment', 'created datetime',
|
||||
* and 'modified datetime' fields.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.libs
|
||||
* @subpackage cake.cake.libs.model
|
||||
* @since CakePHP v 0.2.9
|
||||
*
|
||||
*/
|
||||
|
@ -325,8 +325,8 @@ class Model extends Object
|
|||
break;
|
||||
}
|
||||
}
|
||||
//$this->_belongsTo = array($className,$association);
|
||||
$this->linkAssociation('Belongs', $className, $this->id);
|
||||
$className = Inflector::singularize($className);
|
||||
$this->linkAssociation('Belongs', $this->$className->table, $this->id);
|
||||
$this->relink('Belongs');
|
||||
unset($className);
|
||||
}
|
||||
|
@ -336,9 +336,9 @@ class Model extends Object
|
|||
$association = explode(',', $this->belongsTo);
|
||||
foreach ($association as $modelName)
|
||||
{
|
||||
// $this->_belongsTo = array($modelName,$modelName);
|
||||
$this->_constructAssociatedModels($modelName , 'Belongs');
|
||||
$this->linkAssociation('Belongs', $modelName, $this->id);
|
||||
$modelName = Inflector::singularize($modelName);
|
||||
$this->linkAssociation('Belongs', $this->$modelName->table, $this->id);
|
||||
$this->relink('Belongs');
|
||||
}
|
||||
}
|
||||
|
@ -368,6 +368,7 @@ class Model extends Object
|
|||
if ($classCreated === false)
|
||||
{
|
||||
$this->_constructAssociatedModels($className , 'One');
|
||||
$className = $this->$className->table;
|
||||
$classCreated = true;
|
||||
}
|
||||
|
||||
|
@ -402,8 +403,8 @@ class Model extends Object
|
|||
break;
|
||||
}
|
||||
}
|
||||
// $this->_hasOne = array($className,$association);
|
||||
$this->linkAssociation('One', $className, $this->id);
|
||||
$className = Inflector::singularize($className);
|
||||
$this->linkAssociation('One', $this->$className->table, $this->id);
|
||||
$this->relink('One');
|
||||
unset($className);
|
||||
}
|
||||
|
@ -413,9 +414,9 @@ class Model extends Object
|
|||
$association = explode(',', $this->hasOne);
|
||||
foreach ($association as $modelName)
|
||||
{
|
||||
// $this->_hasOne = array($modelName,$modelName);
|
||||
$this->_constructAssociatedModels($modelName , 'One');
|
||||
$this->linkAssociation('One', $modelName, $this->id);
|
||||
$modelName = Inflector::singularize($modelName);
|
||||
$this->linkAssociation('One', $this->$modelName->table, $this->id);
|
||||
$this->relink('One');
|
||||
}
|
||||
}
|
||||
|
@ -444,7 +445,7 @@ class Model extends Object
|
|||
|
||||
if ($classCreated === false)
|
||||
{
|
||||
$this->_constructAssociatedModels($className , 'Many');
|
||||
$this->_constructAssociatedModels($className , 'Many');
|
||||
$classCreated = true;
|
||||
}
|
||||
switch ($option)
|
||||
|
@ -481,8 +482,8 @@ class Model extends Object
|
|||
break;
|
||||
}
|
||||
}
|
||||
// $this->_hasMany = array($className,$association);
|
||||
$this->linkAssociation('Many', $className, $this->id);
|
||||
$className = Inflector::singularize($className);
|
||||
$this->linkAssociation('Many', $this->$className->table, $this->id);
|
||||
$this->relink('Many');
|
||||
unset($className);
|
||||
}
|
||||
|
@ -492,9 +493,9 @@ class Model extends Object
|
|||
$association = explode(',', $this->hasMany);
|
||||
foreach ($association as $modelName)
|
||||
{
|
||||
// $this->_hasMany = array($modelName,$modelName);
|
||||
$this->_constructAssociatedModels($modelName , 'Many');
|
||||
$this->linkAssociation('Many', $modelName, $this->id);
|
||||
$modelName = Inflector::singularize($modelName);
|
||||
$this->linkAssociation('Many', $this->$modelName->table, $this->id);
|
||||
$this->relink('Many');
|
||||
}
|
||||
}
|
||||
|
@ -516,9 +517,9 @@ class Model extends Object
|
|||
$association = explode(',', $this->hasAndBelongsToMany);
|
||||
foreach ($association as $modelName)
|
||||
{
|
||||
// $this->_hasAndBelongsToMany = array($modelName,$modelName);
|
||||
$this->_constructAssociatedModels($modelName , 'ManyTo');
|
||||
$this->linkAssociation('ManyTo', $modelName, $this->id);
|
||||
$modelName = Inflector::singularize($modelName);
|
||||
$this->linkAssociation('ManyTo', $this->$modelName->table, $this->id);
|
||||
$this->relink('ManyTo');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue