Commit graph

2226 commits

Author SHA1 Message Date
ADmad
bb767408d3 Fix cs errors 2013-01-27 23:03:06 +05:30
ADmad
04ec9dd614 Renamed AuthComponent::redirect() to AuthComponent::redirectUrl().
Closes #3268
2013-01-27 21:22:11 +05:30
ADmad
422ceaff85 Added "tel" and "email" input type guessing.
Closes #3557
2013-01-27 08:59:54 +05:30
mark_story
4af6039107 Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Console/Command/Task/ModelTask.php
	lib/Cake/Model/Model.php
2013-01-26 21:16:26 -05:00
Mark Story
1fc9641af3 Merge pull request #1089 from majna/2.3-sort-natural
Fix Hash::sort() 'natural' type fallback on PHP < 5.4
2013-01-25 18:49:16 -08:00
mark_story
ce7f85abe8 Fix Token fields being added to GET forms.
They are not used so there is not much point in appending them.

Fixes #3565
2013-01-25 15:21:16 -05:00
Mark Story
bc4db91b51 Merge pull request #864 from dereuromark/2.3-radio-multiple-between
allow between to be an array of strings

Fixes #2859
2013-01-25 12:06:55 -08:00
Majna
5250c92635 Fix Hash::sort() 'natural' type fallback on PHP < 5.4 2013-01-25 01:07:45 +01:00
mark_story
e4f241dd23 Merge branch 'pr-1075'
Merge changes in pull request 1075.
2013-01-23 21:19:53 -05:00
mark_story
0b659d513e Add tests for #3545
Fix included in GH-1075

Closes #3545
2013-01-23 21:19:37 -05:00
Mark Story
6ade91e83b Merge pull request #1083 from ceeram/2.3-pmdvars
Remove unused local vars.
2013-01-23 14:51:11 -08:00
Ceeram
16be9d4990 remove unused local vars 2013-01-23 17:22:06 +01:00
ADmad
82f34c4cb3 Don't set "required" attribute for checkboxes (unless explicitly specified).
Adding it prevents user from submitting form with checkbox unchecked when the "boolean" validation rule is specified for the field.
Closes #3560
2013-01-23 20:38:24 +05:30
mark_story
0cdef75060 Fix failing tests.
I have no idea why the updated session test was expected to fail as the
data was written to the session.

Refs #3551
2013-01-21 21:13:35 -05:00
mark_story
75495705a6 Fix Hash::get($data, '0')
Fixes #3555
2013-01-21 20:50:46 -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
773666ddad Fix coding standards and save a function call. 2013-01-17 20:34:25 -05:00
Mark Story
acc6a2645f Merge pull request #1039 from bfanger/master
Fixes an issue with urls as GET parameters
2013-01-17 17:31:59 -08: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
Mark Story
70171f5403 Merge pull request #1073 from cakephp/issue-3533
Partially revert default niceShortFormat

The changes introduced in 2.2 dramatically changed the output from 2.1, this change attempts to be a compromise between the 2.1 format and the 2.2 format.

Fixes #3533
2013-01-16 18:08:44 -08:00
mark_story
95ed471c41 Reduce duplication in code.
This will result in all tests being skipped when any of the required
models pre-exists.
2013-01-16 12:59:13 -05:00
mark_story
5a6a45d0d1 Add support for --admin to bake controller all.
I missed this when originally implementing bake controller all.

Fixes #3536
2013-01-16 12:57:18 -05:00
mark_story
ad0d6644c4 Partially revert default niceShortFormat
In 9fa531d6e3 the default niceShortFormat
was changed, which has been interpreted as a regression in #3533.

This change partially reverts the previous change and tries to strike
a balance between the old behavior and new.

