Commit graph

4203 commits

Author SHA1 Message Date
ADmad
367463f4c1 Added disabledTag option.
Closes #3108
2012-12-24 20:48:44 +05:30
ADmad
bacfa5a977 Fix missing controller error 2012-12-24 00:29:22 +05:30
Ceeram
3f4d24bfc0 remove unused local variables and a few improvements 2012-12-23 13:53:13 +01:00
Jose Lorenzo Rodriguez
f25f35353d Making getMockForModel actually useful 2012-12-23 00:30:27 +01:00
Jose Lorenzo Rodriguez
bcda684ad7 Copying changes doe to cake executable to skel files 2012-12-23 00:23:01 +01:00
euromark
b811afbc44 double spaces to single ones 2012-12-22 23:48:15 +01:00
José Lorenzo Rodríguez
a8bd7c6678 Merge pull request #961 from dereuromark/2.3-unify-object-collection
2.3 unify object collection
2012-12-22 14:24:26 -08:00
ADmad
fce07bd5b8 Fix failing test 2012-12-23 03:32:25 +05:30
José Lorenzo Rodríguez
29f6e13a28 Merge pull request #1007 from dereuromark/2.3-response-charset
not just json should send the charset
2012-12-22 14:00:58 -08:00
José Lorenzo Rodríguez
9f5549a7eb Merge pull request #1037 from ADmad/2.3-formhelper
Added "required" attribute to input element based on validation rules fo...
2012-12-22 13:51:40 -08:00
ADmad
5aa9c26fdf Update doctypes to html5 2012-12-23 02:57:30 +05:30
ADmad
a340c19c08 Added support for php.ini style values 2012-12-23 02:25:59 +05:30
Bob Fanger
13dc397172 Added unittest for REQUEST_URI with multiple FQDNs. 2012-12-21 19:59:55 +01:00
ADmad
8ef2c22c29 Added "required" attribute to input element based on validation rules for field 2012-12-21 23:20:40 +05:30
Bob Fanger
b7b6859c27 Fixes corrupted CakeRequests when a $_GET value contains "://" 2012-12-21 16:12:51 +01:00
Ceeram
6672eafe53 fix whitespace errors 2012-12-21 16:05:32 +01:00
ravage84
bd71f8aa25 Update lib/Cake/Model/Model.php
Corrected an unlogic link from Model:find to an appropriate page in the docs
2012-12-21 15:06:43 +01:00
euromark
910e21e65e a few more application contents should send the charset
adding content type tests as dataprovider
2012-12-21 12:32:32 +01:00
Mark Story
69248dfb1a Merge pull request #1001 from dogmatic69/refactor-uuid-checks
Refactor uuid checks into a method
2012-12-20 17:46:07 -08:00
Mark Story
e524f7b470 Merge pull request #1036 from dereuromark/2.3-cleanup
code cleanup
2012-12-20 17:38:47 -08:00
Vinícius Krolow
c724f0739a Clean up code.
* It is not need to check the same thing twice
* One if condition instead of two ifs
* Ternary codition instead of checking if variable is null
* Returning early to avoid unnecessary conditional levels
* It is not needed to put an else as the if before already has returned
* Changing ternary conditional to PHP 5.2
* Removing some not needed conditions in the if, also changed to return false (instead of NULL) to follow the code block docs
* Changing to check before if the class_exists so we make sure that class was autoloaded before the condition

Squash of commits in https://github.com/cakephp/cakephp/pull/1034
2012-12-20 20:31:04 -05:00
euromark
2b1e5b02b5 code cleanup 2012-12-21 00:40:12 +01:00
mark_story
554d5794ce Merge branch 'master' into 2.3 2012-12-19 21:18:52 -05:00
mark_story
08cde9f5a2 Fix foreach error when useTable = false.
When calling model->create() with useTable = false, an error should not
be triggered.

