Commit graph

2461 commits

Author SHA1 Message Date
mark_story
f725779a17 Better support various ranges as described in RFC2616
Refs #3914
2013-07-18 11:26:55 -04:00
mark_story
3f9e8e8113 Add missing calls to parent. 2013-07-18 11:04:09 -04:00
mark_story
e03d3df0fe Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Test/Case/View/HelperTest.php
	lib/Cake/VERSION.txt
2013-07-17 22:40:09 -04:00
Mark Story
204fb4b864 Merge pull request #1428 from markstory/2.4-location
2.4 location
2013-07-17 18:19:13 -07:00
Christian Winther
4416f2e796 Merge pull request #1427 from dereuromark/2.4-paginator-page1
fixes #700
2013-07-17 09:26:08 -07:00
mark_story
7b5122adb1 Fix pluralization of Objective.
Fixes #3921
2013-07-17 10:04:29 -04:00
mark_story
6c18f6a231 Add failure messages to test assertions. 2013-07-17 09:47:10 -04:00
euromark
22d6625872 fix test 2013-07-17 12:18:06 +02:00
mark_story
2df873412c Add CakeResponse::location()
This method provides an easy to use interface to get/set the location
header in a response object. This is primarily to facilitate future
development in 3.x
2013-07-16 23:38:57 -04:00
euromark
05415dd83f do not display page:1 or ?page=1 to avoid duplicate content in paginator helper output 2013-07-17 00:45:27 +02:00
mark_story
d4db64ff26 Ignore asset requests containing %2e in them.
urldecode URI's early to avoid issues with encoded `.` characters.
2013-07-16 13:14:27 -04:00
mark_story
b873186468 Fix being unable to sort on custom synthetic columns.
If a sort field whitelist is used we should trust its data and also
trust that the developer wanted what they asked for. This solves issues
where it was impossible to sort on synthetic columns added in custom
find types.

Fixes #3919
2013-07-16 10:19:18 -04:00
euromark
b412e2cbb1 provide ability for rounding - closes #1986 2013-07-16 15:42:08 +02:00
euromark
13ee5b7338 ability to provide custom strings for timeAgoInWords() 2013-07-16 15:16:30 +02:00
mark_story
4d6258adeb Correct off by one error.
Refs #3914
2013-07-15 21:48:03 -04:00
Christian Winther
532b2099e5 Merge pull request #1410 from Phally/2.x-3814
LH#3814 CakeNumber::toPercentage() should return percentage
2013-07-15 10:44:41 -07:00
Adam Taylor
5a6f1259e3 Fix the "testAssetUrlNoRewrite" test
When running the test in the browser from somewhere other than
http://localhost (e.g. http://foo.dev), the test was failing.
2013-07-13 23:38:55 -06:00
ADmad
d161b21ae1 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Controller/Component/AuthComponent.php
2013-07-14 10:58:55 +05:30
Majna
1ce9fc537f Pages controller should render 404 on missing view file 2013-07-13 17:41:16 +02:00
mark_story
e016f1156f Revert previous changes.
Adding this parameter was a mistake. Remove it.
2013-07-12 21:37:22 -04:00
mark_story
52be365598 Introduce the strip argument to Router.
This allows callers to request that the basepath *not* be stripped off
when normalizing string URL's. This is important in AuthComponent when
handling redirect URL's as the redirect location could point to
a controller that shares a name with the base path.

Refs #3897
Refs #3916
2013-07-12 21:16:18 -04:00
Mark
f9fdc1e6e0 Merge pull request #1408 from dereuromark/master-cleanup
remove @access and unnecessary $name
2013-07-12 07:10:23 -07:00
mark_story
494fd05de6 Fix downloading Ranges in files.
Correctly handle ranges that don't terminate at the end of the file.
Also reject invalid ranges as described in RFC-2616.

Thanks to Kim Biesbjerg for the initial patch.

