Commit graph

5456 commits

Author SHA1 Message Date
Mark Story
942bb77046 Merge pull request #1695 from renan/2.4-wordwrap
Make String::wrap() unicode aware. Fixes #3981.
2013-10-02 05:04:02 -07:00
Renan Gonçalves
a73e926467 Make String::wrap() unicode aware. Solves #3981. 2013-10-01 22:35:11 +02:00
mark_story
314ae1c8b4 Merge branch 'master' of github.com:cakephp/cakephp 2013-10-01 15:12:34 -04:00
Simon Males
c998888fe7 Do not assume CONTENT_TYPE is available.
In some server environments notably the CLI server, _SERVER['CONTENT_TYPE'] is not available.
In these cases, fall back to the HTTP_CONTENT_TYPE header.

Refs #GH-1661
2013-10-01 15:10:33 -04:00
ovidiupruteanu
dd3b1e41bc Test case for DboSource::flushMethodCache 2013-10-01 21:34:40 +03:00
euromark
1c6a379346 Fix issue 4116 and also merge both versions of home.ctp 2013-09-30 20:45:26 +02:00
José Lorenzo Rodríguez
06a89f128a Changing order of jpeg aliases so that mapType() returns the most common one 2013-09-28 14:24:13 +02:00
Schlaefer
be61a5023f Refactors Model::_clearCache
- don't use mixed keys in $assoc array
- removes unnecessary strtolower on Inflector::underscore result
- return early
2013-09-28 10:16:23 +02:00
mark_story
e96fe515a1 Rename config class used in test cases.
Having a separate classname for testing allows the testsuite to not
provide a classname that the application would. This allows composer to
generate the correct classmap when CakePHP is installed with composer.

Fixes #4112
2013-09-27 22:22:23 -04:00
Bryan Crowe
bb65765d70 Updated additional references of Cake to CakePHP 2013-09-27 21:31:35 -04:00
Frank de Graaf
3e8af8b180 Merge pull request #1689 from dereuromark/master-cakephp-name
Cake to CakePHP name
2013-09-27 12:16:25 -07:00
Frank de Graaf
ceb78fee9c Merge pull request #1671 from ADmad/bugfix/auth-infinite-redirect
Fixed infinite redirects when authenticated user tried to access login p...
2013-09-27 12:13:36 -07:00
euromark
9a86f7e883 correct spelling mistake 2013-09-27 20:28:03 +02:00
euromark
df269ba0ef Cake to CakePHP name 2013-09-27 19:36:43 +02:00
ADmad
4dbf9107a8 Fixed infinite redirects for authenticated users accessing login page. 2013-09-27 22:33:07 +05:30
Schlaefer
99ec97bd19 performance improvements in Model::_clearCache
- don't empty cache twice if pluralized name is identical to underscored
- refactors for fewer function calls
2013-09-27 16:39:23 +02:00
Mark Story
355e2efbc6 Merge pull request #1685 from dereuromark/master-autolink
Test to prove that autoLink has issues with umlauts.
2013-09-27 06:53:38 -07:00
Mark Story
066e0b6677 Merge pull request #1684 from dereuromark/master-shell
Bugfix: Assert own tasks are loaded before trying to access taskNames.
2013-09-27 06:52:12 -07:00
euromark
bd87ef45f2 complete autoLinkEmail() 2013-09-27 15:01:46 +02:00
euromark
205f7a504b also fix autoLinkEmail() 2013-09-27 14:56:53 +02:00
Frank de Graaf
41a7739b69 Merge pull request #1686 from andydhobbs/ticket-4108
Fixes bad merge of #1683.

Refs #4108.
2013-09-27 05:53:10 -07:00
euromark
2a954b6095 Make TextHelper::autoLink() work properly with umlauts. 2013-09-27 14:48:57 +02:00
Andy Hobbs
56f1c9b8b5 Ticket 4108
- updated DboSourceTest::testFieldsCacheKeyWithSchemanameChange() to skip for Postgres and Sqlserver
2013-09-27 13:03:32 +01:00
Renan Gonçalves
bd1c0b18ff Merge pull request #1679 from dereuromark/master-cleanup-tests
Don't use comp. wrappers anymore.
2013-09-27 04:10:39 -07:00
euromark
c23531e806 Assert own tasks are loaded before trying to access taskNames. 2013-09-27 12:53:18 +02:00
Andy Hobbs
0f7d6a90a1 Ticket 4108
- Added schemaName to DboSource::fields() method cache key to fix bug with changing schema name
2013-09-26 11:56:14 +01:00
Bryan Crowe
ab4bc16463 Updated Controller:: doc block and ControllerMergeVarsTest:: 2013-09-25 22:53:23 -04:00
Bryan Crowe
915b51b239 Updated JavaScript casing and JsHelper references in doc blocks 2013-09-25 22:46:38 -04:00
euromark
0b45a2eca8 correct order of params 2013-09-25 22:07:52 +02:00
euromark
9844da8e99 Don't use comp. wrappers anymore. 2013-09-25 20:58:29 +02:00
Mark Story
1c148c28f0 Merge pull request #1677 from dereuromark/master-cleanup
App::import to App::uses
2013-09-25 11:40:17 -07:00
euromark
0ae69aace9 App::import to App::uses 2013-09-25 19:40:14 +02:00
Mark Story
bb4716a9ee Merge pull request #1675 from bar/patch-1
Wrong signature.
2013-09-25 06:37:39 -07:00
ber clausen
39bc8dff97 Wrong signature. 2013-09-25 09:12:49 -03:00
euromark
2455af09c5 Resolves ticket #4100 2013-09-25 14:01:35 +02:00
Bryan Crowe
3e05ab897c Missed a couple instanceOf asserations 2013-09-24 22:12:51 -04:00
Bryan Crowe
9a1170cd2b Replaced true asserations with instanceOf asserations in test cases 2013-09-24 22:10:36 -04:00
Bryan Crowe
7d7954ce18 Replaced all is_a() calls with instanceof operator 2013-09-24 21:08:06 -04:00
euromark
653aed7701 is_a() to instance of - completes PR 1669 2013-09-24 22:57:51 +02:00
Bryan Crowe
1393325ad1 Use instanceof instead of is_a() in Controller.php 2013-09-23 21:37:27 -04:00
mark_story
a30f861f2c Use array_key_exists instead of isset()
This allows contains() to work with null values.