Fixes #3480
2012-12-19 21:18:34 -05:00
mark_story
d70730d722 Fix issues with TreeBehavior and nested deletes.
Fixes #3481
2012-12-19 20:48:51 -05:00
mark_story
b346227d10 Fix issues with paths + spaces. 2012-12-19 17:35:56 -05:00
ADmad
d16a9ab98e Fix error when no model scope is set 2012-12-20 02:32:24 +05:30
ADmad
1612bdf250 Fix docblock 2012-12-20 01:54:09 +05:30
ADmad
4fe85fc3c5 Fix docblock 2012-12-20 01:22:09 +05:30
mark_story
fe2f56e8bd Fix path resolution when app dir has been renamed.
This solves path resolution when the default app dir has bee
renamed, and a relative path is used to run `cake`

Fixes #3474
2012-12-18 20:31:57 -05:00
José Lorenzo Rodríguez
6af78c15df Merge pull request #1031 from krolow/ticket-2495
Paginator Sort, displaying related model field more friendly
2012-12-18 00:50:12 -08:00
mark_story
7ad11f59bb Change line length in emails.
Use LINE_LENGTH_MUST instead of LINE_LENGTH_SHOULD. This
fixes a number of text wrapping issues caused by the narrower wrap
length.

Fixes #3151
Fixes #3473
2012-12-17 20:54:38 -05:00
euromark
ce93e7c206 (isset($contain[0]) && $contain[0] === null) always false 2012-12-18 01:28:05 +01:00
Mark
8febb71b67 Merge pull request #1003 from dereuromark/2.3-cache-prefixes
cache prefix for view cache to avoid collisions with domains/languages
2012-12-17 00:46:08 -08:00
mark_story
f326058a6d Update docs for Hash::apply() 2012-12-16 23:03:43 -05:00
Vinícius Krolow
00ea427383 When you are showing a related model field in paginator sort it will display more friendly. eg: $this->Paginator->sort('Text.label') will retorn as Text Label 2012-12-17 01:55:03 -02:00
ADmad
f2d1ebae49 Added deprecated tag 2012-12-17 02:47:41 +05:30
mark_story
4bdaa2b5a0 Merge branch 'master' into 2.3 2012-12-16 13:32:38 -05:00
mark_story
1528b5c382 Don't return true when there is nothing to save.
Model::save() should not return true when no work has been done.

Fixes #3469
2012-12-16 13:19:14 -05:00
Ceeram
54607ba0fa fix coding standards, double whitespace 2012-12-15 18:24:29 +01:00
Mark Story
408f9dd3b0 Merge pull request #1018 from dereuromark/2.3-postlink-target
Put target attr on correct element when using postLink()
2012-12-15 06:58:14 -08:00
Mark Story
c67c4d3317 Merge pull request #1028 from dereuromark/2.3-view-elements
pluginSplit for a more meaningful notice
2012-12-15 06:57:19 -08:00
euromark
c83b454946 pluginSplit for a more meaningful exception message 2012-12-15 03:32:01 +01:00
dogmatic69
2266292594 fixing bug in Hash where array is not similar to the path required 2012-12-14 22:45:52 +00:00
mark_story
6f5ff4d7dd Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Model/CakeSchema.php
	lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
2012-12-13 20:20:42 -05:00
Ceeram
53b465d64e do not pass 5th argument to mail() when in safe mode, even with a falsy value mail() will return false, fixes #3452 2012-12-13 18:22:45 +01:00
Mark Story
45f6ade800 Merge pull request #997 from rhelms/2.2.5-text-index-in-fixture
Cater for length part of TEXT field in indexes for MySQL'

Fixes #3428
2012-12-12 17:27:30 -08:00
Reuben Helms
07dbc4a527 Cater for length part of TEXT field in indexes for MySQL
Cater for length on TEXT column in index for _alterIndexes

Handle nested arrays in schemas

Used when writing indexes containg TEXT field for MySQL

Change comment style from code review

Remove stray space

Only generate length part of TEXT index column field when necessary

Override buildIndex() in Mysql instead of name()
Revert DboSource::buildIndex to previous state
Update Mysql::_alterIndexes for code reuse
Update MysqlTest to handle quoted index names.

