Commit graph

2905 commits

Author SHA1 Message Date
Rachman Chavik
e71d650ade Fix: Regression with format specifiers in i18n methods
Refs: #2589
2014-03-07 09:22:56 +07:00
mark_story
6c3bc48ce0 Merge branch 'master' into 2.5 2014-03-06 17:45:00 -05:00
Mark
3ca338fe26 Merge pull request #2781 from davidsteinsland/2.5
Fixed HTTP Status code when ajaxLogin is set
2014-03-06 12:37:51 +01:00
mark_story
5544fcc4c2 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/VERSION.txt
2014-03-03 21:20:58 -05:00
ndm2
1015b38a27 Use convenience methods to create a (case-insensitive) negation matcher 2014-03-02 17:56:35 +01:00
ndm2
70a1b87db6 Fix wrong test model association class name 2014-03-01 23:01:33 +01:00
ndm2
01e1b5ca61 Fix failing tests caused by already existing classes 2014-03-01 20:24:32 +01:00
ndm2
008ad3237c Fix verification of expected invocations #2919 2014-03-01 19:06:17 +01:00
ADmad
a707709e1d Added test for FormHelper::radio().
Tests generating radio input for field with model other than one used
in create(). Refs #2911.
2014-02-28 02:34:16 +05:30
mark_story
25f94f9b71 Add test to prove the fix made in pull/2899
Ensure that event listeners are not lost when merging the global and
local listeners.

Fixes #2897
Fixes #2899
2014-02-26 21:06:32 -05:00
mark_story
0f584c0e8b Merge branch 'master' into 2.5 2014-02-24 21:19:17 -05:00
mark_story
0776b87214 Fix postLink() & postButton() with nested data.
Flatten deeply nested array data before generating hidden inputs.
This solves 'Array to string conversion' errors.

Closes #2894
2014-02-24 21:17:31 -05:00
jalbertocr
35f152b333 Make sure a datetime instance is valid to avoid fatal errors. 2014-02-19 20:50:30 -03:00
AD7six
4e0627232c account for localized floats more robustly.
Normalize floats, strings too, so that they are validated as

    dddddddddd.dd

ref #2853
2014-02-19 15:04:25 +00:00
mark_story
b8c94fa5d4 Merge branch 'master' into 2.5 2014-02-18 22:19:12 -05:00
mark_story
0a51458ffd Fix Validation::decimal() not working with localized floats.
Use similar workarounds as DboSource::value() for accepting localized
floats.

Fixes #2853
2014-02-18 22:18:56 -05:00
mark_story
3433f4a1f0 Clean up changes code standards and tests.
Refs #2582
2014-02-17 11:03:49 -05:00
Jonas
b32deed4aa changed FormHelper::secure() and FormHelper::end() to support attributes in the hidden CSRF-protection tags that are being generated for SecurityComponent to allow specification of additional html attributes like HTML5s "form" attribute. This allows separation of Form instantiation/controls and form data - for instance within html tables
improved tests for testing against additional attributes for Form::secure()

improved tests for testing against additional attributes for Form::end()

removed array cast, fixed test

fixed docblock format

format

Fixed a bug, this won't work as some forms are just empty
2014-02-17 10:54:02 -05:00
Mark Story
c325a93998 Merge pull request #2741 from ADmad/2.5-mimetype
Added regex support to Validation::mimeType().
2014-02-17 10:10:48 -05:00
ADmad
9ae7f11a2a Made mimetype check case insensitive. 2014-02-17 11:48:00 +05:30
mark_story
cde93ca7b9 2.x needs to be compatible with PHP<5.4 2014-02-16 21:37:28 -05:00
mark_story
3919f93149 Use simpler assertions. 2014-02-16 14:37:29 -05:00
mark_story
7a4cabe5d3 Add depth to log().
Much like dump() it is handy to be able to control the depth variables
are dumped out when logged.

