Commit graph

74 commits

Author SHA1 Message Date
nate
4e56b06f66 Adding Set::sort(), for sorting model results by association keys, tests included
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6412 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-27 20:22:45 +00:00
gwoo
d901e0af31 fixed bake interactive models for self associations and error in Set:extract when data is not an array
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6394 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-20 03:42:01 +00:00
gwoo
22cc25e9c5 updating Set::map() handling of deeply nested arrays, fixes #3809, thanks to speedmax for an updated test case.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6320 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-04 01:32:52 +00:00
nate
60fa3938ee Adding regular expression support to Set::extract(), closes #3263
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6307 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-02 04:46:49 +00:00
phpnut
cb53dc61b0 "Closes #2897, Built-in file validation.
Implemented Validation::extension(); and Vaidation::range();
Updated copyright notices in all files"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6296 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-01 22:18:17 +00:00
gwoo
7e845242d5 updating set handling of xml and adding tests for model saving xml
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6274 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-29 20:24:10 +00:00
phpnut
c5ff7cb4db "Fixes #3774, Set::combine possibly applies wrong formatstring"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6266 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-27 07:59:22 +00:00
phpnut
aa667c4d61 "Closes #3059, Set::format() allow arg type conversion with use of sprintf format style"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6247 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-25 07:10:20 +00:00
gwoo
5dd9847881 changing Set::map() to accept true as second param. This will maintain the structure of the array coming in. related to #3713, changes [6185]
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6186 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-21 20:54:10 +00:00
gwoo
b4c3be2ccd updating set, pass second param as false if you do not want the array flattened, fixes #3713
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6185 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-21 20:12:43 +00:00
phpnut
8a2b51c3ec "Removing all shortcut function usage from the core"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6128 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-08 06:08:03 +00:00
phpnut
d6c918ec95 "Fixes #3689, Set::__map() array cast corrupt new object"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6123 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-06 15:59:54 +00:00
phpnut
ae8ccbd817 "Correcting type for @param $primary"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6093 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-27 18:04:41 +00:00
gwoo
76d69fb0c7 updating Set::__map() doc comment
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6092 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-27 18:02:09 +00:00
gwoo
86dafa3009 updating Set::map() to return an array of objects if the key is numeric. Changed __identity__ to _name_, updated tests.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6091 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-27 17:57:59 +00:00
gwoo
ca79acf3fd change to use $class
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6089 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-27 00:46:24 +00:00
gwoo
21bea5ffb5 updating Set class and added valid test, fixes #3652
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6088 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-27 00:33:10 +00:00
gwoo
01230b92b1 refactoring Set::map() and reverse, all tests passing
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6035 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-20 21:04:58 +00:00
gwoo
dd5854f210 refactoring Set::reverse()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6034 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-20 20:00:54 +00:00
phpnut
b867f832c1 Refactoring return of Set::map(); and Set::reverse();
Added new test cases to SetTest.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5979 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-11 23:49:30 +00:00
mariano.iglesias
9b01ce7066 Adding support for Set::countDim() to count dimensions in all branches of an array, not just the first element. Set second parameter of countDim to true to get the real dimension of the array (regardless if the deepest depth is on first element).
Adding better documentation and test cases for countDim

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5960 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-06 18:54:32 +00:00
mariano.iglesias
896f62544b Changing @return int to @return integer and @param bool to @param boolean
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5860 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 16:54:36 +00:00
phpnut
da97a5c871 Correcting @return bool
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5857 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 16:09:35 +00:00
mariano.iglesias
897825d596 Adding documentation to classes belonging to Cake console.
Standarizing on datatypes used in phpdocblocs and removing unneeded @return types

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5851 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 05:52:20 +00:00
nate
02494a0519 Adding fix for Set::extract() when only grabbing numeric keys
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5652 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-09-16 18:22:17 +00:00
nate
ce51d009ac Adding hasMany optimization fixes for failing model tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5587 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-27 03:15:11 +00:00
nate
bd194b51e5 Routing fixes for invalid null value matching and named argument handling (Ticket #3083, #3085, #3086, #3093). Thanks biesbjerg for all your help!
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5554 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-20 13:09:11 +00:00
nate
3e7044d4b8 Implementing prefix-based routing, and transitioning configuration away from global constants
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5531 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-16 05:44:06 +00:00
nate
1911b1d7a5 Implementing custom array value formatting in Set::combine() and Model::generateList()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5518 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-13 20:59:49 +00:00
nate
823672217a Implementing Set::format() to combine extracted array values
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5512 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-11 21:32:25 +00:00
phpnut
549d86ac23 Refactoring dispatcher.
Added test for changes to Dispatcher.
Updating Model::_ _saveMulti(), moved the insert statement to DboSource::insertMulti() this will allow database that do not support multiple inserts in one statement to save data.


git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5460 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-07-25 04:38:28 +00:00
phpnut
1713dcdfb2 Merging changes to Set class into 1.1.x.x
Added doc comment for Set::reverse()
merged changes in DboSource and DboPostgres into 1.1.x.x

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5420 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-07-09 04:47:05 +00:00
phpnut
072ed9581f Adding fix for failing tests on php 5
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5374 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-07-02 21:27:20 +00:00
phpnut
3880f9ce13 Refactoring Set::reverse() and Model::set()
Set::reverse() will now reverse the object to an array that was created in Set::map();
Added testMapReverse() to Set tests.
Removed code in Model::set() that was no longer needed

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5373 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-07-02 18:36:49 +00:00
phpnut
382a63651d Updating Set::reverse()
Corrected undefined variable

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5372 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-07-02 17:13:35 +00:00
mariano.iglesias
cd09a7c7dd Adding option to group elements in Set::combine and making Model::generateList use Set::combine. Adding tests for Model::generateList and more tests for Set::combine
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5370 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-07-01 03:43:05 +00:00
mariano.iglesias
61df674db5 Adding Set::combine to allow mapping of keys and values of an array using paths
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5369 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-06-30 22:34:47 +00:00
phpnut
5e2b574e2f Refactoring Model::set()
Added Set::reverse(0 to convert an object to an array

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5368 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-06-30 06:52:39 +00:00
phpnut
dac1bd0913 Correcting code structure to standards
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5315 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-06-20 07:51:52 +00:00
phpnut
23dfd90b29 Correcting code structure to standards
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5313 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-06-20 06:15:35 +00:00
mariano.iglesias
a0ecb53e11 Adding comments to Set
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5200 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-05-26 19:06:14 +00:00
phpnut
698b221943 Adding fix for #2488 fixes Set::extract failed on assoc array if key starts with numeric
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4900 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-04-29 01:47:26 +00:00
nate
e5b0f2e3fa Moving Router::__filter() to Set::filter()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4867 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-04-17 07:00:26 +00:00
phpnut
924a235ec3 Removing comments from Set::merge()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4796 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-04-05 21:29:00 +00:00
phpnut
135ebe8994 Merging changes from 1.2.x.x Set class to 1.1.x.x branch
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4792 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-04-05 20:09:32 +00:00
nate
ac904cd4d4 Adding new Set::merge() and Set class test case, thanks Felix
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4779 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-04-05 05:57:52 +00:00
phpnut
dcac88825a Adding fix for Ticket #2339
Adding fix for Ticket #2335
Adding fix for Ticket #2344

Merged changes in dbo from 1.2 to 1.1
Merged changes to session handling in 1.2 to 1.1
Merged changes to Model::_ _saveMulti() in 1.2 to 1.1
Added Set::pushDiff() to append differences in array 2 to array 1
Added SessionComponent::activate() and SessionHelper::activate() to turn sessions usage on if AUTO_SESSION is set to false
Added test for Ticket #2343
Added change to AclNode to use correct table naming
Added garbage clean up to CakeSession::_ _close(); some installs, like Debian, have removed garbage clean
up and use a cron job instead. Currently this change is only supported for database session.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4752 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-04-04 07:25:48 +00:00
phpnut
dea1dc77fb Adding fix for Ticket #2130, Ticket #2168, Ticket #2178
Adding beforeRender() callback for helpers.
Adding fix for Set::diff();

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4575 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-03-04 09:12:09 +00:00
nate
cb511b95ed Removing eval() calls from Session and replacing with Set methods
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4545 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-02-20 19:51:58 +00:00
nate
c8da214170 Fixing instance references in Set method calls
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4529 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-02-17 16:54:36 +00:00