Commit graph

5018 commits

Author SHA1 Message Date
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
mark_story
a8f4ec0450 Simplify whitelist logic. 2013-07-16 19:33:06 -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
304b54fe7d wording 2013-07-16 15:18:14 +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
Phally
1fe424a62b Moves code out of the try/catch blocks in the connect() methods.
That code wouldn't throw a PDOException, so having it in the
try/catch block is pointless. Moving it out makes it easier to
read.
2013-07-15 12:59:46 +02: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
Mark Story
4774d62e7f Merge pull request #1416 from majna/2.4-pages
Pages controller should render 404 on missing view file
2013-07-13 17:05:14 -07:00
Mark Story
8ad1f00ae4 Merge pull request #1417 from cakephp/feature/2.4-simpler-rewrite
use a simpler rewrite rule
2013-07-13 17:03:56 -07:00
AD7six
6b66aee138 use a simpler rewrite rule
The capture group isn't used - so don't captuer it
There are no get args in the rewrite rule so there's no need to
request appending the existing get args - they are unmodified.
2013-07-13 16:18:48 +00:00
Majna
1ce9fc537f Pages controller should render 404 on missing view file 2013-07-13 17:41:16 +02:00
mark_story
d40c7376ce Rebalance where URL normalization happens in AuthComponent.
Make URL's not include the base path when storing them in the session.
This makes future redirection simpler. When URL's are an array use
Router::url() on them.

Fixes #3916
2013-07-12 21:54:22 -04: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
8133f72b53 Update AuthComponent to not strip when normalizing URLs.
Revert most of the changes done to fix #3897 originally and try
a different strategy of solving the base path issues and not breaking
apps running in a subdirectory.

Fixes #3916
2013-07-12 21:17:25 -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
b3273e9cc2 Correct documentation.
Options are traditionally above the @param block as it results in easier
to read API docs.
2013-07-11 21:00:11 -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
64ff9ad387 Fixed indenting 2013-07-10 17:51:42 +02: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
Charles Burgess
ec1e75fe53 I split out the regex to make it more readable as requested. 2013-07-10 08:28:42 -06:00
Phally
e35bd80dfb Adds option to multiply decimal percentages. Fixes #3814 2013-07-10 14:37:57 +02:00
mark_story
960ce7fa81 Don't use inline assignment.
CakePHP generally avoids inline assignment as it can be confusing and do
the wrong thing.
2013-07-09 21:11:06 -04:00
mark_story
cfa260d8c5 Update ServerShell to use provided documentRoot.
Fix ServerShell from using the wrong path to the routing script when
a custom document root is used. Thanks to Marko Marković for the patch.

Fixes #3909
2013-07-09 21:10:37 -04:00
mark_story
2918ae9c7a Update index.php to serve static files with query strings.
Trim off the query string before attempting to locate the file on the
filesystem. Thanks to Marko Marković for the initial patch.

Fixes #3910
2013-07-09 21:07:12 -04:00
Charles Burgess
fa3d4a0bb5 Updating the phone validation routine.
According to NANPA, there are area codes and exchanges that are invalid or reserved and not available for assignment. This would make those phone numbers invalid. For example:

- area-codes: 555, N11, N9X, 37X, 96X
- exchanges: N11
- numbers: 555-0100 thru 555-0199

You could also say 555-1212 is invalid as it is assigned as information for the US.

I changed the tests where 555 as an area code was being used as the assertion will give it a false on the area code and not the exchange as intended.
2013-07-09 09:54:18 -06:00
Rachman Chavik
542d594b86 Fix deprecated value in argument and disable caching
This aligns better with changes required in the 3.x branch.
Related: 4bb0a122
2013-07-08 21:55:14 +07: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
Mark Story
481d3920ae Merge pull request #1406 from ravage84/formhelper
Some minor CS improvements to FormHelper
2013-07-06 13:57:47 -07:00
Marc Würth
a397f034e6 Some love for a deprecated class
Whitespace and wording.