Fixes #4083
2013-09-19 21:44:09 -04:00
euromark
f62f46562c add missing create() for creating a new record. 2013-09-19 00:23:56 +02:00
euromark
17bd465cae simplify tests 2013-09-19 00:17:21 +02:00
ADmad
1d89ee1c6d Fixed TreeBehavior::recover() when using scope. Fixes #4062. 2013-09-19 00:39:19 +05:30
euromark
58f38f1667 Fix casing of validation rules in bake 2013-09-18 18:31:55 +02:00
Bryan Crowe
5c329b4875 Updated CakeTime::i18nFormat() doc block description 2013-09-17 23:09:46 -04:00
mark_story
809f6129e0 Update docs for HttpSocket methods.
delete() uses the request body, not the query string.
2013-09-17 21:17:26 -04:00
Bryan Crowe
24a522f972 Updated doc block for JsonView's subDir property 2013-09-17 20:25:32 -04:00
Bryan Crowe
878e599976 Corrected some grammar in the JsonView class doc blocks 2013-09-17 20:15:18 -04:00
euromark
e3a3946e89 address casting cs 2013-09-17 15:15:25 +02:00
euromark
12f2f729c8 more cs 2013-09-17 14:53:07 +02:00
euromark
382f75dbfc cs corrections, bool to boolean and int to integer. 2013-09-17 14:44:34 +02:00
mark_story
5ec9b145bf Fix label element for attributes not matching their inputs.
Radio elements would contain ModelModelFieldValue instead of
ModelFieldValue like they should. This was caused by the fix for #3936
and lack of tests for create() + radio().

Fixes #4071
2013-09-16 22:38:28 -04:00
spiliot
37c9832dc1 removed duplicate test case
Was exact duplicate of case starting line 692
2013-09-17 00:48:09 +03:00
mark_story
4ea6c158d1 Fix wording and remove trailing spaces. 2013-09-16 12:04:29 -04:00
Jerome Roethlisberger
3a4a0e54eb Improved wording of Model::invalidFields()
Inspired by
http://book.cakephp.org/2.0/en/models/data-validation/validating-data-from-the-controller.html#validating-data-from-the-controller
2013-09-16 16:13:58 +02:00
euromark
c8b18164c5 fix test 2013-09-16 00:49:01 +02:00
euromark
910ee33710 remove wrong trailing slash 2013-09-16 00:40:37 +02:00
mark_story
085636ea1b Update version number to 2.4.1 2013-09-14 22:07:19 -04:00
mark_story
7379d32b59 Simplify & fix phone number validation.
The changes made in fa3d4a0bb5 tightened
the area code validation too much and excluded at least one valid area
code. This change replaces that with a more generic solution that does
not attempt to exclude non-allocated but potentially valid area codes.

Fixes #4066
2013-09-13 23:05:40 -04:00
Marc Würth
0a7d5b9c3f Corrected a CakeLog example in a DocBlock about scopes and types
> Its important to remember that
> when using scopes you must also define the `types` of log messages
>  that a logger will handle. Failing to do so will result in the logger
>  catching all log messages even if the scope is incorrect.

According to this the previous example would fail to log correctly.
2013-09-13 03:07:46 +02:00
mark_story
ba4afcc074 Fix incorrectly encoded address fields.
Address fields cannot contain : or " it causes a number of
mail servers/clients to be confused.

Fixes #4058
2013-09-12 20:14:11 -04:00
Mark Story
ba016c2c68 Merge pull request #1630 from dereuromark/master-cleanup
Master cleanup
2013-09-12 16:46:18 -07:00
euromark
a796b26f13 fix renderLayout and update deprecated and outdated code 2013-09-13 00:09:31 +02:00
ovidiupruteanu
f416a321c7 flushMethodCache not working if called before cacheMethod
When calling flushMethodCache it correctly empties self::$methodCache but if cacheMethod is called afterwards self::$methodCache gets populated with data from the Cache.
2013-09-12 22:02:39 +03:00
Marc Würth
446792987a Replaced two elseifs by if in sqlserver datasource 2013-09-11 23:15:05 +02:00
Adam Taylor
186f2a27e0 Make the "pr" function use printf instead of echo sprintf 2013-09-10 19:52:18 -06:00
Mark Story
fd50c5277e Merge pull request #1624 from ADmad/fix-paginator-order
Fix setting of order in Paginator options when using model's order. 

