Commit graph

3002 commits

Author SHA1 Message Date
mark_story
f1b57d14ab Revert changed added in #2750.
While the had the potential to make 404s going through AssetDispatcher
much faster, they broke plugins + extension routing. While explicit
extensions could be fixed, routing all extensions could not. Because we
are trying to keep 2.x as API compatible as possible it makes sense to
revert the previous changes.
2014-04-13 20:00:34 -04:00
mark_story
749f2b99d9 Don't 404 extensions that could be handled by routing.
Fixes an error in #2750 where routed extensions would always return
404's for plugin requests. When a file extenion could be handled by
router, AssetDispatcher cannot 404 the request.

Refs #3305
2014-04-13 06:48:51 -04:00
Stephen Young
b55fa98a2d Updated documentation
* Removed references to nonexistent `AclBase` class
* Added references to `AclInterface` requirements
2014-04-11 15:10:56 -04:00
mark_story
bf9c3029cb Merge branch 'master' into 2.5 2014-04-10 20:51:49 -04:00
mark_story
c6173a0054 Add tests for #3288 and remove nested ternaries.
Nested ternaries are complicated to maintain and hard to read. Break
down the nested ternary into two conditionals.
2014-04-10 20:37:08 -04:00
euromark
8e0f15b3d6 Revert the removal of a BC relevant part. 2014-04-10 20:11:58 +02:00
euromark
9058f0f6f1 Make CakePlugin::loadAll behave correctly regarding merging of settings. 2014-04-08 12:18:17 +02:00
Mark Story
caf0217fe0 Merge pull request #3259 from dereuromark/2.5-array-merge
microptimize options and default merge and other string key array merges
2014-04-07 21:44:38 -04:00
mark_story
b05ab740d6 Merge branch '2.5-AssetDispatcher-404' into 2.5
Return a 404 much earlier when handling missing theme/plugin assets.

Fixes #2750
2014-04-07 21:43:37 -04:00
mark_story
7eb569c439 Add test case for #2750 2014-04-07 21:26:11 -04:00
euromark
0ece694a75 microptimize options and default merge and other string key array merges 2014-04-08 01:25:14 +02:00
Jose Lorenzo Rodriguez
343d3279b9 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Test/Case/Utility/FileTest.php
	lib/Cake/VERSION.txt
2014-04-06 21:50:41 +02:00
mark_story
7fb920c256 Add file missed in last commit. 2014-04-04 22:22:38 -04:00
mark_story
4ec81542db Fix email rendering when using 2 different plugins.
When an email template and layout are in different plugins the incorrect
plugin would be used for the layout.

Fixes #3062
2014-04-04 21:45:04 -04:00
euromark
b150e33472 correct missed cs errors 2014-04-02 03:16:03 +02:00
euromark
e544340d67 fix indentation 2014-04-02 03:12:22 +02:00
euromark
bbe3b6a439 more cs 2014-04-02 03:09:42 +02:00
euromark
0d09a54033 more missing doc block tags added 2014-04-02 03:02:37 +02:00
euromark
44952b06a4 cs 2014-04-02 02:23:43 +02:00
Bryan Crowe
b93f373f16 Fix yoda condition in File test 2014-03-31 17:40:35 -04:00
ADmad
10f294d6bb Remove $reponse param of Dispatcher::_invoke().
Use controller's $response property by default.
2014-03-30 19:29:07 +05:30
mark_story
ff73229ab8 Fix failing tests.
Not everyone uses the same database names as me.
2014-03-24 10:04:19 -04:00
mark_story
2fe8c4050b Insert manual joins *after* generated joins.
Re-order query joins to make manually added joins be performed after
generated joins. This removes the need to workaround the current join
order, or redefine all association joins when you want to add an
additional join on a leaf table.