Make code clearer, as per code review

Adjust function comments, as per code review
2012-12-13 08:33:43 +10:00
euromark
ae7f629eff correct target attribute for postLinks 2012-12-12 11:23:41 +01:00
euromark
32f2426001 cache prefix for view cache to avoid collisions with domains/languages 2012-12-11 12:54:16 +01:00
mark_story
7605bc35c3 Merge branch 'zero-option'
Related to pull request #1013
2012-12-10 22:10:34 -05:00
mark_story
b20f6e132d Add test for options with 0 value. 2012-12-10 22:10:00 -05:00
ceeram
1516434d61 Merge pull request #1014 from ceeram/phpcs
ignore last few silencers for code sniffer
2012-12-10 13:14:45 -08:00
ADmad
209f3dfe99 Moved deprecated tag 2012-12-11 01:43:10 +05:30
ADmad
c159854a17 Improve docblock 2012-12-11 00:44:42 +05:30
Ceeram
74836a1c30 ignore last few silencers for code sniffer 2012-12-10 17:57:22 +01:00
Ceeram
a8eca60fc5 fix coding standards 2012-12-10 17:40:12 +01:00
Ceeram
ec3e7afd75 Remove todo's whihc have been removed in e02eab05d5
and accidentally been re-added in 3e3af1f998
2012-12-10 17:06:06 +01:00
Simon Males
693ca5481e Testing option value as a string 2012-12-10 23:02:51 +08:00
Simon Males
80773ad970 ConsoleOptionParser::_parseOption() tramples option values of 0 (zero). I believe the following condition is the culprit. 2012-12-10 22:13:38 +08:00
Ceeram
2d908885c8 adding short descriptions in docblock 2012-12-10 10:55:22 +01:00
Ceeram
a15481bbe9 starting refactor Form->input 2012-12-10 10:51:39 +01:00
mark_story
6292fc707d Fix example & incorrect import. 2012-12-09 14:06:28 -05:00
mark_story
9c9cc7fba2 Expand doc block for Router::connect(). 2012-12-09 13:57:50 -05:00
mark_story
2a8ebcea60 Exclude value attribute from generated file inputs.
Having a value attribute present causes HTML validation errors in HTML5
doctypes. It has no effect in other doctypes, and excluding it is always
valid.

Fixes #3440
2012-12-09 13:31:01 -05:00
mark_story
8a77a31620 Set translations to use the cake domain.
Core classes should be using either the cake, or cake_dev domain.

Fixes #3443
2012-12-09 13:25:00 -05:00
mark_story
1e49be3472 Fix stack traces not being highlighted correctly.
Fixes #3439
2012-12-08 20:48:45 -05:00
dogmatic69
49ea72e53e rename the method and fix docblock return type 2012-12-08 13:10:12 +00:00
mark_story
b1aa75bec0 Fix coding standards. 2012-12-07 22:06:15 -05:00
Mark Story
38c592928d Merge pull request #1000 from dogmatic69/validation-simplify
Validation simplify

