Commit graph

1294 commits

Author SHA1 Message Date
Mark Story mark@mark-story.com
bb3a1d546b Fixing RequesHandler::prefers(). It was previously entirely wrong.
It took the ordered list of accept types, and blindly assumed
the first in the list was the most preferred.  This is an incorrect
assumption to make, as all types with the same q value are equal.

- Using CakeRequest::parseAccept() to access only the most preferred
content types.
- Using in_array() to check for the desired type.
- Updating tests for RequestHandler.
2011-09-01 00:20:54 +01:00
Mark Story mark@mark-story.com
e2f48b4a95 Refactoring how q values are parsed, as content types were
reversed for similar q value types.  This causes issues in
RequestHandlerComponent.
2011-09-01 00:20:54 +01:00
Jose Lorenzo Rodriguez
ef4bb2239e Merge branch '2.0' of github.com:cakephp/cakephp into 2.0 2011-08-31 17:40:55 -04:30
Jose Lorenzo Rodriguez
b9b7516945 Merge remote-tracking branch 'ceeram/2.0-email' into 2.0
Conflicts:
	lib/Cake/Network/Email/AbstractTransport.php
	lib/Cake/Network/Email/CakeEmail.php
	lib/Cake/Network/Email/DebugTransport.php
	lib/Cake/Network/Email/MailTransport.php
	lib/Cake/Network/Email/SmtpTransport.php
2011-08-31 17:39:41 -04:30
Mark Story mark@mark-story.com
8ce6c31708 Adding extra information about DboSource::fetchAll() and result caching. 2011-08-31 22:52:33 +01:00
Juan Basso
840d27bbb9 Fixed the allow method to parameters not be required. 2011-08-30 21:12:57 -04:00
Jose Lorenzo Rodriguez
6612cb3421 Merge branch '2.0' of github.com:cakephp/cakephp into 2.0 2011-08-30 00:08:54 -04:30
Jose Lorenzo Rodriguez
a8b38beb9d Fixing bug in SchemaShell where it would always force a read on all tables 2011-08-30 00:07:57 -04:30
Mark Story mark@mark-story.com
3a8b344208 Fixing issue where CakeTestCase would erase custom bootstrapped paths in tearDown().
Adding App::paths() to simplify getting all the paths App knows about.
Fixes #1934
2011-08-29 22:14:18 -04:00
Jose Lorenzo Rodriguez
0e85170f28 Merge branch '2.0' of github.com:cakephp/cakephp into 2.0 2011-08-29 16:55:27 -04:30
Jose Lorenzo Rodriguez
40ba4005bd Affecting the REQUEST_METHOD env variable in order to ease controller testing with different http verbs 2011-08-29 16:54:22 -04:30
Ceeram
0b00fb4fe0 fixing bug in deliver(), and adding more tests 2011-08-29 17:13:41 +02:00
Ceeram
4b093a858c adding more testcases for CakeEmail 2011-08-29 16:02:00 +02:00
Ceeram
c5d0955cd0 adding back blank line 2011-08-29 11:39:08 +02:00
Ceeram
87ffd92c2b Fixing transport test, as transport class now returns as stated in RFC 2822 2011-08-29 11:38:01 +02:00
Ceeram
3be9a8a5e8 debugtransport now also returns in correct format as stated in RFC 2822 2.3, updated tests 2011-08-29 11:21:46 +02:00
Mark Story
59c6b419e5 Merge branch '1.3' into merger
Conflicts:
	cake/console/libs/bake.php
	cake/libs/configure.php
	cake/libs/controller/components/request_handler.php
	cake/tests/cases/console/libs/tasks/fixture.test.php
	cake/tests/cases/libs/controller/components/request_handler.test.php
	lib/Cake/Cache/Engine/FileEngine.php
	lib/Cake/Test/Case/Controller/ScaffoldTest.php
	lib/Cake/Utility/Validation.php
