Commit graph

15892 commits

Author SHA1 Message Date
mark_story
13b870d7e1 Fix coding standards error. 2013-09-01 21:44:45 -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
José Lorenzo Rodríguez
5f4feb0729 Merge pull request #1594 from mreishus/feature-readline-support
Use readline in console when supported
2013-09-01 15:51:32 -07:00
Matt Reishus
bb98ac761f ConsoleInput::_canReadLine change from private -> protected 2013-09-01 17:15:51 -05:00
Matt Reishus
3b057cb82b Correct style 2013-09-01 16:58:23 -05:00
Matt Reishus
916d992162 Use readline in console when supported
$this->stdin->read(); will use readline if the system is detected to
support it.  In linux, you will be able to use the left and right arrow
keys to edit the current line, use the up and down keys to navigate
history, press ^U to delete the entire line, etc.

Before this, using arrow keys in linux will just spam characters like
^[[C^[[A^[[D^[[C^[[A^.  Useful for "Console/cake console"
2013-09-01 16:20:29 -05:00
José Lorenzo Rodríguez
64cf40558f Merge pull request #1592 from kimegede/model-after-find-if-condition-remove
Reduce if condtion for finds
2013-09-01 11:24:23 -07:00
Kim Egede Jakobsen
b64c7e3e84 Remove the $state === 'after' condition.
Can only be before / after.
2013-09-01 11:06:45 -07:00
Mark Story
1c080b2ec0 Merge pull request #1585 from dereuromark/2.4-generatetreelist-scope
Bugfix: Add scope for generateTreeList

Fixes #4028
2013-09-01 07:02:53 -07:00
euromark
eb71eeeac5 add scope for generateTreeList - resolves ticket 4028 2013-09-01 01:02:26 -07:00
José Lorenzo Rodríguez
fec646b69f Merge pull request #1588 from kimegede/caketime-docblock-update
Added @link CakeTime.
2013-08-31 21:59:11 -07:00
Kim Egede Jakobsen
539040aa07 Added @link CakeTime. 2013-08-31 21:56:15 -07:00
José Lorenzo Rodríguez
87908a2bfa Merge pull request #1590 from Phally/master-lctime
Avoid notices when loading locale file
2013-08-31 21:49:00 -07:00
Phally
f4929c1b04 Strict checks for I18n::loadLocaleDefinition(). 2013-09-01 06:20:53 +02:00
Phally
4f91465af7 Safer way to prevent the array to string notice. 2013-09-01 06:16:10 +02:00
Ceeram
84c980f1f4 avoid notices when loading locale file
Conflicts:

	lib/Cake/Test/Case/I18n/I18nTest.php
2013-09-01 06:05:40 +02:00
euromark
a36456cc87 Correct doc blocks for AuthComponent 2013-08-31 19:58:10 -07:00
José Lorenzo Rodríguez
f91eb3b508 Merge pull request #1587 from kimegede/cakenumber-docblock-update
Added @link to CakeNumber's docblock
2013-08-31 17:41:45 -07:00
Kim Egede Jakobsen
fcf9f34392 Added @link to CakeNumber's docblock 2013-08-31 17:32:48 -07:00
José Lorenzo Rodríguez
f32760e200 Merge pull request #1586 from kimegede/hash-docblock-update
Hash docblock update
2013-08-31 17:20:26 -07:00
Kim Egede Jakobsen
46d3d8e48e Added @link to all public functions there have documentation.
And correct a small 'typo'.
2013-08-31 17:12:29 -07:00
mark_story
b8ad7f314a Fix doc blocks. 2013-08-31 14:03:32 -04:00
mark_story
9b0e26cc21 Deprecate MemcacheEngine and update defaults for Memcached
People should switch to Memcached instead. The underlying extension is
better maintained and provides improved features and performance.

Collapse the persistent and persistentId settings, while also making
non-persistent connections the default. Persistent connections should be
an opt-in feature as having them enabled by default could go very wrong
on shared hosting environments.
2013-08-31 13:29:54 -04:00
mark_story
9e8c4ad285 Rename persistent_id to persistentId.
The new name is more consistent with other settings in CakePHP.
2013-08-31 13:15:53 -04:00
Mark Story
0f9560c5cf Merge pull request #1562 from kamisama/feature/2.5-memcached-cache-engine
2.5: Add Memcached storage engine for cache 

Fixes #3511
2013-08-31 10:12:16 -07:00
Mark Story
dcb6b77ab6 Merge pull request #1571 from gilleswittenberg/no_confirm
Add y/yes option to schema create and update subcommands
2013-08-31 09:44:25 -07:00
Phally
dbbd05d850 Updates the Travis button to the master branch. 2013-08-31 13:55:09 +02:00
Phally
28dbc5b89b PHPCS fixes. 2013-08-31 13:30:05 +02:00
ADmad
75e8facd2f Remove JS constant use from tests. 2013-08-31 11:45:59 +05:30
mark_story
83db877765 Update version number to 2.4.0 2013-08-30 16:03:49 -04:00
mark_story
4f237e6a93 Merge branch '2.4' making 2.4 into the master branch.
Conflicts:
	lib/Cake/VERSION.txt
2013-08-30 16:02:42 -04:00
mark_story
ca9a305679 Update version number to 2.3.10 2013-08-30 15:56:44 -04:00
mark_story
7bd2174c5b Refactor tests to use a data provider. 2013-08-30 15:36:18 -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
824a6f700b Merge pull request #1563 from mvdriel/fix-i18n-extract
Extract category strings to separate .po files
2013-08-30 12:19:17 -07:00
mark_story
95ad5f5c78 Add hmac to encrypted data.
Using an HMAC ensures that the ciphertext has not been
modified.
2013-08-29 14:40:01 -04:00
Mark van Driel
256e1f6532 Removed unused variable 2013-08-29 10:49:23 +02:00
Gilles Wittenberg
a54e8f238e Add y/yes option to schema create and update subcommands 2013-08-29 09:13:54 +02:00
Mark Story
a902529702 Merge pull request #1570 from cakephp/issue-4030
2.4 - Load helpers at View construction.
2013-08-28 14:28:00 -07: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 van Driel
cce1fafd80 Fixed typo in comments 2013-08-28 18:49:34 +02:00
mark_story
130ccf4714 Merge branch '2.4' into 2.5 2013-08-28 12:35:17 -04:00
mark_story
f18d354f55 Merge branch 'master' into 2.4 2013-08-28 12:35:07 -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
mark_story
c5092851d1 Fix compatibility with PHP 5.2 2013-08-27 23:03:08 -04:00
mark_story
005a7d841d Add support for aes encrypted cookies.
With Security supporting AES encryption it is also ideal to have AES
compatible cookies. Refactor and simplify code. Dynamic invocation of
static method is a bit obtuse and the various methods don't all have the
same arguments.
2013-08-27 21:34:18 -04:00
mark_story
215d43eb06 Add encrypt() and decrypt() methods.
These methods use AES-256 and provide a simple to use API with easy to
remember names.
2013-08-27 21:20:22 -04:00
mark_story
c1ae41da51 Correctly generate bigint primary keys in sqlite.
generate bigint primary keys correctly. Autoincrement cannot be set as
it only works with INTEGER columns[1]. I decided to use some string
manipulations as the entire SQL generation bits are a bit janky and I've
already re-written them for 3.0.

[1] https://www.sqlite.org/autoinc.html

Closes #GH-1552
2013-08-27 18:11:04 -04:00