José Lorenzo Rodríguez
a54c92fc0f
Merge pull request #1475 from cakephp/feature/2.4-mock-app-model
...
Make mocking random models easier
2013-08-05 00:22:53 -07:00
ADmad
04fb1eb614
Added more tests to db related tests group
2013-08-04 23:38:30 +05:30
ADmad
f68701d647
Created new test group for all db related tests
2013-08-04 21:23:45 +05:30
ADmad
38b050a711
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Console/Command/ConsoleShell.php
2013-08-04 19:26:55 +05:30
AD7six
ff856b7ebb
bark if the model doesn't exist
...
Getting the following warning:
ReflectionException: Class Mock_Foo_e187b1d1 does not have a
constructor, so you cannot pass any constructor arguments
Is a much less obvious way of saying "the class you're trying to mock
doesn't exist". Be more explicit
2013-08-03 16:00:34 +00:00
AD7six
35b4ac0286
make it possible to run this test on its own
...
Without setting up paths to the test_app - two of the tests will fail
Verify/demonstrate how to mock a model without a model existing
2013-08-03 16:00:04 +00:00
AD7six
46b28aae50
merge config in getMockForModel
...
Otherwise, to override just one key, it's necessary to set all the other
defaults too
2013-08-03 16:00:04 +00:00
Juan Basso
cda1a1e6c9
Added test for relative path using app asset configuration
2013-08-03 11:04:52 -04:00
Juan Basso
db6d0a748b
Fix for relative protocol on assets
2013-08-03 10:36:19 -04:00
Juan Basso
316c6582ea
Fixed pathPrefix for css and script methods
2013-08-03 10:36:19 -04:00
Juan Basso
c0212a0454
Supporting full urls on css/js/image url constants
2013-08-03 10:34:47 -04:00
Christian Winther
cd44c2afae
Merge pull request #1472 from ADmad/bugfix/3948
...
Fixed bug when using multi model fieldList and whitelists for all models...
2013-08-03 05:56:22 -07:00
Andy Dawson
f34388c53a
Merge pull request #1471 from cakephp/feature/2.4-pretty-print
...
pretty print json and xml responses in debug mode
2013-08-03 01:35:56 -07:00
mark_story
b5edcba309
Unlink files with full path.
2013-08-02 23:41:15 -04:00
mark_story
b999b4d9ae
Fix error when clearing FileCache.
...
I made a mistake in a previous commit that did not account for dir()
returning directory names.
2013-08-02 23:32:17 -04:00
mark_story
1b610a8d62
Move disabling of bootstrap mode to after init().
...
init() loads from the cache which can autoload additional classes. For
example the FileEngine adapter loads Inflector. Loading additional
classes causes the file_map cache to be re-written on each request when
using FileEngine. This results in degraded performance when using
FileEngine.
Fixes #3947
2013-08-02 23:20:13 -04:00
euromark
a5531f7419
fix casing
2013-08-03 04:32:39 +02:00
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
ADmad
a2e818e509
Deprecated ConsoleShell
2013-08-03 03:04:32 +05:30
ADmad
473e4f991f
Fixed bug when using multi model fieldList and whitelists for all models are not provided.
...
Fixes #3948
2013-08-03 02:49:41 +05:30
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
AD7six
1643e10c74
pretty print json and xml responses in debug mode
2013-08-02 15:17:24 +00:00
Christian Winther
50b192eb1b
Merge pull request #1470 from uzyn/csfix
...
CS fix.
2013-08-02 04:49:09 -07:00
Andy Dawson
d7bc432202
Merge pull request #1468 from cakephp/feature/fix-console
...
Fix the console cli
2013-08-02 04:22:21 -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
5bd45ec65d
Fix double printing of models in ConsoleShell.
...
Fixes #3952
2013-08-01 08:50:02 +00:00
AD7six
69be4bb1e8
Update the console shell for easier maintenance
2013-08-01 08:39:01 +00: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
ADmad
61bf8df454
Renaming base url config keys and methods for better uniformity.
2013-08-01 00:44:36 +05:30
ADmad
b22b39f158
Deprecate constants IMAGES_URL, CSS_URL, JS_URL and add corresponding config values instead.
2013-07-31 18:31:26 +05:30
ADmad
b7cee8ff57
Ensure Configure::boostrap() doesn't overwrite existing configs under 'App' key.
...
Fixes #3874
2013-07-31 17:24:36 +05:30
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
a70e004cda
Corrects bad merge.
...
Bad merge: d161b21ae1
Fixes #3938 .
2013-07-26 20:00:32 +02:00
Phally
933013f808
Test case to prove base urls are stripped.
...
Refs #3938 , #3916 .
2013-07-26 19:57:12 +02:00
Phally
6b41eaa950
Merge branch 'master' into 2.4
2013-07-26 19:44:11 +02: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
euromark
24fa926ff9
remove private in favor of protected visibility
2013-07-22 21:08:05 +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
2d2721d2d9
Update docs for MySQL
...
MySQL supports a few non-standard options. Document them.
2013-07-19 23:01:16 -04:00
Mike Scarborough
c780ded512
add SSL support to MySQL PDO connections
2013-07-19 22:56:51 -04: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
c5e3bbec29
Merge pull request #1435 from Phally/2.4-paginatorhelpertest
...
Test case that proves #1432 .
2013-07-18 11:07:59 -07:00
Phally
32b818d2d8
Fixes bug in the first link of PaginatorHelper::numbers().
...
The link was the current URL instead of a link to the first
page. This only happened with named parameters. This commit
also includes a test for querystring parameters.
Refs #1432 .
2013-07-18 19:32:41 +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
5769217ef9
Merge pull request #1433 from dereuromark/2.4-user-agent-session
...
Always create user agent hash in session
2013-07-18 07:05:10 -07:00
euromark
0b6919ee94
force option for bake tasks (view, model, controller, test, fixture)
2013-07-18 13:09:00 +02:00
euromark
7a1a3e593d
Always create user agent hash in session
2013-07-18 12:02:42 +02: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
717b1ded00
Update version number to 2.3.8
2013-07-17 22:15:15 -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
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