ADmad
c093804b35
Merge branch 'master' into 2.5
2014-01-26 17:39:50 +05:30
mark_story
d7d8fc00d1
Check data with isset() before accessing it.
...
Don't blindly access data that may not exist.
Fixes #2712
2014-01-25 22:15:47 -05:00
mark_story
7e5c0f7185
Merge branch 'master' into 2.5
2013-12-20 14:15:35 -05:00
mark_story
01be15d654
Don't always wipe a Model's _schema property when calling setSource()
...
Only wipe the internal schema cache if listSources() returned a useful
list of sources. Otherwise retain the old schema. This lets datasources
that don't implement listSources to be combined with models that define
static schema properties.
Fixes #2467
2013-12-16 14:42:21 -05:00
mark_story
48d2618c62
Merge branch 'master' into 2.5
...
Conflicts:
lib/Cake/Routing/Router.php
2013-12-08 21:25:59 -05:00
Rachman Chavik
2d5a153c0d
Set 'order' to false to prevent issues with postgres
...
See: https://github.com/cakephp/cakephp/pull/2421#issuecomment-30074971
2013-12-08 16:40:22 +07:00
ADmad
f3900e89fd
Fixed bug where deleteAll tried to delete same id multiple times.
...
Ensure find done in deleteAll only returns distinct ids. A wacky
combination of association and conditions can sometimes generate
multiple rows per id.
2013-12-03 22:18:17 +05:30
mark_story
71312932e8
Merge branch 'master' into 2.5
2013-11-21 21:46:21 -05:00
mark_story
1be40d5d64
Fix coding standards error.
...
Refs #2364
2013-11-19 18:36:52 -05:00
mark_story
ec38ee1c48
Only enable cacheSources if both the datasource + model agree on it.
...
This prevents models from flipping cacheSources on when the datasource
has it disabled already.
Refs #2364
2013-11-19 17:36:20 -05:00
mark_story
99fd6e40fe
Leave db->cacheSources unaltered.
...
When a model uses cacheSources = false, it should not have side effects
on the datasource.
Fixes #2364
2013-11-19 15:06:55 -05:00
ADmad
dda6080579
Merge branch 'master' into 2.5
2013-11-19 00:27:12 +05:30
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
mark_story
3561929be7
Merge branch 'master' into 2.5
2013-11-10 21:53:09 -05:00
José Moreira
b1e366c500
Model.php PHPDoc Description: Chang afterFilter with afterFind
2013-11-10 16:59:28 +00:00
ADmad
d9ca148499
Merge branch 'master' into 2.5
...
Conflicts:
CONTRIBUTING.md
lib/Cake/Model/Model.php
lib/Cake/VERSION.txt
2013-10-30 02:34:09 +05:30
Mark Story
ea0c66e713
Merge pull request #2187 from bar/model-optimizations
...
Optimize conditionals and reduce lookups.
2013-10-24 14:09:47 -07:00
Marc Würth
3773311cc0
Normalized associated models in unbindModel.
...
Resolves #1764
Had to cast $models to an array since ``Hash::normalize()`` doesn't support strings which ``Set::normalize()`` does (but which is deprecated).
Reused existing tests.
2013-10-24 15:28:31 +02:00
Ber Clausen
1fbe9c0021
Optimize conditionals and reduce lookups.
...
Also, make the code easier to read removing unneded indentations.
2013-10-24 10:16:55 -03:00
Marc Würth
7c07d37fb3
Some DocBlock improvements for Model.php
2013-10-24 13:05:32 +02:00
Ber Clausen
6dcfd28600
Optimize _clearCache().
...
It is cheaper to make an assignment or call strtolower() than to pluralize.
2013-10-23 22:29:42 -03:00
Bryan Crowe
a943ea5c34
Add space between classname(s)
2013-10-22 22:59:50 -04:00
Jose Lorenzo Rodriguez
df549898ad
Merge remote-tracking branch 'origin/2.5' into k-halaburda-master
2013-10-12 01:05:02 +02:00
José Lorenzo Rodríguez
99620ab58e
Merge pull request #1593 from kimegede/more-readable-code
...
More readable code
2013-10-11 15:51:28 -07:00
Bryan Crowe
4242bd4f3d
Additional Cake references to CakePHP and docblock typo
2013-10-09 19:38:16 -04:00
euromark
eb852a0247
Strict checks where applicable.
2013-10-08 20:16:55 +02:00
Schlaefer
be61a5023f
Refactors Model::_clearCache
...
- don't use mixed keys in $assoc array
- removes unnecessary strtolower on Inflector::underscore result
- return early
2013-09-28 10:16:23 +02:00
Schlaefer
99ec97bd19
performance improvements in Model::_clearCache
...
- don't empty cache twice if pluralized name is identical to underscored
- refactors for fewer function calls
2013-09-27 16:39:23 +02:00
mark_story
4ea6c158d1
Fix wording and remove trailing spaces.
2013-09-16 12:04:29 -04:00
Jerome Roethlisberger
3a4a0e54eb
Improved wording of Model::invalidFields()
...
Inspired by
http://book.cakephp.org/2.0/en/models/data-validation/validating-data-from-the-controller.html#validating-data-from-the-controller
2013-09-16 16:13:58 +02:00
Ber Clausen
0a52061d86
Update afterFind() callback signature to be PHP5.4+ compliant.
2013-09-10 14:15:01 -03:00
Ber Clausen
867d4b312d
Update afterSave() callback signature to be PHP5.4+ compliant.
2013-09-09 21:34:11 -03:00
Ber Clausen
c524645738
Update Model/Behaviors callback signature to be PHP5.4+ compliant.
2013-09-05 11:17:02 -03:00
Kim Egede Jakobsen
63dfbe55f7
Added/removed newlines to make the code more readable.
2013-09-01 12:09:14 -07:00
Kim Egede Jakobsen
09bdad6ceb
Reduce variable use/duplicate code.
2013-09-01 12:08:48 -07:00
Kim Egede Jakobsen
b64c7e3e84
Remove the $state === 'after' condition.
...
Can only be before / after.
2013-09-01 11:06:45 -07:00
mark_story
0f2d59d987
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Network/CakeResponse.php
lib/Cake/TestSuite/CakeTestCase.php
2013-08-18 23:10:08 -04:00
mark_story
675f828e16
Remove insertQuery and deleteQuery.
...
These properties were never implemented and are misleading when people
try to use them.
Closes #3997
2013-08-18 21:37:37 -04:00
euromark
6cf147e8c8
unify null checks - avoid method call in favor of strict check
2013-08-16 20:12:49 +02:00
euromark
fc2d28974b
remove undocumented code and uncessary in_array() checks + cleanup
2013-08-08 03:56:58 +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
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
c597855fe4
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Test/Case/Network/CakeRequestTest.php
2013-07-03 14:21:09 -04:00
euromark
f389435bae
coding standards and else block simplification
2013-07-03 19:27:17 +02:00
euromark
7cb19b97db
coding standards and simplification of else cases as well as some minor fixes
2013-07-03 00:52:48 +02:00
ADmad
12da3b1f27
Merge branch 'master' into 2.4
2013-06-16 13:07:44 +05:30