Refs #3533
2013-01-14 21:12:11 -05:00
mark_story
9c29fab4a4 Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Network/Http/HttpResponse.php
2013-01-14 20:24:56 -05:00
U-Zyn Chua
bcdbdc8108 Add OK or Successful HTTP codes 200-206 to HttpResponse::isOK(). Fixes #3531 2013-01-15 09:17:24 +08:00
ADmad
d8551c49e5 Improve messages logged for exceptions 2013-01-12 11:30:25 +05:30
ADmad
676872d623 Allow AuthComponent::$unauthorizedRedirect to be an url.
Closes #3494
2013-01-12 11:25:13 +05:30
Mark Story
e7330fa585 Merge pull request #1067 from ceeram/paginatecount
Avoid calling paginateCount when there are no results.
2013-01-11 18:09:32 -08:00
José Lorenzo Rodríguez
d571b056f4 Merge pull request #1063 from ADmad/2.3-cakeplugin
Added feature to ignore include errors for CakePlugin
2013-01-11 15:13:54 -08:00
dogmatic69
bcb3eb89dc Before this change 0.00 and '0.00' are treated differently. Floats from the database are returned as the string
version while doing calculations will normally end up as floats.

This causes output differences on pages like order totals or invoices where there is a mix of calculated values
and database values.

	Number::currency(0.00, 'GBP') -> &#163;0.00
	Number::currency('0.00', 'GBP') -> 0p

Both versions will return `&#163;0.00` (or whatever 0 is configured to return).
2013-01-11 17:00:06 +00:00
euromark
11a88042bd fix doc block endings 2013-01-11 15:06:54 +01:00
Ceeram
92d9b11aee fix double semicolon 2013-01-11 11:15:15 +01:00
Ceeram
d3f9cc10b5 fix failing test 2013-01-10 18:10:24 +01:00
mark_story
7008b812be Fix string '0' not being exported correctly.
Fixes #3518
2013-01-09 23:04:58 -05:00
mark_story
735517ade1 Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/VERSION.txt
2013-01-08 22:27:17 -05:00
mark_story
e3692225ff Fix lint errors. 2013-01-08 22:26:43 -05:00
mark_story
d0d13acaf4 Merge branch 'master' into 2.3 2013-01-08 20:15:46 -05:00
mark_story
c2e087dc9b Add test for recursion issues in Hash::expand().
Refs #3080
2013-01-08 19:42:12 -05:00
ADmad
970fdca89d Added feature to ignore include errors for CakePlugin 2013-01-09 01:08:42 +05:30
euromark
a266d8bede add test case 2013-01-08 13:06:02 +01:00
mark_story
3f21d09c1d Fix radio() and boolean values.
Boolean values should be cast to integer equivalents, which allows
for correct handling of boolean columns and their string equivalents
used in form options.

Fixes #3512
2013-01-07 21:12:53 -05:00
mark_story
e132a7c856 Remove duplicated assertions.
These assertions are effectively duplicated in the next test method.
2013-01-07 21:00:14 -05:00
mark_story
6d743971e9 Consistently inflect theme names.
Themes should be consistently converted into CamelCase, this
makes the camelization consitent with the treatment in App::themePath().

Fixes #3508
2013-01-03 21:06:46 -05:00
mark_story
75f654b87b Fix double encoding in JsHelper request methods.
The urls were being HTML & URL encoded, this causes issues with URL's
containing query string parameters.  Remove HTML entities as they aren't
required in the Javascript context.

Fixes #3495
2013-01-02 23:09:37 -05:00
mark_story
83abced287 Add tests for save() and multiple locales.
Refs #3498
2012-12-29 11:57:52 -05:00
mark_story
4c98e39c1f Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Controller/Component/SecurityComponent.php
2012-12-29 11:44:59 -05:00
mark_story
1117ad2f1c Blackhole requests when the action is the blackhole callback.
When a user requests the blackhole callback as an action we should
blackhole that request. The blackhole callback should not be URL
accessible.