Refs #3902
2013-09-10 13:41:51 -07:00
euromark
beff12d8a5 add missing params for parent call 2013-09-10 21:19:30 +02:00
ADmad
1d0c785725 Fixed setting of order in Paginator options when using model's order. Refs f680c76, #3902 2013-09-10 22:47:31 +05:30
Ber Clausen
0a52061d86 Update afterFind() callback signature to be PHP5.4+ compliant. 2013-09-10 14:15:01 -03:00
Mark
994a5b00b6 Merge pull request #1622 from bar/php54-afterSave
Update Model/Behavior afterSave() callback signature to be PHP5.4+ compliant.
2013-09-10 04:04:04 -07:00
mark_story
fc2e1fac4e Fix clearing groups with FileCache and no prefix.
If you used FileCache + groups + an empty prefix cached files would not
be cleared as strpos() would fail.
2013-09-09 22:24:18 -04:00
Ber Clausen
867d4b312d Update afterSave() callback signature to be PHP5.4+ compliant. 2013-09-09 21:34:11 -03:00
Ber Clausen
98a32c334a Fix CS. 2013-09-09 21:25:22 -03:00
mark_story
5210f831c8 Add test for insertMulti with id in the last spot.
Both tests work, so there are no changes to the implementation.

Closes #4048
2013-09-09 19:43:15 -04:00
mark_story
2fc3222322 Fix whitespace. 2013-09-09 12:20:54 -04:00
ovidiupruteanu
7019c79b81 Quoting test for null value and string column 2013-09-09 17:14:09 +03:00
ovidiupruteanu
b58940e9b5 Fixed handling null values in Sqlserver->value
The value function quoted a null value as N'' instead of NULL.
As a result is produced queries like [name] IS N'' instead of [name] IS NULL which resulted in an SQL error.
2013-09-09 16:33:54 +03:00
Ber Clausen
c3ee9a2058 JsonView should return null if no data is set, regardless of the type of '_serialize'.
It should also honor true/false/0/'' values.
2013-09-07 02:38:52 -03:00
Mark Story
f82814d7ac Merge pull request #1618 from dereuromark/master-cs
Remove last yoda conditions as per coding standards guidelines.
2013-09-06 11:11:24 -07:00
euromark
959988cfa1 Remove last yoda conditions as per coding standards guidelines. 2013-09-06 18:36:57 +02:00
mark_story
0891073d19 Add coding standards ignore comments to FileEngine
We normally disallow error supression but it is the only way to
atomically delete files.
2013-09-06 12:19:23 -04:00
davidsteinsland
45b3417bd7 Fixed race conditions for FileEngine 2013-09-06 15:46:01 +02:00
Mark Story
0f528c279a Merge pull request #1614 from okinaka/2.x-disused-code
Postgres::truncate(): Delete disused code.
2013-09-05 18:16:22 -07:00
Mark Story
66394f2201 Merge pull request #1610 from bar/php54-callback-signatures
Update Model/Behaviors callback signature to be PHP5.4+ compliant.

This may require updates to userland behaviours.
2013-09-05 11:11:15 -07:00
mark_story
6a6371b2d4 Fix CROSS JOINs
While seldomly used, CROSS joins should not generate invalid SQL.

Fixes #4050
2013-09-05 12:45:48 -04:00
mark_story
e3e4efba0a Add test for issue #3936
radio() method should accept an array for the label element.

Refs #3936
2013-09-05 11:04:47 -04:00
Christian Winther
a1866733a0 Merge pull request #1611 from ADmad/2.4-log-suffix
Dropping 'Log' suffix from log configs as per change in cb24dbb084.
2013-09-05 07:24:41 -07:00
mark_story
3c9500a3cb Fix whitespace error. 2013-09-05 10:21:24 -04:00
Mark Story
f191ff017b Merge pull request #1597 from aread22/master
Potential Fix for LightHouse Ticket #3936

Fixes #3936
2013-09-05 07:20:48 -07:00
Ber Clausen
c524645738 Update Model/Behaviors callback signature to be PHP5.4+ compliant. 2013-09-05 11:17:02 -03:00
ADmad
29d0e26710 Dropping 'Log' suffix from log configs as per change in cb24dbb084.
Reverts regressive change done in 7e28636a72.
2013-09-05 19:37:41 +05:30
Schlaefer
82da8d9d07 performance improvements in CakeTime::timeAgoInWords Edit
- rearranges code to move return statements before otherwise dead code
- only do translation if translated string is actually used
2013-09-05 12:22:28 +02:00
Hadrien Collongues
7e28636a72 Fix log classname in skeleton
Fixes "logger class File does not implement a write method."
It probably tries to use the utility File class instead of the logger
2013-09-05 11:20:39 +02:00
okinaka
e0f24d0ade Postgres::truncate(): Delete disused code. 2013-09-05 14:11:50 +09:00
aread22
cb056a5cbe Use FormHelper->label instead of HtmlHelper->useTag
Implementing suggested fix by mark_story
2013-09-04 13:32:36 -04:00
Rob McVey
7f44cc01b5 Plural of breif is breifs not breives 2013-09-04 09:20:32 +01:00
mark_story
4c92cdcada Reorder inflection rules.
Place rules for words like 'archives' and 'relatives' before words like
'knives'.

