Commit graph

323 commits

Author SHA1 Message Date
mark_story
7b5e45b965 Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/Model/Datasource/DataSource.php
	lib/Cake/VERSION.txt
2012-05-03 21:06:35 -04:00
mark_story
73b0345ff4 Fix issue with non-sequential array keys.
Xml::fromArray() should not cause errors with non-sequential
numeric array keys.

Fixes #2580
2012-05-03 20:35:01 -04:00
ADmad
061483d03e Added missing keyword 2012-04-25 11:03:26 +05:30
Rachman Chavik
2f87992d15 File::create() does not need to change umask
umask(0) causes all files to be created with 666 permission.
After input from jrbasso and AD7six, this was found to be an
additional code to support caching using file engine.

FileEngine has since moved to SplFile since 2.x and thus umask
juggling is not required anymore.

Refs: f9f1c4df5
Cherrypicked from 2.2 branch.
2012-04-24 23:35:32 +07:00
Rachman Chavik
74830b9b93 File::create() does not need to change umask
umask(0) causes all files to be created with 666 permission.
After input from jrbasso and AD7six, this was found to be an
additional code to support caching using file engine.

FileEngine has since moved to SplFile since 2.x and thus umask
juggling is not required anymore.

Refs: f9f1c4df5
2012-04-24 23:17:28 +07:00
mark_story
b6de177ffa Merge branch '2.1' into 2.2 2012-04-23 21:50:36 -04:00
mark_story
13468937cc Fix singularization of databases.
Fixes #2822
2012-04-23 21:01:03 -04:00
ADmad
3800029c9a Fix docblock 2012-04-22 02:22:48 +05:30
ADmad
d26f869455 Added function to get timezone object 2012-04-22 01:59:26 +05:30
ADmad
058d57a85a Added function to convert time from user timezone to server timezone. 2012-04-22 01:59:26 +05:30
ADmad
a96de99388 Tweak docblocks 2012-04-22 01:59:26 +05:30
ADmad
ebf304927b Added "Config.timezone" config param to avoid having to specify timezone in each function call. 2012-04-22 01:59:26 +05:30
ADmad
d34f0c2bd8 CakeTime functions can now use timezone string or DateTimeZone object for user offsets. (Passing numeric offsets has been kept for BC) 2012-04-22 01:59:08 +05:30
mark_story
21ba5bf04a Merge branch '2.1' into 2.2 2012-04-17 21:47:24 -04:00
Cauan Cabral
28bd6880df Make Validation::decimal accept integers
Fix #2800
Force locale of ValidationTests with en_US to ensure decimal dot separator
2012-04-17 20:22:22 -04:00
mark_story
a4f0399f74 Fix coding standards warnings. 2012-04-10 22:16:14 -04:00
mark_story
9f9feec222 Merge branch '2.2-hash' into 2.2
Conflicts:
	lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php
	lib/Cake/View/Helper/FormHelper.php