Fixes #3496
2012-12-29 11:43:06 -05: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
ADmad
fd16b8a1e5 Throw exception if requested page number is out of range.
Closes #3459
2012-12-28 01:37:25 +05:30
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
Jose Lorenzo Rodriguez
9cc4371246 Revert "Merge pull request #1050 from rynop/2.3"
This reverts commit f3f1e1ab52, reversing
changes made to 9fc4678fa3.
2012-12-27 13:55:25 +01: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
Ryan
1881ff1664 Fix testClear() case
After clear of memcache config, all keys should be gone. So a read on a key should return false.
2012-12-26 16:34:23 -06:00
ADmad
367463f4c1 Added disabledTag option.
Closes #3108
2012-12-24 20:48:44 +05:30
euromark
b811afbc44 double spaces to single ones 2012-12-22 23:48:15 +01:00
José Lorenzo Rodríguez
a8bd7c6678 Merge pull request #961 from dereuromark/2.3-unify-object-collection
2.3 unify object collection
2012-12-22 14:24:26 -08:00
ADmad
fce07bd5b8 Fix failing test 2012-12-23 03:32:25 +05:30
José Lorenzo Rodríguez
29f6e13a28 Merge pull request #1007 from dereuromark/2.3-response-charset
not just json should send the charset
2012-12-22 14:00:58 -08:00
José Lorenzo Rodríguez
9f5549a7eb Merge pull request #1037 from ADmad/2.3-formhelper
Added "required" attribute to input element based on validation rules fo...
2012-12-22 13:51:40 -08:00
ADmad
a340c19c08 Added support for php.ini style values 2012-12-23 02:25:59 +05:30
Bob Fanger
13dc397172 Added unittest for REQUEST_URI with multiple FQDNs. 2012-12-21 19:59:55 +01:00
ADmad
8ef2c22c29 Added "required" attribute to input element based on validation rules for field 2012-12-21 23:20:40 +05:30
Bob Fanger
b7b6859c27 Fixes corrupted CakeRequests when a $_GET value contains "://" 2012-12-21 16:12:51 +01:00
euromark
910e21e65e a few more application contents should send the charset
adding content type tests as dataprovider
2012-12-21 12:32:32 +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
ADmad
d16a9ab98e Fix error when no model scope is set 2012-12-20 02:32:24 +05:30
mark_story
7ad11f59bb Change line length in emails.
Use LINE_LENGTH_MUST instead of LINE_LENGTH_SHOULD. This
fixes a number of text wrapping issues caused by the narrower wrap
length.

Fixes #3151
Fixes #3473
2012-12-17 20:54:38 -05:00
Vinícius Krolow
00ea427383 When you are showing a related model field in paginator sort it will display more friendly. eg: $this->Paginator->sort('Text.label') will retorn as Text Label 2012-12-17 01:55:03 -02: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
Mark Story
408f9dd3b0 Merge pull request #1018 from dereuromark/2.3-postlink-target
Put target attr on correct element when using postLink()
2012-12-15 06:58:14 -08:00
dogmatic69
2266292594 fixing bug in Hash where array is not similar to the path required 2012-12-14 22:45:52 +00: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
euromark
ae7f629eff correct target attribute for postLinks 2012-12-12 11:23:41 +01:00
mark_story
b20f6e132d Add test for options with 0 value. 2012-12-10 22:10:00 -05:00
Ceeram
a8eca60fc5 fix coding standards 2012-12-10 17:40:12 +01:00
Ceeram
a15481bbe9 starting refactor Form->input 2012-12-10 10:51:39 +01:00
mark_story
2a8ebcea60 Exclude value attribute from generated file inputs.
Having a value attribute present causes HTML validation errors in HTML5
doctypes. It has no effect in other doctypes, and excluding it is always
valid.