Fixes #4040
2013-09-03 12:50:02 -04:00
mark_story
800ffa804b Fix invalid CSS in fixture files.
Fixes #4041
2013-09-03 09:55:04 -04:00
Alexander Hofbauer
78d5b69bec Load helpers of email view 2013-09-02 14:36:08 +02:00
mark_story
229c824da6 Remove a default helper from View.
This goes back to the days of yore and combined with
b8320fdbb7 it causes issues. The specific
issue at hand was testing a helper that uses other aliased helpers
(HtmlHelper specifically). The core helper would always be loaded
instead of the aliased one.
2013-09-01 21:39:59 -04:00
aread22
4ab1c8c225 Format to CakePHP code sniffs 2013-09-01 21:08:17 -04:00
aread22
64bb74a7e8 Potential Fix for LightHouse Ticket #3936
I believe I found a fix for this issue. I am here at #CakeFest2013 and during the #HourOfContribution I ran across this issue.

Currently in CakePHP 2.4 on Line 1522 - 1524 you can see the following code:

@@@ php
if ($label) {
	$optTitle = $this->Html->useTag('label', $tagName, '', $optTitle);
}
@@@

The $label variable here the is the $label array passed into the input method in Sethathi example above. The problem is that the $label array is completely ignored and instead a label is created using the HtmlHelper->useTag method.

I have what I believe is a fix for this issue but it hasn't been extensively tested. I tested against Sethathi example in the ticket and it produced the correct result.

The fix is simple. We detect if an array is passed in and then send it to the FormHelper label method instead of the HtmlHelper useTag method. The FormHelper label methods accepts an options array, so we pass in the $label array.

This will probably need to be fixed for checkbox also

"ask":https://cakephp.lighthouseapp.com/users/235987 helped me with this fix
2013-09-01 20:56:44 -04:00
Matt Reishus
bb98ac761f ConsoleInput::_canReadLine change from private -> protected 2013-09-01 17:15:51 -05:00
Matt Reishus
3b057cb82b Correct style 2013-09-01 16:58:23 -05:00
Matt Reishus
916d992162 Use readline in console when supported
$this->stdin->read(); will use readline if the system is detected to
support it.  In linux, you will be able to use the left and right arrow
keys to edit the current line, use the up and down keys to navigate
history, press ^U to delete the entire line, etc.