Simplify internals in Model/Validation
2012-12-07 19:00:46 -08:00
mark_story
8b0a7ee13d Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/VERSION.txt
2012-12-07 20:53:10 -05:00
mark_story
6cf6903982 Fix incorrect argument order. 2012-12-07 14:40:27 -05:00
dogmatic69
b3dba95b7d making uuid field check protected 2012-12-07 02:24:12 +00:00
dogmatic69
521a759911 refactor uuid checks into a method 2012-12-07 02:22:24 +00:00
dogmatic69
85de93a4a7 fixing issue where merge is renumbering array keys 2012-12-07 01:26:14 +00:00
Mark Story
00d178fa28 Merge pull request #999 from dogmatic69/model-simplify
Simplify some model code
2012-12-05 18:18:50 -08:00
euromark
881127ef4d unify new lines at the end of the file 2012-12-05 15:00:24 +01:00
dogmatic69
b92b7c2d2d removing variables that are unnecessarily used 2012-12-05 10:55:11 +00:00
dogmatic69
0ada30f3bc removing nested if statement 2012-12-05 10:54:30 +00:00
dogmatic69
b99066ddd9 simplify some model code
remove nested if's and else where possible and early return.
2012-12-04 02:06:20 +00:00
dogmatic69
03882f4b55 fix up the fails 2012-12-04 01:58:57 +00:00
ADmad
06c3f01af6 Fix docblock 2012-12-04 03:18:35 +05:30
dogmatic69
24abed969a simplify validation code 2012-12-03 15:51:20 +00:00
euromark
41f2d812bb fix ticket 3429 2012-12-03 12:31:56 +01:00
mark_story
002700071d Fix incorrectly quoted fields when using the || operator.
Fixes #3404
2012-12-02 20:59:56 -05:00
Jose Lorenzo Rodriguez
9bcc05b18b Update version number to 2.3.0-RC1 2012-12-02 23:22:43 +01:00
Jose Lorenzo Rodriguez
0b508b887a Update version number to 2.2.4 2012-12-02 23:15:46 +01:00
Saleh Souzanchi
d5283af818 fixed utf-8 pattern in router option 2012-12-02 16:30:45 +03:30
Jose Lorenzo Rodriguez
c1551d9828 Merge branch 'master' into 2.3 2012-12-02 00:34:55 +01:00
Jose Lorenzo Rodriguez
da4fdbac3a Fixing failing test case 2012-12-02 00:34:26 +01:00
Jose Lorenzo Rodriguez
0f5fa290ed Merge remote-tracking branch 'origin/master' into 2.3 2012-12-01 23:19:53 +01:00
José Lorenzo Rodríguez
99e84b8a08 Merge pull request #930 from LiquidityC/2.3_3315_viewblock_startifempty
Added: View::startIfEmpty($name)
2012-12-01 14:06:55 -08:00
José Lorenzo Rodríguez
dfb154464e Merge pull request #994 from dereuromark/2.3-missing-elements
make View trigger notice if elements are missing.
2012-12-01 13:38:54 -08:00
José Lorenzo Rodríguez
dc370826af Merge pull request #918 from bar/2.3-form-empty-error
Calling Form->input() with 'errorMessage'=> false should trigger field error, but not render error element.
2012-12-01 13:09:35 -08:00
euromark
d4af674ccb doc block correction 2012-12-01 10:34:02 +01:00
mark_story
479aefc438 Update TLD validation to accept gTLD variations
The upcoming gTLD extensions will allow much more variety in TLD names.
Loosen the validation to better accept different length TLDs.

Fixes #3414
2012-11-30 22:11:57 -05:00
ADmad
2bc5988674 Added ConfigReaderInterface::dump() and made all readers' dump() method support 'Plugin.keyname' format for keys. Closes #3363 2012-12-01 00:09:43 +05:30
mark_story
889c1ebc09 Fix sorting empty data with Hash & Set.
Fixes #3420
2012-11-30 13:05:14 -05:00
euromark
e1e4d93134 make View trigger notice by default if elements are missing
and add elementExists() method
2012-11-30 14:11:45 +01:00
ADmad
4a6ebaa07b Added Helper::$settings 2012-11-30 12:19:40 +05:30
ADmad
1de8ed18de Avoiding specifying 'maxLimit' too when setting 'limit' greater than default 'maxLimit' in code. 2012-11-30 11:26:10 +05:30
Mark Story
68976a028e Merge pull request #990 from beeman/minor-js-fix
Minor js fix, makes two files in test suite valid JavaScript
2012-11-29 18:10:40 -08:00
Mark Story
0230fa102a Merge pull request #975 from dereuromark/2.3-i18n
use CakeSession wrapper in i18n class
2012-11-28 18:33:39 -08:00
Thomas Ploch
7f0085cd4e Added type hinting to Model::validator()
Added missing param and fixed typo in method's phpdoc.

Used 'assertSame' and 'assertNotSame'. Removed piped NULL type from phpdoc.