Refs #2834
2014-02-16 14:35:32 -05:00
mark_story
2c5d96e916 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Datasource/DboSource.php
2014-02-16 14:24:19 -05:00
AD7six
5334fe04c3 handle loose % signs in __() function
While it's passed to sprintf and translation markers may contain
variable placeholders (%s, %d) that doesn't mean translators need to be
aware of all relevant rules. A % sign in a translation message shouldn't
cause a warning (and no return) it should be handled as a literal
percent sign.
2014-02-13 15:30:16 +00:00
euromark
1725386c16 Fix uploadError validation rule to work with OS Win. Here the error is string, not integer. 2014-02-12 21:52:18 +01:00
mark_story
827dc77a11 Fix incorrect assertion. 2014-02-11 22:00:24 -05:00
mark_story
96a37d5917 Fix temporary associations that replace fields not being restored.
When binding temporary associations, fields should be restored
in the afterFind as the association will have become unbound.

Fixes #2816
2014-02-11 21:56:05 -05:00
mark_story
a5d50da040 Remove dead and unused code. 2014-02-11 16:38:24 -05:00
ADmad
9de3418079 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Permission.php
2014-02-11 18:17:59 +05:30
ADmad
bea30e62cb Renamed CakeRequest::onlyAllow() to CakeRequest::allowMethod().
Existing name is unintuitive and it's not easily apparent what
the method does. Closes #2803
2014-02-10 17:38:55 +05:30
mark_story
91349c306e Remove trailing whitespace.
Refs #2799
2014-02-09 16:03:37 -05:00
Sam
f3cd0fc808 Test added for previous fix in CakeRoute.php. Refs #2797. 2014-02-10 02:20:00 +11:00
ADmad
d9489257d3 Don't return true from view classes' render() method.
It cause's Controller:render() to set the response body as `true`.

Refs #2780
2014-02-06 03:06:00 +05:30
David Steinsland
f2b9aa5ca4 Fixed HTTP Status code when ajaxLogin is set 2014-02-05 16:05:02 +01:00
mark_story
be8ebfc005 Merge branch 'master' into 2.5 2014-02-05 09:22:46 -05:00
AD7six
adc0bf3ded BC fix for checkbox ids
Revert to previous behavior for id generation of checkboxes, This commit
can be reverted for 2.5+ is desired

Fixes #2733
2014-02-03 17:57:26 +00:00
José Lorenzo Rodríguez
e36c954da7 Merge pull request #2693 from ADmad/2.5-session-start
Don't start a session if it's known to be empty.
2014-02-01 04:08:48 -08:00
Mark Story
a6459a6c2f Merge pull request #2740 from rchavik/2.5-event-manager-regression
RFC Fix: CakeEventManager regression
2014-01-31 07:10:46 -08:00
Mark Story
405f3a1cb9 Merge pull request #2752 from rchavik/2.4-postgres-alterschema
Fix: Changing boolean to integer for Postgres
2014-01-31 06:46:52 -08:00
Rachman Chavik
35c22a291e Add test to prove Event Manager regression 2014-01-31 16:52:26 +07:00
Rachman Chavik
59549b7ebe Fix: Changing boolean to integer for Postgres
Closes #2751, CakeDC/migrations#149
2014-01-31 15:14:20 +07:00
mark_story
4d57d3ce5b Fix plugin path filtering when directories do not exist.
When paths do not exist we should correctly remove them from the output
paths.

Fixes #2748
2014-01-30 21:40:08 -05:00
mark_story
605351d0c9 Allow empty values in checkboxes.
Allow the checkbox value attribute to be empty. This is required to make
checkboxes with a value of 0.

Fixes #2717
2014-01-30 21:12:06 -05:00
Walter Nasich
43604f64d5 Rendering a proper value for html5 attribute 'step' 2014-01-30 17:17:50 -03:00
ADmad
2d10707d18 Added regex support to Validation::mimeType(). 2014-01-30 21:05:04 +05:30
mark_story
c1ab6fa9d1 Merge branch 'master' into 2.5 2014-01-30 10:13:37 -05:00
Mark Story
6eb5a38f22 Merge pull request #2692 from jrbasso/2.5-cors
Added support to cross origin requests
2014-01-29 06:45:11 -08:00
Mark Story
8db034cbf1 Merge pull request #2731 from joostdekeijzer/console-extract-not-handling-validation-quotes
Console Extract task doesn't handle validation messages with qoutes correctly
2014-01-29 06:43:23 -08:00
Mark Story
5629dfdcc3 Merge pull request #2728 from joostdekeijzer/2721-fix-in-translatebehavior
Fix Model::field() and  TranslateBehavior::beforeFind() not working together.

