Commit graph

1194 commits

Author SHA1 Message Date
Highstrike
8257100f54 How about this? 2015-06-24 15:46:48 +03:00
Highstrike
ef1fc7dfef PHPCS 2015-06-24 15:18:57 +03:00
Highstrike
833c747b41 Test append PR to Issue
This commit fixes #6874
2015-06-24 14:18:14 +03:00
Highstrike
7cdf19363d Tab instead of space
IDE preference
2015-06-24 14:09:32 +03:00
Highstrike
58983f717a 2.7.0-RC Auth doesn't use the new Flash component
Changed 'Flash.' to 'Message.' and also provided backwards compatibility
in FlashHelper->render
2015-06-24 14:06:35 +03:00
Mark Scherer
6e5381a4e3 Cleanup method calls. 2015-06-20 23:27:32 +02:00
mark_story
664ba53c89 Merge branch '2.6' into 2.7 2015-06-20 10:03:14 -04:00
Mark Scherer
1d03d5bd59 Consolidate template whitespace 2015-06-20 05:10:35 +02:00
mark_story
705f44e30a Fix regression where attributes were created with no whitespace. 2015-06-19 22:00:27 -04:00
Mark Scherer
7dedf7f86d Refactor cleanly. 2015-06-17 11:38:42 +02:00
Mark Scherer
2d7487d33c img tag needs manual space 2015-06-17 11:34:03 +02:00
Mark Scherer
51d75bc2be Remove overhead whitespace in templates. 2015-06-17 11:04:04 +02:00
Mark Scherer
ccac3b3e06 Allow deep options for radio() just as for select(). 2015-06-16 13:23:51 +02:00
mark_story
d7d8b90986 Merge branch '2.6' into 2.7 2015-05-28 19:34:59 -04:00
Mark Scherer
29747995dc Add missing minimizable HTML attributes 2015-05-18 18:10:02 +02:00
Mark Scherer
4915e802c1 Fix tableCells() 2015-05-02 16:52:51 +02:00
Mark Scherer
ed21f84236 Backport _xmlOptions 2015-05-02 14:24:02 +02:00
Mark Scherer
adf2eb03f2 Backport jsonOptions 2015-04-30 15:51:13 +02:00
mark_story
345d8d8390 Merge branch '2.6' into 2.7 2015-04-29 19:54:53 -04:00
Mark Scherer
c31fcd6f39 Correct default value to false. 2015-04-21 14:32:34 +02:00
Mark Scherer
8cdf222cc0 Also fix hour() 2015-04-20 22:04:33 +02:00
Mark Scherer
a9ae7fd5bb Fix year form field when magic input wrapper is used.
s
2015-04-20 18:31:00 +02:00
mark_story
3151c53255 Merge branch '2.6' into 2.7 2015-03-23 22:50:09 -04:00
mark_story
744952e344 Fix FormHelper::create() dropping 0 value parameter.
When 0 is the first passed parameter we shouldn't drop it.

Fixes #6107
2015-03-19 21:15:20 -04:00
José Lorenzo Rodríguez
277f641108 Merge pull request #6064 from robmcvey/jsonView
2.6 jsonView should throw exception if json_encode fails
2015-03-18 10:01:40 +01:00
mark_story
6df7bf9c21 Fix notice errors in pagination link generation.
No errors should be emitted when creating links for models that were not
paginated.

Refs #6090
2015-03-17 22:19:17 -04:00
Rob McVey
d94e05cf76 Assert exception msg contains UTF-8
The different versions of PHP throw several various messages for UTF-8
sequences, so this just performs a basic regex check
2015-03-15 11:01:51 +00:00
Rob McVey
5002bd4dbe Use fall back json_last_error_msg 2015-03-14 09:21:15 +00:00
Rob McVey
10cfb878be fallback implementation of json_last_error_msg 2015-03-14 09:13:31 +00:00
Rob McVey
bcb6549565 add throws tag to function comment 2015-03-14 08:45:18 +00:00
Rob McVey
842cdf58f8 Don't translate errors 2015-03-14 08:34:06 +00:00
Rob McVey
3b01c5f842 suppress warnings so test runner doesn't fart 2015-03-13 16:58:29 +00:00
Rob McVey
b880714231 coding standards elseif 2015-03-13 16:27:24 +00:00
Rob McVey
08620704be Handle json_encode failure 2015-03-13 16:12:21 +00:00
mark_story
0b916cedbb Merge branch 'master' into 2.7 2015-03-09 21:55:20 -04:00
Mark van Driel
ed5da19d10 Fixed return type of toQuarter in CakeTime and TimeHelper 2015-03-02 12:08:11 +01:00
mark_story
8dba9879d4 Don't generate maxlength properties for decimal columns.
Int casting the decimal scale isn't going to work in a number of
situations as users may end up trying to include decimal points, commas
or spaces in larger amounts.

