Ceeram
16be9d4990
remove unused local vars
2013-01-23 17:22:06 +01:00
mark_story
efadf3dcd3
Make sure sessions are started before destroying them.
...
Fixes #3551
2013-01-21 20:46:41 -05:00
mark_story
7790bcacff
Allow afterFind() to fully remove an associated record.
...
By returnning array() or unsetting the 0'th result an afterFind
callback should be able to fully remove data from the results.
Fixes #3541
2013-01-17 20:35:37 -05:00
mark_story
18e282f3aa
Fix space between function + parenthesis.
2013-01-17 19:36:46 -05:00
Renan Gonçalves
23d4807933
Fixing expected value from find when it results in failure.
...
When a behavior callback (eg: beforeFind) stops the event, find will return null. False is really never returned from find().
2013-01-17 13:00:56 +01:00
euromark
19cfe40fd1
fix return type in docblock
2013-01-12 16:26:44 +01:00
euromark
11a88042bd
fix doc block endings
2013-01-11 15:06:54 +01:00
Majna
6d75d90c25
Code cleanup
...
Remove unneeded sprintf.
Fix doc blocks.
Remove duplicated keys in tests assertions.
Use boolean value for CakeRequest $parseEnvironment param.
2012-12-28 23:37:58 +01:00
Graham Weldon
a9293aa385
Merge remote-tracking branch 'origin/master' into 2.3
...
Conflicts:
lib/Cake/Console/Templates/skel/Config/core.php
2012-12-27 22:42:18 +09:00
mark_story
965f0e87c5
Fix SQL errors in TreeBehavior.
...
SQL errors were caused by escapeField() usage in TreeBehavior. Quoted
fields were not correctly unquoted.
Fixes #3491
2012-12-26 20:55:07 -05:00
Saleh Souzanchi
ed761320df
Disabled callbacks in _getMax() & _getMin()
...
This fixes issues where model/behavior callbacks append into the query
conditions without checking that its an array. Disabling callbacks
should also improve performance a tiny bit.
Refs #GH-1049
2012-12-26 14:09:45 -05:00
Ceeram
3f4d24bfc0
remove unused local variables and a few improvements
2012-12-23 13:53:13 +01:00
euromark
b811afbc44
double spaces to single ones
2012-12-22 23:48:15 +01:00
ravage84
bd71f8aa25
Update lib/Cake/Model/Model.php
...
Corrected an unlogic link from Model:find to an appropriate page in the docs
2012-12-21 15:06:43 +01:00
Mark Story
69248dfb1a
Merge pull request #1001 from dogmatic69/refactor-uuid-checks
...
Refactor uuid checks into a method
2012-12-20 17:46:07 -08:00
euromark
2b1e5b02b5
code cleanup
2012-12-21 00:40:12 +01:00
mark_story
554d5794ce
Merge branch 'master' into 2.3
2012-12-19 21:18:52 -05:00
mark_story
08cde9f5a2
Fix foreach error when useTable = false.
...
When calling model->create() with useTable = false, an error should not
be triggered.
Fixes #3480
2012-12-19 21:18:34 -05:00
mark_story
d70730d722
Fix issues with TreeBehavior and nested deletes.
...
Fixes #3481
2012-12-19 20:48:51 -05:00
euromark
ce93e7c206
(isset($contain[0]) && $contain[0] === null) always false
2012-12-18 01:28:05 +01:00
mark_story
4bdaa2b5a0
Merge branch 'master' into 2.3
2012-12-16 13:32:38 -05:00
mark_story
1528b5c382
Don't return true when there is nothing to save.
...
Model::save() should not return true when no work has been done.
Fixes #3469
2012-12-16 13:19:14 -05:00
Ceeram
54607ba0fa
fix coding standards, double whitespace
2012-12-15 18:24:29 +01:00
mark_story
6f5ff4d7dd
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/Model/CakeSchema.php
lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
2012-12-13 20:20:42 -05:00
Mark Story
45f6ade800
Merge pull request #997 from rhelms/2.2.5-text-index-in-fixture
...
Cater for length part of TEXT field in indexes for MySQL'
Fixes #3428
2012-12-12 17:27:30 -08:00
Reuben Helms
07dbc4a527
Cater for length part of TEXT field in indexes for MySQL
...
Cater for length on TEXT column in index for _alterIndexes
Handle nested arrays in schemas
Used when writing indexes containg TEXT field for MySQL
Change comment style from code review
Remove stray space
Only generate length part of TEXT index column field when necessary
Override buildIndex() in Mysql instead of name()
Revert DboSource::buildIndex to previous state
Update Mysql::_alterIndexes for code reuse
Update MysqlTest to handle quoted index names.
Make code clearer, as per code review
Adjust function comments, as per code review
2012-12-13 08:33:43 +10:00
ADmad
c159854a17
Improve docblock
2012-12-11 00:44:42 +05:30
Ceeram
a8eca60fc5
fix coding standards
2012-12-10 17:40:12 +01:00
dogmatic69
49ea72e53e
rename the method and fix docblock return type
2012-12-08 13:10:12 +00:00
Mark Story
38c592928d
Merge pull request #1000 from dogmatic69/validation-simplify
...
Validation simplify
Simplify internals in Model/Validation
2012-12-07 19:00:46 -08:00
mark_story
8b0a7ee13d
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/VERSION.txt
2012-12-07 20:53:10 -05:00
dogmatic69
b3dba95b7d
making uuid field check protected
2012-12-07 02:24:12 +00:00
dogmatic69
521a759911
refactor uuid checks into a method
2012-12-07 02:22:24 +00:00
Mark Story
00d178fa28
Merge pull request #999 from dogmatic69/model-simplify
...
Simplify some model code
2012-12-05 18:18:50 -08:00
euromark
881127ef4d
unify new lines at the end of the file
2012-12-05 15:00:24 +01:00
dogmatic69
b92b7c2d2d
removing variables that are unnecessarily used
2012-12-05 10:55:11 +00:00
dogmatic69
0ada30f3bc
removing nested if statement
2012-12-05 10:54:30 +00:00
dogmatic69
b99066ddd9
simplify some model code
...
remove nested if's and else where possible and early return.
2012-12-04 02:06:20 +00:00
dogmatic69
03882f4b55
fix up the fails
2012-12-04 01:58:57 +00:00
dogmatic69
24abed969a
simplify validation code
2012-12-03 15:51:20 +00:00
mark_story
002700071d
Fix incorrectly quoted fields when using the || operator.
...
Fixes #3404
2012-12-02 20:59:56 -05:00
Thomas Ploch
7f0085cd4e
Added type hinting to Model::validator()
...
Added missing param and fixed typo in method's phpdoc.
Used 'assertSame' and 'assertNotSame'. Removed piped NULL type from phpdoc.
Simplify condition in Model::validator()
2012-11-28 21:32:00 -05:00
mark_story
ffcf71c810
Merge branch 'master' into 2.3
2012-11-28 21:30:15 -05:00
mark_story
f250592fee
Fix multi-model validators with deep & atomic.
...
Apply patch from 'Christian Buffin' to fix validateMany() and
validateAssociated() when atomic=false & deep=true are used in
conjunction. Using Hash to flatten the nested set of validation results
yields the correct results.
Fixes #3352
2012-11-28 21:26:40 -05:00
ADmad
72d6ca636f
Docblock fixes
2012-11-29 04:36:29 +05:30
mark_story
82d20ed948
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/Test/Case/Model/ModelReadTest.php
lib/Cake/Test/Case/View/MediaViewTest.php
2012-11-24 15:44:52 -05:00
Mark Story
780b6f01b4
Merge pull request #962 from srwebs/feature/empty-bool-operators
...
Fix: check if bool operators in find conditions are empty.
2012-11-24 10:14:22 -08:00
Sam Mousa
8ef3034482
Added the table name to the cacheKey used by DboSource::fields. #3394
2012-11-24 12:22:17 +01:00
Ceeram
eadc3a75e5
fix coding standards
2012-11-21 15:39:03 +01:00
mark_story
27d7e2865e
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/Console/Command/ConsoleShell.php
lib/Cake/Network/CakeSocket.php
lib/Cake/Network/Http/HttpResponse.php
lib/Cake/Utility/Folder.php
lib/Cake/View/MediaView.php
lib/Cake/basics.php
2012-11-20 23:02:33 -05:00
ceeram
4611c987db
Merge pull request #959 from ceeram/phpcsw
...
Make phpcs pass
2012-11-19 15:10:47 -08:00
Nicolas
9c7f357029
Check if bool operators in find conditions are empty.
2012-11-17 12:39:08 +01:00
Ceeram
6d0e32e642
fix coding standards, remove break after return/continue
2012-11-15 12:09:14 +01:00
mark_story
a7f192c606
Merge branch 'master' into 2.3
2012-11-14 21:50:29 -05:00
Mark Story
7206254166
Merge pull request #955 from dereuromark/master-tree-fixes
...
Asserting that tree behavior generates valid sql in recover
Fixes #3366
2012-11-14 18:03:05 -08:00
Ceeram
e02eab05d5
Remove all todo from core, create tickets for them
2012-11-14 14:59:51 +01:00
Ceeram
56225bcca3
fix all warnings except TODO warnings
2012-11-14 12:56:10 +01:00
euromark
b7e75a6399
more whitespace coding standards
2012-11-14 12:36:55 +01:00
euromark
8f78b1e05b
fix coding standards for whitespaces
2012-11-14 12:24:08 +01:00
euromark
354069d229
cascade false for recover
2012-11-13 21:12:46 +01:00
ADmad
ac087ec938
Fix rules set being updated with array instead of CakeValidationRule objects. Closes #3367
2012-11-13 22:13:15 +05:30
euromark
22f65f7cb5
asserting that tree behavior generates valid sql in recover
2012-11-13 11:18:17 +01:00
mark_story
e0aab77dab
Merge branch 'master' into 2.3
...
Conflicts:
app/Config/Schema/i18n.php
lib/Cake/I18n/Multibyte.php
lib/Cake/Test/Case/Log/CakeLogTest.php
lib/Cake/Test/Case/Routing/DispatcherTest.php
2012-11-10 21:33:26 -05:00
ADmad
7360abb0fe
Added query logging to DboSource::insertMulti(). Closes #3354
2012-11-09 16:51:51 +05:30
Ceeram
aaf2d2ef71
fix remaining cs errors
2012-11-04 13:56:13 +01:00
Ryan Morris
fa759231da
Update checkRequired to simply check if an array key is present rather than isset (which fails if the value is null)
2012-11-03 14:41:06 +09:00
mark_story
60f9626838
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/Test/Case/View/MediaViewTest.php
2012-11-02 16:52:51 -04:00
Ceeram
093275aef6
Use correct value when using virtualFields in conditions and IN (), refs PR#897
...
Squashed commit of the following:
commit 6a986953e16601fb34a132df24ae16f882f218cf
Merge: babd714 118dd8c
Author: Ceeram <c33ram@gmail.com>
Date: Fri Nov 2 13:02:15 2012 +0100
Merge branch 'master' into virtualcondition
commit babd714d80178c68b0e3fbcc21fc53b846484fd8
Author: Ceeram <c33ram@gmail.com>
Date: Fri Nov 2 00:22:43 2012 +0100
fix incorrect tests
commit 9a46c13e1aa13905b8e5474947933676e03009ce
Author: Ceeram <c33ram@gmail.com>
Date: Thu Nov 1 11:44:19 2012 +0100
add test for regular fields and conditionKeysToString with IN
commit 3aa62e5cb93aa0c7bbb47e874fc1446873dd0d27
Merge: a8f0c3d 1f31340
Author: Ceeram <c33ram@gmail.com>
Date: Thu Nov 1 11:37:01 2012 +0100
Merge branch 'master' into virtualcondition
commit a8f0c3d918761ff2c456cc3a53f1e3ee5b1c6173
Author: Ceeram <c33ram@gmail.com>
Date: Thu Oct 11 16:46:10 2012 +0200
use correct value when using virtualFields in conditions and IN ()
2012-11-02 14:29:38 +01:00
Ceeram
b8607ca2ed
fix fieldlist, refs PR808 and PR851
...
Squashed commit of the following:
commit 7007dba0eb836f852aaca95fada103bc4ba993a9
Merge: 3ca4d23 7d84486
Author: Ceeram <c33ram@gmail.com>
Date: Fri Nov 2 10:53:39 2012 +0100
Merge branch '2.3' into calinseciu-2.3
commit 3ca4d231bf80d2bb1c0572196f633da68c1a0db7
Author: Ceeram <c33ram@gmail.com>
Date: Sun Sep 23 12:45:00 2012 +0200
more tests added
commit e6b12532655671aff2b966a9be89b2625a715e8f
Author: Ceeram <c33ram@gmail.com>
Date: Tue Sep 18 09:18:32 2012 +0200
change methodname and visbilty
commit 70396265025190ab2fbc159911ec3e064cc44fb2
Author: Ceeram <c33ram@gmail.com>
Date: Thu Sep 6 17:26:52 2012 +0200
fix fieldlist, refs PR #808
commit e9db96bfe163609eeefba430d8353c822aabacb0
Merge: 99b798f
adb8142
Author: Ceeram <c33ram@gmail.com>
Date: Thu Sep 6 16:26:40 2012 +0200
Merge branch '2.3' of git://github.com/calinseciu/cakephp into calinseciu-2.3
commit adb8142d2694692ec71a063ac2ad1b275f3a67c9
Author: calinseciu <calinseciu@gmail.com>
Date: Thu Aug 30 17:57:50 2012 +0300
Add foreignKey to whitelist in saveAssociated()
Association's foreignKey doesn't get saved when saving hasMany associations since it's not in the model's whitelist after validation.
This happens if you don't send the foreignKey with the associated records data.
2012-11-02 10:56:49 +01:00
mark_story
1f31340a2a
Fix issue with Model::saveAssociated() and TranslateBehavior
...
When combining saveAssociated() with validate=first and
TranslateBehavior. Saving data for multiple locales was not done
correctly.
Fixes #3272
2012-10-31 23:13:56 -04:00
Kyle Robinson Young
f10c669813
Code standards fixes
2012-10-29 08:14:17 -07:00
mark_story
c24bec679b
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/View/Helper/FormHelper.php
2012-10-27 21:13:53 -04:00
euromark
0f978195d6
coding standards regarding whitespaces
2012-10-27 00:46:12 +02:00
Rachman Chavik
e61483126c
CakeSchema: adds empty line between tables
2012-10-26 13:27:47 +07:00
Ber Clausen
c741f60367
Make Model::find('first') always return an array.
2012-10-25 17:57:37 -03:00
dogmatic69
641ba9f3e6
Merge branch '2.3' into type-checks
...
Conflicts:
lib/Cake/Error/ExceptionRenderer.php
lib/Cake/Routing/Dispatcher.php
2012-10-24 19:03:44 +01:00
ADmad
1763f46340
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/bootstrap.php
2012-10-23 16:53:01 +05:30
Mark Story
746eaf9389
Merge pull request #894 from dereuromark/comp-fix-save-all
...
BC mod for saveAll()
2012-10-22 18:40:38 -07:00
mark_story
a0a61b5980
Fix issue where createSchema() would omit primary keys sometimes.
...
Fix missing primary key SQL when using the primary flag + other indexes.
Fixes #3292
2012-10-22 20:46:10 -04:00
Jose Lorenzo Rodriguez
c00d58b4ef
Fixed problems with resetSequence() not using the correct sequence name
...
in postgres
2012-10-21 16:32:52 +02:00
mark_story
0b0b361e48
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php
2012-10-20 20:48:11 -04:00
mark_story
08556ab879
Fix saveAssociated() with validate=first, atomic=false
...
When using the above options & validation errors on the associated
models, saving would not be aborted.
Fixes #3285
2012-10-20 15:12:05 -04:00
mark_story
888b1f4795
Fix issue with using contain() and query[contain]
...
When contain() and query['contain'] = array(...) were used together
the query['contain'] values where not respected.
Fixes #3287
2012-10-20 14:51:52 -04:00
mark_story
1aea9ac0c9
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/Event/CakeEventManager.php
lib/Cake/VERSION.txt
lib/Cake/View/ViewBlock.php
2012-10-15 21:46:49 -04:00
Adam Taylor
4090c2e932
Remove trailing whitespace from comments
...
See http://groups.google.com/d/topic/cakephp-core/fuHTYMKVJno/discussion
2012-10-15 18:19:37 -06:00
mark_story
3e0fa0009b
Show the last 200 queries instead of the first 200.
...
Fixes #3273
2012-10-14 21:30:28 -04:00
euromark
1e2ac0b9c8
comp mod for saveAll()
...
better approach
test case to assert saveAll still behaves like previous versions
2012-10-11 14:03:59 +02:00
ADmad
f06bdde8c6
Fix docblock
2012-10-11 12:33:46 +05:30
ADmad
5de492fb25
Allow saving new records with pre specified primary key value with treebehavior.
2012-10-11 01:03:49 +05:30
Mark Story
4acc687dcd
Merge pull request #890 from dereuromark/master-not-empty-validation
...
Fix validation error domain for notEmpty
2012-10-09 14:52:11 -07:00
ADmad
33a879ff41
Fix find('count') with 'group' when result has only one group. Closes #1677
2012-10-09 10:43:27 +05:30
ADmad
a1aa73c1a2
Cache character set names
2012-10-07 21:58:49 +05:30
euromark
e85b2a072a
fix validation error domain for notEmpty
...
$this->_validationDomain for default notEmpty message
notEmpty default error message
2012-10-07 14:17:31 +02:00
dogmatic69
408e619c9f
Merge branch '2.3' into type-checks
...
Conflicts:
lib/Cake/Console/Command/Task/ModelTask.php
lib/Cake/Controller/Component/RequestHandlerComponent.php
lib/Cake/Model/Datasource/Database/Mysql.php
lib/Cake/Utility/CakeNumber.php
2012-10-01 02:08:00 +01:00
mark_story
59e948fb1b
Merge branch 'master' into 2.3
2012-09-28 21:20:24 -04:00
James Michael DuPont
2d46fc60be
Fixing undefined variable usage
...
Squash of pull request #872
2012-09-28 20:46:25 -04:00
euromark
b7f1740d2b
correcting coding-standards
2012-09-28 13:49:51 +02:00
mark_story
0fc9a2c29c
Update query building in TranslateBehavior.
...
* Reduce duplicate checks for Alias.*.
* Allow both the quoted and non quoted version of Alias.*
Fixes #3210
2012-09-25 21:01:19 -04:00
Jose Lorenzo Rodriguez
c870044262
Fixed typo
2012-09-25 17:05:41 +02:00
Jose Lorenzo Rodriguez
d5c9d97dc1
Merge remote-tracking branch 'origin/master' into 2.3
...
Conflicts:
lib/Cake/Model/Behavior/TranslateBehavior.php
lib/Cake/Model/CakeSchema.php
lib/Cake/Utility/CakeTime.php
lib/Cake/Utility/ClassRegistry.php
lib/Cake/View/MediaView.php
2012-09-25 16:36:03 +02:00