James Tancock
fd198ce0fa
Edits to tests to cover the changes to Model::exists
2015-08-17 12:19:02 +01:00
Mark Story
de4b44a37b
Merge pull request #7077 from dereuromark/2.7-static
...
Replacing self with static due to PHP5.3+. Following #7040 .
2015-07-23 22:27:37 -04:00
mark_story
c6e5026767
Fix issues saveMany & saveAssociated with boolean values.
...
For non-atomic, save operations that include models with boolean fields.
The first false value would cause the save to abort. This regression was
introduced in #6947 . Instead of checking the data from save() we should
be boolean casting save() to capture the success/failure.
Refs #7069
2015-07-22 00:41:10 -04:00
Mark Scherer
52e79987a2
Replacing self with static due to PHP5.3+. Following #7040 .
2015-07-21 10:22:53 +02:00
Mark Scherer
d98e7d8d27
Fix tests.
2015-07-13 08:37:11 +02:00
mark_story
59a18e7709
Merge branch '2.6' into 2.7
2015-07-07 22:05:56 -04:00
hiromi2424
deb62c8887
#6935 Fix deep saving for hasMany could not handle validation errors correctly
2015-07-04 06:10:58 +00:00
Mark Scherer
4f3602ad5f
Adjust bake, docblocks and tests for notBlank.
2015-05-17 22:27:16 +02:00
mark_story
a9519d39f7
Fix whitelist being empty during afterSave.
...
whitelist should only be reset after afterSave event.
Refs #6028
2015-03-08 13:51:46 -04:00
Ceeram
43e998422e
Fix PHPCS errors
2014-10-10 16:52:01 +02:00
ADmad
3fb252ad2f
Merge branch 'master' into 2.6
2014-09-13 00:37:16 +05:30
euromark
04ef39217f
Take care of more int casts.
2014-09-10 16:29:23 +02:00
mark_story
7c316bbc56
Merge branch 'master' into 2.6
...
Conflicts:
lib/Cake/basics.php
2014-08-30 21:28:11 -04:00
Jeremy Harris
2dac6d29c2
Clearing HABTM (unique) when HABTM array is empty, refs #2461
2014-08-28 17:52:13 -05:00
mark_story
9c3089796f
Merge branch 'master' into 2.6
...
Conflicts:
lib/Cake/Model/Model.php
2014-08-08 23:28:06 -04:00
chinpei215
cb376bf420
Add some more transaction tests
...
And remove 2 else clauses.
2014-08-03 22:34:11 +09:00
chinpei215
799500ce6d
Fix transactions do not get rollbacked in saveAssociated/saveMany
...
Refs #2849
2014-08-02 10:12:33 +09:00
chinpei215
3d77ce5d34
Fix serveral tests pass regardless of whether data is valid or not
2014-08-02 09:55:29 +09: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
ca93bbcd15
Fix CS
2014-07-14 01:21:09 +09: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
ADmad
e410501791
Fix CS errors.
2014-07-03 23:13:55 +05:30
Haithem BEN GHORBAL
31615ce415
add 'atomic' option to "save()" API
...
This commit adds a transaction context to 'save()' API in order to rollback
possible modifications done in some 'Model.beforeSave' listener callback.
This will allow cakephp 2.x to behave like 3.0 .
It uses try/catch to better handle transaction.
Previous save() API is renamed to protected _doSave() method.
A new save() method is created for transaction handling.
'atomic' option is disabled for internal 'save()' call.
2014-06-03 09:37:17 +02:00
Haithem BEN GHORBAL
a8e410ee20
fix save with habtm returning false
2014-05-28 18:17:16 +02:00
euromark
0d09a54033
more missing doc block tags added
2014-04-02 03:02:37 +02:00
euromark
44952b06a4
cs
2014-04-02 02:23:43 +02:00
ndm2
70a1b87db6
Fix wrong test model association class name
2014-03-01 23:01:33 +01:00
ndm2
008ad3237c
Fix verification of expected invocations #2919
2014-03-01 19:06:17 +01:00
mark_story
3b867a048e
Add test for saveMany + validate=false.
...
Closes #2468
2013-12-11 12:43:18 -05:00
mark_story
abf4af14a8
Change quotes to keep postgres happy.
2013-12-08 11:58:26 -05:00
mark_story
530c95725f
Attempt to fix errors with postgres tests.
2013-12-08 11:46:17 -05:00
mark_story
016c3aed44
Add test for saveAssociated and expression objects.
...
Add a test for #1514 . This issue was fixed during recent refactorings.
Closes #1514
2013-11-16 10:51:14 -05:00
Marc Würth
7cfa0116f4
Removed "PHP 5" from file header DocBlocks
...
This statement does not serve a purpose anymore.
In a long forgotten world it indicated the main version number of PHP which the code in the file was compatible to.
http://pear.php.net/manual/en/standards.sample.php
But since PHP 5.1 and later this is only marginally true.
Thus I propose to remove it from CakePHP.
2013-11-13 22:58:39 +01:00
Bryan Crowe
c1dd0e4393
Changed url to URL where appropriate
2013-10-07 23:17:58 -04:00
euromark
17bd465cae
simplify tests
2013-09-19 00:17:21 +02:00
euromark
e3a3946e89
address casting cs
2013-09-17 15:15:25 +02:00
mark_story
3244b9e3d7
Merge branch 'master' into 2.4
2013-08-16 14:47:01 -04:00
Mischa ter Smitten
0e49a23065
Makes the locale test not always pass, be verbose when it is skipped.
2013-08-14 22:32:04 +02:00
Jose Lorenzo Rodriguez
9d07fc4330
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Console/ShellDispatcher.php
lib/Cake/Utility/CakeNumber.php
lib/Cake/View/Elements/sql_dump.ctp
2013-08-11 23:31:10 +02:00
euromark
1339a9dfe1
coding standards according to new sniffer rules
2013-08-08 01:03:21 +02:00
ADmad
38b050a711
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Console/Command/ConsoleShell.php
2013-08-04 19:26:55 +05:30
ADmad
473e4f991f
Fixed bug when using multi model fieldList and whitelists for all models are not provided.
...
Fixes #3948
2013-08-03 02:49:41 +05:30
Phally
db1876d837
Adds order to the test models to make the results more predictable.
...
Even though there was some code in place to prevent results in random
order from PostgreSQL we were still experiencing this with Jenkins
and Travis.
This commit removes the old code that handled this. From now on this
will be handled differently. Every test model will order by its
primary key. You can disable this by changing the order property
of the model to `null`: `$testModel->order = null`.
2013-07-19 22:31:09 +02:00
ADmad
d161b21ae1
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Controller/Component/AuthComponent.php
2013-07-14 10:58:55 +05:30
euromark
a643295e4c
remove @access and unnecessary $name
2013-07-08 15:50:50 +02:00
ADmad
4ded269549
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Controller/Component/Auth/BlowfishAuthenticate.php
lib/Cake/VERSION.txt
2013-07-07 12:22:12 +05:30
euromark
e7f380d2b7
doublespace to single space
2013-07-05 14:36:40 +02:00
mark_story
f09693f6e8
Merge branch 'master' into 2.4
2013-06-29 23:26:26 -04:00
Marc Würth
2609016dfe
Changed http links to lighthouse, groups.google and github to https
...
Because they get redirected anyway and we should follow good practices.
Also in many cases similar URLs were already using https
2013-06-25 22:58:30 +02:00
mark_story
dcf7df39d2
Merge branch 'master' into 2.4
2013-06-21 17:47:37 -04:00