Fixes #5977
2015-02-27 21:08:54 -05:00
mark_story
63769ae4a6 Merge branch 'master' into 2.7
Conflicts:
	lib/Cake/VERSION.txt
2015-02-26 12:50:35 -05:00
mark_story
ea79cf5d13 Fix words with WWW in them being autolinked.
Don't autolink words that don't have `www.` in them.

Fixes #5968
2015-02-25 20:52:35 -05:00
Mark Story
9f1f158cc0 Merge pull request #5855 from tanuck/2.7-custom-flash-message
Backport of 3.x flash messages #5823
2015-02-14 22:07:30 -05:00
mark_story
b3c9c1615e Fix doubly linking URLs starting with //
Fixes #5889
2015-02-13 21:40:50 -05:00
mark_story
eb85a875c0 Merge branch 'master' into 2.7 2015-02-10 23:00:43 -05:00
James Tancock
1cb670bdfa Add deprecated doctag for current methods 2015-02-10 08:15:01 +00:00
mark_story
b974daac7b Don't create invalid maxlength attributes for decimal columns.
Converting the maxlength to an int avoids any commas from decimal
columns.

Refs #5832
2015-02-05 22:53:40 -05:00
James Tancock
b8b6b67abd Tests for ported Flash component & helper 2015-02-04 15:05:40 +00:00
James Tancock
2ff6bdccec Back port of Flash component & helper 2015-02-04 12:18:31 +00:00
Mark Story
35e0dc2bbd Merge pull request #5760 from cakephp/master
Merge master into 2.7
2015-01-27 20:48:15 -05:00
cake17
2c251b80af put message in cake.pot file instead of default.pot 2015-01-21 16:41:34 +01:00
mark_story
3078a1eb52 Merge branch 'master' into 2.7
Conflicts:
	lib/Cake/VERSION.txt
2015-01-16 22:22:26 -05:00
Mark Scherer
d37721ab0e Fix notice in PaginatorHelper when model params are not available. 2015-01-16 14:11:32 +01:00
mark_story
ac9a212d44 Merge branch 'master' into 2.7
Conflicts:
	lib/Cake/Utility/String.php
2015-01-11 15:25:18 -05:00
Mark Story
1fee3c030e Merge pull request #5616 from cakephp/issue-5603
Fix radio buttons not being added to security hash.
2015-01-09 15:32:44 -05:00
antograssiot
c2f298a8b7 Replace our custom code fence with markdown standard fence 2015-01-09 13:47:25 +01:00
mark_story
98909fb465 Fix radio buttons not being added to security hash.
When some but not all inputs were disabled radio buttons were omitted
from the security hash. This caused blackhole failures as the input was
unexpected.

Refs #5603
2015-01-08 23:25:34 -05:00
euromark
52ecccb1a2 App::uses and usage replacements for String => CakeText. 2015-01-05 01:00:57 +01:00
euromark
63093e1d30 More String CakeText replacements and a BC class. 2015-01-05 00:55:23 +01:00
mark_story
4cd2c8fdcb Merge branch 'master' into 2.7 2015-01-03 14:34:55 -05:00
Rob McVey
54e172b129 Regex modified to to not capture brackets
Modified the existing regex from th TLD onwards

Credit to @gruber for the regex info
https://gist.github.com/gruber/249502
2015-01-02 15:15:23 +00:00
Mark Story
7bbc3dfd90 Merge pull request #5470 from cakephp/2.7-session
Backport Session consume() to 2.x
2014-12-26 12:22:20 -05:00
mark_story
d21ae178bf Merge branch 'master' into 2.7
Conflicts:
	lib/Cake/VERSION.txt
