Commit graph

569 commits

Author SHA1 Message Date
euromark
4fe1ab1bf6 missing app uses statements 2012-07-21 13:34:33 +02:00
mark_story
3c6b50953b Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/VERSION.txt
2012-07-18 22:12:51 -04:00
Mark Story
83cef3ef9a Merge pull request #718 from dereuromark/2.3-fix-validation-error-message
2.3 fix validation error message
2012-07-17 19:57:16 -07:00
euromark
3945c0e6a8 rtim files 2012-07-18 03:55:29 +02:00
mark_story
a63dd9ee9d Fix incorrect formatting in TreeBehavior.
Fixes #3045
2012-07-17 21:06:41 -04:00
euromark
760cf33ce3 make sure a missing validation rule always triggers a warning (in productive mode this will be logged in the log files) 2012-07-17 10:47:20 +02:00
mark_story
a7c79e5da2 Fix warnings when deleting records that do not exist.
Fixes #3037
2012-07-14 15:54:07 -04:00
mark_story
8fc5726920 Remove trailing whitespace. 2012-07-11 21:39:32 -04:00
Jose Lorenzo Rodriguez
39715bcd89 Adding missing afterValidate callback to behaviors, Fixes #3024 2012-07-10 20:35:26 -04:30
Thomas von Hassel
1c0b6c076a Update afterSave to ensure created entires have all translated fields present
Without all fields being present, find() will be unable to find the
translated records.

Fixes #3009
2012-07-07 12:03:29 -04:00
mark_story
eb7b66b37c Revert default value of allowEmpty.
In 2.1, the default value was null, which does not impart any behavior.
In 2.2 this was changed to false, which makes it hard to validate ''
with validation methods.  Move some tests around and update tests that
probably should have been failing before.

Fixes #2983
2012-06-24 20:06:14 -04:00
mark_story
5e54be4e5a Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/Error/exceptions.php
2012-06-23 16:41:32 -04:00
Ceeram
b913fe5303 better error message in MissingConnectionException when driver is not enabled 2012-06-23 11:42:26 +02:00
Ceeram
71112d1225 No need to create new instance of ModelValidator when one is already created 2012-06-20 14:57:56 +02:00
Ceeram
60c611fa47 Parse rules in getField() 2012-06-20 14:54:32 +02:00
Ceeram
03e2263b69 Merge branch '2.1' into 2.2 2012-06-19 18:35:36 +02:00
Ceeram
cf18e8d38b avoid unneeded query in delete() 2012-06-19 16:08:36 +02:00
Ceeram
0df1e90eed show all validation errors when saving/validating Associated and primary model fails validation as well, fixes #2925 2012-06-18 14:20:53 +02:00
mark_story
f625742a12 Make CakeSession use httponly by default.
Fixes #2955
2012-06-12 22:10:55 -04:00
Kyle Robinson Young
54745aada9 Fix custom validation methods with CakeValidationSet 2012-06-11 23:28:45 -07:00
mark_story
f3464b002f Remove duplicate code.
Use a shutdown function to close the session off.
This removes a bit of icky code and continues to allow
objects to be used as session handlers.
2012-06-06 21:01:16 -04:00
Jose Lorenzo Rodriguez
51635c2ca6 Merge remote-tracking branch 'origin/2.1' into 2.2
Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/Test/Case/Model/ModelValidationTest.php
2012-06-06 11:06:06 -04:30
Jose Lorenzo Rodriguez
111a23274e Fixing yet another issue related to beforeValidate and
validateAssociated
2012-06-06 10:07:01 -04:30
Ceeram
4c6453501e Merge branch '2.1' into 2.2 2012-06-02 01:47:21 +02:00
Ceeram
048dc8d254 casting schema to array, fixes error for array_keys when return is null 2012-06-02 01:39:53 +02:00
Jelle Henkens
e5eb7b490e Preventing cache collisions by adding the the datasource key 2012-06-01 10:42:26 +01:00
Jelle Henkens
18b335a605 Replacing crc32 with md5 for less collisions in method caching 2012-06-01 10:42:26 +01:00
mark_story
55c4ad3c1c Fix coding standards errors.
Also remove count() calls in TreeBehavior.
2012-05-31 21:20:11 -04:00
mark_story
9a8ceaeba6 Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/Test/Case/View/XmlViewTest.php
2012-05-30 21:20:56 -04:00
mark_story
0bfcd49249 Fix unbindTranslation not unbinding.
There were documented use cases that have never worked.  Fix that.
Also rename a method so it better describes what it does.