2012-04-10 21:32:37 -04:00
mark_story
f8966a64f2 Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
2012-04-09 21:55:02 -04:00
mark_story
3c9e79737d Update doc blocks for CakeNumber. 2012-04-08 12:35:44 -04:00
mark_story
eeec362741 Merge remote-tracking branch 'ceeram/2.2-hash' into 2.2-hash 2012-04-07 14:28:40 -04:00
mark_story
83789915a3 Update docs about PHP5.4 constant. 2012-04-04 21:36:56 -04:00
Ceeram
7700a0261b only use and test SORT_NATURAL on PHP 5.4 2012-04-04 18:21:52 +02:00
mark_story
e5ca80b711 Add additional sort flag support.
Add natural, numeric, and string sorting to Hash.
Fixes #1700
2012-04-01 23:09:15 -04:00
mark_story
475a1596b7 Merge branch '2.1' into 2.2 2012-04-01 15:37:21 -04:00
mark_story
6677127c8e Fix coding standard error. 2012-03-31 21:38:39 -04:00
mark_story
432d00de19 Another small optimization. 2012-03-31 21:37:10 -04:00
mark_story
7d098fa5f0 Some small performance optimizations. 2012-03-31 21:25:02 -04:00
mark_story
6a9fdd841a Fix failing tests.
Set::merge() accepts anything even non-array values.
2012-03-31 13:38:09 -04:00
Kyle Robinson Young
4370bf280a Support multiple bytes with thousands/decimals in CakeNumber::format < PHP5.4
Fixes #2602
2012-03-28 10:46:31 -07:00
Mark Story
0443fe1507 Merge pull request #584 from shama/patch-inpath-test
Add test/doc for reverse Folder::inPath()
2012-03-27 16:50:38 -07:00
Kyle Robinson Young
deb5a57cb9 Add test/doc for reverse Folder::inPath() 2012-03-27 11:55:13 -07:00
mark_story
95d4549c9b Docs + coding standards. 2012-03-26 22:57:50 -04:00
mark_story
c087576f20 Port changes done to Set into Hash
See #2722
2012-03-26 22:39:13 -04:00
mark_story
6e0e15682f Remove duplication where possible. 2012-03-26 22:33:46 -04:00
mark_story
66eabe462a Copy Set::expand into Hash class. 2012-03-26 22:32:58 -04:00
mark_story
9015d78017 Port most recent changes in Set to Hash.
See [68eeee80d8] and
[af575027da]
2012-03-26 22:32:56 -04:00
mark_story
e55927c007 Update the doc links. 2012-03-26 22:32:56 -04:00
mark_story
0ef9adba93 Move and rename pushDiff onto Hash.
Its used internally in a number of places and diff() + merge()
are not an resonable replacement.
2012-03-26 22:32:54 -04:00
mark_story
19e0d8d946 Switch usage to Hash where possible. 2012-03-26 22:32:53 -04:00
mark_story
2231087ba3 Rename Set2 -> Hash. 2012-03-26 22:25:40 -04:00
mark_story
5b4b936157 Make filter() more flexible. 2012-03-26 22:25:40 -04:00
mark_story
239f52c48c Move nest() over
Make get() able to take arrays for $path.
2012-03-26 22:25:40 -04:00
mark_story
ae66682c35 Add apply(), map() and reduce()
Add tests as well.
2012-03-26 22:25:39 -04:00
mark_story
8cadac3ee5 Add tests for issue #104 2012-03-26 22:25:39 -04:00
mark_story
ff5e72c9a7 Move Set::format across.
Remove the {0} style of formatting.  Custom formatting
syntax is a bit silly. sprintf() is more than expressive enough
for this method.
2012-03-26 22:25:39 -04:00
mark_story
e4a505797d Move combine() across. 2012-03-26 22:25:39 -04:00
mark_story
aa4dca6c0c Move Set::check across. 2012-03-26 22:25:39 -04:00
mark_story
771efd950e Fix sort() not working. 2012-03-26 22:25:38 -04:00
mark_story
57d50cd018 Extract common method. 2012-03-26 22:25:38 -04:00
mark_story
3d8a955043 Add remove() and insert()
Also add support for multi insert and multi remove.
2012-03-26 22:25:38 -04:00
mark_story
6b69ed269a Extracting duplicate loops. 2012-03-26 22:25:38 -04:00
mark_story
e72127e359 WIP, adding sort() and remove() 2012-03-26 22:25:37 -04:00
mark_story
31181f58d6 Add attribute pattern matching. 2012-03-26 22:25:37 -04:00
mark_story
cbfa938303 Fix muliple attribute conditions. 2012-03-26 22:25:37 -04:00
mark_story
8ad4e66eba Making attributes work with any selector type.
Attributes work with all base selectors.
2012-03-26 22:25:37 -04:00
mark_story
9269a6dcde Added some more operators.
Attribute + {n} is still not working.
2012-03-26 22:25:36 -04:00
mark_story
6c87be97ef Implement presence and equality attributes. 2012-03-26 22:25:36 -04:00
mark_story
37181e99a8 Basic path selectors implemented for extract(). 2012-03-26 22:25:36 -04:00
mark_story
b3861c01dc Move numeric() into Set2. 2012-03-26 22:25:36 -04:00
mark_story
1315e0f1a1 Moving filter() into Set2. 2012-03-26 22:25:35 -04:00
mark_story
885d5dfd80 Make contains() non-recursive.
Add a few more tests for contains().
2012-03-26 22:25:35 -04:00
mark_story
d37e10a8a9 Move contains() across.
Fix a few issues in contains() with nested needle values.
2012-03-26 22:25:35 -04:00
mark_story
ad65098348 Move normalize() into Set2.
Dropping the ability to 'normalize' string data.
2012-03-26 22:25:34 -04:00
mark_story
e736ea3af9 Move merge() into Set2. 2012-03-26 22:25:34 -04:00
mark_story
51f45c0f28 Moving flatten() across.
It is no longer recursive either.
2012-03-26 22:25:34 -04:00
mark_story
51e3ee0425 Adding dimensions() and maxDimensions()
Splitting the Set::countDim() into two methods.  This creates a simpler
API, as each method only does one job, and only has one argument.  Also
replacing recursion with iteration.
2012-03-26 22:25:34 -04:00
mark_story
db3485d47c Add function prototypes. 2012-03-26 22:25:34 -04:00
mark_story
328513d35e Start Set2. 2012-03-26 22:25:33 -04:00
mark_story
6b045318d8 Merge branch '2.1' into 2.2 2012-03-26 22:24:30 -04:00
mark_story
b3d886fe82 Fix Set::insert() not overwriting values.
Set::insert() failed to overwrite values that were previously
defined as strings.  Remove test in SessionComponentTest that was
ensuring this bug stuck around.