Fixes #3440
2012-12-09 13:31:01 -05:00
mark_story
1e49be3472 Fix stack traces not being highlighted correctly.
Fixes #3439
2012-12-08 20:48:45 -05:00
mark_story
b1aa75bec0 Fix coding standards. 2012-12-07 22:06:15 -05:00
mark_story
8b0a7ee13d Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/VERSION.txt
2012-12-07 20:53:10 -05:00
dogmatic69
85de93a4a7 fixing issue where merge is renumbering array keys 2012-12-07 01:26:14 +00:00
euromark
881127ef4d unify new lines at the end of the file 2012-12-05 15:00:24 +01:00
mark_story
002700071d Fix incorrectly quoted fields when using the || operator.
Fixes #3404
2012-12-02 20:59:56 -05:00
Saleh Souzanchi
d5283af818 fixed utf-8 pattern in router option 2012-12-02 16:30:45 +03:30
Jose Lorenzo Rodriguez
c1551d9828 Merge branch 'master' into 2.3 2012-12-02 00:34:55 +01:00
Jose Lorenzo Rodriguez
da4fdbac3a Fixing failing test case 2012-12-02 00:34:26 +01:00
Jose Lorenzo Rodriguez
0f5fa290ed Merge remote-tracking branch 'origin/master' into 2.3 2012-12-01 23:19:53 +01:00
José Lorenzo Rodríguez
99e84b8a08 Merge pull request #930 from LiquidityC/2.3_3315_viewblock_startifempty
Added: View::startIfEmpty($name)
2012-12-01 14:06:55 -08:00
José Lorenzo Rodríguez
dfb154464e Merge pull request #994 from dereuromark/2.3-missing-elements
make View trigger notice if elements are missing.
2012-12-01 13:38:54 -08:00
José Lorenzo Rodríguez
dc370826af Merge pull request #918 from bar/2.3-form-empty-error
Calling Form->input() with 'errorMessage'=> false should trigger field error, but not render error element.
2012-12-01 13:09:35 -08:00
mark_story
479aefc438 Update TLD validation to accept gTLD variations
The upcoming gTLD extensions will allow much more variety in TLD names.
Loosen the validation to better accept different length TLDs.

Fixes #3414
2012-11-30 22:11:57 -05:00
mark_story
889c1ebc09 Fix sorting empty data with Hash & Set.
Fixes #3420
2012-11-30 13:05:14 -05:00
euromark
e1e4d93134 make View trigger notice by default if elements are missing
and add elementExists() method
2012-11-30 14:11:45 +01:00
ADmad
4a6ebaa07b Added Helper::$settings 2012-11-30 12:19:40 +05:30
ADmad
1de8ed18de Avoiding specifying 'maxLimit' too when setting 'limit' greater than default 'maxLimit' in code. 2012-11-30 11:26:10 +05:30
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
mark_story
35d67bf4a8 Merge branch 'master' into 2.3 2012-11-28 21:00:30 -05:00
mark_story
966c69cb98 Fix missing plugin parameters in scaffolding.
Add missing plugin parameter to scaffolded associations.
This improves link generation and correctness overall.

Fixes #3396
2012-11-27 21:59:06 -05:00
Schlaefer
94a17d40da fix ticket 3400: url string with # in it is not routed
See: http://cakephp.lighthouseapp.com/projects/42648/tickets/3400-url-string-with-in-it-is-not-routed
2012-11-26 16:43:47 +01:00
mark_story
739982addb Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/View/Helper.php
2012-11-25 23:33:16 -05:00
mark_story
1f35d82c81 URL encode image/script/css/video paths.
Properly urlencode urls used in HTML attributes. This solves issues with
invalid HTML being generated when paths contain special characters.

Fixes #3395
2012-11-25 23:31:22 -05:00
mark_story
869d556d07 Fix typos & strict errors. 2012-11-24 22:42:14 -05:00
mark_story
3ba2db738f Re-work MediaViewTest
it was duplicating many of the tests in CakeResponse, and missing a
few of the cases in MediaView itself.
2012-11-24 16:29:39 -05:00
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
e04e0a0ec8 Use non-mocked methods for tests
This makes reducing off by 1 second errors much easier.
2012-11-24 13:34:12 -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
mark_story
0d29861423 Fix order for finds
This should solve more occasional errors in postgres on travis.
2012-11-21 21:52:23 -05: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
mark_story
587c7071b4 Fix incorrect order of arguments when added out of sequence.
Fixes #3385
2012-11-20 22:42:44 -05:00
Mark Story
04d4abfa53 Merge pull request #965 from frederikweber/patch-1
Send charset in Content-Type when Content is JSON.
2012-11-19 17:08:57 -08:00
ceeram
4611c987db Merge pull request #959 from ceeram/phpcsw
Make phpcs pass
2012-11-19 15:10:47 -08:00
mark_story
fb275c5fa2 Fix warnings from file_get_contents() in Xml::build()
Use HttpSocket to get proper exceptions when trying to load XML from
remote servers.

