mark_story
e4b2428735
Fix PHPCS errors.
2015-07-21 16:28:17 -04:00
mark_story
bd23fdeebf
Simplify code and reduce test redundancy.
...
We don't need the additional parameter, and some of the tests weren't
covering unique scenarios.
Refs #7040
2015-07-20 22:16:50 -04:00
Chris Valliere
64f0ca0028
Fix Hash::maxDimensions
...
The current Hash::maxDimensions function calls Hash::dimensions to try
to get the maximum depth of the passed in array. However, this ends up
only getting the depth of the first element of each 1st dimension
element in the array passed to maxDimensions. The function needs to be
called recursively in order to get the depth of ALL of the elements in
all of the dimensions of the passed in array.
I made the maxDimensions function more closely resemble the deprecated
Set::countDim function in order to restore the correct functionality.
2015-07-20 22:07:58 -04:00
Mark Scherer
2eea245491
Backport utf fix for CakeText::tokenize().
2015-07-13 08:23:05 +02:00
mark_story
47378427e3
Merge branch '2.6' into 2.7
2015-07-11 21:25:26 -04:00
Marc Würth
4a131bdcbf
Capitalize Windows, the OS
2015-07-09 15:54:03 +02:00
mark_story
26b3713bd6
Merge branch '2.7' of github.com:cakephp/cakephp into 2.7
2015-06-20 10:03:24 -04:00
mark_story
664ba53c89
Merge branch '2.6' into 2.7
2015-06-20 10:03:14 -04:00
Mark Scherer
4025f2fb22
add cast for clarification and to allow int 0.
2015-06-17 12:38:06 +02:00
Mark Scherer
1b81323462
Use strict check
2015-06-17 12:06:56 +02:00
Mark Scherer
86c358f3f9
Fix Validation::multiple() regarding 0 value.
2015-06-15 16:35:27 +02:00
mark_story
c47196fe08
Merge branch '2.6' into 2.7
2015-06-07 15:45:26 -04:00
mark_story
239c83938f
Fix regression in camelize().
...
The input should not be lowercased before camelizing, as this can cause
inputs that were previously camelized to create incorrect results.
Refs #6735
2015-06-05 10:20:51 -04:00
mark_story
df0f2295c3
Fix issue with overlapping irregular inflections.
...
When irregular inflections overlap we should choose the longest match,
not the shortest.
Refs #6659
2015-06-02 23:09:29 -04:00
Mark Scherer
2a5cbb8037
Add missing static keyword.
2015-05-31 13:40:22 +02:00
mark_story
d7d8b90986
Merge branch '2.6' into 2.7
2015-05-28 19:34:59 -04:00
mark_story
995d8d22c6
Disable reading XML files and URLs when handling user data.
...
Allowing users to load arbitrary files/URLs with Xml is not desirable
when handing user input.
2015-05-27 09:45:53 -04:00
mark_story
733ddc7ff4
Use mb* functions in Inflector humanize/underscore.
...
Use the mbstring shims we already provide to make Inflector more robust
than it currently is. This solves the invalid ID attribute generation in
a way that never varies between environments.
Refs #6635
2015-05-26 22:51:00 -04:00
nojimage
c6e4208bda
refs #6635 Inflector::underscore, humanize support multibyte string inputs
2015-05-26 13:29:05 +09:00
nojimage
8ebc9cdd87
refs #6635 FormHelper::radio() return collect id attributes with multibyte
2015-05-25 22:10:50 +09:00
Mark Scherer
866242643f
Deprecate notEmpty in favor of notBlank.
2015-05-17 22:13:04 +02:00
ndm2
323e8d8d76
Add underscore support for multi word irregulars.
...
Underscore separated words were not catched by the irregular regex,
tests however didn't fail as the default rules matched the tested words
too. The added test should ensure that this won't happen again.
Fixes the gap left by the previous #6538 fix.
2015-05-12 14:33:15 +02:00
mark_story
d4740c9c09
Fix incorrect handling of irregular values.
...
When inflecting irregular values, both plural and singular forms were
generated incorrectly.
Fixes #6538
2015-05-11 21:35:08 -04:00
Mark Scherer
8e618ed9e6
Fix documentation regarding attributes
2015-05-02 14:31:38 +02:00
mark_story
5e9d4893a8
Add the {*} matcher to Hash::extract()
...
This matcher will match anything and is useful when you just want to
traverse through data and you're not too picky.
I've also refactored the conditions to use a case as it is slightly more
readable and uses fewer lines of code.
Refs #6447
2015-05-01 22:03:40 -04:00
mark_story
096a2ebb72
Merge branch '2.6' into 2.7
...
Conflicts:
lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php
lib/Cake/VERSION.txt
2015-04-20 15:42:54 -04:00
Marc Würth
b19b76b9f2
Fix parameter type annotation
...
https://github.com/cakephp/cakephp/blob/2.6.3/lib/Cake/Utility/Hash.php#L265
https://github.com/cakephp/cakephp/blob/2.6.3/lib/Cake/Utility/Hash.php#L293
2015-04-13 18:20:16 +02:00
mark_story
a6aefdd4d3
Fix null path in Hash::get() causing exceptions.
...
This was a regression introduced in 2.6.x
Refs #6297
2015-04-09 07:50:29 -04:00
José Lorenzo Rodríguez
405e725767
Merge pull request #6238 from cakephp/issue-6224
...
Fix maxDimensions() for empty/1 dimensional arrays.
2015-04-01 09:26:50 +02:00
Justin Yost
f32d1c1362
Updates Inflector For Irregular Case Sieves
...
Sieves incorrectly singualrized as sief.
Adds sieve, sieves as an irregular case and test cases to
match for the Inflector class.
Closes Issue #6240 in CakePHP 2.6 Branch
Signed-off-by: Justin Yost <justin.yost@yostivanich.com>
2015-03-31 22:21:05 -07:00
mark_story
69971505a2
Fix maxDimensions() for empty/1 dimensional arrays.
...
maxDimensions() should not emit warnings or mis-calculate an array's
dimensions.
Fixes #6224
2015-03-31 22:21:15 -04: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
35e0dc2bbd
Merge pull request #5760 from cakephp/master
...
Merge master into 2.7
2015-01-27 20:48:15 -05:00
tgskiv
97c6850005
Let IDE work better with ClassRegistry::init()
...
This small change will allow some IDEs like NetBeans to work with returned object like with a instance of $class parameter.
I`m sure, this will help Cake users a lot!
2015-01-27 19:06:46 +02: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
cd58fa0b61
Backport changes from #5635 to 2.x
...
In case the path passed to the File class doesn't exists, this will
cause File::$path to be set to a partial path, that is the filename
of the passed path with a slash prepended, ex with
$file = new File('/non/existent/file');
calling $file->pwd() will return/set /file, possibly causing that
file in the root to be accessed.
2015-01-11 15:20:34 -05:00
antograssiot
c2f298a8b7
Replace our custom code fence with markdown standard fence
2015-01-09 13:47:25 +01:00
dmromanov
eb414bdda1
Fix double encoding time strings (CakeTime)
...
Fix time strings being double encoded when mb_string is not installed.
2015-01-09 00:03:49 +03:00
Bryan Crowe
66a0e6226d
Correct criterion inflection
2015-01-06 23:03:53 -05:00
euromark
389f745d16
Stop goofy formatting when newlines are present already.
2015-01-06 13:13:33 +01: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
euromark
722e54279c
Rename String to CakeText.
2015-01-05 00:53:32 +01:00
mark_story
4d6611b328
Merge branch 'master' into 2.6
...
Conflicts:
lib/Cake/VERSION.txt
2014-12-17 21:38:32 -05:00
mark_story
ac6d5cc70f
Fix incorrect pluralization of Human.
...
Human should become humans, unlike other words ending in man.
Fixes #5370
2014-12-09 21:51:42 -05:00
euromark
e1c128bb99
Consolidate with conditions sniff.
2014-12-09 03:17:35 +01: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