Fixes #2721
2014-01-29 06:40:27 -08:00
joostdekeijzer
42daa25340 Fix Console "extract i18n from sources" to handle quotes in Model::validate parameters correctly 2014-01-29 14:53:52 +01:00
joostdekeijzer
987187ef8c Fix #2721 in TranslateBehavior::beforeFind() supporting both Model::field('fieldname') and Model::read('fieldname') 2014-01-29 13:37:47 +01:00
joostdekeijzer
827c815cf1 correct property comment 2014-01-29 12:25:09 +01:00
Rachman Chavik
b83b59a9d7 Log errors instead of calling trigger_error() 2014-01-29 17:51:07 +07:00
ADmad
c093804b35 Merge branch 'master' into 2.5 2014-01-26 17:39:50 +05:30
José Lorenzo Rodríguez
ddf046a246 Merge pull request #2694 from bar/patch-3
Correctly remove routing url from query string.
2014-01-22 05:15:03 -08:00
mark_story
61dd1c3f9d Fix trailing whitespace. 2014-01-21 20:23:12 -05:00
Juan Basso
dae756c84a Added option to allowed headers 2014-01-21 15:31:05 -05:00
Ber Clausen
5b4121f643 Update tests. 2014-01-21 16:56:37 -03:00
ADmad
84932fcc4a Don't start a session if it's known to be empty.
If an app only reads/checks the session there's no need to start a
session to know that the read/checked session value is empty.