Fixes #3379
2012-11-19 14:46:45 -05:00
mark_story
6b4afb989e Fix Set::merge() failing to merge correctly.
When merging 3 values, and the 2nd was empty, the resulting
merge was incorrect.

Fixes #3384
2012-11-19 14:03:03 -05:00
ADmad
165035faa8 Merge pull request #963 from sarce/paginator-tag
prev() and next() methods of PaginatorHelper now possible to place the 'tag' option to 'false' for disable the wrapper.
2012-11-18 22:41:10 -08:00
frederikweber
58df515a6d Add test for Content-Type JSON and charset. 2012-11-18 23:44:37 +01:00
Linus Probert
d6bf0dc003 Added additional test for View::startIfEmpty($name) 2012-11-18 16:30:47 +01:00
Nicolas
a77e46cbfd Added accidentally removed tests back in. 2012-11-17 23:14:40 +01:00
mark_story
c504fcfdf0 I'm a tool, fix test and remove debug(). 2012-11-17 14:57:03 -05:00
mark_story
a3ddff4aa7 Fix failing test & simplify code. 2012-11-17 14:51:57 -05:00
Mark Story
c752b75904 Merge pull request #958 from planardothum/feather
Frameworks compatible Breadcrumbs.
2012-11-17 11:23:43 -08:00
Nicolas
1b704fb7cf Unit tests added. 2012-11-17 19:34:02 +01:00
Sebastián Arce
d0d15701b3 prev() and next() methods of PaginatorHelper now possible to place the 'tag' option to 'false' for disable the wrapper. 2012-11-17 15:26:08 -03:00
Mark Story
26e31848c6 Merge pull request #954 from rhelms/feature/2.3-mock-model
Add CakeTestCase::getMockForModel convenience method

Fixes #3364
2012-11-16 10:03:35 -08:00
Ber Clausen
1c281c9a2b Calling Form->input() with 'errorMessage'=>false should trigger field
error, but not render error message (HTML element).
2012-11-16 15:02:01 -03:00
planardothum
4351b78639 Change more spacing issues. 2012-11-16 06:39:13 -05:00
euromark
8acdb129b2 unify object load/unload and loaded methods 2012-11-16 12:14:28 +01:00
planardothum
bed9ba22cc Fix spaces around operators. 2012-11-15 20:15:49 -05:00
Ceeram
6d0e32e642 fix coding standards, remove break after return/continue 2012-11-15 12:09:14 +01:00
ADmad
f7e66da6fc Fix derpness of fieldset and legend options being mashed inside $fields param array. 2012-11-15 11:22:04 +05:30
mark_story
a7f192c606 Merge branch 'master' into 2.3 2012-11-14 21:50:29 -05:00
mark_story
374631dc8c Fix skip condition. 2012-11-14 21:42:40 -05:00
mark_story
9011b42bb4 Add skip if response is invalid. 2012-11-14 21:35:58 -05:00
mark_story
58de6702bc Fix notice errors when creating fields named 0.
Fixes #3371
2012-11-14 21:27:12 -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
b48f105b3f fix tabs to spaces 2012-11-14 09:55:33 +01:00
planardothum
a0f323eb4c Add frameworks compatible Breadcrumbs.
New options in HtmlHelper::getCrumbList() to make it compatible with Twitter Bootstrap, Zurb foundation or other CSS frameworks.
2012-11-13 20:19:29 -05: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
bfbd05576b Merge pull request #947 from cakephp/2.3-http-socket
2.3 HttpSocket enhancements
2012-11-12 19:13:31 -08:00
Reuben Helms
4d87abfcdc Add CakeTestCase::getMockForModel convenience method
This method provides a convenience to create mocked models that
are still associated with fixtures and the datasource.
2012-11-13 13:07:18 +10:00
mark_story
9ef9b8b662 Remove off by a second errors. 2012-11-12 21:47:05 -05:00
mark_story
12e2e1363d Skip more tests when openssl is not enabled.
5.2 environments on travis-ci don't have openssl enabled.
2012-11-11 22:53:13 -05:00
mark_story
593cfc05d5 Skip tests if openssl is not enabled. 2012-11-11 22:28:23 -05:00
mark_story
e0586da808 Fix tests that occasionally fail on postgres. 2012-11-11 22:14:59 -05:00
mark_story
d95ef5d5e8 Fix failing tests. 2012-11-11 21:57:52 -05:00
mark_story
240c8718eb Implement SSL peer verification in HttpSocket
Use the stream API and enable SSL certificate validation. This
increases the security features of HttpSocket, and provides easy access
to the stream context options.  SSL related configuration should be
prefixed with 'ssl_'.