Refs #2179
Refs #2346
2014-03-23 21:09:08 -04:00
func0der
06f47ee01f Introduced I18n category constants (#1894)
Replaced all hard coded category values
2014-03-23 17:00:17 +01:00
Mark Story
dea6709d89 Merge pull request #3014 from ndm2/smtp-extensibility-response-access
SMTP transport - Extensibility and response access
2014-03-23 09:24:21 -04:00
mark_story
8acb75425d Merge branch 'master' into 2.5
Conflicts:
	CONTRIBUTING.md
	lib/Cake/Model/Datasource/DboSource.php
2014-03-21 22:55:28 -04:00
mark_story
f12b272758 Fix a few flaky/bad attribute matchers. 2014-03-21 22:52:52 -04:00
mark_story
af68f61e7a Make assertTags() run much faster.
Generating the various permutations a priori is incredibly expensive
with sets of attributes. Using nested loops that look for matches is
more efficient.

Add replacments for `.*` and `.+` in preg:/ prefixed attribute matchers
so they do not greedily eat all content. This also requires that preg:/
based attribute matchers *must* be quoted.

Fixes #3072
2014-03-21 22:52:52 -04:00
mark_story
c1b2b560bb Fix typo. 2014-03-21 22:52:52 -04:00
wbkostan
fea60bfe51 Update InflectorTest.php
Added test cases for changes to inflector which affected words ending -aves. Author acknowledges the homonym conflict with 'leaves' and 'leaves', but preferences the word whose singular avoids an exception to the inflection rule.
2014-03-19 19:17:52 -04:00
mark_story
afc8587949 Merge branch 'master' into 2.5 2014-03-18 22:12:14 -04:00
mark_story
ee895a8bb1 Add form attribute to hidden inputs when present.
If inputs are placed outside of the form elements the form attribute
needs to be set on the hidden inputs. Without this attribute the empty
state does not submit correctly.

Fixes #3053
2014-03-18 22:11:57 -04:00
Hadrien
d55a167830 Themed CakeEmail should load view helpers with the theme set 2014-03-18 14:22:24 +01:00
mark_story
9888209e9a Add tests and fix issues with multiple trailing whitespaces.
Closes #3016
2014-03-17 13:08:46 -04:00
ADmad
abacf0d14b Remove setting of Controller::$ext by RequestHandler.
Closes #3022
2014-03-16 20:09:08 +05:30
ndm2
0ae225615c Match SP as per rfc2821 2014-03-15 11:47:13 +01:00
ndm2
c1824071c9 Expose last SMTP response. 2014-03-13 16:28:54 +01:00
mark_story
c5b6dda82f Merge branch 'master' into 2.5 2014-03-11 21:02:27 -04:00
mark_story
c0ac61117e Only sort the keys once per request instead of on each match.
Sorting the keys property by value sorts keys with the same prefix for
free. This does change the order of the keys, but I don't think that is
actually a large issue as it is just a list.

Refs #2991
2014-03-10 21:42:26 -04:00
Mike Gibson
1202658396 Added a test case 2014-03-10 12:03:04 +00:00
Rachman Chavik
aa0f1c1862 Fix: Stray [] syntax in php 5.3 codebase 2014-03-07 09:23:06 +07:00
Rachman Chavik
e71d650ade Fix: Regression with format specifiers in i18n methods
Refs: #2589
2014-03-07 09:22:56 +07:00
mark_story
6c3bc48ce0 Merge branch 'master' into 2.5 2014-03-06 17:45:00 -05:00
Mark
3ca338fe26 Merge pull request #2781 from davidsteinsland/2.5
Fixed HTTP Status code when ajaxLogin is set
2014-03-06 12:37:51 +01:00
mark_story
5544fcc4c2 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/VERSION.txt
2014-03-03 21:20:58 -05:00
ndm2
1015b38a27 Use convenience methods to create a (case-insensitive) negation matcher 2014-03-02 17:56:35 +01:00
ndm2
70a1b87db6 Fix wrong test model association class name 2014-03-01 23:01:33 +01:00
ndm2
01e1b5ca61 Fix failing tests caused by already existing classes 2014-03-01 20:24:32 +01:00
ndm2
008ad3237c Fix verification of expected invocations #2919 2014-03-01 19:06:17 +01:00
ADmad
a707709e1d Added test for FormHelper::radio().
Tests generating radio input for field with model other than one used
in create(). Refs #2911.
2014-02-28 02:34:16 +05:30
mark_story
25f94f9b71 Add test to prove the fix made in pull/2899
Ensure that event listeners are not lost when merging the global and
local listeners.

Fixes #2897
Fixes #2899
2014-02-26 21:06:32 -05:00
mark_story
0f584c0e8b Merge branch 'master' into 2.5 2014-02-24 21:19:17 -05:00
mark_story
0776b87214 Fix postLink() & postButton() with nested data.
Flatten deeply nested array data before generating hidden inputs.
This solves 'Array to string conversion' errors.

Closes #2894
2014-02-24 21:17:31 -05:00
jalbertocr
35f152b333 Make sure a datetime instance is valid to avoid fatal errors. 2014-02-19 20:50:30 -03:00
AD7six
4e0627232c account for localized floats more robustly.
Normalize floats, strings too, so that they are validated as

    dddddddddd.dd

ref #2853
2014-02-19 15:04:25 +00:00
mark_story
b8c94fa5d4 Merge branch 'master' into 2.5 2014-02-18 22:19:12 -05:00
mark_story
0a51458ffd Fix Validation::decimal() not working with localized floats.
Use similar workarounds as DboSource::value() for accepting localized
floats.

Fixes #2853
2014-02-18 22:18:56 -05:00
mark_story
3433f4a1f0 Clean up changes code standards and tests.
Refs #2582
2014-02-17 11:03:49 -05:00
Jonas
b32deed4aa changed FormHelper::secure() and FormHelper::end() to support attributes in the hidden CSRF-protection tags that are being generated for SecurityComponent to allow specification of additional html attributes like HTML5s "form" attribute. This allows separation of Form instantiation/controls and form data - for instance within html tables
improved tests for testing against additional attributes for Form::secure()

improved tests for testing against additional attributes for Form::end()

removed array cast, fixed test

fixed docblock format

format

Fixed a bug, this won't work as some forms are just empty
2014-02-17 10:54:02 -05:00
Mark Story
c325a93998 Merge pull request #2741 from ADmad/2.5-mimetype
Added regex support to Validation::mimeType().
2014-02-17 10:10:48 -05:00
ADmad
9ae7f11a2a Made mimetype check case insensitive. 2014-02-17 11:48:00 +05:30
mark_story
cde93ca7b9 2.x needs to be compatible with PHP<5.4 2014-02-16 21:37:28 -05:00
mark_story
3919f93149 Use simpler assertions. 2014-02-16 14:37:29 -05:00
mark_story
7a4cabe5d3 Add depth to log().
Much like dump() it is handy to be able to control the depth variables
are dumped out when logged.

Refs #2834
2014-02-16 14:35:32 -05:00
mark_story
2c5d96e916 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Datasource/DboSource.php
2014-02-16 14:24:19 -05:00
AD7six
5334fe04c3 handle loose % signs in __() function
While it's passed to sprintf and translation markers may contain
variable placeholders (%s, %d) that doesn't mean translators need to be
aware of all relevant rules. A % sign in a translation message shouldn't
cause a warning (and no return) it should be handled as a literal
percent sign.
2014-02-13 15:30:16 +00:00
euromark
1725386c16 Fix uploadError validation rule to work with OS Win. Here the error is string, not integer. 2014-02-12 21:52:18 +01:00
mark_story
827dc77a11 Fix incorrect assertion. 2014-02-11 22:00:24 -05:00
mark_story
96a37d5917 Fix temporary associations that replace fields not being restored.
When binding temporary associations, fields should be restored
in the afterFind as the association will have become unbound.

Fixes #2816
2014-02-11 21:56:05 -05:00
mark_story
a5d50da040 Remove dead and unused code. 2014-02-11 16:38:24 -05:00
ADmad
9de3418079 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Permission.php
2014-02-11 18:17:59 +05:30
ADmad
1da79080ac Updated bake templates to use CakeRequest::allowMethod() 2014-02-10 17:56:57 +05:30
ADmad
bea30e62cb Renamed CakeRequest::onlyAllow() to CakeRequest::allowMethod().
Existing name is unintuitive and it's not easily apparent what
the method does. Closes #2803
2014-02-10 17:38:55 +05:30
mark_story
91349c306e Remove trailing whitespace.
Refs #2799
2014-02-09 16:03:37 -05:00
Sam
f3cd0fc808 Test added for previous fix in CakeRoute.php. Refs #2797. 2014-02-10 02:20:00 +11:00
ADmad
d9489257d3 Don't return true from view classes' render() method.
It cause's Controller:render() to set the response body as `true`.

Refs #2780
2014-02-06 03:06:00 +05:30
David Steinsland
f2b9aa5ca4 Fixed HTTP Status code when ajaxLogin is set 2014-02-05 16:05:02 +01:00
mark_story
be8ebfc005 Merge branch 'master' into 2.5 2014-02-05 09:22:46 -05:00
AD7six
adc0bf3ded BC fix for checkbox ids
Revert to previous behavior for id generation of checkboxes, This commit
can be reverted for 2.5+ is desired

Fixes #2733
2014-02-03 17:57:26 +00:00
José Lorenzo Rodríguez
e36c954da7 Merge pull request #2693 from ADmad/2.5-session-start
Don't start a session if it's known to be empty.
2014-02-01 04:08:48 -08:00
Mark Story
a6459a6c2f Merge pull request #2740 from rchavik/2.5-event-manager-regression
RFC Fix: CakeEventManager regression
2014-01-31 07:10:46 -08:00
Mark Story
405f3a1cb9 Merge pull request #2752 from rchavik/2.4-postgres-alterschema
Fix: Changing boolean to integer for Postgres
2014-01-31 06:46:52 -08:00
Rachman Chavik
35c22a291e Add test to prove Event Manager regression 2014-01-31 16:52:26 +07:00
Rachman Chavik
59549b7ebe Fix: Changing boolean to integer for Postgres
Closes #2751, CakeDC/migrations#149
2014-01-31 15:14:20 +07:00
mark_story
4d57d3ce5b Fix plugin path filtering when directories do not exist.
When paths do not exist we should correctly remove them from the output
paths.

Fixes #2748
2014-01-30 21:40:08 -05:00
mark_story
605351d0c9 Allow empty values in checkboxes.
Allow the checkbox value attribute to be empty. This is required to make
checkboxes with a value of 0.

Fixes #2717
2014-01-30 21:12:06 -05:00
Walter Nasich
43604f64d5 Rendering a proper value for html5 attribute 'step' 2014-01-30 17:17:50 -03:00
ADmad
2d10707d18 Added regex support to Validation::mimeType(). 2014-01-30 21:05:04 +05:30
mark_story
c1ab6fa9d1 Merge branch 'master' into 2.5 2014-01-30 10:13:37 -05:00
Mark Story
6eb5a38f22 Merge pull request #2692 from jrbasso/2.5-cors
Added support to cross origin requests
2014-01-29 06:45:11 -08:00
Mark Story
8db034cbf1 Merge pull request #2731 from joostdekeijzer/console-extract-not-handling-validation-quotes
Console Extract task doesn't handle validation messages with qoutes correctly
2014-01-29 06:43:23 -08:00
Mark Story
5629dfdcc3 Merge pull request #2728 from joostdekeijzer/2721-fix-in-translatebehavior
Fix Model::field() and  TranslateBehavior::beforeFind() not working together.

Fixes #2721
2014-01-29 06:40:27 -08:00
joostdekeijzer
42daa25340 Fix Console "extract i18n from sources" to handle quotes in Model::validate parameters correctly 2014-01-29 14:53:52 +01:00
joostdekeijzer
987187ef8c Fix #2721 in TranslateBehavior::beforeFind() supporting both Model::field('fieldname') and Model::read('fieldname') 2014-01-29 13:37:47 +01:00
joostdekeijzer
827c815cf1 correct property comment 2014-01-29 12:25:09 +01:00
Rachman Chavik
b83b59a9d7 Log errors instead of calling trigger_error() 2014-01-29 17:51:07 +07:00
ADmad
c093804b35 Merge branch 'master' into 2.5 2014-01-26 17:39:50 +05:30
José Lorenzo Rodríguez
ddf046a246 Merge pull request #2694 from bar/patch-3
Correctly remove routing url from query string.
2014-01-22 05:15:03 -08:00
mark_story
61dd1c3f9d Fix trailing whitespace. 2014-01-21 20:23:12 -05:00
Juan Basso
dae756c84a Added option to allowed headers 2014-01-21 15:31:05 -05:00