Mark Story
c4f9727720
Merge pull request #5576 from istvanp/2.7
...
Prevent NULL value on NOT NULL column when value is an empty string
2015-01-06 21:23:53 -05:00
Istvan Pusztai
22b0275a58
Prevent NULL value on NOT NULL column when value is an empty string (MySQL)
2015-01-05 12:04:24 -05:00
euromark
52ecccb1a2
App::uses and usage replacements for String => CakeText.
2015-01-05 01:00:57 +01:00
euromark
394da88d23
Stay 100% BC for 2.7
2015-01-04 10:52:18 +01:00
euromark
39e0ce415d
Backport of 3.0 Session API hardening and clear().
2015-01-04 01:40:09 +01:00
mark_story
4cd2c8fdcb
Merge branch 'master' into 2.7
2015-01-03 14:34:55 -05:00
Mark Story
0a4cffc603
Merge pull request #5501 from cakephp/2.6-hotfix-session-tmp-dir
...
Also autocreate session folder in debug mode
2015-01-02 11:36:53 -05:00
Kaz Watanabe
e5fc1858f9
fix error at change type of text field to integer in PostgreSQL
2014-12-30 09:27:46 +09:00
mark_story
ec57fb4579
Fix length reflection in SQLServer
...
Don't reflect TEXT column lengths in SQLServer. Because SQLServer text
columns hold ~2GB of data there is no meaningful length to them.
Refs #5506
2014-12-29 16:47:50 -05:00
euromark
5aff618109
Also autocreate session folder in debug mode
2014-12-27 20:34:47 +01:00
Mark Story
7bbc3dfd90
Merge pull request #5470 from cakephp/2.7-session
...
Backport Session consume() to 2.x
2014-12-26 12:22:20 -05:00
euromark
813925abee
Backport Session consume()
2014-12-23 03:39:05 +01:00
mark_story
c540e2b798
Merge branch 'master' into 2.6
2014-12-22 21:38:58 -05:00
mark_story
4d6611b328
Merge branch 'master' into 2.6
...
Conflicts:
lib/Cake/VERSION.txt
2014-12-17 21:38:32 -05:00
OKINAKA Kenshin
8c008ad97d
Update.
2014-12-11 13:55:41 +09:00
OKINAKA Kenshin
5cff6aa746
Fixing Mysql::describe() for timestamp.
2014-12-11 10:31:19 +09:00
euromark
e1c128bb99
Consolidate with conditions sniff.
2014-12-09 03:17:35 +01:00
mark_story
543f05e3d0
Merge branch 'master' into 2.6
2014-11-29 22:00:00 -05:00
euromark
d0f75a03af
Allow RLIKE in conditions.
2014-11-26 19:56:58 +01:00
Stephen Cuppett
ffb7e86641
Enable sslmode for PostgreSQL connections
...
By default, PHP 5.5 and PostgreSQL PDO will not allow SSL connections. This adds the default of "allow", but also the user may override the setting to "require" or any of the other potential values.
See: http://php.net/manual/en/function.pg-connect.php
2014-11-20 22:37:39 -05:00
mark_story
23c5805763
Fix mistake with previous commit.
...
I forgot to put the correct variable into the query like a doofus.
Refs #4168
2014-11-18 22:03:30 -05:00
mark_story
ddc3eee84c
Use name() instead of hand quoting sequence names.
...
By using name() we can easily accomodate postgres sequences that exist
out side of sequences.
Fixes #4168
2014-11-17 22:47:07 -05:00
mark_story
decce4daf2
Merge branch 'master' into 2.6
2014-11-14 21:25:09 -05:00
Bryan Crowe
e3e54d40fa
Fix CS, remove extra space
2014-11-13 16:47:10 -05:00
mark_story
6092c168a9
Fix issues with sqlite field parsing.
...
The previous attempt would still fail on unions or derived table join
queries. This new approach is a bit slower but more robust.
Refs #3972
2014-11-12 20:49:19 -05:00
mark_story
93a6fd5648
Fix SQLite parsing fields incorrectly when using subqueries.
...
When using subqueries or joining against tables containing FROM the
results were bizzare and unexpected. By tokenizing the entire query we
can more accurately grab the fields.
Refs #3972
2014-11-11 23:16:08 -05:00
mark_story
0e4fb9d648
Merge branch 'master' into 2.6
2014-11-07 15:13:46 -05:00
euromark
0d5d6b19b5
Wording correction.
2014-11-05 13:14:45 +01:00
euromark
768f2c809c
Correct doc block return types.
2014-11-05 13:03:27 +01:00
mark_story
48101e6bf5
Merge branch 'master' into 2.6
2014-11-04 22:44:11 -05:00
Mark Story
96b82e4226
Merge pull request #5021 from dereuromark/master-mysql
...
Fix IN replacement in virtual fields for MYSQL.
2014-11-04 08:24:03 -05:00
mark_story
579b16d90b
Merge branch 'master' into 2.6
2014-10-30 21:20:53 -04:00
Mark Story
a8c5b70b22
Merge pull request #4489 from busgurlu/patch-1
...
to correctly return SET() type
2014-10-30 19:56:47 -04:00
euromark
e5b45bcdea
Fix IN replacement in virtual fields for MYSQL.
2014-10-30 19:14:04 +01:00
Marc Würth
84b0fe1c88
Added comment to $tableParameters array
2014-10-16 16:06:33 +02:00
mark_story
87fcc9f0b9
Merge branch 'master' into 2.6
...
Conflicts:
lib/Cake/VERSION.txt
2014-10-13 21:11:38 -04:00
ADmad
ecf030796b
Fix docblock
2014-10-11 19:37:22 +05:30
ADmad
94e718372a
Make CakeSession::read() return null for all failure cases.
2014-10-09 19:27:27 +05:30
mark_story
af43bc1706
Merge branch 'master' into 2.6
2014-09-25 22:39:51 -04:00
mark_story
1877cab341
Fix UUID primary key columns not being reflected properly.
...
When UUID columns are converted into varchar(36) they should also be
default = null, null = false.
Fixes #4695
2014-09-23 22:16:18 -04:00
mark_story
0d11cf7a33
Merge branch 'master' into 2.6
2014-09-14 23:26:33 -04:00
mark_story
9e4446fe5f
Trim whitespace from columns before checking for operators.
...
Fixes #4599
2014-09-13 21:50:35 -04:00
ADmad
3fb252ad2f
Merge branch 'master' into 2.6
2014-09-13 00:37:16 +05:30
euromark
e3dc51bb68
Manually correct remaining casts.
2014-09-10 16:40:22 +02:00
euromark
04ef39217f
Take care of more int casts.
2014-09-10 16:29:23 +02:00
euromark
e77f96d8b7
Use (int) cast instead of intval() function for performance reasons and to unify it.
2014-09-10 15:52:57 +02:00
mark_story
734bb9223b
Merge branch 'master' into 2.6
...
Conflicts:
lib/Cake/Core/App.php
lib/Cake/VERSION.txt
2014-09-06 23:04:20 -04:00
Burak USGURLU
996ad04b95
to correctly return SET() type
2014-09-04 18:07:30 +03:00
José Lorenzo Rodríguez
b5bfbfcf15
Merge pull request #4223 from chinpei215/2.6-issue2529-fix
...
Fix different format of $results in afterFind
2014-09-03 10:39:37 +02:00
mark_story
638d2ea7b6
Add array cast for method_cache data.
...
Fixes #4186
2014-09-02 22:39:28 -04:00
ADmad
d60cd3ab2f
Revert "Merge pull request #4405 from php-engineer/master-session-bugfix"
...
This reverts commit 5863adda42
, reversing
changes made to 4c37cf6d4b
.
There was no real issue. The lack of session cookie in CLI makes writing
tests a bit tricky which caused the confusion. Refs #4405 , #4451 .
2014-09-01 00:17:53 +05:30
mark_story
7c316bbc56
Merge branch 'master' into 2.6
...
Conflicts:
lib/Cake/basics.php
2014-08-30 21:28:11 -04:00
chinpei215
31204832c2
Ensure that afterFind is called when using 'joins' with 'recursive' = -1
2014-08-27 15:16:13 +09:00
chinpei215
b74774bb0c
hasOne/belongsTo associations should contain associated records in afterFind
...
Before 1fe943d6f1
,
afterFind() is called twice with belongsTo/hasOne associations.
Although $results also doesn't contain associated records on first time,
it contains them on second time.
After 1fe943d6f1
,
it doesn't work if associated records are used in afterFind.
This commit fixes it.
2014-08-27 09:32:00 +09:00
Stefan Dickmann
66ccfaf5e2
session bugfix
2014-08-26 17:47:45 +02:00
mark_story
7936b5e764
Fix CURRENT_TIMESTAMP being stored as a default value.
...
When reflecting timestamp columns in MySQL current_timestamp comes back
as the default value. This causes insertion errors later on as
'current_timestamp' is an invalid value for timestamp columns.
Refs #4184
2014-08-25 11:17:11 +02:00
chinpei215
c246695518
Fix different format of $results in afterFind
...
Refs #2529
As of this commit, we can get consistent format of $resutls in afterFind.
And we can keep backward compatibility if Model::$useConsistentAfterFind is set to false.
2014-08-11 01:19:40 +09:00
chinpei215
c227c14bf2
Fix afterFind() called twice with hasMany relationship
...
It occurs when a model and the children models are related to a same model.
For example, such as the following:
* User hasMany Comment
* User hasMany Article
* Article hasMany Comment
2014-08-11 00:12:03 +09:00
mark_story
9c3089796f
Merge branch 'master' into 2.6
...
Conflicts:
lib/Cake/Model/Model.php
2014-08-08 23:28:06 -04:00
mark_story
d114fa1431
Update join building to not error out on empty conditions.
...
When conditions are empty we can assume one of two things:
* The person made a mistake.
* The person is doing the join conditions in the where clause.
In both cases we should attempt to generate proper SQL.
Fixes #4189
2014-08-08 10:02:09 -04:00
Mark S.
2471c64aae
Merge pull request #4158 from dereuromark/master-cakesession-hotfix
...
Fix notice in CakeSession.
2014-08-06 18:25:55 +02:00
chinpei215
1fe943d6f1
Fix afterFind() called twice with belongsTo and hasOne relationships
...
Refs #2268
2014-08-06 07:27:04 +09:00
euromark
864f5e06f6
Fix notice in CakeSession.
2014-08-04 13:32:20 +02:00
ADmad
713f430fc4
Merge branch 'master' into 2.6
2014-08-03 01:05:36 +05:30
Anthony GRASSIOT
aa42b80a4d
a
/ an
typo fixes fot API
2014-07-30 22:11:03 +02:00
mark_story
051d78c1a5
Merge branch 'master' into 2.6
...
Conflicts:
lib/Cake/Model/Model.php
2014-07-16 23:11:58 -04:00
chinpei215
ace30fdd8a
Fix a race condition problem
...
Prevents Model::save() from generating a query with WHERE 1 = 1 on race condition.
Refs #3857
2014-07-12 23:27:39 +09:00
mark_story
03c2a8b722
Unify datetime column default values between MySQL and Postgres.
...
Datetime columns should have 'default' => null, in both Postgres and
MySQL.
Fixes #3837
2014-07-11 23:10:16 -04:00
mark_story
3a70d9c033
Merge branch 'master' into 2.6
2014-07-09 10:17:05 -04:00
Ceeram
a266a9493d
minor optimisation, refs comments on 81875cfeb1
2014-07-04 17:25:41 +02:00
ADmad
e410501791
Fix CS errors.
2014-07-03 23:13:55 +05:30
mark_story
2bcd817367
Merge branch 'master' into 2.6
2014-07-03 11:13:06 -04:00
euromark
974ca851c2
Correct doc blocks according to cs guidelines.
...
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
mark_story
b1610c145e
Merge branch 'master' into 2.6
2014-07-02 23:39:16 -04:00
mark_story
33a5b6e451
Fix additional missing API doc tags.
2014-07-02 23:38:34 -04:00
mark_story
91721244a4
Fix more doc block errors in lib/
2014-06-27 22:58:34 -04:00
Mark Story
e9da7b8f80
Merge pull request #3596 from zeroasterisk/2.6
...
MySQL DbdSource alter field support 'after'
2014-06-25 23:10:29 -04:00
mark_story
146053c980
Update datasource API docs.
2014-06-06 14:06:32 -04:00
ADmad
1d40f3e685
Fix API docblock CS errors.
2014-06-05 00:28:55 +05:30
alan bount
c273ed8d2c
MySQL DbdSource alter field support 'after'
...
The ALTER FIELD for MySQL should support 'after' just like the ADD FIELD
2014-05-29 11:06:44 -04:00
mark_story
81875cfeb1
Optimize renew().
...
Don't call session_id() twice when we can use a local variable to store
the current session id.
Fixes #3531
2014-05-22 14:28:56 -04:00
Kenshin Okinaka
91cb3ddc27
Unset $db in DboSource::read().
...
After calling $db->queryAssociatin(), it is necessary to unset db.
This reverts commit 52d425737a
.
2014-05-13 21:17:34 +09:00
Walther Lalk
2dd3cecfaa
Fixes issue with Sql Server driver when loading fixtures
...
Sqlserver::describe is expecting a model object (Unlike other drivers which work with either a object or string). While this does work under normal conditions, it causes a "Trying to get property of non-object" notice when using fixtures. The same problem also causes the testLimitOffsetHack test to fail.
This change does a simple test to ensure that the $model variable is an object before trying to access a property of it. All SqlServer tests are now passing.
2014-05-06 12:43:36 +02:00
ADmad
d466e00644
Merge branch 'master' into 2.5
...
Conflicts:
lib/Cake/Model/Datasource/DboSource.php
lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
lib/Cake/Utility/Folder.php
lib/Cake/VERSION.txt
2014-05-04 14:35:36 +05:30
euromark
7a287a6942
More coding standard corrections.
2014-04-29 14:19:33 +02:00
mark_story
d54fbe6f60
Merge branch 'master' into 2.5
2014-04-18 22:13:56 -04:00
Mark Story
d2fa1b444f
Merge pull request #3301 from ubermaniac/Sqlserver-trim
...
Trim $sql before checking for SELECT
2014-04-11 18:48:41 -04:00
Joseph Woodruff
9aeea2fcc3
Trim $sql before checking for SELECT
2014-04-11 15:25:07 -06:00
mark_story
bf9c3029cb
Merge branch 'master' into 2.5
2014-04-10 20:51:49 -04:00
euromark
8e0f15b3d6
Revert the removal of a BC relevant part.
2014-04-10 20:11:58 +02:00
euromark
0ece694a75
microptimize options and default merge and other string key array merges
2014-04-08 01:25:14 +02:00
Joseph Woodruff
8536371501
Sqlserver Datasource how properly appends the schemaName prefix in the describe() method
2014-04-02 13:59:04 -06:00
mark_story
2fe8c4050b
Insert manual joins *after* generated joins.
...
Re-order query joins to make manually added joins be performed after
generated joins. This removes the need to workaround the current join
order, or redefine all association joins when you want to add an
additional join on a leaf table.
Refs #2179
Refs #2346
2014-03-23 21:09:08 -04:00
mark_story
8acb75425d
Merge branch 'master' into 2.5
...
Conflicts:
CONTRIBUTING.md
lib/Cake/Model/Datasource/DboSource.php
2014-03-21 22:55:28 -04:00
James Watts
2eadb89ff6
Update in_array() check to avoid fatal error
...
Enabling the $strict parameter to true avoids PHP's default behavior when search for an array in an array, which throws a fatal error if circular references exist - http://php.net/in_array#refsect1-function.in-array-parameters
2014-03-21 16:16:32 +01:00
ADmad
961f9d7669
Merge branch 'master' into 2.5
2014-03-16 20:17:24 +05:30
mark_story
3a226b03c3
Remove typehint from generateAssociationQuery()
...
While I think typehints are generally a good idea, this one broke a few
plugins, notably CakeDC/search. I don't think it is wise for 2.X release
to break BC in that way. I think reverting this change is probably the
safest path right now.
2014-03-12 23:42:21 -04:00
mark_story
5a944734b8
Remove typehint on $LinkModel argument.
...
Adding a typehint here causes errors in a few userland plugins. We
should honor the previous interface as best we can.
2014-03-12 23:30:46 -04:00
ovidiupruteanu
7b1086e632
Add missing spaces
2014-03-06 05:18:31 +02:00
ovidiupruteanu
56a3f093a1
Sqlserver->describe failing for models with a schemaName
...
When models have a schemaName set it was searching for TABLE_NAME = 'schema_name.table_name'.
Instead it should search for TABLE_NAME = 'table_name' AND TABLE_SCHEMA = 'schema_name'
2014-03-06 04:54:03 +02:00