Commit graph

965 commits

Author SHA1 Message Date
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
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
mark_story
ecf5aec1ae Add '@' to the list of characters removed from radio/checkbox ID.
This character can easily show up in email addresses and can cause
invalid HTML.

Refs #2733
2014-02-02 21:20:31 -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
a7f50e0ce7 Using sprintf to convert number into non-scientific notation 2014-01-30 19:07:23 -03:00
Walter Nasich
43604f64d5 Rendering a proper value for html5 attribute 'step' 2014-01-30 17:17:50 -03:00
ADmad
c093804b35 Merge branch 'master' into 2.5 2014-01-26 17:39:50 +05:30
Giampaolo Falqui
ef08534460 Improves next() and prev() documentation
Adds the explanation for the URL available option, which is really useful when dealing with non-default CakePHP routes, now lacking from the official documentation.
2014-01-26 11:38:11 +01: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
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
euromark
a02ab67521 unify exception and error handling. 2014-01-03 12:42:52 +01:00
mark_story
3cee3b0e99 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/VERSION.txt
2013-12-30 21:28:22 -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
mark_story
a7ecf44007 Deprecated scaffold and scaffoldview.
They have already been removed in 3.0, so mark them accordingly.
2013-12-20 14:16:44 -05: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
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
euromark
8ebf004450 Also make DOM ids for radio element values unique. 2013-12-04 02:14:08 +01:00
euromark
587a04ab84 prevent possible XSS attack via form helper selects and unescaped output. 2013-12-04 01:51:39 +01:00
euromark
aae0f762dd Collision free approach to resolve the DOM ID issue in a clean way. Fix to generation of ids for multiple checkboxes. Resolves ticket 4064. 2013-12-04 01:30:57 +01:00
mark_story
8578708e76 Merge branch 'master' into 2.5 2013-12-01 21:37:37 -05:00
mark_story
a9ca1bdc58 Add tests and fix other cases where autoLinkEmail would fail.
Refs #2403
2013-11-29 22:57:43 -05:00
mark_story
7c66d0db50 Fix autoLink() when URLs contain email addresses.
Add whitespace lookbehind to ensure the email address is preceded by
whitespace, this obviously means that emails starting with word/symbols
are not detected, however those symbols are generally valid in an email
address anyways, and will form the local part.

Fixes #2403
2013-11-29 22:24:03 -05:00
ADmad
155c7585e0 Fixed docblock 2013-11-29 00:14:43 +05:30
mark_story
3b8208be2e Merge branch 'master' into 2.5 2013-11-18 21:49:13 -05:00
Matheus Pedroso
4677ddf490 Fix duplicated webroot path on HtmlHelper::meta('icon'). 2013-11-18 23:38:01 -02: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
a07608cbb9 Fix incorrect CSRF token fields when using postLink()
Creating a postLink after creating a GET form would result in the
incorrect fields being generated.

Fixes #2308
2013-11-11 21:56:55 -05:00
mark_story
3561929be7 Merge branch 'master' into 2.5 2013-11-10 21:53:09 -05:00
mark_story
8d38861a2e Fix missing HTML encoding on URL's generated by Html->meta().
The input URL was not correctly handled as an asset URL and thus was
not correctly HTML or URL escaped. This created invalid HTML when
favicon URLs included query string arguments.

Refs #2233
2013-11-09 14:31:09 -05:00
ADmad
d647fe8a91 Added buffering of form tags generated by FormHelper::postLink() 2013-11-03 23:11:11 +05:30
mark_story
afd182898f Merge branch 'master' into 2.5 2013-11-01 16:54:57 -04:00
Bryan Crowe
94d7ac1dd6 Correct spelling of retrieve 2013-10-30 23:13:07 -04:00
mark_story
aaac360833 Merge branch 'master' into 2.5 2013-10-30 14:58:20 -04:00
mark_story
525efcb808 Remove use of deprecated constants.
Fixes #2232
2013-10-29 17:49:16 -04: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
Marc Würth
39cd7565ef Throw an exception when starting a view block twice 2013-10-26 03:35:12 +02:00
José Lorenzo Rodríguez
45bd01fdc0 Merge pull request #2132 from dereuromark/2.5-paginator-sort
Ability to use PaginatorHelper::sort() with only one direction.
2013-10-24 05:40:42 -07:00
Bryan Crowe
a943ea5c34 Add space between classname(s) 2013-10-22 22:59:50 -04:00
Bryan Crowe
d39ced8381 Correct 'an URL' to 'a URL' in docblocks 2013-10-22 00:09:34 -04:00
mark_story
e27e887707 Deprecate features being removed in 3.0 2013-10-21 16:55:21 -04:00
euromark
def015108d Ability to use PaginatorHelper::sort() with only one direction. 2013-10-19 12:44:50 +02:00
Cameri
bb33d52cc6 Added 'xhr' as callback in JqueryEngineHelper::request() so it formats as Javascript. 2013-10-17 18:26:39 -04:00
Marc Würth
fcb7f86b76 include calls without parentheses
Refs https://github.com/cakephp/cakephp/pull/1698/files#r6748085
2013-10-16 01:40:45 +02:00
Marc Würth
bf8a13a77c Added binary type to field type map, defaulting to file input field
Refs  https://github.com/cakephp/cakephp/issues/2071
2013-10-15 22:25:51 +02:00
Bryan Crowe
f9435aff27 Add missing return tags 2013-10-14 22:43:17 -04:00
Mark Story
ce74153389 Merge pull request #1691 from uzyn/2.5-decimal
Add support for decimal type in Schema.