Fixes #2913
2012-05-27 21:25:55 -04:00
mark_story
115b2c1495 Rename joined to _joined to hopefully prevent issues. 2012-05-27 20:43:15 -04:00
Majna
ce2fc6c83d Improve belongsTo and hasOne for unneeded queries when recursive > 1.
Reuse already joined data for 'belongsTo' and 'hasOne' associations instead of running unneeded queries for each record.
Fixes #47
2012-05-27 23:15:20 +02:00
mark_story
4b8c469004 Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/VERSION.txt
2012-05-26 21:11:36 -04:00
mark_story
b27a3aab7b Set session.gc_maxlifetime by default.
In the default case of using files for sessions, files could
be garbage collected earlier than expected based on other session
settings.  Always set session.gc_maxlifetime so session files are
garbage collected correctly.

Fixes #2901
2012-05-23 22:25:19 -04:00
mark_story
ea9eee4c77 Fix array arguments being translated.
Fixes #2902
2012-05-23 21:02:41 -04:00
Jelle Henkens
ecd869d4e3 Changing int to integer 2012-05-22 16:34:07 +01:00
Jelle Henkens
f7ce5262b7 Updating mixed @param documentation to seperate list of accepted types 2012-05-21 21:55:10 +01:00
Jose Lorenzo Rodriguez
9cceb1553f Improving ModelValidator::add() to allow multiple rules to be defined at once 2012-05-20 18:51:00 -04:30
mark_story
16a1a0ee79 Fix coding standards. 2012-05-20 15:51:09 -04:00
Jose Lorenzo Rodriguez
2ad406ab64 Merge branch '2.2-validator' into 2.2
Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/Test/Case/Model/ModelValidationTest.php
2012-05-20 14:27:35 -04:30
mark_story
ad31caeb0e Merge branch '2.1' into 2.2 2012-05-20 14:53:41 -04:00
Jose Lorenzo Rodriguez
16847b0d97 Backporting changes form 2.2 to fix some edge cases on deep saving. Fixes #2879 2012-05-19 21:14:23 -04:30
Jose Lorenzo Rodriguez
dc8c731ccb Fixed failing test case 2012-05-19 19:59:32 -04:30
Jose Lorenzo Rodriguez
b22c50d8b6 Merge branch '2.1' into 2.2-validator
Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/Test/Case/Model/ModelValidationTest.php
	lib/Cake/Test/Case/Model/models.php
2012-05-19 15:39:44 -04:30
Ceeram
7dbd6bc3a2 make sure model data is moved to alias, even when first key in data is assoc model
add extra tests for saveAll and validate first
ensure db values dont get reset to default values
2012-05-19 14:41:16 -04:30
Jelle Henkens
dbd826f794 Removing extra space in the extract() calls 2012-05-13 10:37:50 +01:00
ADmad
eeff950cf9 Removing default null value for $data parameter. Refs GH pull request #646 2012-05-12 00:18:47 +05:30
Jose Lorenzo Rodriguez
217bf85537 Implemented new method isEmptyAllowed in CakeValidationRule 2012-05-10 23:13:45 -04:30
Jose Lorenzo Rodriguez
785cf8354c Fixing merge artifacts to make all tests pass 2012-05-10 22:36:55 -04:30
Jose Lorenzo Rodriguez
307197da9e Merge branch '2.2' into 2.2-validator
Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/Test/Case/Model/ModelValidationTest.php
	lib/Cake/Test/Case/Model/ModelWriteTest.php
2012-05-10 22:19:35 -04:30