mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Merge branch '2.0' into 2.1
Conflicts: lib/Cake/Utility/ClassRegistry.php
This commit is contained in:
commit
97ce118294
5 changed files with 27 additions and 25 deletions
|
@ -206,6 +206,8 @@ class Postgres extends DboSource {
|
||||||
if ($c->type == 'character varying') {
|
if ($c->type == 'character varying') {
|
||||||
$length = null;
|
$length = null;
|
||||||
$type = 'text';
|
$type = 'text';
|
||||||
|
} else if ($c->type == 'uuid') {
|
||||||
|
$length = 36;
|
||||||
} else {
|
} else {
|
||||||
$length = intval($c->oct_length);
|
$length = intval($c->oct_length);
|
||||||
}
|
}
|
||||||
|
|
|
@ -288,13 +288,13 @@ class Model extends Object implements CakeEventListener {
|
||||||
* ### Possible keys in association
|
* ### Possible keys in association
|
||||||
*
|
*
|
||||||
* - `className`: the classname of the model being associated to the current model.
|
* - `className`: the classname of the model being associated to the current model.
|
||||||
* If you’re defining a ‘Profile belongsTo User’ relationship, the className key should equal ‘User.’
|
* If you're defining a 'Profile belongsTo User' relationship, the className key should equal 'User.'
|
||||||
* - `foreignKey`: the name of the foreign key found in the current model. This is
|
* - `foreignKey`: the name of the foreign key found in the current model. This is
|
||||||
* especially handy if you need to define multiple belongsTo relationships. The default
|
* especially handy if you need to define multiple belongsTo relationships. The default
|
||||||
* value for this key is the underscored, singular name of the other model, suffixed with ‘_id’.
|
* value for this key is the underscored, singular name of the other model, suffixed with '_id'.
|
||||||
* - `conditions`: An SQL fragment used to filter related model records. It’s good
|
* - `conditions`: An SQL fragment used to filter related model records. It's good
|
||||||
* practice to use model names in SQL fragments: “User.active = 1” is always
|
* practice to use model names in SQL fragments: 'User.active = 1' is always
|
||||||
* better than just “active = 1.”
|
* better than just 'active = 1.'
|
||||||
* - `type`: the type of the join to use in the SQL query, default is LEFT which
|
* - `type`: the type of the join to use in the SQL query, default is LEFT which
|
||||||
* may not fit your needs in all situations, INNER may be helpful when you want
|
* may not fit your needs in all situations, INNER may be helpful when you want
|
||||||
* everything from your main and associated models or nothing at all!(effective
|
* everything from your main and associated models or nothing at all!(effective
|
||||||
|
@ -303,7 +303,7 @@ class Model extends Object implements CakeEventListener {
|
||||||
* fetched. Returns all fields by default.
|
* fetched. Returns all fields by default.
|
||||||
* - `order`: An SQL fragment that defines the sorting order for the returned associated rows.
|
* - `order`: An SQL fragment that defines the sorting order for the returned associated rows.
|
||||||
* - `counterCache`: If set to true the associated Model will automatically increase or
|
* - `counterCache`: If set to true the associated Model will automatically increase or
|
||||||
* decrease the “[singular_model_name]_count” field in the foreign table whenever you do
|
* decrease the "[singular_model_name]_count" field in the foreign table whenever you do
|
||||||
* a save() or delete(). If its a string then its the field name to use. The value in the
|
* a save() or delete(). If its a string then its the field name to use. The value in the
|
||||||
* counter field represents the number of related rows.
|
* counter field represents the number of related rows.
|
||||||
* - `counterScope`: Optional conditions array to use for updating counter cache field.
|
* - `counterScope`: Optional conditions array to use for updating counter cache field.
|
||||||
|
@ -335,18 +335,18 @@ class Model extends Object implements CakeEventListener {
|
||||||
* ### Possible keys in association
|
* ### Possible keys in association
|
||||||
*
|
*
|
||||||
* - `className`: the classname of the model being associated to the current model.
|
* - `className`: the classname of the model being associated to the current model.
|
||||||
* If you’re defining a ‘User hasOne Profile’ relationship, the className key should equal ‘Profile.’
|
* If you're defining a 'User hasOne Profile' relationship, the className key should equal 'Profile.'
|
||||||
* - `foreignKey`: the name of the foreign key found in the other model. This is
|
* - `foreignKey`: the name of the foreign key found in the other model. This is
|
||||||
* especially handy if you need to define multiple hasOne relationships.
|
* especially handy if you need to define multiple hasOne relationships.
|
||||||
* The default value for this key is the underscored, singular name of the
|
* The default value for this key is the underscored, singular name of the
|
||||||
* current model, suffixed with ‘_id’. In the example above it would default to 'user_id'.
|
* current model, suffixed with '_id'. In the example above it would default to 'user_id'.
|
||||||
* - `conditions`: An SQL fragment used to filter related model records. It’s good
|
* - `conditions`: An SQL fragment used to filter related model records. It's good
|
||||||
* practice to use model names in SQL fragments: “Profile.approved = 1” is
|
* practice to use model names in SQL fragments: "Profile.approved = 1" is
|
||||||
* always better than just “approved = 1.”
|
* always better than just "approved = 1."
|
||||||
* - `fields`: A list of fields to be retrieved when the associated model data is
|
* - `fields`: A list of fields to be retrieved when the associated model data is
|
||||||
* fetched. Returns all fields by default.
|
* fetched. Returns all fields by default.
|
||||||
* - `order`: An SQL fragment that defines the sorting order for the returned associated rows.
|
* - `order`: An SQL fragment that defines the sorting order for the returned associated rows.
|
||||||
* - `dependent`: When the dependent key is set to true, and the model’s delete()
|
* - `dependent`: When the dependent key is set to true, and the model's delete()
|
||||||
* method is called with the cascade parameter set to true, associated model
|
* method is called with the cascade parameter set to true, associated model
|
||||||
* records are also deleted. In this case we set it true so that deleting a
|
* records are also deleted. In this case we set it true so that deleting a
|
||||||
* User will also delete her associated Profile.
|
* User will also delete her associated Profile.
|
||||||
|
@ -378,13 +378,13 @@ class Model extends Object implements CakeEventListener {
|
||||||
* ### Possible keys in association
|
* ### Possible keys in association
|
||||||
*
|
*
|
||||||
* - `className`: the classname of the model being associated to the current model.
|
* - `className`: the classname of the model being associated to the current model.
|
||||||
* If you’re defining a ‘User hasMany Comment’ relationship, the className key should equal ‘Comment.’
|
* If you're defining a 'User hasMany Comment' relationship, the className key should equal 'Comment.'
|
||||||
* - `foreignKey`: the name of the foreign key found in the other model. This is
|
* - `foreignKey`: the name of the foreign key found in the other model. This is
|
||||||
* especially handy if you need to define multiple hasMany relationships. The default
|
* especially handy if you need to define multiple hasMany relationships. The default
|
||||||
* value for this key is the underscored, singular name of the actual model, suffixed with ‘_id’.
|
* value for this key is the underscored, singular name of the actual model, suffixed with '_id'.
|
||||||
* - `conditions`: An SQL fragment used to filter related model records. It’s good
|
* - `conditions`: An SQL fragment used to filter related model records. It's good
|
||||||
* practice to use model names in SQL fragments: “Comment.status = 1” is always
|
* practice to use model names in SQL fragments: "Comment.status = 1" is always
|
||||||
* better than just “status = 1.”
|
* better than just "status = 1."
|
||||||
* - `fields`: A list of fields to be retrieved when the associated model data is
|
* - `fields`: A list of fields to be retrieved when the associated model data is
|
||||||
* fetched. Returns all fields by default.
|
* fetched. Returns all fields by default.
|
||||||
* - `order`: An SQL fragment that defines the sorting order for the returned associated rows.
|
* - `order`: An SQL fragment that defines the sorting order for the returned associated rows.
|
||||||
|
@ -429,7 +429,7 @@ class Model extends Object implements CakeEventListener {
|
||||||
* ### Possible keys in association
|
* ### Possible keys in association
|
||||||
*
|
*
|
||||||
* - `className`: the classname of the model being associated to the current model.
|
* - `className`: the classname of the model being associated to the current model.
|
||||||
* If you're defining a ‘Recipe HABTM Tag' relationship, the className key should equal ‘Tag.'
|
* If you're defining a 'Recipe HABTM Tag' relationship, the className key should equal 'Tag.'
|
||||||
* - `joinTable`: The name of the join table used in this association (if the
|
* - `joinTable`: The name of the join table used in this association (if the
|
||||||
* current table doesn't adhere to the naming convention for HABTM join tables).
|
* current table doesn't adhere to the naming convention for HABTM join tables).
|
||||||
* - `with`: Defines the name of the model for the join table. By default CakePHP
|
* - `with`: Defines the name of the model for the join table. By default CakePHP
|
||||||
|
@ -439,11 +439,11 @@ class Model extends Object implements CakeEventListener {
|
||||||
* - `foreignKey`: the name of the foreign key found in the current model.
|
* - `foreignKey`: the name of the foreign key found in the current model.
|
||||||
* This is especially handy if you need to define multiple HABTM relationships.
|
* This is especially handy if you need to define multiple HABTM relationships.
|
||||||
* The default value for this key is the underscored, singular name of the
|
* The default value for this key is the underscored, singular name of the
|
||||||
* current model, suffixed with ‘_id'.
|
* current model, suffixed with '_id'.
|
||||||
* - `associationForeignKey`: the name of the foreign key found in the other model.
|
* - `associationForeignKey`: the name of the foreign key found in the other model.
|
||||||
* This is especially handy if you need to define multiple HABTM relationships.
|
* This is especially handy if you need to define multiple HABTM relationships.
|
||||||
* The default value for this key is the underscored, singular name of the other
|
* The default value for this key is the underscored, singular name of the other
|
||||||
* model, suffixed with ‘_id'.
|
* model, suffixed with '_id'.
|
||||||
* - `unique`: If true (default value) cake will first delete existing relationship
|
* - `unique`: If true (default value) cake will first delete existing relationship
|
||||||
* records in the foreign keys table before inserting new ones, when updating a
|
* records in the foreign keys table before inserting new ones, when updating a
|
||||||
* record. So existing associations need to be passed again when updating.
|
* record. So existing associations need to be passed again when updating.
|
||||||
|
@ -854,7 +854,7 @@ class Model extends Object implements CakeEventListener {
|
||||||
}
|
}
|
||||||
if ($name === 'tablePrefix') {
|
if ($name === 'tablePrefix') {
|
||||||
$this->setDataSource();
|
$this->setDataSource();
|
||||||
if (property_exists($this, 'tablePrefix')) {
|
if (property_exists($this, 'tablePrefix') && !empty($this->tablePrefix)) {
|
||||||
return $this->tablePrefix;
|
return $this->tablePrefix;
|
||||||
}
|
}
|
||||||
return $this->tablePrefix = null;
|
return $this->tablePrefix = null;
|
||||||
|
|
|
@ -104,7 +104,7 @@ class CakeRequest implements ArrayAccess {
|
||||||
'ajax' => array('env' => 'HTTP_X_REQUESTED_WITH', 'value' => 'XMLHttpRequest'),
|
'ajax' => array('env' => 'HTTP_X_REQUESTED_WITH', 'value' => 'XMLHttpRequest'),
|
||||||
'flash' => array('env' => 'HTTP_USER_AGENT', 'pattern' => '/^(Shockwave|Adobe) Flash/'),
|
'flash' => array('env' => 'HTTP_USER_AGENT', 'pattern' => '/^(Shockwave|Adobe) Flash/'),
|
||||||
'mobile' => array('env' => 'HTTP_USER_AGENT', 'options' => array(
|
'mobile' => array('env' => 'HTTP_USER_AGENT', 'options' => array(
|
||||||
'Android', 'AvantGo', 'BlackBerry', 'DoCoMo', 'Fennec', 'iPod', 'iPhone',
|
'Android', 'AvantGo', 'BlackBerry', 'DoCoMo', 'Fennec', 'iPod', 'iPhone', 'iPad',
|
||||||
'J2ME', 'MIDP', 'NetFront', 'Nokia', 'Opera Mini', 'Opera Mobi', 'PalmOS', 'PalmSource',
|
'J2ME', 'MIDP', 'NetFront', 'Nokia', 'Opera Mini', 'Opera Mobi', 'PalmOS', 'PalmSource',
|
||||||
'portalmmm', 'Plucker', 'ReqwirelessWeb', 'SonyEricsson', 'Symbian', 'UP\\.Browser',
|
'portalmmm', 'Plucker', 'ReqwirelessWeb', 'SonyEricsson', 'Symbian', 'UP\\.Browser',
|
||||||
'webOS', 'Windows CE', 'Windows Phone OS', 'Xiino'
|
'webOS', 'Windows CE', 'Windows Phone OS', 'Xiino'
|
||||||
|
|
|
@ -1288,7 +1288,7 @@ class CakeEmail {
|
||||||
}
|
}
|
||||||
$data = $this->_readFile($fileInfo['file']);
|
$data = $this->_readFile($fileInfo['file']);
|
||||||
|
|
||||||
$msg[] = '--' . $this->_boundary;
|
$msg[] = '--rel-' . $this->_boundary;
|
||||||
$msg[] = 'Content-Type: ' . $fileInfo['mimetype'];
|
$msg[] = 'Content-Type: ' . $fileInfo['mimetype'];
|
||||||
$msg[] = 'Content-Transfer-Encoding: base64';
|
$msg[] = 'Content-Transfer-Encoding: base64';
|
||||||
$msg[] = 'Content-ID: <' . $fileInfo['contentId'] . '>';
|
$msg[] = 'Content-ID: <' . $fileInfo['contentId'] . '>';
|
||||||
|
@ -1323,7 +1323,7 @@ class CakeEmail {
|
||||||
$msg[] = '--' . $boundary;
|
$msg[] = '--' . $boundary;
|
||||||
$msg[] = 'Content-Type: multipart/related; boundary="rel-' . $boundary . '"';
|
$msg[] = 'Content-Type: multipart/related; boundary="rel-' . $boundary . '"';
|
||||||
$msg[] = '';
|
$msg[] = '';
|
||||||
$relBoundary = 'rel-' . $boundary;
|
$relBoundary = $textBoundary = 'rel-' . $boundary;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($hasMultipleTypes) {
|
if ($hasMultipleTypes) {
|
||||||
|
|
|
@ -865,7 +865,7 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
"\r\n" .
|
"\r\n" .
|
||||||
"--alt-{$boundary}--\r\n" .
|
"--alt-{$boundary}--\r\n" .
|
||||||
"\r\n" .
|
"\r\n" .
|
||||||
"--$boundary\r\n" .
|
"--rel-$boundary\r\n" .
|
||||||
"Content-Type: application/octet-stream\r\n" .
|
"Content-Type: application/octet-stream\r\n" .
|
||||||
"Content-Transfer-Encoding: base64\r\n" .
|
"Content-Transfer-Encoding: base64\r\n" .
|
||||||
"Content-ID: <abc123>\r\n" .
|
"Content-ID: <abc123>\r\n" .
|
||||||
|
|
Loading…
Add table
Reference in a new issue