Simplify condition in Model::validator()
2012-11-28 21:32:00 -05:00
mark_story
ffcf71c810 Merge branch 'master' into 2.3 2012-11-28 21:30:15 -05:00
mark_story
f250592fee Fix multi-model validators with deep & atomic.
Apply patch from 'Christian Buffin' to fix validateMany() and
validateAssociated() when atomic=false & deep=true are used in
conjunction. Using Hash to flatten the nested set of validation results
yields the correct results.

Fixes #3352
2012-11-28 21:26:40 -05:00
mark_story
35d67bf4a8 Merge branch 'master' into 2.3 2012-11-28 21:00:30 -05:00
ADmad
72d6ca636f Docblock fixes 2012-11-29 04:36:29 +05:30
Bram Borggreve
f69fe20376 Makes sure these two files are valid JavaScript by adding comment marks
to them, this way editors (NetBeans 7.3 for instance) stop marking them
invalid.
2012-11-28 15:29:50 +01:00
mark_story
966c69cb98 Fix missing plugin parameters in scaffolding.
Add missing plugin parameter to scaffolded associations.
This improves link generation and correctness overall.

Fixes #3396
2012-11-27 21:59:06 -05:00
Sethrin
c727444880 Fix behavior of --plugin param
Since plugins are not loaded in bootstrap, this is a good place to do it.
2012-11-26 22:13:01 -05:00
euromark
c3e501b2d9 use CakeSession wrapper 2012-11-27 00:09:21 +01:00
Mark Story
85c7ef8ec4 Merge pull request #978 from andraskende/master
removed a non used $i, spacing between actions. changed to single quotes
2012-11-26 09:44:05 -08:00
Schlaefer
94a17d40da fix ticket 3400: url string with # in it is not routed
See: http://cakephp.lighthouseapp.com/projects/42648/tickets/3400-url-string-with-in-it-is-not-routed
2012-11-26 16:43:47 +01:00
mark_story
739982addb Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/View/Helper.php
2012-11-25 23:33:16 -05:00
mark_story
1f35d82c81 URL encode image/script/css/video paths.
Properly urlencode urls used in HTML attributes. This solves issues with
invalid HTML being generated when paths contain special characters.

Fixes #3395
2012-11-25 23:31:22 -05:00
mark_story
b41705f59e Set headerCharset in EmailComponent.
Apply patch from 'Shota Watanabe', that sets headerCharset on CakeEmail
instances created from within EmailComponent.

Fixes #3398
2012-11-25 23:00:43 -05:00
mark_story
7402eea9eb Remove nested conditionals. 2012-11-25 22:53:39 -05:00
mark_story
869d556d07 Fix typos & strict errors. 2012-11-24 22:42:14 -05:00
mark_story
3ba2db738f Re-work MediaViewTest
it was duplicating many of the tests in CakeResponse, and missing a
few of the cases in MediaView itself.
2012-11-24 16:29:39 -05:00
ADmad
9c0939b888 A cleaner way to check if RequestHandler is loaded 2012-11-25 02:43:50 +05:30
mark_story
82d20ed948 Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Test/Case/Model/ModelReadTest.php
	lib/Cake/Test/Case/View/MediaViewTest.php
2012-11-24 15:44:52 -05:00
mark_story
3083b01f7d Fix exceptions being thrown in beforeFilter breaking error pages.
If an exception was raised in the AppController::beforeFilter(),
requests for content-type responses would render as HTML. Extracting the
startupProcess() allows us to keep a reference to the error controller,
which can be used to force startup RequestHandlerComponent if its
enabled.

Fixes #3389
2012-11-24 15:38:42 -05:00
mark_story
e04e0a0ec8 Use non-mocked methods for tests
This makes reducing off by 1 second errors much easier.
2012-11-24 13:34:12 -05:00
Mark Story
780b6f01b4 Merge pull request #962 from srwebs/feature/empty-bool-operators
Fix: check if bool operators in find conditions are empty.
2012-11-24 10:14:22 -08:00
Mark Story
4025794b05 Merge pull request #971 from ceeram/typehint
Add type hinting to dispatch filters.