Fixes #3171
2013-10-14 08:36:15 -07:00
Jose Lorenzo Rodriguez
df549898ad Merge remote-tracking branch 'origin/2.5' into k-halaburda-master 2013-10-12 01:05:02 +02:00
Bryan Crowe
c1dd0e4393 Changed url to URL where appropriate 2013-10-07 23:17:58 -04:00
mark_story
60b0893c79 Merge branch 'master' into 2.5 2013-10-06 23:49:32 -03:00
ADmad
aa60b8791a Fixed setting "required" attribute for file input. Closes #4124
In general fixed the issue where enabling SECURE_SKIP for a field
skipped "required" attribute check altogether. Instead now "required"
is set to false for hidden fields by default.
2013-10-04 20:35:38 +05:30
euromark
eb98770304 Remove leftover of pageTitle. 2013-10-04 00:35:56 +02:00
U-Zyn Chua
4806d09d7e Setting of step for decimal field based on precision. 2013-09-29 22:44:50 +08:00
U-Zyn Chua
091658a752 Decimal support for FormHelper. 2013-09-29 22:40:35 +08:00
mark_story
5e9b22271a Merge branch 'master' into 2.5 2013-09-27 22:26:33 -04:00
euromark
df269ba0ef Cake to CakePHP name 2013-09-27 19:36:43 +02:00
euromark
bd87ef45f2 complete autoLinkEmail() 2013-09-27 15:01:46 +02:00
euromark
205f7a504b also fix autoLinkEmail() 2013-09-27 14:56:53 +02:00
euromark
2a954b6095 Make TextHelper::autoLink() work properly with umlauts. 2013-09-27 14:48:57 +02:00
mark_story
cc5795c67d Merge branch 'master' into 2.5 2013-09-26 10:07:10 -04:00
Bryan Crowe
915b51b239 Updated JavaScript casing and JsHelper references in doc blocks 2013-09-25 22:46:38 -04:00
euromark
2455af09c5 Resolves ticket #4100 2013-09-25 14:01:35 +02:00
mark_story
d2577fac60 Merge branch 'master' into 2.5 2013-09-21 20:01:50 -04:00
Bryan Crowe
24a522f972 Updated doc block for JsonView's subDir property 2013-09-17 20:25:32 -04:00
Bryan Crowe
878e599976 Corrected some grammar in the JsonView class doc blocks 2013-09-17 20:15:18 -04:00
mark_story
a7a6fcae8a Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/VERSION.txt
2013-09-17 10:11:24 -04:00
euromark
12f2f729c8 more cs 2013-09-17 14:53:07 +02:00
euromark
382f75dbfc cs corrections, bool to boolean and int to integer. 2013-09-17 14:44:34 +02:00
mark_story
5ec9b145bf Fix label element for attributes not matching their inputs.
Radio elements would contain ModelModelFieldValue instead of
ModelFieldValue like they should. This was caused by the fix for #3936
and lack of tests for create() + radio().

Fixes #4071
2013-09-16 22:38:28 -04:00
mark_story
a2bd91638e Merge branch 'master' into 2.5 2013-09-12 19:47:13 -04:00
euromark
a796b26f13 fix renderLayout and update deprecated and outdated code 2013-09-13 00:09:31 +02:00
Simon Males
8311a16ebd Accurate description of what is returned 2013-09-11 22:28:09 +08:00
Simon Males
0c3197a435 View::get() to support a fallback param 2013-09-11 11:10:27 +08:00
Ber Clausen
c3ee9a2058 JsonView should return null if no data is set, regardless of the type of '_serialize'.
It should also honor true/false/0/'' values.
2013-09-07 02:38:52 -03:00
mark_story
3c9500a3cb Fix whitespace error. 2013-09-05 10:21:24 -04:00
Mark Story
f191ff017b Merge pull request #1597 from aread22/master
Potential Fix for LightHouse Ticket #3936