Optionally we could include a version number until when this class will work. I assumed this will be 3.0...
http://www.phpdoc.org/docs/latest/for-users/phpdoc/tags/deprecated.html
I treid that but after I let apigen generate the doc and I saw it did nothing special about it ;-/
2013-07-06 19:50:26 +02:00
Marc Würth
11eeb33644 Some minor CS improvements to FormHelper
Replaced use of deprecated method getVar by get.
Improved DocBocks, mostly data types
Removed deprecated DocBock tag because it's an invalid use of such. This makes the method look like it was deprecated but in reality it's only one of the possible values of one of its parameters.
2013-07-06 19:04:06 +02:00
Christian Winther
cbb4f7db90 allow serialize in json and xml alias 2013-07-06 16:57:46 +00:00
Marc Würth
d9882fcc08 Fixed three @param data types 2013-07-06 16:49:21 +02:00
mark_story
a7213b2e64 Update doc block. 2013-07-05 21:25:06 -04:00
Marc Würth
85a75906d4 Minor doc block improvements
http://ch1.php.net/manual/de/exception.construct.php
Second parameter gets only passed by. Exception constructor uses an int for the second parameter,not a string.

Replaced text by docblock @see
http://www.phpdoc.org/docs/latest/for-users/phpdoc/tags/see.html
2013-07-06 00:27:23 +02: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
c478d60e79 bool to boolean 2013-07-05 16:07:29 +02:00
euromark
e7f380d2b7 doublespace to single space 2013-07-05 14:36:40 +02:00
euromark
c989624f80 whitespace coding standards 2013-07-05 14:15:18 +02:00
mark_story
fd2c096712 Update version number to 2.4.0-beta 2013-07-04 22:07:25 -04:00
mark_story
06fc8dbfc1 Update version number to 2.3.7 2013-07-04 22:05:00 -04:00
mark_story
22a198a8ba Merge branch 'master' into 2.4 2013-07-04 21:40:51 -04:00
mark_story
c685f6ca13 Make check for .. more specific.
A `..` anywhere in the classname is invalid.
2013-07-04 21:40:30 -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
José Lorenzo Rodríguez
9c4775a220 Merge pull request #1393 from markstory/constant-time-login
Hash passwords even when users don't exist.
2013-07-03 13:49:03 -07: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
mark_story
36d8473215 Make check for .. more specific.
A `..` anywhere in the classname is invalid.
2013-07-03 14:19:39 -04:00
euromark
f389435bae coding standards and else block simplification 2013-07-03 19:27:17 +02: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
Jose Lorenzo Rodriguez
58149f2315 Backporting from 2.4 fix for booleans in mysql when running PHP 5.5 2013-07-02 16:51:29 -04:30
Marc Würth
ff1f80349a Removed superfluous break
In every case of the if clause it will return, so break is not needed.
2013-07-02 21:00:24 +02:00
euromark
c671d8da62 use strict comparison for strings 2013-07-02 11:01:02 +02:00
mark_story
2f57a7fb18 Use simpler and faster code.
substr_compare() is up to 2x slower than just substr(). Use a faster,
more common, and simpler to read variant of the same thing.
2013-07-01 23:06:56 -04: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
17e4eee73d Hash passwords even when users don't exist.
Not hashing passwords when users don't exist means there is an
opportunity for timing attacks when people use blowfish or other
expensive hashing algorithms.
2013-07-01 21:52:15 -04:00
mark_story
9754789b69 Don't load classnames with .. in their names.
Classnames with . in them are invalid and can be leveraged to load code
outside of an application by traversing directories.
2013-07-01 21:21:20 -04: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
Mischa ter Smitten
dad1f16eaf Made _stop() usage in Consoles / Tasks more consistent 2013-07-01 14:15:54 +02: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
Marc Würth
e84bf65016 Typo in FormAuthenticate.php 2013-07-01 00:03:03 +02: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
nojimage
eabea1163f CakeEmail::emailRegex() change to null default value 2013-06-30 00:51:02 +09:00
ADmad
75e7797a26 Allow escaping only attributes of a link and not it's title 2013-06-29 20:51:52 +05:30
euromark
c94fe1b729 also move protected variable resetting into the correct scope 2013-06-29 16:23:55 +02:00
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
Mark Story
b73f927787 Merge pull request #1381 from ravage84/patch-1
Annotated testReconnect
2013-06-27 14:59:29 -07:00
Marc Würth
aabeaada0f Fixed @return statement in DboSource::disconnect 2013-06-27 17:38:46 +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
070a6f0ad5 Added a related cookbook link to DataSource.php 2013-06-26 22:07:52 +02:00
euromark
0ca1ba3211 allow callbacks to modify attachements by moving the decision to calculate boundary value into the correct position inside _render() 2013-06-26 02:20:31 +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
Jose Lorenzo Rodriguez
489d1db7d1 More edge case handlignfor native_type in mysql for older versions of
php
2013-06-24 14:15:15 +02:00
Jose Lorenzo Rodriguez
b8bbf0b4a9 Preventing notice in older versions of php 2013-06-24 14:03:50 +02:00
Jose Lorenzo Rodriguez
f6eac9a175 Fixing boolean type introspection for Mysql in PHP 5.5 2013-06-24 13:42:29 +02: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
Werner Pieterson
9383236114 Formatted code
Formatted code to conform to style guide
2013-06-23 19:49:17 +02:00
Werner Pieterson
b172d6e254 Fixed "delete" translation string bug 2013-06-23 18:10:29 +02:00
ADmad
3e8a7f5e66 Make ScaffoldView extend View instead of deprecated ThemeView 2013-06-22 22:05:31 +05:30
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
1ff77f2363 Fix subtle error in Regex matching URI scheme.
[+-.] will match plus, hyphen, and dot, but also comma. Use [+\-.] since  commas not allowed in URI scheme.
2013-06-21 15:17:59 -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
Marc Würth
2418ea0a57 Fixed typo in AuthComponent::redirectUrl 2013-06-21 16:49:31 +02: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
b6a2c2a982 update bootstrap config 2013-06-21 16:38:25 +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
Mark Story
691288accc Merge pull request #1362 from dereuromark/master-cake-session
cake session clarification
2013-06-18 15:05:00 -07:00
euromark
1b1943954b CakeSession improvements 2013-06-18 23:49:42 +02:00
euromark
eb13242680 assert proper array access for _dateTimeSelected() 2013-06-18 09:39:43 +02: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
Mark Story
b2a40c787d Merge pull request #1327 from pafuinlu/patch-2
Added a clear() function to Model.php (2.4 branch)
2013-06-14 06:18:37 -07:00
mark_story
fe809cd85d Remove undocumented magic features for IIS.
Undocumented, untested features break very easily. It is best to not
have them where possible.
2013-06-13 18:01:11 -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
mark_story
e2d69402e7 Remove dead view cache code.
Now that cache files contain the response headers, this is no longer
needed. Remove what is now duplicate code.