Fixes #1981
2014-01-22 01:17:16 +05:30
Juan Basso
5af3da7fe6 Changed tests to support PHP 5.2 :( 2014-01-21 10:44:00 -05:00
Juan Basso
ec7196013c Added support to cross origin requests 2014-01-21 09:44:49 -05:00
mark_story
55e1619c59 Fix issue with find(count) and TranslateBehavior.
Fixes #2667
2014-01-18 21:54:09 -05:00
Rob McVey
7a27650297 Test case that demonstrates issue with count and Translate 2014-01-18 21:49:07 -05:00
mark_story
75dd2ff1fb Merge branch 'master' into 2.5 2014-01-16 15:20:40 -05:00
mark_story
f25e84f4fb Don't select year 0 when there are all 0's.
Year 0 is almost never a 'good' selection value and causes odd behavior
when paired with MySQL.

Fixes #2658
2014-01-15 10:23:45 -05:00
Matthew Ouyang
84eb46dbdc allow additional status codes through constructor
through $options['statusCodes']
2014-01-14 11:18:57 -05:00
euromark
690f54ad9d more corrections in order 2014-01-10 00:33:27 +01:00
euromark
3ff23c732f unify and correct assert order 2014-01-10 00:18:08 +01:00
José Lorenzo Rodríguez
606362d519 Merge pull request #2636 from dereuromark/2.5-title-for-layout
Follow the deprecation note in the doc block of View class
2014-01-09 15:13:07 -08:00
euromark
97e43e5806 unify to expected 2014-01-09 16:52:21 +01:00
euromark
738b34c2d0 Correct assert param order 2014-01-09 16:50:27 +01:00
euromark
29e15386b2 Follow the deprecation note of 2.1 migration guide and switch to fetch(title)
correct assert order for test
2014-01-09 16:45:49 +01:00
mark_story
b20ca3f4e0 Fix errors with postgres tests. 2014-01-08 09:42:13 -05:00
mark_story
312b2c3cd1 Merge branch 'translate-patch' 2014-01-06 21:21:25 -05:00
mark_story
3763350667 Add test for issue #2595
Fold conditions that did the same thing and add a test case.

Closes #2595
2014-01-06 21:21:13 -05:00
euromark
ecfd64c082 adding test 2014-01-06 21:07:00 +01:00
mark_story
3cee3b0e99 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/VERSION.txt
2013-12-30 21:28:22 -05:00
Rachman Chavik
c48afae2dc Add test to prove issue when saving invalid tree data 2013-12-27 12:35:28 +07:00
mark_story
1daa27c0d7 Add tests for uncovered case of :0 replacements.
There were previously no tests for the :0, :1 style replacement markers
in DboSource. In fact I didn't even know it was a 'feature'.
2013-12-24 13:13:05 -05:00
Mark Story
1cb7e4f0ff Merge pull request #1635 from dereuromark/master-dom-ids
Fix duplicate ID generation of for multiple checkboxes.
2013-12-24 07:02:38 -08:00
euromark
b392254c92 fix cs 2013-12-24 15:20:32 +01:00
mark_story
99e4dbd827 Merge branch 'master' into 2.5 2013-12-23 11:58:07 -05:00
mark_story
70530135d6 Don't use FORWARDED_HOST when getting referer values.
HTTP_X_FORWARDED_HOST is supposed to be used by proxies to indicate the
original HTTP_HOST value. It has nothing to do with referer values.

Since the HTTP_X_FORWARDED_HOST is intended to replace the HOST header
in proxied setups, add a trustProxy parameter to host() and default it
to false. This maintains existing behavior and allows people to access
the proxied value.

Fixes #2537
2013-12-23 11:32:14 -05:00
mark_story
62e89734ab Throw exceptions from Hash::combine()
When the key + value counts do not match Hash should throw an exception.
Silently doing the wrong thing is generally not a good idea. While this
change could break existing applications, those applications were
probably behaving incorrectly anyways.

Fixes #2470
2013-12-21 17:46:05 -05:00
José Lorenzo Rodríguez
60d2ece035 Merge pull request #2506 from dereuromark/2.5-string
Correct tokenize for empty strings.
2013-12-21 10:31:52 -08:00
mark_story
7e5c0f7185 Merge branch 'master' into 2.5 2013-12-20 14:15:35 -05:00
mark_story
5bddc477a3 Fix incorrectly handled time values around 12:00:00
When using 12 hour formats & intervals, values around 12:00 were
incorrecly converted to midnight.

Fixes #2507
2013-12-19 17:36:27 -05:00
euromark
3ecce19732 Correct tokenize for empty strings. 2013-12-19 15:58:08 +01:00
Saleh Souzanchi
bbbf3076ab undo remove end line break 2013-12-19 00:36:20 +03:30
OKINAKA Kenshin
3433e10fbd Fix Postgres for bigint primary key. 2013-12-18 14:58:18 +09:00
Saleh Souzanchi
4639d3597c add DispatcherFilter Settings 2013-12-18 06:54:27 +03:30
ADmad
49a9d24ca7 By default use filter_var() to valid email addresses in CakeEmail.
Refs #2477
2013-12-18 01:07:40 +05:30
mark_story
30e139412d Fix input type inference when type=>checkbox
FormHelper should not infer types when the explicit type is checkbox.
Instead the provided type should be used.

Fixes #2491
2013-12-16 23:26:20 -05:00
ADmad
27979286b2 Revert change done in 11f543f1f2.
The change is unneeded now as Security::encrypt() no longer throws exception
for falsey values.
2013-12-15 20:29:41 +05:30
ADmad
8a666fb37e Don't throw exception when trying to encrypt falsey value. 2013-12-15 19:28:56 +05:30
mark_story
e15d1652ed Relax the 'my' and 'ym' date validation formats.
All other formats that include 'y' allow 2006 or 06. These formats are
now conformant with the other formats available.

Closes #2436
2013-12-14 23:02:12 -05:00
Mark Story
bf96ea36d9 Merge pull request #2482 from zoghal/2.5-cookie-fix2
fix CookieComponent - when write null or empty string
2013-12-14 16:21:58 -08:00
mark_story
c2b8778ce8 Merge branch 'master' into 2.5 2013-12-14 17:45:49 -05:00
Saleh Souzanchi
11f543f1f2 fix CookieComponent - when write null or empty string 2013-12-15 02:15:36 +03:30