Fixes #3914
2013-07-11 23:20:12 -04:00
Mark Story
d992d3a626 Merge pull request #1385 from LeaseWeb/2.4
Add option to send email attachment from string (not only from file).
2013-07-10 10:12:07 -07:00
Mark Story
1ecc921e13 Merge pull request #1412 from wernerhp/master
Inflector pluralize and singularize update
2013-07-10 08:59:03 -07:00
Werner Pieterson
3d83c628eb Added more words to InflectorTest 2013-07-10 17:49:18 +02:00
Werner Pieterson
a27499d88a Updated Inflector's 'pluralize and singularize to correctly handle addisional words.
Updated InflectorTest to test new words.
2013-07-10 17:46:01 +02:00
Phally
e35bd80dfb Adds option to multiply decimal percentages. Fixes #3814 2013-07-10 14:37:57 +02:00
euromark
a643295e4c remove @access and unnecessary $name 2013-07-08 15:50:50 +02:00
ADmad
4ded269549 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Controller/Component/Auth/BlowfishAuthenticate.php
	lib/Cake/VERSION.txt
2013-07-07 12:22:12 +05:30
Rachman Chavik
0555895de3 Remove leftover temp file 2013-07-07 11:20:37 +07:00
Rachman Chavik
4bb0a1228a Fix I18n to extract plugin model validation messages 2013-07-07 11:20:14 +07:00
Christian Winther
cbb4f7db90 allow serialize in json and xml alias 2013-07-06 16:57:46 +00:00
euromark
af455b4121 correct return types in doc blocks 2013-07-05 17:19:22 +02:00
euromark
ba02678693 doc block corrections 2013-07-05 16:17:23 +02:00
euromark
e7f380d2b7 doublespace to single space 2013-07-05 14:36:40 +02:00
mark_story
22a198a8ba Merge branch 'master' into 2.4 2013-07-04 21:40:51 -04:00
euromark
a620fbbbb8 fix cs 2013-07-04 13:30:08 +02:00
euromark
f680c763b2 ticket-3902 - paginator and display of order via model default order 2013-07-04 13:07:14 +02:00
mark_story
c597855fe4 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Test/Case/Network/CakeRequestTest.php
2013-07-03 14:21:09 -04:00
euromark
a90cb29c0f simplify else cases 2013-07-03 01:14:41 +02:00
euromark
7cb19b97db coding standards and simplification of else cases as well as some minor fixes 2013-07-03 00:52:48 +02:00
mark_story
521c293eb1 Fix coding standards. 2013-07-01 22:56:00 -04:00
Mark Story
9a08aeafcf Merge pull request #1377 from ravage84/fix-for-3318
Trim off webroot/index.php when determining base and url.

Trimming off index.php from url and webroot/index.php from base url allows the correct values to be created when a path contains index.php in it.

Fixes #3318
2013-07-01 19:51:34 -07:00
Mark Story
2219991d3b Merge pull request #1386 from nojimage/cakeemail-custom-email-validation
CakeEmail class be able to setting custom email validation rule.
2013-07-01 07:36:34 -07:00
Mark Story
da033cbed7 Merge pull request #1375 from dereuromark/master-cake-email
Move boundary calculation inside _render()
2013-07-01 06:12:24 -07:00
Mark Story
94db8fbed6 Merge pull request #1380 from ceeram/2.4-ext
Set extension with multiple accept based on order in parseExtensions.
2013-06-30 19:42:50 -07:00
nojimage
f6a011215c change emailRegex to emailPattern 2013-07-01 00:03:18 +09:00
Marc Würth
f930a50805 Fix for #3318
Fixes https://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/3318

It seems fixing this in the htaccess file(s) isn't going to work even though a url rewriting based solution was more clean. On the plus side this works for any web server.
If a url is called with "index.php" in it then the CakeRequest swallows this part and fixes the path. Any linked url from the requested page will have a clean url. Thus after following one of these urls this problem is gone anyway.

Some code docblock improvements to CakeRequestTest.php
Added test case for fix
Also now you can call just index.php even if you have url rewriting enabled
2013-06-30 05:38:58 +02:00
mark_story
f09693f6e8 Merge branch 'master' into 2.4 2013-06-29 23:26:26 -04:00
mark_story
1d18a4f702 Fix issue where redirectURLs were not generated correctly.
When the first path segment matches the base path an incorrect URL was
generated. Trimming slashes off makes Router normalize the URL correctly
as the leading / implies that the base is already prepended.

