Commit graph

4645 commits

Author SHA1 Message Date
euromark
6c1e60953b fix cs 2013-08-03 03:02:52 +02:00
mark_story
b3860b3992 Fix clearing files in multiple groups.
When using multiple groups on a cache config, clearing was not working
properly. Clearing un-used cache configs also failed when the
directories did not exist.

Fixes #3930
2013-08-02 17:56:27 -04:00
mark_story
19ac39963a Remove duplicate code.
The conditions for persistParams() work should be self contained. Remove
this duplication.
2013-08-02 13:30:31 -04:00
mark_story
8209a298f7 Make CakeRoute::persistParams() more tolerant
Subclasses and instances may not always define persist options.
CakeRoute should be accepting of these differences.

Fixes #3957
2013-08-02 13:28:58 -04:00
Christian Winther
50b192eb1b Merge pull request #1470 from uzyn/csfix
CS fix.
2013-08-02 04:49:09 -07:00
Jose Lorenzo Rodriguez
d218313cf5 Removing legacy code that will not work on current versions of phpunit,
fixes #3955
2013-08-02 12:24:43 +02:00
U-Zyn Chua
585ac157c0 CS fix. 2013-08-02 18:19:13 +08:00
Simon Males
0adef209e3 Camel case SecurityComponent::blackHole() method call 2013-08-02 12:07:33 +08:00
Christian Winther
227f9aaa88 Merge pull request #1440 from Phally/master-postgres-fails
Adds order to the test models to make the results more predictable.
2013-08-01 02:38:33 -07:00
mark_story
1202456ef2 Fix errors in ConsoleShell.
The switch statement was failing to evaluate conditions properly and
always attempted to run the bind command.
2013-07-31 23:51:30 -04:00
mark_story
810fd28186 Fix double printing of models in ConsoleShell.
Fixes #3952
2013-07-31 23:41:49 -04:00
mark_story
95b74bd9ef Make sure ComponentCollection has the controller dependency.
Add setter method as changing ComponentCollection's constructor now is
not possible. This fixes issues where components that rely on
Collection->getController() in their constructor can work properly.

Fixes #3946
2013-07-30 09:09:52 -04:00
Mark Story
4c7bc11a08 Merge pull request #1461 from thegallagher/master
Required fields not recognised by FormHelper when only using ModelValidator::add()
2013-07-29 18:33:28 -07:00
David Gallagher
37ab0611ae Fix whitespace 2013-07-30 11:26:49 +10:00
David Gallagher
35cc737261 Add for required fields when using only ModelValidator::add() 2013-07-30 11:11:49 +10:00
David Gallagher
bce0eb37b4 Don't need to check for empty because Model::validator() returns an interator 2013-07-30 11:09:43 +10:00
ADmad
a691e70065 Docblock and return type fixes 2013-07-29 19:13:31 +05:30
Mark Story
7269568ae6 Merge pull request #1460 from ravage84/cakeschematest-setup+teardown
Removed unused setup & teardown methods
2013-07-28 17:54:33 -07:00
Marc Würth
3a4f7815e8 Removed unused setup & teardown methods from MyAppSchema in CakeSchemaTest 2013-07-29 01:55:32 +02:00
Marc Würth
1cac1846a3 Added missing calls to setUp & tearDown in tests 2013-07-29 01:52:39 +02:00
Marc Würth
4a37ad5637 Added return before redirects
As recommended by the Cookbook:
http://book.cakephp.org/2.0/en/development/testing.html#testing-controllers

> When testing actions that contain redirect() and other code following the redirect it is generally a good idea to return when redirecting. The reason for this, is that redirect() is mocked in testing, and does not exit like normal. And instead of your code exiting, it will continue to run code following the redirect.
2013-07-28 23:44:07 +02:00
mark_story
8a81903e37 Fix FileEngine not clearing keys when groups are used.
Fixes #3930
2013-07-27 22:20:40 -04:00
mark_story
17b25388b3 Throw exceptions when '' is used as translation domain.
'' is never a good translation domain and often indicates developer
error. Treat it as a mistake and throw an exception.

Fixes #3939
2013-07-27 21:41:22 -04:00
mark_story
76aab0a635 Add failing test for #3930 2013-07-27 17:15:15 -04:00
mark_story
c28cde4e56 Update webroot files to fix an issue in ServerShell.
The previous fixes done in 2918ae9c7a
caused other issues preventing actions from being dispatched properly.

Fixes #3934
2013-07-27 17:01:35 -04:00
Phally
f7eab23a5c Strips the base off the generated URL from the AuthComponent.
Fixes #3922.
2013-07-26 15:18:28 +02:00
David Gallagher
5937685817 Use ModelValidator::count() to count dynamiclly added validation rules 2013-07-26 22:44:59 +10:00
euromark
8b21710c95 whitespace correction 2013-07-25 13:26:21 +02:00
Phally
881e757a1e Paths for App::build() require trailing /. 2013-07-22 13:51:09 +02:00
Phally
5953171c7b Fixes cake bake all. Refs #1443. 2013-07-20 20:21:35 +02:00
Phally
6d6be87f8f Replaces deprecated paginate() calls in controller bake templates.
Fixes #3895.
2013-07-20 16:59:39 +02:00
Mark Story
1402796047 Merge pull request #1441 from ravage84/ViewTestsCleanup
Added missing test + minor cleanup of ViewTests.php
2013-07-19 19:40:09 -07:00
Marc Würth
da8e50a48a Added missing test + minor cleanup of ViewTests.php
Added missing block reset test through assign().
Also made some minor cleanup in ViewTests.php. Mostly docblocks (params, returns) but also some unused variables.
2013-07-20 01:43:07 +02:00
Phally
db1876d837 Adds order to the test models to make the results more predictable.
Even though there was some code in place to prevent results in random
order from PostgreSQL we were still experiencing this with Jenkins
and Travis.

This commit removes the old code that handled this. From now on this
will be handled differently. Every test model will order by its
primary key. You can disable this by changing the order property
of the model to `null`: `$testModel->order = null`.
2013-07-19 22:31:09 +02:00
Phally
36cac116d0 Fixes errors in tests with APC installed but not enabled in CLI. 2013-07-19 17:04:54 +02:00
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
717b1ded00 Update version number to 2.3.8 2013-07-17 22:15:15 -04:00
mark_story
a8f4ec0450 Simplify whitelist logic. 2013-07-16 19:33:06 -04: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
mark_story
4d6258adeb Correct off by one error.
Refs #3914
2013-07-15 21:48:03 -04: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
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