Refs #2358
2013-06-12 21:30:42 -04:00
Mark Story
e454f2d2a3 Merge pull request #1334 from thegallagher/2.3-cache-fix
Fix content-type header in cached views.

Fixes #2358
2013-06-12 18:27:42 -07:00
Mark Story
57d8c6b412 Merge pull request #1350 from dereuromark/master-post-link-doc-block
doc block formhelper postLink
2013-06-12 09:37:08 -07:00
euromark
b5b8885096 doc block formhelper postLink 2013-06-12 18:14:02 +02:00
Mark Story
d52c401ff2 Merge pull request #1348 from thomseddon/consistent-timestamps
Unify modified/created times. Both the created/updated timestamps will reflect the same point in time now.
2013-06-12 07:13:48 -07:00
Thom Seddon
305b3f4688 Unify modified/created times
The former implementation meant that it was not guarantee that
the times automatically generated for the modified/created fields
would be exactly the same for a given operation.
2013-06-12 13:51:56 +01: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
eb72c709f2 Merge pull request #1344 from dereuromark/2.4-router-url
fix absolute url generation
2013-06-10 19:13:16 -07:00
mark_story
cd3c54bb9d Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/VERSION.txt
2013-06-10 22:12:10 -04:00
euromark
9f9c103c6f fix absolute url generation 2013-06-11 00:06:27 +02:00
Frank de Graaf
f79a258a64 Minor optimization of CakeEmail::_wrap(). 2013-06-11 00:53:25 +03:00
euromark
6ed85f2d5d doc block 2013-06-10 15:10:32 +02:00
Mark Story
e77d49f554 Merge pull request #1342 from dereuromark/master-coding-standards
incorrect tab to space - whitespace coding standards
2013-06-09 20:00:46 -07:00
mark_story
d10df32a44 Update version number to 2.3.6 2013-06-09 22:41:41 -04: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
euromark
f6aedea271 coding standards elseif 2013-06-09 17:12:46 +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
Pafu Inlu
08cef539f9 Update Model.php
fixed comment spacing
2013-06-08 05:53:35 -06: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
Arnold Almeida
dacf7e0ebe Update FixtureTask.php
Using err() does not stop shell output when used in the context of a script. 