2011-08-28 22:08:49 -04:00
Ceeram
2efa3b0377 optmizing CakeEmail, and improving tests, transport class config() now returns configs array if no array is passed 2011-08-29 03:11:30 +02:00
mark_story
9ff922cbc7 App::objects() should skip directories and files starting with
`.`.  These generally contain version control or OS metadata, and
not code CakePHP can use.
Fixes #1933
2011-08-28 15:36:19 -04:00
mark_story
4a7bd031e5 Adding a file_exists() check before unlinking cache files.
This prevents issues where two concurrent requests could
be clearing the same cache files.
Fixes #1936
2011-08-27 11:52:29 -04:00
mark_story
1a872e6544 Fixing CakeRequest::accepts() where ;q values on Accept header
were not respected.
Fixes #1940
2011-08-27 11:39:22 -04:00
mark_story
5df12a287e Fixing failing tests caused by moving params[ext]. 2011-08-27 10:36:11 -04:00
mark_story
02a6883b22 Using Folder class in CakeTestSuite, this fixes issues where
hidden directories from VCS would be added as test cases.
Fixes #1933
2011-08-27 10:34:08 -04:00
mark_story
682dc5e24b Make Folder::tree use SPL Iterators. 2011-08-27 10:20:59 -04:00
mark_story
7656feb0bb Converting internals of Folder::read() to use DirectoryIterator. 2011-08-27 10:20:59 -04:00
Jose Lorenzo Rodriguez
f94394f582 Removing routing url from query string in CakeRequest. This happens mostly with nginx setups 2011-08-27 01:29:50 -04:30
Juan Basso
7d0250ff47 Merge branch '2.0-api-doc' into 2.0 2011-08-26 20:22:26 -04:00
Ceeram
9300f094a5 fixing output for logs and accept log level from configs 2011-08-26 09:33:49 +02:00
mark_story
5955cc6ed7 Adding trimming of Accept headers to CakeRequest.
Fixes #1684
2011-08-25 22:28:02 -04:00
Ceeram
9e0ff5ad88 add Cakelog to send(), transport classes now all return in same format, fixing some typos 2011-08-26 02:31:18 +02:00
Ceeram
c93274a528 dropping first parameter for _applyConfig() 2011-08-25 16:50:30 +02:00
Ceeram
4cc5295400 more refactoring of CakeEmail 2011-08-25 16:03:39 +02:00
Juan Basso
c60abb1802 Fixed tests affected by the visibility changes. 2011-08-24 23:10:51 -04:00
Ceeram
0b8a3069eb removing duplicate code, config() already applies configs now 2011-08-24 16:58:51 +02:00
mark_story
f060fdafb7 Adding the --debug flag that later versions of PHPUnit support. 2011-08-22 22:29:32 -04:00
mark_story
6acf024a2b Fixing incorrect keying for ext routing parameter. It was
nested under params[url][ext].  This makes it unlike
all other routing parameters.  Having the nested value
also makes reversing requests harder, and generating urls more
difficult.
Adding a test for Router::reverse() and extensions.
Fixes #1923, fixes #1928
2011-08-22 22:26:02 -04:00
Mark Story
68b2d67b0a Adding support for callback style error formatters.
This will allow other classes to inject custom error formatting
code into debugger.  Hopefully making it possible to remove the getInstance() workarounds.
2011-08-22 20:44:33 -04:00
Mark Story
48c6b78660 Adding tests for Debugger::addFormat() 2011-08-22 20:44:32 -04:00
Mark Story
73f4b8c8bf Adding additional test cases for assertTags. 2011-08-22 20:44:32 -04:00
Mark Story
daf1251473 Adding tests for Debugger::outputAs()
Adding exceptions for invalid state checking.
2011-08-22 20:44:32 -04:00
Mark Story
35fc8352ce Extracting methods from nasty Debugger::output(). 2011-08-22 20:44:32 -04:00
Mark Story
ea3b38ef3e Adding doc block info for Debugger::output(). 2011-08-22 20:44:32 -04:00
Mark Story
8503ffd39b Adding a constant for TIME_START as $_SERVER[REQUEST_TIME] is only
accurate to the second.  Profilers and timers need ms resolution
to be accurate.
2011-08-22 20:44:32 -04:00
ADmad
34d3d6fe9e Fixing doc block related to session configuration. Closes #1927 2011-08-23 04:07:08 +05:30
Juan Basso
dbb87a0196 Changed protected callbacks of scaffold to public in Controller. 2011-08-21 23:18:55 -04:00
Juan Basso
f7f3515135 Fixed documentation to methods that use func_get_args(). 2011-08-21 21:45:34 -04:00
Juan Basso
e9390985ca Changed mergeAssociation scrubQueryData to be protected. 2011-08-21 21:27:35 -04:00
Juan Basso
689c7ffd45 Fixed some problems caused by the visibility changes. 2011-08-21 01:04:55 -04:00
Mark Story
58888399f1 Adding Todo about moving Cookie setting to CakeResponse. 2011-08-20 17:28:58 -04:00
Mark Story
7276f3357d Fixing issues where ControllerTestCase couldn't properly hit plugin
controllers.
Fixing some formatting.
Fixes #1918
2011-08-20 09:58:35 -04:00
Mark Story
70f47378f9 Fixing options[data] always writing its data into $_POST['data'].
It now just overwrites $_POST.
Fixes #1917
2011-08-20 09:46:01 -04:00
Mark Story
0091fac5b9 Adding prefix based cache clearning to Wincache.
This matches APC and Memcache.
Fixes #1911
2011-08-20 09:27:33 -04:00
Mark Story
ef921fa56f Making ApcEngine::clear() only clear keys with a matching
prefix. Refs #1911
2011-08-20 09:27:33 -04:00
Juan Basso
a1a049c700 Merge remote-tracking branch 'origin/2.0' into 2.0-api-doc
Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/View/Helper/CacheHelper.php
2011-08-20 01:47:27 -04:00
Juan Basso
61833294f0 Changed the visibility to methods that not affect others classes. 2011-08-20 01:39:30 -04:00
Juan Basso
f5a54d00dd Changed methods and attributes from private to protected. 2011-08-20 00:43:34 -04:00
Juan Basso
3dd86ebfd4 Fixed the Memcache::clear() to not flush all the server, just the variables associated with the prefix. Refs #1911 2011-08-19 22:12:37 -04:00
Ceeram
acdfb483a7 Change casing of delivery method being passed to transport(), to ensure correct transport class will be loaded 2011-08-19 16:47:46 +02:00
Juan Basso
40654df5ab Fixing more documentations. 2011-08-18 22:31:00 -04:00
Mark Story
46c07add3f Fixing issues with HTML5 number inputs and float columns.
For float columns, the default step value is 'any'
Fixes #1907
2011-08-18 22:31:00 -04:00
Juan Basso
0575e92833 Added visibility in some methods and attributes. 2011-08-18 22:30:28 -04:00
Mark Story
0e21093268 Removing XmlHelper references in layouts.
Fixes #1916
2011-08-18 22:11:42 -04:00
Ceeram
138aae670a CakeEmail constructor now accepts $config 2011-08-17 23:15:57 +02:00
Ceeram
803cd287c2 config() will apply configs from email.php if string is passed 2011-08-17 23:11:49 +02:00
ADmad
c3884f407f Implemented feature to allow multiple counter caches per associated model. 2011-08-17 18:10:32 +05:30
Mark Story
54e1de9070 Adding visibility keywords to code that came from
a 1.3 merge.
2011-08-16 22:40:38 -04:00
Juan Basso
16ef234180 Removing trailing spaces. 2011-08-15 23:55:08 -04:00
ADmad
2b342d96d6 Optimizing various finds when deleting records and updating counter cache to avoid extra queries, unnecessary joins and callbacks triggering 2011-08-15 11:47:52 +05:30
Juan Basso
7581db2cf2 More API description/examples to relations variables. 2011-08-15 01:10:32 -04:00
Juan Basso
0fcf6f6a1d Updating some sentenses. 2011-08-15 00:35:20 -04:00
Juan Basso
725e512839 Description to some attributes in Model. 2011-08-15 00:17:40 -04:00
Juan Basso
620a65b2fc Merge branch '2.0' into 2.0-api-doc
Conflicts:
	lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
	lib/Cake/Utility/Debugger.php