This should help provide more helpful errors when developers make mistakes.
2012-11-24 10:09:35 -08:00
Sam Mousa
8ef3034482 Added the table name to the cacheKey used by DboSource::fields. #3394 2012-11-24 12:22:17 +01:00
Andras Kende
b191f42cc8 removed a not used $i, spacing between actions.
removed a not used $i, spacing between actions. changed to single quotes
2012-11-23 16:01:04 -08:00
euromark
18fb132d41 some doc block corrections as well a !! to (bool) convertion
remove nonsense default value
2012-11-22 14:28:09 +01:00
Ceeram
5741ac1828 add type hinting to dispatch filters 2012-11-22 10:02:36 +01:00
mark_story
0d29861423 Fix order for finds
This should solve more occasional errors in postgres on travis.
2012-11-21 21:52:23 -05:00
Ceeram
eadc3a75e5 fix coding standards 2012-11-21 15:39:03 +01:00
mark_story
27d7e2865e Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Console/Command/ConsoleShell.php
	lib/Cake/Network/CakeSocket.php
	lib/Cake/Network/Http/HttpResponse.php
	lib/Cake/Utility/Folder.php
	lib/Cake/View/MediaView.php
	lib/Cake/basics.php
2012-11-20 23:02:33 -05:00
mark_story
587c7071b4 Fix incorrect order of arguments when added out of sequence.
Fixes #3385
2012-11-20 22:42:44 -05:00
Mark Story
04d4abfa53 Merge pull request #965 from frederikweber/patch-1
Send charset in Content-Type when Content is JSON.
2012-11-19 17:08:57 -08:00
ceeram
4611c987db Merge pull request #959 from ceeram/phpcsw
Make phpcs pass
2012-11-19 15:10:47 -08:00
mark_story
fb275c5fa2 Fix warnings from file_get_contents() in Xml::build()
Use HttpSocket to get proper exceptions when trying to load XML from
remote servers.

Fixes #3379
2012-11-19 14:46:45 -05:00
mark_story
6b4afb989e Fix Set::merge() failing to merge correctly.
When merging 3 values, and the 2nd was empty, the resulting
merge was incorrect.

Fixes #3384
2012-11-19 14:03:03 -05:00
ADmad
165035faa8 Merge pull request #963 from sarce/paginator-tag
prev() and next() methods of PaginatorHelper now possible to place the 'tag' option to 'false' for disable the wrapper.
2012-11-18 22:41:10 -08:00
frederikweber
58df515a6d Add test for Content-Type JSON and charset. 2012-11-18 23:44:37 +01:00
Linus Probert
d6bf0dc003 Added additional test for View::startIfEmpty($name) 2012-11-18 16:30:47 +01:00
frederikweber
374dd55270 Changed else if to elseif. 2012-11-18 14:06:46 +01:00
frederikweber
9b479958f6 Send charset=UTF-8 if Content-Type is JSON. 2012-11-18 12:25:45 +01:00
frederikweber
ac0b9b285d Send charset in Content-Type when Content is JSON. 2012-11-18 11:39:17 +01:00
Nicolas
a77e46cbfd Added accidentally removed tests back in. 2012-11-17 23:14:40 +01:00
mark_story
c504fcfdf0 I'm a tool, fix test and remove debug(). 2012-11-17 14:57:03 -05:00
mark_story
a3ddff4aa7 Fix failing test & simplify code. 2012-11-17 14:51:57 -05:00
Mark Story
c752b75904 Merge pull request #958 from planardothum/feather
Frameworks compatible Breadcrumbs.
2012-11-17 11:23:43 -08:00
Nicolas
1b704fb7cf Unit tests added. 2012-11-17 19:34:02 +01:00
Sebastián Arce
d0d15701b3 prev() and next() methods of PaginatorHelper now possible to place the 'tag' option to 'false' for disable the wrapper. 2012-11-17 15:26:08 -03:00