Also no nice color syntax to indicate that there was an error with one of the fixture generations.

Using error() fixes that.
2013-06-07 14:21:35 +08: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
Jose Lorenzo Rodriguez
51af8800f2 Rewriting assertion to account for the actual case and not breaking in
PHP 5.5
2013-06-06 17:45:52 +02:00
David Gallagher
e222b3b78e Remove trailing space 2013-06-07 01:01:33 +10:00
David Gallagher
0ada093295 Set content-type to xml to replicate existing behaviour 2013-06-07 00:28:28 +10:00
David Gallagher
0eead76d4b Fix content-type header in cached views. Fixes issue #2358 2013-06-06 23:33:51 +10:00
José Lorenzo Rodríguez
3b4a4fde31 Merge pull request #1317 from lorenzo/feature/full-base-url
Adding App.fullbaseURL as a recognized Configure value
2013-06-05 15:12:27 -07:00
Jose Lorenzo Rodriguez
10ba4dd773 Fixed CS errors 2013-06-06 00:11:50 +02:00
Jose Lorenzo Rodriguez
7b746ccb57 Overwriting App.fullBaseURL if changed using Router::baseURL() 2013-06-05 23:57:16 +02:00
Mark Story
e26a05ce04 Merge pull request #1235 from ADmad/2.3-caketime
Fix datetime comparison in relative datetime functions.
2013-06-05 06:12:50 -07:00
Kim Egede Jakobsen
6c3a63ea9b Correct small typos. 2013-06-05 09:57:18 +02:00
Mark Story
59646aa30a Merge pull request #1326 from fahad19/http-patch
convenience wrapper for HTTP PATCH in HttpSocket class.
2013-06-04 20:54:45 -07:00
Pafu Inlu
089c9e1139 Added a clear() function to Model.php (2.4 branch)
1.) Changed Pull Request from master branch to 2.4 (Old Pull Request: https://github.com/cakephp/cakephp/pull/1323)

2.) Updated return value in comment
2013-06-04 15:59:54 -06:00
Fahad Ibnay Heylaal
679177b8f3 convenience wrapper for HTTP PATCH in HttpSocket class. 2013-06-04 22:46:15 +02:00
mark_story
3aa189eb3a Fix cookie expiry time calculation on 32bit systems.
strtotime() misbehaves on 32bit systems when the resulting timestamp
would overflow an integer. Use a DateTime to workaround this issue.

Fixes #3868
2013-06-03 20:16:18 -04:00
mark_story
027cfe9496 Fix typo. 2013-06-02 18:12:51 -04:00
ADmad
f3c69c9f40 docblock updates 2013-06-03 01:04:00 +05:30
mark_story
cbf3228c34 Fix inconsistent name/alias usage.
TranslateBehavior should always use name instead of alias when
creating/updating/saving new translate records. It already uses name
when finding translations and the mismatch was causing translations to
not be found when saved from an aliased model.

Thanks to Joost de Keijzer for providing the initial patch.