Fixes #2722
2012-03-26 21:50:53 -04:00
Jose Lorenzo Rodriguez
b373309ba9 Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/VERSION.txt
2012-03-25 21:18:58 -04:30
mark_story
49a455a2cb Fix some code standards warnings. 2012-03-24 22:15:08 -04:00
dogmatic69
d3a44811ce adding test and fix for hightlighting tags, old bug 2111 for 1.3 but its the same issue. This should make more options possible 2012-03-16 21:20:27 +00:00
Rachman Chavik
079ae8265c Set::expand as implemented by jeremyharris 2012-03-15 20:07:49 +07:00
Rachman Chavik
af575027da fix Set::sort() for issue in previous commit 2012-03-13 12:45:06 +07:00
Juan Basso
3b1bd90ad6 Updated copyright to 2012. 2012-03-12 22:46:07 -04:00
Ceeram
68eeee80d8 Set::sort() now correctly sorts when using {s}.path, fixes #2673 2012-03-12 21:58:24 +01:00
mark_story
a9c8a520b2 Port [c19b233] to 2.1 2012-03-12 12:33:20 -04:00
Majna
4543a4cb88 Make Validation class more strict when checking values in list.
Use in_array() with 'strict' param. Affected rules are Validation::inList() and Validation::multiple().
2012-03-07 18:52:48 +01:00
mark_story
664b0538b8 Fix more coding standards problems. 2012-03-04 22:49:38 -05:00
mark_story
9d325fe46e Fixing most coding standard issues in Utility/ 2012-03-03 17:31:47 -05:00
mark_story
7d51db9e63 Merge branch '2.0' into 2.1 2012-03-03 12:27:22 -05:00
mark_story
0b4f735b4c Update API docs for Set::extract()
Fixes #2634
2012-03-02 11:19:17 -05:00
Michael Hagedon
5eb4155236 Fixing case. 2012-02-28 13:20:47 -07:00
Michael Hagedon
ef80045fc5 Fixing _fromArray(). See http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2624-xml_fromarray-does-not-handle-certain-array-structures-as-expected 2012-02-28 12:41:43 -07:00
euromark
e94d307ee1 code conventions 2012-02-25 19:46:05 -05:00
mark_story
943d928084 Merge branch '2.0' into 2.1 2012-02-18 22:19:38 -05:00
mark_story
2ddc3873c2 Update the Set::merge() documentation. 2012-02-18 16:01:07 -05:00
Mark Story
60df31cfb6 Merge pull request #487 from dogmatic69/2.1
2.1
2012-02-17 17:38:03 -08:00
Majna
0cd9a93e9e Remove unused variables and statements. 2012-02-17 21:10:43 +01:00
Majna
c40d132f81 Fix Folder::tree() when excluding dot files or folders.
When 'exclude' param is array('.') files/folders are not skipped. Added test.
2012-02-17 20:46:52 +01:00
dogmatic69
be49b2b942 fixing up the docs for Collection::attached(), was showing behaviors but is for all collections 2012-02-17 13:25:37 +00:00
mark_story
6412797dfc Add missing static. 2012-02-16 20:58:43 -05:00
Rachman Chavik
d6fd051fb4 changing methods in CakeTime class to static 2012-02-14 09:34:36 +07:00
Rachman Chavik
9624c27ef4 changing methods in CakeNumber class to static 2012-02-14 09:34:36 +07:00
Rachman Chavik
abd6d22445 changing methods in String class to static 2012-02-14 09:34:36 +07:00
mark_story
2afb05b590 Merge branch '2.0' into 2.1
Conflicts:
	app/View/Pages/home.ctp
	lib/Cake/Config/config.php
	lib/Cake/Core/App.php
	lib/Cake/VERSION.txt
	lib/Cake/View/Helper/NumberHelper.php
2012-02-12 10:06:13 -05:00
Jose Lorenzo Rodriguez
fd17e33e78 Making CakeNumber::addFormat static so it is easier to configure globally for the app 2012-02-10 22:25:59 +07:00
Rachman Chavik
2dc9986fad moving methods from TextHelper to String 2012-02-10 22:25:59 +07:00
Rachman Chavik
6fdaef10c8 moving NumberHelper to CakeNumber 2012-02-10 22:25:59 +07:00