Commit graph

138 commits

Author SHA1 Message Date
mark_story
cbf3228c34 Fix inconsistent name/alias usage.
TranslateBehavior should always use name instead of alias when
creating/updating/saving new translate records. It already uses name
when finding translations and the mismatch was causing translations to
not be found when saved from an aliased model.

Thanks to Joost de Keijzer for providing the initial patch.

Fixes #3865
2013-06-02 13:50:23 -04:00
Marc Würth
4c9f0414cb Improved the DocBlocks and other code cleanup
Fixed @license tag, url comes first
Whitespace and other minor code cleanup
Added some docblocks
2013-05-31 00:11:19 +02:00
Simon Males
77feac9ef6 Second parameter of ClassRegistry::init() is a boolean, not a string 2013-04-22 14:06:30 +08:00
Adam Taylor
433dd09ec4 Fix typos 2013-03-05 00:05:14 -07:00
euromark
111366d5c8 == to === and != to !== where applicable 2013-02-12 03:38:08 +01:00
Graham Weldon
26a08c6780 Updated copyright 2013-02-08 21:28:17 +09:00
Graham Weldon
66d856d883 Added extra line for referencing license file for copyright 2013-02-08 21:22:51 +09:00
Graham Weldon
7b860debe4 This commit is dedicated to Mark Story, who has put in much dedicated time and effort into CakePHP over the years.
I just wanted to ruin his evening, because this change needs to be merged into CakePHP 3.0.
2013-02-08 20:59:49 +09:00
euromark
05546aff32 coding standards 2013-02-04 09:26:50 +01: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
mark_story
554d5794ce Merge branch 'master' into 2.3 2012-12-19 21:18:52 -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
ADmad
72d6ca636f Docblock fixes 2012-11-29 04:36:29 +05:30
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
mark_story
a7f192c606 Merge branch 'master' into 2.3 2012-11-14 21:50:29 -05:00
Ceeram
e02eab05d5 Remove all todo from core, create tickets for them 2012-11-14 14:59:51 +01:00
euromark
b7e75a6399 more whitespace coding standards 2012-11-14 12:36:55 +01:00
euromark
354069d229 cascade false for recover 2012-11-13 21:12:46 +01:00
euromark
22f65f7cb5 asserting that tree behavior generates valid sql in recover 2012-11-13 11:18:17 +01: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
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
euromark
0f978195d6 coding standards regarding whitespaces 2012-10-27 00:46:12 +02: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
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
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
ADmad
5de492fb25 Allow saving new records with pre specified primary key value with treebehavior. 2012-10-11 01:03:49 +05:30
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
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
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
euromark
213d4caa85 coding standards 2012-09-20 01:50:15 +02:00
mark_story
d6e2b6f83e Re-format long lines. 2012-09-14 22:08:52 -04:00
dogmatic69
22a2e1b51e converting $foo == / $foo == 0 to !$foo (and a few $foo === 0) 2012-09-14 18:42:25 +01:00
dogmatic69
cf8fccae96 converting $foo == null / $foo == false to !$foo 2012-09-14 18:26:30 +01:00
Kyle Robinson Young
bc40ac7d3f Remove unused variables and code 2012-09-05 17:19:13 -07:00
euromark
e1fbfcef00 fix contain for find method 2012-08-13 08:10:51 +02:00
mark_story
e59555a66f Merge branch 'master' into 2.3 2012-08-03 22:45:56 -04:00
mark_story
788cf52572 Fix saving empty values for translated fields with multiple locales 2012-08-03 22:40:38 -04:00
Mark Story
2728c6253e Merge pull request #728 from boast/patch-2
TreeBehavior: Changed $Model->alias . '.' . $field to $Model->escapeField($field)
2012-08-01 19:41:04 -07:00
mark_story
d94cdc67fe Merge branch 'master' into 2.3 2012-07-27 22:38:24 -04:00
mark_story
162d3bcb29 Fix whitespace errors. 2012-07-23 22:44:05 -04:00
David Thalmann
f926ae7637 Clean up string concatenations and refactored some reused strings into variables.
Refs #GH-729

Signed-off-by: mark_story <mark@mark-story.com>
2012-07-23 22:30:28 -04:00
mark_story
ed19821168 Merge branch 'master' into 2.3 2012-07-22 21:01:28 -04:00
mark_story
e6ef218600 Fix associated translations being inserted.
Due to changes introduced in [1c0b6c076a]
associated translations would incorrectly be saved with a value of ''.

Fixes #3057
2012-07-22 20:59:24 -04:00