Fixes #3865
2013-06-02 13:50:23 -04:00
ADmad
3303a2cda1 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php
	lib/Cake/Console/Templates/skel/Config/Schema/i18n.php
	lib/Cake/Console/Templates/skel/Config/Schema/sessions.php
	lib/Cake/Console/Templates/skel/Config/acl.ini.php
	lib/Cake/Console/Templates/skel/Config/acl.php
	lib/Cake/Console/Templates/skel/Config/bootstrap.php
	lib/Cake/Console/Templates/skel/Config/core.php
	lib/Cake/Console/Templates/skel/Config/database.php.default
	lib/Cake/Console/Templates/skel/Config/email.php.default
	lib/Cake/Console/Templates/skel/Config/routes.php
	lib/Cake/Console/Templates/skel/Console/Command/AppShell.php
	lib/Cake/Console/Templates/skel/Console/cake.bat
	lib/Cake/Console/Templates/skel/Console/cake.php
	lib/Cake/Console/Templates/skel/Controller/AppController.php
	lib/Cake/Console/Templates/skel/Controller/PagesController.php
	lib/Cake/Console/Templates/skel/Model/AppModel.php
	lib/Cake/Console/Templates/skel/View/Errors/error400.ctp
	lib/Cake/Console/Templates/skel/View/Errors/error500.ctp
	lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php
	lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/default.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/error.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp
	lib/Cake/Console/Templates/skel/View/Pages/home.ctp
	lib/Cake/Console/Templates/skel/index.php
	lib/Cake/Console/Templates/skel/webroot/index.php
	lib/Cake/Console/Templates/skel/webroot/test.php