Fixes #3897
2013-06-29 23:26:13 -04:00
mark_story
0d76bfe325 Add an additional test for CakeRequest::referer().
Trying to track down the issue for #3897. This test coverage was
missing, so fix that.
2013-06-29 23:26:13 -04:00
ADmad
75e7797a26 Allow escaping only attributes of a link and not it's title 2013-06-29 20:51:52 +05:30
euromark
b346c4af8e Test to proof that render itself should handle the boundary. 2013-06-29 15:16:58 +02:00
nojimage
175280ad79 CakeEmail be able to setting custom email validation rule 2013-06-29 02:55:16 +09:00
nojimage
202b753c63 Add emailRegex property to CakeEmail 2013-06-29 02:44:55 +09:00
Maurits van der Schee
cd71a8439c Add option to send email attachment from string (not only from file).
I would be very pleased if this option would be available in some
future version. Thank you.
2013-06-28 02:12:28 +02:00
Marc Würth
9591f55394 Annotated testReconnect 2013-06-27 17:15:56 +02:00
Mark Story
6fdbdf508f Merge pull request #1368 from planardothum/url-conformance
Url conformance
2013-06-27 06:31:42 -07:00
Ceeram
6a0185d7e6 Set extension with multiple accept based on order in parseExtensions, currently with multiple accepted types, no extension is set at all 2013-06-27 14:34:00 +02:00
Marc Würth
2609016dfe Changed http links to lighthouse, groups.google and github to https
Because they get redirected anyway and we should follow good practices.
Also in many cases similar URLs were already using https
2013-06-25 22:58:30 +02:00
euromark
ee5e8c95dd fix issue with FormHelper and undefined variable and extract 2013-06-25 12:11:10 +02:00
euromark
290c343a74 tests to disprove that input date and partial dateFormat does not work 2013-06-25 11:54:29 +02:00
Juan Basso
19c94d0211 Fixed default datestyle for postgres tests 2013-06-25 00:15:03 -04:00
Juan Basso
accc98f55d Resetting the datestyle to not affect other tests 2013-06-24 23:36:40 -04:00
euromark
d6c25bd0e3 add convenience method param() for PaginatorHelper 2013-06-24 00:03:08 +02:00
José Lorenzo Rodríguez
fb111d6fd6 Merge pull request #1366 from dereuromark/2.4-unify-engine
unify engine to not require the suffix
2013-06-23 14:42:13 -07:00
mark_story
dcf7df39d2 Merge branch 'master' into 2.4 2013-06-21 17:47:37 -04:00
mark_story
94815a74f1 Add ordering to prevent occasional pgsql failures. 2013-06-21 17:47:08 -04:00
Harold Putman
7acf162268 HTTP_HOST is not available in CLI
use FULL_BASE_URL instead.
2013-06-21 16:37:39 -04:00
Harold Putman
2fd36bdedc Router::url should passthru //example.com/file.ext
The function allows ://example.com/file.ext but was treating //example.com as cake-relative URL. The updated regex matches URI schemes as defined in RFC2396. Will passthru any of these formats:
* Starts with a valid URI scheme  (javascript:, https:, itunes:, ftp:)
* Starts with a '#'
* [NEW] Starts with a '?' which may be meaningless, but is as valid as starting with '#' (RFC1808)
* starts with //, or :// (:// is not technically valid, but included for compatibilty)
2013-06-21 15:10:11 -04:00
Harold Putman
cfdac5e32d Allow plus signs in URL's to pass unscathed in Helper functions.
According to  RFC 1738 the plus sign does not have special meaning outisde of the query part of a URL.
2013-06-21 14:24:39 -04:00
euromark
8141dd2d5d unify other log types as well 2013-06-21 16:43:01 +02:00
euromark
24506dcc2c update test for FileLog config 2013-06-21 16:39:51 +02:00
euromark
cb24dbb084 unify engine to not require the suffix (as Cache and other places do). 2013-06-21 15:04:27 +02:00
mark_story
68db74d32d Cleanup from previous commit.
Refs #GH-1352
2013-06-19 15:06:51 -04:00
Lucas Machado
dc3f9113b0 Fix to the date input year field
Create the field if no value is informed only to the maxYear and not to
the current date.
2013-06-19 15:05:15 -04:00
Rachman Chavik
0d486bdab4 AuthComponent: Allow suppressing authError message
When unauthenticated users accesses protected areas, they are greeted
with the default 'You are not allowed to access that location' which is
not desired in some cases.