Refs #2270
2012-11-11 14:23:17 -05:00
mark_story
9e725641ad Add context() to CakeSocket.
This will help enable peer verification for HttpSocket later on.
2012-11-10 22:58:36 -05: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
mark_story
644d47c843 Fix ordering on another query that was failing on travis-ci. 2012-11-10 14:24:30 -05:00
mark_story
8b7b139353 Fix failing tests using chr(226) instead of unicode codes. 2012-11-09 22:32:29 -05:00
Lawrence Barsanti
a60a730e7e XmlView: configure top level element name
Allow the top level element name to be configured by setting
XmlView.RootNodeName.
2012-11-04 21:21:35 -05:00
Ceeram
aaf2d2ef71 fix remaining cs errors 2012-11-04 13:56:13 +01:00
ADmad
fa5ccf46d0 Fix coding standard errors 2012-11-04 02:52:00 +05:30
Jose Lorenzo Rodriguez
f04259d195 Fixing broken test 2012-11-03 14:51:39 +09: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
9007406b9d Fix another test that sometimes fails on travis. 2012-11-02 22:07:24 -04:00
Ber Clausen
8b2b077119 Set::flatten() fails to generate keys when 'tip' value is an empty
array.
2012-11-02 19:23:55 -03:00
mark_story
ce3aa692b5 Use set order for test that failed on travis. 2012-11-02 18:06:59 -04: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
9ce70044b0 Fix missing query arguments in array urls.
Adding documented features that previously wasn't implemented.

Fixes #3328
2012-11-02 16:46:36 -04:00
Linus Probert
03176c6c8c Added test for View::startIfEmpty($name) 2012-11-02 21:29:31 +01: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
b18550c667 fix incorrect tests 2012-11-02 12:16:32 +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
Rachman Chavik
7d844866f0 RedisEngine: authenticate connection if 'password' is set 2012-11-02 09:38:18 +07:00
mark_story
118dd8c534 Make fragile test less fragile. 2012-11-01 21:36:14 -04:00
mark_story
ddd3baf703 Fix null column errors in SQLite and Postgres. 2012-11-01 21:07:29 -04:00
ADmad
cc6b699db4 Added missing App::uses() statement. Closes #3331 2012-11-02 02:16:02 +05:30
Ceeram
0196c6f686 code optimizing and simplify _crypt(), see PR #853 2012-11-01 14:15:52 +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
mark_story
414e0a3484 Fix totally incorrect test.
TranslateBehavior should never be overlapped with real fields.
It should only be used to add fields that don't exist on the parent
table.
2012-10-31 22:51:37 -04:00
mark_story
8035b37df2 Only set $request->data with PUT/DELETE when it can be decoded.
Setting $request->data to the raw put data isn't overly useful unless it
can be decoded.  Generally $request->data is expected to be an array,
when its a string things can go funny.

Fixes #3320
2012-10-31 21:02:47 -04:00
ADmad
26d8351af4 Fixing "required" field detection again. Closes #3305 2012-11-01 05:04:37 +05:30
mark_story
b9ee4fc9f1 URL decode redirect urls.
Some servers send url encoded Location headers. Decode location headers
before processing a redirect.