Before this, using arrow keys in linux will just spam characters like
^[[C^[[A^[[D^[[C^[[A^.  Useful for "Console/cake console"
2013-09-01 16:20:29 -05:00
Kim Egede Jakobsen
63dfbe55f7 Added/removed newlines to make the code more readable. 2013-09-01 12:09:14 -07:00
Kim Egede Jakobsen
09bdad6ceb Reduce variable use/duplicate code. 2013-09-01 12:08:48 -07:00
Kim Egede Jakobsen
b64c7e3e84 Remove the $state === 'after' condition.
Can only be before / after.
2013-09-01 11:06:45 -07:00
euromark
eb71eeeac5 add scope for generateTreeList - resolves ticket 4028 2013-09-01 01:02:26 -07:00
José Lorenzo Rodríguez
fec646b69f Merge pull request #1588 from kimegede/caketime-docblock-update
Added @link CakeTime.
2013-08-31 21:59:11 -07:00
Kim Egede Jakobsen
539040aa07 Added @link CakeTime. 2013-08-31 21:56:15 -07:00
Phally
f4929c1b04 Strict checks for I18n::loadLocaleDefinition(). 2013-09-01 06:20:53 +02:00
Phally
4f91465af7 Safer way to prevent the array to string notice. 2013-09-01 06:16:10 +02:00
Ceeram
84c980f1f4 avoid notices when loading locale file
Conflicts:

	lib/Cake/Test/Case/I18n/I18nTest.php
2013-09-01 06:05:40 +02:00
euromark
a36456cc87 Correct doc blocks for AuthComponent 2013-08-31 19:58:10 -07:00
Kim Egede Jakobsen
fcf9f34392 Added @link to CakeNumber's docblock 2013-08-31 17:32:48 -07:00
Kim Egede Jakobsen
46d3d8e48e Added @link to all public functions there have documentation.
And correct a small 'typo'.
2013-08-31 17:12:29 -07:00
Phally
28dbc5b89b PHPCS fixes. 2013-08-31 13:30:05 +02:00
ADmad
75e8facd2f Remove JS constant use from tests. 2013-08-31 11:45:59 +05:30
mark_story
83db877765 Update version number to 2.4.0 2013-08-30 16:03:49 -04:00
mark_story
4f237e6a93 Merge branch '2.4' making 2.4 into the master branch.
Conflicts:
	lib/Cake/VERSION.txt
2013-08-30 16:02:42 -04:00
mark_story
ca9a305679 Update version number to 2.3.10 2013-08-30 15:56:44 -04:00
mark_story
7bd2174c5b Refactor tests to use a data provider. 2013-08-30 15:36:18 -04:00
mark_story
94b602b684 Merge pull request #1456 'fix-for-3515' into 2.4
Conflicts:
	lib/Cake/Test/Case/View/ViewTest.php

Fixes #3515
2013-08-30 15:27:49 -04:00
Mark Story
824a6f700b Merge pull request #1563 from mvdriel/fix-i18n-extract
Extract category strings to separate .po files
2013-08-30 12:19:17 -07:00
Mark van Driel
256e1f6532 Removed unused variable 2013-08-29 10:49:23 +02:00
Mark Story
a902529702 Merge pull request #1570 from cakephp/issue-4030
2.4 - Load helpers at View construction.
2013-08-28 14:28:00 -07:00
mark_story
c03edd9d1a Don't load Helpers in dataviews when _serialize is set.
Loading helpers when they aren't going to be used is wasteful.
2013-08-28 15:47:44 -04:00
Mark van Driel
cce1fafd80 Fixed typo in comments 2013-08-28 18:49:34 +02:00
mark_story
f18d354f55 Merge branch 'master' into 2.4 2013-08-28 12:35:07 -04:00
mark_story
b8320fdbb7 Load helpers at View construction.
Loading helpers earlier in View's lifecycle allows for the removal of
many duplicated code segments and a now useless property. It slightly
modifies how View behaves in a test case, but that issue is easily
remedied by calling loadHelpers() a second time.

This primarily fixes issues where helpers may not be loaded in View
subclasses if they override any of View's methods. This is particularly
problematic when aliased helpers are involved.

Refs #4030
2013-08-28 12:27:07 -04:00
mark_story
c1ae41da51 Correctly generate bigint primary keys in sqlite.
generate bigint primary keys correctly. Autoincrement cannot be set as
it only works with INTEGER columns[1]. I decided to use some string
manipulations as the entire SQL generation bits are a bit janky and I've
already re-written them for 3.0.

[1] https://www.sqlite.org/autoinc.html

Closes #GH-1552
2013-08-27 18:11:04 -04:00
Mark van Driel
ed10c3332d Fixed typos in text and comments 2013-08-27 21:12:03 +02:00
Andras Kende
17f9661961 Added mask to File cache docblock 2013-08-27 10:02:48 -04:00
Mark van Driel
c4ec8bedd0 Fixed category constant values: constants in Cake don't use the same values as PHP (Linux) 2013-08-27 12:30:39 +02:00
Mark van Driel
1fd936f3cc Fixed cross-platform issue: LC_* constants have different values on windows 2013-08-27 10:51:00 +02:00
ADmad
fc47bf9e1d Avoid reparsing locale definition file. 2013-08-27 04:04:39 +05:30
Mark van Driel
88d7fbeb53 Extract category strings to separate .po files 2013-08-25 23:04:05 +02:00
euromark
80d55feda6 also remove app ones 2013-08-25 21:42:03 +02:00
euromark
1aba204ec7 remove $name where not necessary to unify this in 2.x 2013-08-25 21:19:55 +02:00
mark_story
42feb8dff6 Fix failing test.
Quote encoding in confirm handlers has changed in 2.4. Update the
relevant test.
2013-08-24 21:51:42 -04:00
mark_story
ceb35ac39a Merge branch 'master' into 2.4 2013-08-24 21:50:02 -04:00
Saleh Souzanchi
d606bcb7fd convert forbidden character in filename(Windows) with underline 2013-08-25 02:24:37 +04:30
Saleh Souzanchi
e157d8a7e6 convert forbidden character in filename(Windows) with underline 2013-08-25 02:09:13 +04:30
mark_story
53d265cfba Merge branch 'master' into 2.4 2013-08-23 12:56:43 -04:00
mark_story
59cef53ffe Update docs to reflect the routes that are actually connected.
Refs #GH-1413
2013-08-22 17:54:05 -04:00
Renan Gonçalves
703d9881e9 Adding files to be compared against bake generated files, fixing bake templates in the meantime.
Writing assertContains() or assertRegExp for generated code is a pain and making the test cover most part of it is very difficult.

Things like:
 ```
 } else {
 }
 ```

Are very easy to happen (which was the case) and was not being covered by the test.
2013-08-21 23:44:07 +02:00
mark_story
faa2cbd3c3 Remove session.auto_start configuration.
It now fails in PHP >= 5.5.2 . Also it never did anything in earlier
versions as the session would have already been started if auto_start
was true.

Fixes #4010
2013-08-21 13:18:44 -04:00
mark_story
24123e2374 Add test for postLink with escape false + confirm option.
Closes #4008
2013-08-21 13:09:47 -04:00
Rachman Chavik
9d8bb8c047 Sqlite::truncate(): Verify sqlite_sequence exists before _execute()
`sqlite_sequence` is a dynamic table that's only available when a table in
the database use an auto increment field.  For some cases, eg: databases that
exclusively use uuid for primary keys, this table won't exist and
truncate() call will fail with:

  Error: SQLSTATE[HY000]: General error: 1 no such table: sqlite_sequence
2013-08-21 16:34:21 +07:00
José Lorenzo Rodríguez
8e21e255dc Merge pull request #1543 from dereuromark/2.4-translations
remove code, class names and paths from translation strings.
2013-08-20 15:33:42 -07:00
euromark
361980fade remove code, class names and paths from translation strings. 2013-08-21 00:05:53 +02:00
mark_story
6d80d6a3cb Add missing return. 2013-08-20 18:03:52 -04:00
euromark
036954b52d remove duplicate newlines according to CS 2013-08-20 20:27:06 +02:00
Renan Gonçalves
8ca92a1af0 Breaking trigger_error() to multiple lines to shorten the line length.
As proposed in https://github.com/cakephp/cakephp/pull/1525/files#r5779374
2013-08-20 17:48:56 +02:00
mark_story
67855896ef Remove invalid code.
Fixes #4002
2013-08-20 11:34:30 -04:00
euromark
5ed9e5d691 sync and correct generic css 2013-08-19 21:51:04 +02:00
mark_story
b711d38bf3 Update version number to 2.4.0-RC2 2013-08-19 10:49:03 -04:00
mark_story
9ea2926bf3 Merge branch 'master' into 2.4 2013-08-19 10:40:29 -04:00
mark_story
f7a81a9aee Conditionally define constants in the CLI environment.
Only define constants if they don't already exist. Users can modify
`app/Console/cake.php` and define constants before this code executes.

Fixes #4000
2013-08-19 10:40:09 -04:00
AD7six
09cf69c452 Pass Controller:$components config to mocked components
Otherwise there can be significant differences in behavior between using
an unmodifiedcomponent in testAction and using a mock as the config will not be
propogated from the controller
2013-08-19 10:33:16 +00:00
mark_story
0f2d59d987 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Network/CakeResponse.php
	lib/Cake/TestSuite/CakeTestCase.php
2013-08-18 23:10:08 -04:00
mark_story
675f828e16 Remove insertQuery and deleteQuery.
These properties were never implemented and are misleading when people
try to use them.

Closes #3997
2013-08-18 21:37:37 -04:00
Phally
524aaf3449 Makes PHPCS pass again. 2013-08-18 16:12:23 +02:00
mark_story
a140b30435 Add a test for Hash::sort()
Closes #3956
2013-08-17 17:16:33 -04:00
Mark Story
005699eb49 Merge pull request #1533 from dereuromark/master-null-checks
unify null checks - avoid method call in favor of strict check
2013-08-17 12:05:52 -07:00
joostdekeijzer
7fe2395be3 RedirectRoute class does not honor persist as array with custom route elements.
Custom route elements like '/:lang/etc' should be persisted by redirect
routes as they are in standard routes.

Refs #GH-1531
2013-08-17 14:51:12 -04:00
euromark
6a14f37b74 a few more orders in test case corrected 2013-08-16 20:55:17 +02:00
euromark
47e8e0c57a simplyfy test and correct some test param orders 2013-08-16 20:51:11 +02:00
mark_story
3244b9e3d7 Merge branch 'master' into 2.4 2013-08-16 14:47:01 -04:00
euromark
6cf147e8c8 unify null checks - avoid method call in favor of strict check 2013-08-16 20:12:49 +02:00
dmromanov
7989bad5b7 Corrected codestyle 2013-08-16 14:12:27 +04:00
dmromanov
b4092e374d Corrected spelling 2013-08-16 14:06:36 +04:00
dmromanov
56ef44f495 Excluded method names from several tanslation strings
Removed unnecessary sprintfs
2013-08-16 13:42:28 +04:00
ADmad
8428928fd6 Merge pull request #1528 from mvdriel/caketime-fix
Added workaround for strtotime("0000-00-00 00:00:00") returning -6216995...
2013-08-15 10:55:03 -07:00
Mark Story
7c29aa5155 Merge pull request #1508 from fuga/feature/email-config
making the config method of email-transport-classes mergable
2013-08-15 08:26:11 -07:00
Mark van Driel
97aaa89b3f Refactored the fix 2013-08-15 17:13:31 +02:00
Marc Würth
64f4adf626 Shortened line length of trigger_error calls and improved @param of write()
http://www.phpdoc.org/docs/latest/for-users/phpdoc/tags/param.html
> The @param tag MAY have a multi-line description and does not need explicit delimiting.
2013-08-15 17:09:24 +02:00
Floris
85313e84af Minor Sanitize::escape() update
If the Datasource is not going to be used, do access it.
2013-08-15 12:15:09 +02:00
Mark van Driel
1595287290 Added workaround for strtotime("0000-00-00 00:00:00") returning -62169955200 on a 64 bit system 2013-08-15 08:58:05 +02:00
Mark Story
6bec7a36a4 Merge pull request #1525 from dmromanov/2.4-bugfix3986
Bugfix #3986
2013-08-14 16:57:04 -07:00
Mark Story
c040bb0cdc Merge pull request #1523 from tersmitten/improved-tests-that-use-setlocale
Makes the locale test not always pass, be verbose when it is skipped.
2013-08-14 16:54:50 -07:00
dmromanov
ff01c28735 Prevent accidently translating "%score" as "score" 2013-08-15 03:27:26 +04:00
dmromanov
aa7c912c15 Removed concatenations in gettext $msg param. Closes #3986. 2013-08-15 03:15:35 +04:00
dmromanov
a0b9d5fe8b Removed trailing space 2013-08-15 01:36:51 +04:00
Frank de Graaf
33f7de0072 Merge pull request #1520 from mvdriel/cakenumber-fix
Cakenumber fix
2013-08-14 13:41:53 -07:00
Mischa ter Smitten
0e49a23065 Makes the locale test not always pass, be verbose when it is skipped. 2013-08-14 22:32:04 +02:00
Mark van Driel
559fb5805b Fix formatting with locales using , as decimal separator
No double number formatting for readable size

Fixed testPrecisionLocalized for travis (when locale is missing?)

Switched locale to nl_NL and fixed test

Skip test when locale is not available
2013-08-14 22:19:38 +02:00
Phally
6f74e1958b Makes the locale test not always pass, be verbose when it is skipped. 2013-08-14 21:00:31 +02:00
Andras Kende
d84a2d9419 removed $i variable, it not being used...
removed $i variable, it not being used...
2013-08-14 02:16:46 -07:00
Andras Kende
3f58be260e removed not used $i variable
removed not used $i variable
2013-08-13 22:06:00 -07:00
Mark Story
6c22faa372 Merge pull request #1512 from aleho/2.4
Correctly encode confirm handlers
2013-08-13 20:08:40 -07:00
mark_story
cb6ea82fea Allow CakeEmail::template() to disable layout rendering.
Fix the code to act as documented. Sending template('view', null) should
disable layout rendering.

Fixes #3983
2013-08-13 14:01:33 -04:00
mark_story
3bdcf7b440 Use inner join instead of a left join.
In some database servers an INNER join performs better than a LEFT join.

Fixes #3979
2013-08-13 13:40:59 -04:00
dmromanov
64251b6bd6 Corrected translation string 2013-08-13 21:31:40 +04:00
euromark
759c24e660 correct doc blocks as per cs 2013-08-13 12:29:20 +02:00
fuga
245611424f Apply ADmad's patch and update testConfig method according to a new specification. 2013-08-13 17:42:52 +09:00
Alexander Hofbauer
80e589f19d Correctly encode confirm handlers
With encode set to false the onclick handler will be sent through
h() regardless, making links and postLinks work again.
2013-08-13 10:11:22 +02:00
mark_story
1c1701813b Fix failing test from merge with 2.3
Fix a failed test from bad merge and remove nested conditions.
2013-08-12 14:47:43 -04:00
mark_story
26769edd04 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Utility/CakeTime.php
	lib/Cake/VERSION.txt
2013-08-12 14:39:02 -04:00
mark_story
6ce10b28c9 Update doc blocks. 2013-08-12 14:37:43 -04:00
Mark Story
2f5963e2d3 Merge pull request #1496 from ravage84/else-clause-after-redirect
Removed else clauses after redirects and added return before redirect() ...
2013-08-12 11:05:39 -07:00
euromark
f3018cc532 refactor methods to avoid else block on returning early 2013-08-12 19:06:34 +02:00
Christian Winther
af1c2a1c51 Merge pull request #1511 from ankr/caketime_accuracy_about
Making CakeTime display 'about X ago' when time passed is lower than acc...
2013-08-12 09:23:46 -07:00
ankr
1cb41294b8 Making CakeTime display 'about X ago' when time passed is lower than accuracy
Removing unnecessary else

Also support 'about' times for future times

Make 'about' times translateable in all languages
2013-08-12 10:01:38 -04:00
euromark
7c856e6ab7 missing whitespace 2013-08-12 16:00:24 +02:00
Marc Würth
7d4f229310 Fixed statement about Security:hash's salt parameter
Just nitpicking, but it prepends the salt, not appends it:
https://github.com/cakephp/cakephp/blob/master/lib/Cake/Utility/Security.php#L120
2013-08-12 12:52:34 +02:00
euromark
b09dc7213a deprecate Controller::flash() and adjust some other deprecation messages. 2013-08-12 12:51:12 +02:00
fuga
303261e231 making the config method of email-transport-classes mergable into the current config value. 2013-08-12 10:28:17 +09:00
Jose Lorenzo Rodriguez
64b694011e Update version number to 2.4.0-RC1 2013-08-12 00:42:55 +02:00
Jose Lorenzo Rodriguez
1bdcc58e31 Update version number to 2.3.9 2013-08-12 00:37:35 +02:00
José Lorenzo Rodríguez
789400ac44 Merge pull request #1409 from cdburgess/phone-validation-update
Phone validation update
2013-08-11 14:37:05 -07:00
Jose Lorenzo Rodriguez
9d07fc4330 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/ShellDispatcher.php
	lib/Cake/Utility/CakeNumber.php
	lib/Cake/View/Elements/sql_dump.ctp
2013-08-11 23:31:10 +02:00
José Lorenzo Rodríguez
890d4a9e2c Merge pull request #1478 from aleho/2.4
Use a protected method to generate confirm() links
2013-08-11 13:51:29 -07:00
ADmad
8150b89aba Allow setting path constants in app/Console/cake.php as you can in webroot/index.php 2013-08-12 00:54:50 +05:30
José Lorenzo Rodríguez
42bb766d92 Merge pull request #1503 from tigrang/cake-response-multi-header
Cake response multi header. Fixes #3960
2013-08-11 12:19:26 -07:00
Mark Story
de479cfe8d Merge pull request #1493 from dereuromark/2.4-cleanup
remove undocumented code and unnecessary in_array() checks + cleanup
2013-08-11 08:06:00 -07:00
James Watts
f76046625b Updated doc block comment 2013-08-10 14:45:00 +02:00
James Watts
19afed0003 Updated unit test for HTTP status codes 2013-08-10 13:32:49 +02:00
James Watts
2ce2a2aaa9 Updated the handling of response status codes
Improved API integrity by blocking the ability to set invalid status codes according to the HTTP spec. This includes any non-numeric codes, or any code that is greater or less than 3 digits in length (100-999 being the accepted range).
2013-08-10 13:30:02 +02:00
Tigran Gabrielyan
f6e1c7ca3d Improve code readability 2013-08-09 20:26:17 -07:00
Tigran Gabrielyan
777a46ff6d Fix CS issue 2013-08-09 20:00:33 -07:00
Mark Story
f63aa922f6 Merge pull request #1497 from hiromi2424/fix-unlink-windows
Fix unlink() for CacheEngine::clear() failed on windows.

Refs #3930
2013-08-09 19:55:15 -07:00
ADmad
1d809e9807 Deprecated Sanitize class 2013-08-10 00:10:05 +05:30
mark_story
86dcebf28b Update bakeshell so bake all gets the correct connection name.
Fixes #3972
2013-08-09 10:08:01 -04:00
hiromi2424
29314e0fcc Fixing some errors related to unlink() on windows 2013-08-09 21:33:21 +09:00
hiromi2424
dc381dd4d3 Fix unlink() for CacheEngine::clear() failed on windows. 2013-08-09 21:32:57 +09:00
Marc Würth
2a540ff8a8 Fix for #3515, functional extension & tests
https://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/3515

I used (string) because it is faster than strval() and there are no real benefits in this case.
Also enabled assign(), append() and prepend() to take any values convertible to string.

Removed try/catch as discussed with ADmad.
Changed the three exception expecting tests to check for PHPUnit_Framework_Error now.
2013-08-09 01:34:08 +02:00
Marc Würth
4c13a39f3e Removed else clauses after redirects and added return before redirect() and flash() calls 2013-08-08 21:10:41 +02:00
Mark Story
49d66af12e Merge pull request #1491 from ravage84/sql_dump
Improved code readability
2013-08-08 11:45:39 -07:00
Marc Würth
14f876fbc9 Improved code readability
Changed table echo to printf for more readable code
Wrapped sql_dump error message in __d(), as discussed here:
4c4fdc6f70 (commitcomment-3155723)
and here:
https://github.com/cakephp/cakephp/pull/1491/files#r5646701
2013-08-08 15:43:37 +02:00
euromark
fc2d28974b remove undocumented code and uncessary in_array() checks + cleanup 2013-08-08 03:56:58 +02:00
euromark
e7e5f46916 prevent rtrim to remove whitespace from test 2013-08-08 01:14:31 +02:00
euromark
1339a9dfe1 coding standards according to new sniffer rules 2013-08-08 01:03:21 +02:00
euromark
e1365336e2 avoid notice in mime() 2013-08-07 23:35:19 +02:00
dmromanov
af48904117 Combined strings of Testsuite Shell's description to a one translatable sentence. 2013-08-08 00:28:38 +04:00
D. Romanov
4d3c049f25 Do not translate "CakePHP" 2013-08-07 22:54:19 +04:00
ADmad
faa4262969 Merge pull request #1305 from jrbasso/2.4-fix-asset-full-url
Fixed full urls on asset methods
2013-08-07 10:29:11 -07:00
Mark
6c30851783 Merge pull request #1424 from dereuromark/2.4-form-helper-datetime-rounding
provide ability for rounding - closes #1986
2013-08-07 10:15:35 -07:00
Mark Story
054668f149 Merge pull request #1194 from dereuromark/2.4-file-improvements
Allow creating of missing tmp directories in debug (development) mode
2013-08-07 09:52:07 -07:00
mark_story
e36c537cf6 Switch from LEFT to INNER joins.
INNER joins are often more efficient as they can result in fewer rows
being examined before a result set is generated.

Fixes #3968
2013-08-07 12:50:02 -04:00
euromark
f5859ca719 allow creating of missing tmp directories in debug (development) mode for cache and log to avoid unnecessary errors thrown - using 0775 for dirs and 0664 for files 2013-08-07 13:24:45 +02:00
ADmad
339cd00fec Merge pull request #1482 from ADmad/2.4-l10n
L10n cleanup
2013-08-07 00:42:09 -07:00
Mark Story
dc15c78710 Merge pull request #1483 from tigrang/debugger-fix
Added case for `unknown` type.

Fixes #3966
2013-08-06 19:39:13 -07:00
mark_story
9efad54e31 Fix missing expiry times on cookies.
When writing multiple cookies in a single request with the default
expiry time, cookies after the first should continue to have the default
expiry time used.

Fixes #3965
2013-08-06 22:01:13 -04:00
Juan Basso
330f8d168d Merge pull request #1228 from jrbasso/2.4-router-parse
Supoprt query parameters on Router::parse.
2013-08-06 18:57:37 -07:00
Tigran Gabrielyan
2150e8dce5 Added case for unknown type. Fixes #3966 2013-08-06 18:30:00 -07:00
Mark Story
33af7e2e52 Merge pull request #1426 from dereuromark/2.4-currency-fraction
Fix currency output for fraction values.

Fixes #1329
2013-08-06 18:19:01 -07:00
Mark Story
3f186d6c97 Merge pull request #1484 from tigrang/code-cleanup
Loop instead of duplicate code
2013-08-06 18:12:12 -07:00
Tigran Gabrielyan
84dcd30730 Loop instead of duplicate code 2013-08-06 15:50:58 -07:00
euromark
ad6fcd43d7 Fix currency output for fraction values using fractionExponent option. 2013-08-07 00:36:37 +02:00
ADmad
18cd3729e4 Deprecated DEFAULT_LANGUAGE constant and config value 'Config.language' is not used for default.
Cleaned up L10n::_setLanguage(). Removed unused L10n::$found
2013-08-07 03:37:26 +05:30
Tigran Gabrielyan
34d848d0ca Fixed order of assert params 2013-08-06 12:59:36 -07:00
Mark Story
f57e315061 Merge pull request #1480 from uzyn/fix/shell-space-docroot
Fixes a bug where server would not run when there are spaces in documentRoot
2013-08-06 10:01:51 -07:00
U-Zyn Chua
3559aa35af Removed a stray tab. 2013-08-06 17:13:53 +08:00
Tigran Gabrielyan
a6e3bb37a6 Restructured CakeResponse::header() to avoid multiple returns, assignments, and calls to itself
Added ability to send multiple values with the same type of header in CakeResponse
2013-08-06 01:35:45 -07:00
Alexander Hofbauer
8601e0078a Implement a Helper method to generate confirm() links
This allows for overriding the default behavior of showing
confirm()-dialogs in Html and Form helpers.
2013-08-06 10:04:44 +02:00
U-Zyn Chua
d9b99d0599 Fixes a bug where server would not run when there are spaces in documentRoot. 2013-08-06 15:19:59 +08:00
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