2014-12-23 11:29:57 -05:00
euromark
545ff20e1d Add component and helper wrapper methods. 2014-12-23 03:50:35 +01:00
euromark
14073dc742 Don't send response from view. 2014-12-22 21:02:52 +01:00
mark_story
839ef73d43 Merge branch '2.6' into 2.7 2014-12-17 21:46:54 -05:00
mark_story
4d6611b328 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-12-17 21:38:32 -05:00
Walther Lalk
9be725613e Backport helper method for view blocks from 3.0
Related PR is #5385
2014-12-11 16:44:11 +02:00
euromark
f63d955f73 Add additional test. 2014-12-09 03:43:35 +01:00
euromark
dc70da9d14 Only merge the _defaults keys. 2014-12-09 03:43:35 +01:00
euromark
dc41a1ff56 Fix paginator options when disabled. 2014-12-09 03:43:34 +01:00
euromark
e1c128bb99 Consolidate with conditions sniff. 2014-12-09 03:17:35 +01:00
mark_story
ad2d6edda9 Merge branch 'master' into 2.6 2014-12-06 21:28:59 -05:00
Guy Warner
fb61d9393b Add @trigger doc blocks of methods triggering CakeEvent 2014-11-30 14:45:40 -07:00
Rachman Chavik
a37e007d9f BC fix for css() and script() with identical resource names 2014-11-19 11:20:37 +07:00
euromark
41c646c5a1 Simplification of return types. No need to return more mixed than necessary. 2014-11-08 20:07:47 +01:00
euromark
345a18f15f Merge branch 'master' into 2.6 2014-11-05 23:29:06 +01:00
euromark
768f2c809c Correct doc block return types. 2014-11-05 13:03:27 +01:00
mark_story
07c91d4b3e Merge branch '2.6' of github.com:cakephp/cakephp into 2.6 2014-11-04 22:44:28 -05:00
mark_story
48101e6bf5 Merge branch 'master' into 2.6 2014-11-04 22:44:11 -05:00
euromark
a6bd133413 Correct typos. 2014-11-02 22:41:17 +01:00
euromark
e7f76a983a Add a method for generating pagination meta links. 2014-11-02 22:29:02 +01:00
euromark
00432fa427 Show stack trace for fatal errors if xdebug is loaded. 2014-11-02 20:44:17 +01:00
mark_story
579b16d90b Merge branch 'master' into 2.6 2014-10-30 21:20:53 -04:00
mark_story
1e8f12f9f5 Bump the depth of variables in stack traces to 4.
Giving more context allows developer to look at request/response data
more easily.

Fixes #5005
2014-10-29 21:43:18 -04:00
mark_story
177b797aab Merge branch 'master' into 2.6 2014-10-26 21:25:05 -04:00
Jan Ptacek
797635d26b fixing testcases + do not disable the hidden input on partial disables 2014-10-25 21:05:37 +02:00
ptica
abb0c7cb9d Update FormHelper.php
disabled multiple checkbox input should not generate an enabled hidden input,
as it leads to saving empty data upon submission -> carrying the disabled attribute to the hidden input prevents this
2014-10-24 18:25:31 +02:00
euromark
03d92494f1 Fix maxlength for manual type set and add textarea maxlength support. 2014-09-13 04:03:33 +02:00
ADmad
3fb252ad2f Merge branch 'master' into 2.6 2014-09-13 00:37:16 +05:30
euromark
04ef39217f Take care of more int casts. 2014-09-10 16:29:23 +02:00
mark_story
734bb9223b Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Core/App.php
	lib/Cake/VERSION.txt