Fixes #3310
2012-10-29 22:29:13 -04:00
Kyle Robinson Young
f10c669813 Code standards fixes 2012-10-29 08:14:17 -07:00
mark_story
478461d301 Merge branch 'master' into 2.3 2012-10-28 21:42:48 -04:00
mark_story
d9a3ab844f Fix another test that fails on postgres sometimes. 2012-10-28 21:16:50 -04:00
mark_story
94bd2cedcf Fix more off by a second errors 2012-10-28 16:15:20 -04:00
mark_story
ab2ce29bd6 Fix a few more tests that sometimes fail on postgres. 2012-10-28 16:11:07 -04:00
Jose Lorenzo Rodriguez
8bca041066 Revert "Fixing failing test case in RssHelper"
This reverts commit 7715689523.
2012-10-28 20:48:31 +01:00
Jose Lorenzo Rodriguez
7715689523 Fixing failing test case in RssHelper 2012-10-28 11:52:30 +01:00
mark_story
c794e295a0 Merge branch 'master' into 2.3 2012-10-27 22:50:02 -04:00
mark_story
667dfd308f DateTime::getTimestamp() only exists in PHP > 5.3.0 2012-10-27 22:49:43 -04: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
mark_story
e8f727fe68 Using fixed points in time.
This avoids lulz when the United Kingdom changes change to/from DST at
a different time than your local timezone.
2012-10-27 21:12:34 -04:00
Ber Clausen
a7d9422c09 Test all empty array with assertSame() because assertEquals() does not check the type. 2012-10-26 19:21:51 -03:00
Ceeram
870d77c89e Make the test more accurate on type of result 2012-10-26 20:49:04 +02:00
Ceeram
f4f4aa4a2a Squashed commit of the following:
commit 22311a1e62934da757d53d7aecfce884f5a1ca10
Merge: fda331e d051b69
Author: Ceeram <c33ram@gmail.com>
Date:   Fri Oct 26 14:40:24 2012 +0200

    Merge branch '2.3' into currency

commit fda331eab169068763717f88838032b7c0c02c29
Author: Ceeram <c33ram@gmail.com>
Date:   Sun Oct 7 23:53:03 2012 +0200

    NumberHelper now also uses the default currency from CakeNumber, instead of default argument value

commit 967bf8e27ea2438f1972390b7ef78ae62e17a762
Author: Ceeram <c33ram@gmail.com>
Date:   Sun Oct 7 18:01:35 2012 +0200

    Adding feature to set default currency on CakeNumber, to make repetetive calls to CakeNumber::currency() more DRY
2012-10-26 19:32:39 +02:00
Ceeram
39dcb80b45 Fix failing test, find('first') now returns empty array when no record was found 2012-10-26 16:32:15 +02:00
Mark Story
a0665feac4 Merge pull request #917 from bar/master-find
Make Model::find('first') always return an array.
2012-10-26 07:00:48 -07:00
ADmad
0ddd130833 Improved "required" field detection. Closes #3305. 2012-10-26 12:58:24 +05:30
mark_story
559130b87b Try and make test less likely to fail. 2012-10-25 21:56:00 -04:00
mark_story
c359e4b689 Fix issue with array based values and interval.
Fixes #3299
2012-10-25 20:46:54 -04:00
Ber Clausen
c741f60367 Make Model::find('first') always return an array. 2012-10-25 17:57:37 -03:00
euromark
cc436146be making tests pass on windows again 2012-10-25 17:37:35 +02:00
Mark Story
555bfc32ea Merge pull request #909 from dereuromark/master-magic-input-bc
Master magic input bc

Fixes #3295
2012-10-25 07:05:31 -07:00
mark_story
83d307e545 Try to set order on more things. 2012-10-24 22:38:15 -04:00
mark_story
9e0778951a Add some fixed orders.
Hopefully this makes tests in postgres more reliable.
2012-10-24 21:27:01 -04:00
mark_story
5786245832 Fix lint error. 2012-10-24 21:21:11 -04:00
mark_story
c4b9fa6c7a Fix failing tests. 2012-10-24 21:00:56 -04: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
d2010308d4 Merge branch 'master' into 2.3 2012-10-23 20:20:52 -04:00
mark_story
3729ac1f2f Fix issue where the incorrect meridian would be selected.
When combining 12 hour format, interval and afternoon times, the
incorrect meridian would be selected.  Moving the hour math into
FormHelper::hour() makes that method generally more correct and lenient
on its input.