2011-08-14 21:12:05 -04:00
mark_story
182b13fdbd Fixing failing test. In 2.0, absolute paths are not altered. 2011-08-14 14:49:56 -04:00
mark_story
e29eb1cb03 Fixing failing cache tests. 2011-08-14 14:45:47 -04:00
mark_story
d93c8cb200 Merge branch '1.3' into merger
Conflicts:
	cake/libs/controller/components/security.php
	cake/libs/view/pages/home.ctp
	cake/libs/view/view.php
	lib/Cake/Cache/Engine/FileEngine.php
	lib/Cake/Config/config.php
	lib/Cake/Model/Datasource/Database/Postgres.php
	lib/Cake/Test/Case/Utility/SanitizeTest.php
	lib/Cake/Test/Case/Utility/SetTest.php
	lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
	lib/Cake/Test/Case/View/Helper/FormHelperTest.php
	lib/Cake/VERSION.txt
	lib/Cake/View/Helper/CacheHelper.php
2011-08-14 14:39:49 -04:00
ADmad
ef4826eb70 Making Model::find('count') behave nicely when 'group' key is specified in options. Closes #1677 2011-08-14 07:37:23 +05:30
ADmad
5d79299362 For paging links the 'class' attribute is now always applied to the wrapping tag for consistency. Closes #1759 2011-08-14 05:09:57 +05:30
ADmad
b781762903 Fixing regression in Set::extract(). Refs #1895, #1816, #1692. 2011-08-14 03:11:55 +05:30
ADmad
7983b4109b Data returned by Model::save() not contains primary key too when new record is created. Closes #1869 2011-08-14 02:56:08 +05:30
mark_story
fdacc9de16 Fixing issues with request stack not being used correctly
when there are requestAction requests being performed.
Adding Router::popRequest() to allow manipulation of request stack
so nested requestAction or serial requestAction calls work correctly.
Fixes #1906
2011-08-12 21:21:05 -04:00
mark_story
3014d3fb84 Fixing issues with CSRF token failure and requestAction.
Fixes #1900
2011-08-12 20:38:24 -04:00
mark_story
1df8de683d Fixing notice error when all csrf tokens are expired at once.
Fixes #1901
2011-08-11 23:06:18 -04:00
Jose Lorenzo Rodriguez
1726bad396 Adding ability to Set class to iterate on ArrayObjects, or any object implementing ArrayAccess and Traversable 2011-08-11 13:26:06 -04:30
Jose Lorenzo Rodriguez
9b6ea7dc45 Merge branch '2.0' of github.com:cakephp/cakephp into 2.0 2011-08-11 13:17:19 -04:30
Jose Lorenzo Rodriguez
3d461724cf Re-adding primaryKey detection support to FormHelper, it was removed mistakenly in last refactor 2011-08-11 12:13:01 -04:30
Mark Story
6026aa4019 Adding tests for FormHelper::postButton() and SecurityComponent. 2011-08-10 22:00:02 -04:00
Mark Story
2ce2d06de2 Fixing issue where postLink() would fail when used with SecurityComponent. 2011-08-10 21:53:33 -04:00
Mark Story
e9382d0897 Fixing failing tests. 2011-08-10 21:40:53 -04:00
ADmad
8d8d64ac80 Merge pull request #169 from kamui545/patch-1
Adding support for url input
2011-08-10 08:10:25 -07:00
Majna
826001adc7 Added doc blocks for WincacheEngine. Fixed Memcache doc block. 2011-08-10 16:55:05 +02:00
Maggion Emmanuel
27734507e4 Adding test case 2011-08-09 20:47:25 +03:00
Maggion Emmanuel
6cd89b0992 Edited lib/Cake/View/Helper/FormHelper.php via GitHub 2011-08-09 17:59:55 +03:00
Majna
48e681424f Fix for wrong 'cake_dev' i18n domain param. 2011-08-09 16:24:41 +02:00
Maggion Emmanuel
cb5f57f0ed Adding support for url input 2011-08-09 17:02:00 +03:00
Maggion Emmanuel
7ab1805bd9 Adding cake_dev domain 2011-08-09 13:03:32 +03:00
mark_story
95f3eb48f9 Fixing plugin option + locations subcommand. 2011-08-07 18:17:14 -04:00
mark_story
a268eea24f Expanding docs on HtmlHelper. 2011-08-07 18:17:14 -04:00
Mark Story
4ab9dedd58 Updating doc blocks in Debugger and CakeLog. 2011-08-07 14:31:14 -04:00
mark_story
5330096019 Fixing parameter name in RssHelper docs.
Fixes #1888
2011-08-07 09:14:16 -04:00
mark_story
e4a7c8f3d7 Cleanup of minor issues found with phpmd. 2011-08-06 21:15:31 -04:00
mark_story
be262f30f0 Fixing notice errors caused by undefined property. 2011-08-06 21:12:48 -04:00
Mark Story
2f079b33dd Fixing issues output xml help. 2011-08-06 16:26:58 -04:00
Mark Story
5d3c470871 Fixing issues where option values started with '-'. 2011-08-06 15:43:41 -04:00
Mark Story
b7391274fb Adding an exception when a short option is longer than one
character. Having long short options breaks parsing, and
doesn't make sense with how short options are used.
2011-08-06 15:21:42 -04:00
Mark Story
10c78c5420 Fixing bad include on text reporter.
Fixing bad includes and updating usage in text coverage reports.
2011-08-06 13:54:02 -04:00
Mark Story
fb756c5aee Fixing incorrectly inflected shell names in help. 2011-08-06 09:52:07 -04:00
Mark Story
5f84b4846c Making long options & arguments replaced with short forms.
Fixes #1882
2011-08-06 09:50:41 -04:00
mark_story
c1b0eb8f21 Updating output of project task to better reflect what
happened.
2011-08-03 21:56:24 -04:00
Mark Story
b45e8eb0cd Adding comments about CAKE_CORE_INCLUDE_PATH.
Removing ini_set() blocks that don't need to exist.
2011-08-03 20:06:47 -04:00
Mark Story
b362afee06 Changing assertPattern to assertRegExp. 2011-08-03 20:06:47 -04:00
Mark Story
cdcabc79b6 Doing some refactoring in the project task.
Adding tests for constants staying commented out when CakePHP is on the include_path.
2011-08-03 20:06:47 -04:00
Mark Story
6e2870c706 Removing APP_PATH it is always the same as APP.
Fixing a typo in index.php.
2011-08-03 20:06:47 -04:00
Mark Story
20e9015f80 Making skel files generate hard coded paths, when CakePHP
is not on the include_path, and exclude hard coded paths when it is.
2011-08-03 20:06:47 -04:00
Mark Story
721c438817 Re-adding support for PHP's include_path.
Moving constants that are made of other constants into bootstrap.php
2011-08-03 20:06:47 -04:00
Ceeram
e083b21dfe Merge branch '2.0' of github.com:cakephp/cakephp into 2.0 2011-08-02 14:56:47 +02:00
Ceeram
dbdc0a1e37 moving test icons one dir up, and remove subdir img in img 2011-08-02 14:56:03 +02:00
Mark Story
4da671c952 Merge pull request #157 from ProLoser/patch-2
Added `'integer' => 'number'` for HTML5
2011-08-01 18:07:40 -07:00
Juan Basso
895c10af7b Adjusted some types in @param, @return and @var. 2011-07-31 22:57:17 -04:00
Juan Basso
4df585e15e Changed method API description. 2011-07-31 20:33:09 -04:00
Juan Basso
d84531d29c Using @property to autocomplete components and helpers in some IDEs. Also added @property to bake of controller and model. Fixes #103. 2011-07-31 20:28:35 -04:00
Juan Basso
7604763888 Updated some file headers to include correct license and copyright. 2011-07-31 19:14:36 -04:00
Juan Basso
ebb70c4810 Fixed type to parameters that is defined in the code. 2011-07-31 18:03:28 -04:00
Juan Basso
2a50a1ea99 Included @var in API that was missing. 2011-07-31 17:05:20 -04:00
Juan Basso
fedadc091c Included @throws in API that was missing. 2011-07-31 16:55:52 -04:00
ADmad
9577fb0ca2 Fixed TreeBehavior::childCount(). Closes #1833 2011-07-31 12:39:52 +05:30
Jose Lorenzo Rodriguez
eaa01634b1 Making ControllerTestCase abstract, that way PHP won't complain about empty test cases, closes #1868 2011-07-30 22:05:17 -04:30
ADmad
b15c77ecc3 Enhancing validation messages to have placeholders. Closes #1855 2011-07-31 06:33:56 +05:30
Juan Basso
9bc3e567c1 Removed the @access and @static. 2011-07-30 20:56:48 -04:00
Juan Basso
db80fe27e1 Changed the visibility to protected. 2011-07-30 20:00:19 -04:00
Juan Basso
e4a1816557 Changed the signature of methods to avoid strict messages. 2011-07-30 19:17:20 -04:00
Juan Basso
39b4032820 Fixed some API doc in model. 2011-07-30 18:38:57 -04:00
Juan Basso
e74d835a62 Fixed some API doc in routing and cache. 2011-07-30 17:02:25 -04:00
Juan Basso
3723f7d396 Fixed some API doc in controllers and errors. 2011-07-30 16:48:37 -04:00
Juan Basso
fbbfbaf870 Fixed some API doc in controller. 2011-07-29 00:06:43 -04:00
Juan Basso
070980b170 Fixed some API doc in i18n and network. 2011-07-28 23:56:10 -04:00
Juan Basso
552791d74b Marked Helper::_parseAttributes() and Helper::_formatAttribute() as deprecated. 2011-07-28 23:33:33 -04:00
Juan Basso
511b480285 Reverted the change from while to if. 2011-07-28 23:33:27 -04:00
Juan Basso
9e75de2f28 Fixed some API doc in core and utility folders. 2011-07-28 23:33:17 -04:00
Juan Basso
02f290ac52 Fixed some API doc in views. 2011-07-28 22:45:47 -04:00
Juan Basso
a0ee8b49fe Fixed some API doc in console. 2011-07-28 22:05:29 -04:00
mark_story
f9373ff504 Fixing double output issues with Scaffold. 2011-07-28 18:09:19 -04:00
José Lorenzo Rodríguez
dbcdbbb64f Merge pull request #159 from majna/2.0-plugin-task
Fix for lowercased schema folder when baking plugin skel.
2011-07-28 10:14:21 -07:00
Mark Story
8149e4f049 Removing unused property.
Removing broken dispatch pass-though method.
2011-07-28 13:12:18 -04:00
Majna
29e4cad99e Fix for lowercased schema folder when baking plugin skel 2011-07-28 18:57:10 +02:00
Dean Sofer
2ef17ec0a7 Additional tweak to FormHelper::input(), make float types use the number input 2011-07-27 15:15:31 -07:00
Jose Lorenzo Rodriguez
25682db434 Removing duplicate directory separator when looking for locale search paths, closes #1854 2011-07-27 17:41:25 -04:30
Jose Lorenzo Rodriguez
402934fa4d Updating version numbers to 2.0.0-beta 2011-07-26 13:20:27 -04:30
Jose Lorenzo Rodriguez
8c60e01235 Reverting change done to validation that was duplicating the validates() process for the main model, returning the correct value in validateAssociated() instead 2011-07-26 10:05:16 -04:30
Dean Sofer
804e88b092 Added test for HTML5 FormHelper::input() integer to number in $map 2011-07-26 02:19:41 -07:00
Dean Sofer
333f36585b Added 'integer' => 'number' for HTML5
Located in $map in the `FormHelper::input()` method. This means that if a field input is related to an integer column in the database, it will show up as a number input in the HTML5 form (where supported) yet gracefully degrade.
2011-07-26 01:39:56 -07:00