2014-09-06 23:04:20 -04:00
Marc Würth
67ba9cb406 Update all @deprecated annotations
to adhere to the @deprecated <version> <description> format, where version and description are mandatory.
2014-09-02 17:03:22 +02:00
mark_story
7c316bbc56 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/basics.php
2014-08-30 21:28:11 -04:00
Karma Dice
f03393a2a3 Preventing multiple iterations 2014-08-23 15:47:12 +05:30
mark_story
9c3089796f Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Model/Model.php
2014-08-08 23:28:06 -04:00
euromark
9ef7b5713a CS fixes. 2014-08-04 13:53:52 +02:00
mark_story
4e168ca004 Fix incorrect docs. 2014-08-03 20:36:31 -04:00
ADmad
c193ce708a Throw exception instead of logging in debug mode. 2014-08-03 03:16:39 +05:30
ADmad
713f430fc4 Merge branch 'master' into 2.6 2014-08-03 01:05:36 +05:30
William Notowidagdo
23954e6ad3 Update HtmlHelper.php
No need to add `null` to `$options` param as mentioned in the docs section: [Using blocks for script and CSS files](http://book.cakephp.org/2.0/en/views.html#using-blocks-for-script-and-css-files)
2014-08-01 11:22:29 +07:00
Mark Story
a6caf28ea6 Merge pull request #4122 from chinpei215/master-scaffold-error-fix
Fix a fatal error occurs in combination with a scaffold error.
2014-07-31 10:44:33 -04:00
chinpei215
f3e1a18740 Fix a fatal error occurs in combination with a scaffold error. 2014-07-31 05:49:23 +09:00
Anthony GRASSIOT
aa42b80a4d a / an typo fixes fot API 2014-07-30 22:11:03 +02:00
mark_story
3c1d3ee461 Deprecate CacheHelper.
It has been removed from 3.0 as it was a bad idea, and better solutions
have been created outside of PHP.
2014-07-27 22:20:47 -04:00
ADmad
53259cb389 Deprecate $confirmMessage argument. 2014-07-10 23:31:51 +05:30
mark_story
2bcd817367 Merge branch 'master' into 2.6 2014-07-03 11:13:06 -04:00
euromark
974ca851c2 Correct doc blocks according to cs guidelines.
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
Mark Story
187272c06a Merge pull request #3824 from NickBeeuwsaert/element_events
Added view type getter and ensured element render events would get the proper type
2014-06-28 06:21:46 -04:00
Nick Beeuwsaert
733a610bf7 More coding standard fixes 2014-06-27 18:03:29 +00:00
Nick Beeuwsaert
f9aa954562 Changed Event names back, added view type getter
Changed `Element.beforeRender` and `Element.afterRender` back to
`View.beforeRender` and `View.afterRender` Also added a getter for
`View::_currentType`.
Added more tests to make sure that things were getting reset right
And also that View::render and View::element events were working
As expected

Changed Event names back, added view type getter

Changed `Element.beforeRender` and `Element.afterRender` back to
`View.beforeRender` and `View.afterRender` Also added a getter and
setter for `View::_currentType`.
Added more tests to make sure that things were getting reset right
And also that View::render and View::element events were working
As expected
2014-06-27 15:40:12 +00:00
Nick Beeuwsaert
7cef19fe96 Changed View::element() to have an appropriately named event
And also made it so when the event fires the subjects type is
`View::TYPE_ELEMENT`. Wrote some tests which I hope are done right I
don't really know the bes way to write a test for a event listener
2014-06-25 22:08:59 -05:00
mark_story
a2673d8bf0 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Core/App.php
2014-06-25 09:22:10 -04:00
euromark
b3507b199a Update doc blocks regarding return $this 2014-06-25 00:06:51 +02:00
mark_story
497ecd3f80 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-06-19 21:41:02 -04:00
José Lorenzo Rodríguez
5f81a745c4 Merge pull request #3744 from markstory/2.6-missing-views
2.6 Improve missing view error pages
2014-06-19 20:40:02 +02:00
mark_story
8f3ce9c9c4 Filter out core paths from missing view/layout errors.
End developers shouldn't be dropping files in /lib/Cake so lets not tell
them to.
2014-06-19 10:03:00 -04:00
euromark
9c035ff315 doc block corrections 2014-06-19 13:25:36 +02:00
euromark
53a544d9f0 Improve toList to allow localization 2014-06-18 17:56:35 +02:00
mark_story
31956c2abb Remove dead code.
The list of paths is now output on the default error page, we don't need
to make an educated guess here anymore.
2014-06-18 09:26:38 -04:00
mark_story
fecc687f81 Cleanup missing view/layout errors.
Fix formatting issues and make path listings correct.
2014-06-17 23:20:49 -04:00
mark_story
e548dfcaea First pass at making MissingView/MissingLayout exceptions show all
paths.

Showing all the paths a template file could be located help expose
developers to the view path cascade and helps ensure we don't tell
people the wrong place to put a view file.

Refs #3712
2014-06-17 16:30:50 -04:00
mark_story
9136f63874 Fix autoLinkEmail() not working when emails are adjacent to HTML.
When an email address is adjacent to HTML it should be autolinked
correctly.

Refs #3656
2014-06-16 21:48:30 -04:00
mark_story
8e14b2f807 Merge branch 'master' into 2.6 2014-06-11 23:05:59 -04:00
mark_story
849ad9a4f5 Remove dead, untested and unreachable code in FormHelper.
Closes #3650
2014-06-06 08:17:49 -04:00
mark_story
758599e6f4 Add once option to css().
The default value is false for backwards compatibility. In 3.0, the
default will be made consistent with script().

Refs #1973
Refs #3628
2014-06-04 22:15:56 -04:00
ADmad
16df061d66 Fix api docblocks for View layer classes. 2014-05-30 01:23:12 +05:30
mark_story
db86b0c050 Don't disable the entire select when disabled is array(1)
When the disabled attribute is just array(1), then the attribute should
be filtered out of select element attributes. This is kind of a hacky
workaround but changing the underlying attribute handling is going to be
pretty tricky and far more dangerous.

Fixes #3546
2014-05-23 13:26:11 -04:00
akiyan
781430c4af Removed unnecessary conditional branch, fixed test and comment. 2014-05-22 14:08:18 -04:00
akiyan
67f256297d Fixed secure form hash for special url.
No htmlspecialchars encode and without fragment identifer.
2014-05-22 14:08:11 -04:00
James Watts
992ab5ea11 Removed the little doc that lied
View::get() never looked up blocks
2014-05-14 20:06:37 +02:00
euromark
8af76a3705 Hotfix for older baked templates regarding postLink() 2014-05-13 20:51:39 +02:00
mark_story
e9ecfe0936 Remove x bit on files.
PHP files should not have executable permission set.
2014-05-13 12:30:14 -04:00
mark_story
89cd114e6f Merge branch 'master' into 2.5 2014-05-12 14:30:02 -04:00
mark_story
cc49d28ef8 Fix double / in missing component error page.
Fixes #3466
2014-05-10 22:02:22 -04:00
mark_story
51909ae738 Only parse URLs when they contain ://
Parsing incomplete URLs fails in PHP5.2.
2014-05-09 17:01:24 -04:00
mark_story
5469840c80 Fix incorrectly generated URL path.
Refs #3442
2014-05-07 08:52:42 -04:00
mark_story
1103ca7816 Ensure that only the path and query are used to make the hash.
While including the entire protocol, host, port, path and query would be
even better in theory, it gets complicated when proxies and load
balancers are involved.

Fixes #3442
2014-05-06 23:00:11 -04:00
ADmad
d466e00644 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Datasource/DboSource.php
	lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
	lib/Cake/Utility/Folder.php
	lib/Cake/VERSION.txt
2014-05-04 14:35:36 +05:30
euromark
57cb7ea260 Correct documentation. 2014-05-02 13:48:39 +02:00
euromark
fecf321cce This is a hotfix for TextHelper which seems to have gone wrong in a merge. tail() is missing completly and the docs for truncate() are the ones for tail(). This fixes it. 2014-05-02 13:33:57 +02:00
Mathew Foscarini
ceab9f185f Removed incorrect usage of @deprecated phpDoc
@deprecated is flagging the function element as deprecated in all IDE's that support phpDOC tags. There is no phpDoc tag to deprecate a function parameter.
2014-04-30 09:55:27 -04:00
mark_story
e1057e3e6b Fix FormHelper::postLink() not working when SecurityComponent is enabled.
The action attribute value was not being included in the generated hash,
so postLink() forms never worked properly.

Fixes #3418
2014-04-29 11:23:52 -04:00
euromark
7a287a6942 More coding standard corrections. 2014-04-29 14:19:33 +02:00
mark_story
cf96e9f54f Merge branch 'master' into 2.5 2014-04-26 22:04:19 -04:00
Mark Story
5b46eb71ec Merge pull request #3397 from steinkel/fix-formhelper-with-model-mock
fixed FormHelper to allow create() on Mock Models without errors
2014-04-26 08:53:43 -04:00
Jorge González
5cf2ce723c fixed FormHelper to allow create() on Mock Models without errors 2014-04-26 10:33:58 +01:00
mark_story
de0062de77 Merge branch 'master' into 2.5 2014-04-25 22:10:02 -04:00
mark_story
f23d811ff5 Use the form action URL in generated form hashes.
By including the URL in generated hash for secured forms we prevent
a class of abuse where a user uses one secured form to post into a
controller action the form was not originally intended for. These cross
action requests could potentially violate developer's mental model of
how SecurityComponent works and produce unexpected/undesirable outcomes.

Thanks to Kurita Takashi for pointing this issue out, and suggesting
a fix.
2014-04-25 22:05:58 -04:00
ADmad
27699d1f12 Fix auto linking urls with subdomain with underscore.
Closes #3392
2014-04-25 22:28:34 +05:30
ADmad
6bdfdfd436 Optimize view paths caching for plugins.
Closes #2047
2014-04-20 02:02:07 +05:30
mark_story
debdc6bccc Merge branch '2.5' of github.com:cakephp/cakephp into 2.5 2014-04-07 21:46:11 -04:00
mark_story
ac66c2c03a Merge branch 'master' into 2.5 2014-04-07 21:45:57 -04:00