Fixes #3299
2012-10-23 12:47:12 -04:00
euromark
044cf60b69 move the test case to its own method 2012-10-23 16:07:43 +02:00
euromark
5064601c6f adding test case 2012-10-23 15:11:23 +02: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
d75bd48c25 Merge pull request #905 from dereuromark/2.3-ini
allow ini files to have separators between sections for better readability
2012-10-22 18:38:49 -07:00
mark_story
ed6ff92296 Remove bad test. 2012-10-22 20:55:56 -04: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
1c0c8604c8 Pushed before fxing error in test case, I suck. Refs #3291 2012-10-22 23:09:31 +02:00
Jose Lorenzo Rodriguez
9dc3b243ac Correct inflection rules for cookies, fixes fixes #3291 2012-10-22 23:07:42 +02:00
mark_story
d4631a6ead Remove bad test. 2012-10-20 21:03:38 -04: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
euromark
5a8092fc1b allow ini files to have separators between sections for better readability
dump now makes spaces between sections in init files
2012-10-18 17:20:15 +02:00
mark_story
307759516b Try to make tests less fragile. 2012-10-15 22:54:03 -04:00
mark_story
1cc82ff39f Merge branch 'master' into 2.3 2012-10-15 21:48:55 -04:00
mark_story
6d3ae3b83c Fix missed use of VERSION. 2012-10-15 21:48:36 -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
mark_story
f6c5ceb77a Use id() as VERSION doesn't exist in phpunit 3.6 2012-10-15 21:38:10 -04:00
mark_story
f89fe0e1ef Fix tests that fail in PHPUnit 3.7
Add skips for PHPUnit 3.6. Mock object expects required clones in 3.6,
but fail in 3.7 with clones.
2012-10-15 21:36:12 -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
59f84024e5 Handle REQUEST_URI with domain names properly.
Don't depend on parse_url() as it fails with corrupted urls.  Instead
use FULL_BASE_URL to prepare an absolute path.

Fixes #3270
2012-10-14 11:58:07 -04:00
ADmad
56a0eb04b7 Fix incomplete patch 61dd1098d3 2012-10-14 18:44:10 +05:30
Mark Story
7ea3ee466d Merge pull request #899 from dereuromark/2.3-more-tests
default value null makes more sense. add test cases for false.
2012-10-13 18:28:34 -07:00
ADmad
61dd1098d3 Allow specifying tag for current page number. Closes #2892 2012-10-13 12:34:00 +05:30
euromark
7bf08fdcc7 default value null makes more sense. add test cases for false. 2012-10-12 16:03:05 +02:00
euromark
2dfb40bac0 remove duplicate line 2012-10-11 14:54:11 +02:00
mark_story
1110e26483 Fix 0'th index file not being copied to $_FILES.
Fixes #3256
2012-10-11 08:39:46 -04:00
mark_story
8800d7bdec Reduce duplication in test case. 2012-10-11 08:28:59 -04:00
mark_story
b1dfab87e4 Fix autoLinkUrls so it re-capture query strings.
Fixes #3296
2012-10-11 08:28:59 -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
5de492fb25 Allow saving new records with pre specified primary key value with treebehavior. 2012-10-11 01:03:49 +05:30
mark_story
57681ff115 Fix code style errors. 2012-10-09 13:20:53 -04:00
ADmad
33a879ff41 Fix find('count') with 'group' when result has only one group. Closes #1677 2012-10-09 10:43:27 +05:30
mark_story
9a66768aa4 Merge branch 'master' into 2.3 2012-10-08 13:08:58 -04:00
mark_story
72f4d4fac0 Fix issue with logging scopes
Logging scopes should be exclusive and not allow messages matching on
level alone to be logged.  By using scopes + levels you opt-in to new
behavior so grabbing all messages by level should not occur.

Fixes #3264
2012-10-08 12:57:02 -04:00