2013-06-02 18:03:59 +05:30
Saleh Souzanchi
ca44413689 fix Form::_selectOptions, when disabled attribute is not array so do not be disabled item of options 2013-06-01 14:16:23 +04:30
mark_story
be2a252345 Fix coding standards. 2013-05-31 10:37:20 -04:00
Mark Story
4b7c128f04 Merge pull request #1320 from ravage84/docblock-improvements
Improved the DocBlocks and other code cleanup
2013-05-31 07:36:04 -07:00
Mark
525bf3b362 Merge pull request #1297 from dereuromark/master-email-wrapping
enforce a better email wrapping to send valid emails
2013-05-31 07:30:32 -07:00
Marc Würth
4c9f0414cb Improved the DocBlocks and other code cleanup
Fixed @license tag, url comes first
Whitespace and other minor code cleanup
Added some docblocks
2013-05-31 00:11:19 +02:00
Jose Lorenzo Rodriguez
4bc92b822e Adding App.fullbaseURL as a recognized Configure value 2013-05-30 16:07:26 +02:00
Sebastián Marcos Arce
bf6c3854e5 Update HttpSocketTest.php
Update tests.
2013-05-30 10:13:31 -03:00
Sebastián Marcos Arce
fe774ecc03 Update HttpSocket.php
Add 'allow_self_signed' SSL context option.
2013-05-30 10:06:10 -03:00
Marc Würth
2bbd391972 Synced PHP version annotations
CakePHP seems to be just "PHP 5" as opposed to the PEAR header comment standard "PHP version 5"
http://pear.php.net/manual/en/standards.header.php
2013-05-29 20:19:14 +02:00
Mark Story
bed60b5d82 Merge pull request #1312 from ravage84/package-fixes
Fixed or removed some package/subpackage definitions to reflect director...
2013-05-29 10:14:00 -07:00
Marc Würth
e7eb09bc23 Renamed ...Controller package to ...View
Probably a leftover from splitting in 09e7f1d491
2013-05-29 17:20:41 +03:00
Christian Winther
2eb9841c54 Add short option for theme in BakeShell 2013-05-29 13:49:51 +00:00
Christian Winther
5aac41ed43 Fix indentation and add short option 't' for template 2013-05-29 13:49:12 +00:00
Christian Winther
ae3d9a7a8e Remove ` from help line 2013-05-29 13:46:13 +00:00
Christian Winther
2fca41c35d Enable the user to provide a CLI theme through the --theme option for all bake tasks 2013-05-29 13:41:57 +00:00
Marc Würth
29cc6b3652 Fixed or removed some package/subpackage definitions to reflect directory structure
Lowercase cake instead of Cake
Tests instead of Test
Fixtures instead of Fixture
2013-05-29 15:00:18 +02:00
Damien Biasotto
e1c27af9e9 Fix typo variable name in _deleteDependent().
It's not a big deal but there was a typo in _deleteDependent() method. 

$savedAssociatons instead of $savedAssociations.
2013-05-29 14:25:39 +03:00
mark_story
cce9e84907 Merge branch 'master' into 2.4 2013-05-28 22:40:32 -04:00
mark_story
06cf62aefe Fix failing tests.
Refs GH-1307
2013-05-28 22:38:01 -04:00
Mark Story
aa9f221254 Merge pull request #1307 from Jippi/hotfix/debug-in-cli-should-include-newline
debug() in CLI should include newline..
2013-05-28 19:31:41 -07:00
Mark Story
b111750494 Merge pull request #1308 from Jippi/hotfix/sql-bug-with-not-in-with-one-key
Hotfix/sql bug with NOT in with one key
2013-05-28 10:21:21 -07:00
Ceeram
49aded5399 fix coding standard error 2013-05-28 18:39:38 +02:00
Mark Story
05f58a700c Merge pull request #1306 from Jippi/hotfix/notice-should-be-styled-too
Adding color output for notice / LOG_NOTICE in ConsoleOutput
2013-05-28 09:07:34 -07:00
Christian Winther
ef8603e1a7 Add unit test 2013-05-28 12:02:58 +00:00
Christian Winther
4752fcd713 Adding color output for notice / LOG_NOTICE in ConsoleOutput 2013-05-28 11:59:37 +00:00
Christian Winther
d14f0cece4 debug() in CLI should include newline..
If not, two debug() statements after each other is very hard to read, as the #### separater is on the same line
2013-05-28 11:57:59 +00:00
Christian Winther
9e6120c86a This fixes an issue where attempting to use "!=" in a condition with an array with only a single element generates invalid SQL.
Example:
$condition['Model.id !='] = array(1, 2); //Generates Model.id NOT IN (1, 2) as expected
$condition['Model.id !='] = array(1); //Generates Model.id != = (1) which is invalid SQL

Patch will cause the above to generate Model.id != (1);

This an implimentation of @markstory's suggestion on PR 1232
2013-05-28 11:54:31 +00:00
euromark
bebb8ec416 do not translate error message in test case 2013-05-28 03:25:52 +02:00
mark_story
7334643b55 Fix issues with getting Xml as SimpleXmlElement and invalid Xml.
Fixes #3855
2013-05-27 13:22:14 -04:00
mark_story
41e0c524f2 Only try to use CakeErrorController if AppController exists.
This fixes missing error pages when there are parse errors in
AppController.

Fixes #3850
2013-05-26 22:11:53 -04:00
ADmad
00f972f033 Deprecated AuthComponent::password() 2013-05-27 00:25:42 +05:30
ADmad
56fa0dccda Remove unnecessary overriding of '_findUser()' in 'DigestAuthenticate'. 2013-05-26 12:31:40 +05:30
ADmad
dd2892ad8d Added password hasher 2013-05-26 11:29:06 +05:30
ADmad
36c592e72e Merge branch 'master' into 2.4 2013-05-26 11:23:53 +05:30
Mischa ter Smitten
c0039f642e Output to stderr, not stdout 2013-05-25 23:19:31 +02:00
Mischa ter Smitten
caec0abcfc Fix for ExtractTask does not check output directory (ticket 3852) 2013-05-25 22:32:07 +02:00
mark_story
9ee610757e Throw exceptions when invalid permission keys are used.
Silently 'failing' to save permissions is bad, throw exceptions instead.

Fixes #3851
2013-05-24 21:47:22 -04:00
Rachman Chavik
a63b54c34b Fix: Incorrect model being used as Controller::$modelClass
We cannot be sure that Controller::$uses have not been iterated, so
reset the array to use the first value.
2013-05-24 17:50:43 +07:00
euromark
75b5a323e4 enforce a better email wrapping to send valid emails 2013-05-23 18:34:39 +02:00
mark_story
ca1f9e800e Make CakeEmail::config() merge configuration.
This allows you to incremementally overwrite configuration and better
matches other config methods in CakePHP.

Fixes #3848
2013-05-23 09:47:24 -04:00
mark_story
85a906c0fc Expand doc blocks. 2013-05-23 09:45:50 -04:00
ADmad
11e428bca3 Fix docblock 2013-05-23 01:02:07 +05:30
Mark Story
074b21591c Merge pull request #1294 from ADmad/2.3-bugfix-smtp
Ensure passing empty array to SmtpTransport::config() does not reset exi...
2013-05-22 06:21:07 -07:00
Mark Story
085ebae1d3 Merge pull request #1295 from cakephp/master-i18n-fixes
Master i18n fixes
2013-05-22 06:20:04 -07:00
euromark
fa02a2efc9 unify "Are you sure you want to delete" 2013-05-22 12:15:33 +02:00
euromark
e3e11a48e6 fix some domain translations and remove leftover true param from 1.x 2013-05-22 11:15:01 +02:00
ADmad
eccdf3bf60 Ensure passing empty array to SmtpTransport::config() does not reset existing config.
Synced args and return value with AbstractTransport::config().

Fixes #3840
2013-05-22 11:36:31 +05:30
Mark Story
1357b00843 Merge pull request #1289 from gilleswittenberg/master
Allow setting type attribute on script block tags
2013-05-21 13:27:35 -07:00
mark_story
408aac4798 Update return types. 2013-05-21 15:45:22 -04:00
Gilles Wittenberg
6d996d52ce Allow setting different type on scriptStart + scriptEnd 2013-05-21 20:14:44 +02:00
Gilles Wittenberg
f19615a3be Allow setting different type on scriptBlock 2013-05-21 20:14:44 +02:00
Mark Story
28a3b73bdc Merge pull request #1292 from openam/HtmlHelper
make HtmlHelper::tag() just return the $text content with no wrapping tag when $name === false
2013-05-21 08:44:08 -07:00
Mark Story
e2304d8fd6 Merge pull request #1293 from kunit/2.3-cakeemail-wrap
Processing was simplified when a length of one line was smaller than CakeEmail::LINE_LENGTH_MUST
2013-05-20 19:24:41 -07:00
mark_story
82d57fb8b2 Add mocked components to the enable list of components.
Mocked components should be enabled so they receive callbacks. This
allows more realistic integration tests using testAction(). Stop
disabling the constructor as it causes a number of errors with
components that use components.

Fixes #3842
2013-05-20 22:22:22 -04:00
mark_story
9cdc3927f2 Tidy up variable names.
Variables with _ in them are confusing, try to use clearer names.
2013-05-20 21:52:08 -04:00
TAKAHASHI Kunihiko
05473fe7d0 Processing was simplified when a length of one line was smaller than CakeEmail::LINE_LENGTH_MUST 2013-05-21 10:50:46 +09:00
Michael Tuttle
0d082b599a changed HtmlHelper::tag() just return $text when empty($name) 2013-05-20 17:36:51 -06:00
Mark Story
631082a2a4 Merge pull request #1284 from jmillerdesign/public-cakeemail-readfile
Utilize File utility to base64 encode email attachments
2013-05-20 08:19:39 -07:00
J Miller
b42a2d45e7 Remove readBase64() from File utility, since it is not commonly used. 2013-05-19 22:00:42 -07:00
Michael Tuttle
12462b2e51 make HtmlHelper::tag() just return the $text content with no wrapping tag when $name === false 2013-05-19 22:00:27 -06:00
ADmad
fb86859585 Merge branch 'master' into 2.4 2013-05-19 14:37:41 +05:30
mark_story
f8c6138ad7 Fix incorrect exception type when double slash paths are used.
Fixes #3838
2013-05-18 12:20:06 -04:00
J Miller
987c01856a Change variable name to be descriptive 2013-05-17 19:01:18 -07:00
mark_story
e23c4ffad9 Fix empty response bodies when redirect URL's are empty.
When redirecting XHR requests to an empty URL the response body should
not be overwritten.

Fixes #3835
2013-05-17 16:33:08 -04:00
Mark Story
9147f545fe Merge pull request #1286 from kunit/master
CakeEmail::_wrap does not operate correctly by the character string of specific Japanese.
2013-05-17 13:17:13 -07:00
J Miller
277ec8d89b Update link url to revised method name 2013-05-17 10:28:06 -07:00