Fixes #3936
2013-09-05 07:20:48 -07:00
aread22
cb056a5cbe Use FormHelper->label instead of HtmlHelper->useTag
Implementing suggested fix by mark_story
2013-09-04 13:32:36 -04:00
mark_story
229c824da6 Remove a default helper from View.
This goes back to the days of yore and combined with
b8320fdbb7 it causes issues. The specific
issue at hand was testing a helper that uses other aliased helpers
(HtmlHelper specifically). The core helper would always be loaded
instead of the aliased one.
2013-09-01 21:39:59 -04:00
aread22
4ab1c8c225 Format to CakePHP code sniffs 2013-09-01 21:08:17 -04:00
aread22
64bb74a7e8 Potential Fix for LightHouse Ticket #3936
I believe I found a fix for this issue. I am here at #CakeFest2013 and during the #HourOfContribution I ran across this issue.

Currently in CakePHP 2.4 on Line 1522 - 1524 you can see the following code:

@@@ php
if ($label) {
	$optTitle = $this->Html->useTag('label', $tagName, '', $optTitle);
}
@@@

The $label variable here the is the $label array passed into the input method in Sethathi example above. The problem is that the $label array is completely ignored and instead a label is created using the HtmlHelper->useTag method.

I have what I believe is a fix for this issue but it hasn't been extensively tested. I tested against Sethathi example in the ticket and it produced the correct result.

The fix is simple. We detect if an array is passed in and then send it to the FormHelper label method instead of the HtmlHelper useTag method. The FormHelper label methods accepts an options array, so we pass in the $label array.

This will probably need to be fixed for checkbox also

"ask":https://cakephp.lighthouseapp.com/users/235987 helped me with this fix
2013-09-01 20:56:44 -04:00
mark_story
94b602b684 Merge pull request #1456 'fix-for-3515' into 2.4
Conflicts:
	lib/Cake/Test/Case/View/ViewTest.php

Fixes #3515
2013-08-30 15:27:49 -04:00
mark_story
c03edd9d1a Don't load Helpers in dataviews when _serialize is set.
Loading helpers when they aren't going to be used is wasteful.
2013-08-28 15:47:44 -04:00
mark_story
b8320fdbb7 Load helpers at View construction.
Loading helpers earlier in View's lifecycle allows for the removal of
many duplicated code segments and a now useless property. It slightly
modifies how View behaves in a test case, but that issue is easily
remedied by calling loadHelpers() a second time.

This primarily fixes issues where helpers may not be loaded in View
subclasses if they override any of View's methods. This is particularly
problematic when aliased helpers are involved.

Refs #4030
2013-08-28 12:27:07 -04:00
euromark
361980fade remove code, class names and paths from translation strings. 2013-08-21 00:05:53 +02: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
3244b9e3d7 Merge branch 'master' into 2.4 2013-08-16 14:47:01 -04:00
euromark
6cf147e8c8 unify null checks - avoid method call in favor of strict check 2013-08-16 20:12:49 +02:00
dmromanov
56ef44f495 Excluded method names from several tanslation strings
Removed unnecessary sprintfs
2013-08-16 13:42:28 +04:00
dmromanov
aa7c912c15 Removed concatenations in gettext $msg param. Closes #3986. 2013-08-15 03:15:35 +04:00
dmromanov
a0b9d5fe8b Removed trailing space 2013-08-15 01:36:51 +04:00
Andras Kende
d84a2d9419 removed $i variable, it not being used...
removed $i variable, it not being used...
2013-08-14 02:16:46 -07:00
Mark Story
6c22faa372 Merge pull request #1512 from aleho/2.4
Correctly encode confirm handlers
2013-08-13 20:08:40 -07:00
dmromanov
64251b6bd6 Corrected translation string 2013-08-13 21:31:40 +04:00
Alexander Hofbauer
80e589f19d Correctly encode confirm handlers
With encode set to false the onclick handler will be sent through
h() regardless, making links and postLinks work again.
2013-08-13 10:11:22 +02:00
euromark
f3018cc532 refactor methods to avoid else block on returning early 2013-08-12 19:06:34 +02:00
Jose Lorenzo Rodriguez
9d07fc4330 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/ShellDispatcher.php
	lib/Cake/Utility/CakeNumber.php
	lib/Cake/View/Elements/sql_dump.ctp
2013-08-11 23:31:10 +02:00
José Lorenzo Rodríguez
890d4a9e2c Merge pull request #1478 from aleho/2.4
Use a protected method to generate confirm() links
2013-08-11 13:51:29 -07:00