This patch allows applications to suppress this message by setting
AuthComponent::authError to false bypassing the call to
SessionComponent::setFlash() altogether.

Refs: https://github.com/croogo/croogo/pull/175#discussion_r4714240
2013-06-17 09:33:59 +07:00
ADmad
12da3b1f27 Merge branch 'master' into 2.4 2013-06-16 13:07:44 +05:30
mark_story
111bfa43d4 Fix incorrect autolinking when urls end at HTML tags.
Fixes #3879
2013-06-15 22:01:29 -04:00
mark_story
1c358c0f53 Add tests for Model::clear() 2013-06-14 09:21:20 -04:00
euromark
4671f235ad duplicate line removed 2013-06-13 14:15:00 +02:00
José Lorenzo Rodríguez
2f93d781ad Merge pull request #1349 from renansaddam/smtpTransportReturnPath
Using Return-Path email address in MAIL FROM instead of a header in SmtpTransport
2013-06-13 05:05:36 -07:00
Renan Gonçalves
796e4b45dd Using Return-Path email address in MAIL FROM instead of a header in SmtpTransport.
The Return-Path header should not be present on the SMTP transaction, this header is set by the time of final delivery.
Quote RFC2821:
> When the delivery SMTP server makes the "final delivery" of a message, it inserts a return-path line at the beginning of the mail data. This use of return-path is required; mail systems MUST support it. The return-path line preserves the information in the from the MAIL command.
2013-06-12 11:31:49 +02:00
Rik van der Heijden
e7d2892e81 Fixed unit-test locales 2013-06-11 20:18:40 +02:00
mark_story
cd3c54bb9d Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/VERSION.txt
2013-06-10 22:12:10 -04:00
euromark
6ed85f2d5d doc block 2013-06-10 15:10:32 +02:00
euromark
42777b7809 incorrect tab to space - whitespace coding standards 2013-06-09 21:01:01 +02:00
euromark
4518624187 more whitespace coding standard corrections 2013-06-09 17:39:48 +02:00
euromark
a6f065e7a2 coding standards whitespace and single quote 2013-06-09 17:20:08 +02:00
ADmad
405c5b0280 Fix test 2013-06-09 18:57:09 +05:30
ADmad
636cc8c103 Merge branch 'master' into 2.4 2013-06-09 18:08:32 +05:30
mark_story
e5b1182a0d Only delete files that have a matching group + prefix.
Fixes #3873
2013-06-08 22:42:41 -04:00
Aymeric Derbois
0cfdb87cdf Fix a problem of tag values which is not taken into account
(when equal to zero) when passing an array to XML object.
2013-06-09 00:52:06 +02:00
mark_story
e527eab5aa Add missing call to parent::setUp() 2013-06-08 09:47:46 -04:00
Mark Story
5cdd11cb38 Merge pull request #1336 from djbobke/caketimetest-locale
Fix locale for CakeTimeTest when configured different locale in app
2013-06-08 06:45:20 -07:00
Rik van der Heijden
0946a7799a Fix locale for CakeTimeTest when configured different locale in app 2013-06-08 10:25:28 +02:00
euromark
394bf1054d remove name attribute where not necessary, clean up doc blocks 2013-06-08 04:29:08 +02:00
Jose Lorenzo Rodriguez
f14c55916f Repeating previous change for SQLite, so it passes on PHP 5.5 2013-06-06 18:12:07 +02:00
Jose Lorenzo Rodriguez
04a6bfbda6 Fixing postgres test for PHP 5.5 2013-06-06 17:55:55 +02:00