Commit graph

2226 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
mark_story
f8c6138ad7 Fix incorrect exception type when double slash paths are used.
Fixes #3838
2013-05-18 12:20:06 -04: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
TAKAHASHI Kunihiko
f541260350 Add TestCase for Network/Email/CakeEmail.php 2013-05-17 18:56:52 +09:00
TAKAHASHI Kunihiko
a562d9c04e The assembly of the message was not correctly completed in specific Japanese. 2013-05-17 18:36:53 +09:00
euromark
97c2cb367d CS fixes 2013-05-17 10:36:17 +02:00
euromark
9fd2af96a8 add test case 2013-05-14 10:38:10 +02:00
mark_story
f7d106a386 Fix FormHelper::tagIsInvalid with saveMany forms.
When saving multiple records validation errors were not correctly shown.
Fudge the entity path so it matches the validation errors set in the
models.

Fixes #3828
2013-05-13 21:09:31 -04:00
mark_story
bd3428e456 Remove Asset.x Configure values.
Having Asset.timestamp on can fail tests accidentally.
2013-05-13 21:09:31 -04:00
mark_story
c1b2ca581c Use terser assertions. 2013-05-13 21:09:31 -04:00
ADmad
4d434ec9f3 Fix CS errors 2013-05-13 23:51:32 +05:30
mark_story
6017db9dc8 Add missing urlencoding to base/webroot.
This fixes URL generation when PHP_SELF or the request path contains
special characters.
2013-05-10 11:04:46 -04:00
Mark Story
94ff1b20e2 Merge pull request #1276 from aymericderbois/2.3-XmlFixZeroValueProblem
Fix bug in Xml::_toArray Method
2013-05-07 19:03:18 -07:00
Derbois Aymeric
ca6612bc8b Fix a problem of tag values which is not taken into account
(when equal to zero) when passing an XML object to an array.
2013-05-08 00:56:17 +02:00
ADmad
91319bbe7b Fix disabled attribute check.
Fixes #3818
2013-05-08 01:43:27 +05:30
ADmad
372089797f Fix test 2013-05-07 23:23:07 +05:30
ADmad
36a51bdad5 Avoid fail due to postgres ordering 2013-05-06 22:03:45 +05:30
Rik van der Heijden
dddf8aafb9 Fixed curly brackets at a few class definitions 2013-05-04 13:23:58 +02:00
ADmad
db26e24cb7 Remove error setting when reading/deleting non-existent key.
Fixes #3813
2013-05-04 03:16:33 +05:30
mark_story
d4036310e4 Update limit() for Postgres
It should work like the parent class.
2013-05-02 23:27:26 -04:00
mark_story
00569ea405 Update limit() for Sqlite.
It should behave as the parent class does.
2013-05-02 23:25:13 -04:00
mark_story
2096d3f632 Clamp limit values to be unsigned integers.
This solves large page numbers potentially turning into scientific
notation when being formatted into queries. It also further safeguards
against SQL manipulation.

Refs #GH-1263
2013-05-02 22:36:50 -04:00
Rob McVey
bd3be2877d Test case for loooong page numbers in paginated results seems to cause SQL error 2013-05-02 09:57:04 +01:00
mark_story
41d124d4de Fix autoLinkUrls() not autolinking URL's without a /.
Refs #GH-1259
2013-04-30 17:02:07 -04:00
mark_story
37ce6dfc81 Only allow sort fields that match the current object alias.
Instead of modifying aliases that do not match, only allow aliases that
do match.

Refs #3803
2013-04-30 12:41:42 -04:00
euromark
fab5a6f4d9 spelling corrections 2013-04-30 14:11:50 +02:00
Mark
faa6292f15 Merge pull request #1255 from dereuromark/master-copyright-noise-removed
Remove copyright noise from test files
2013-04-30 02:24:25 -07:00
mark_story
2b0e10eebb Exclude domain names starting with -
Related to 479aefc438

Refs #3414
2013-04-29 21:31:30 -04:00
Mark Story
ac94d11e65 Merge pull request #1254 from dereuromark/master-spelling-corrections
spelling corrections (a url to an URL, unify URL)
2013-04-29 09:27:48 -07:00
euromark
5b298c1306 remove copyright noise from test files to unify with new newer files which don't contain it anymore anyway 2013-04-29 17:16:53 +02:00
Mark
eb9b80e63a Merge pull request #1192 from dereuromark/master-templated-emails
fix line length for templated emails
2013-04-29 07:34:06 -07:00
euromark
ff0aa70b59 fix line length for templated emails 2013-04-29 16:18:00 +02:00
euromark
09d9efe235 spelling corrections (a url to an URL, unify URL) 2013-04-29 11:05:17 +02:00
Mark Story
619f66178b Merge pull request #1233 from spiliot/patch-1
Money validation should accept one decimal place.
2013-04-28 18:06:49 -07:00
spiliot
dbe90cae71 removed duplicate test case
```$this->assertFalse(Validation::money('text'));```
is now tested only once
2013-04-29 00:20:35 +03:00
mark_story
65b1a94e63 Simplify how fullBase is calculated.
Using FULL_BASE_URL fixes URL generation when URL rewriting is
disabled.

Fixes #3777
2013-04-27 23:03:25 -04:00
mark_story
c327bdc4bd Enforce model aliases when generating order by clauses.
Invalid SQL could be created by sorting on an invalid alias, with
a field that exists on the model.

Fixes #3797
2013-04-27 13:29:29 -04:00
Mark
372cd6f952 Merge pull request #1250 from dereuromark/master-form-input-require
dont add required class on wrapper div
2013-04-26 07:07:17 -07:00
Mark Story
cfda4e5c43 Merge pull request #1248 from zoghal/fix-router1
fix currentRoute() when $_currentRoute is empty, return false
2013-04-26 07:00:33 -07:00
euromark
67cc7f66da dont add required class on wrapper div 2013-04-26 15:41:35 +02:00
Saleh Souzanchi
4aabf72e1f fix currentRoute() when $_currentRoute is empty, return false 2013-04-26 13:36:35 +04:30
Rachman Chavik
03e5207aa1 Fix: write() after clearGroup() does not actually write to file
Although clearGroup() does not use $this->_File, it needs to be null-ed
so that subsequent write() call do not see stale object.
2013-04-26 14:43:36 +07:00
ADmad
3c036e9ebf Merge pull request #1249 from DiegoMax/master
Fixed CakeResponse Tests
2013-04-26 00:37:18 -07:00
Diego Massanti
03b6c3fa61 Fixed test case for CakeResponse 2013-04-26 04:32:44 -03:00
Jose Lorenzo Rodriguez
db6dd18f86 Fixing case where it was possible to pass array data to FormAuthenticate
fields
2013-04-24 22:33:24 +02:00
euromark
48fa358260 Remove leftover param that is now wrongly triggering "strict" 2013-04-22 11:36:17 +02:00
spiliot
2d7f6fc707 Added tests 2013-04-22 03:42:19 +03:00
mark_story
c2c096428c Uncomment test.
I missed this earlier, because I'm a doofus.
2013-04-21 11:29:25 -04:00
mark_story
f6c3015705 Add additional tests and fix incorrect meridian selection
When dates around midnight were used with interval + 12hr formats, the
incorrect meridian was selected.

Refs #GH-1237
2013-04-20 14:39:47 -04:00
Majna
78ea4da681 Add test for time input with interval on first hour of the day 2013-04-20 17:51:50 +02:00
Ceeram
842b1802d9 add assert that habtm save does not return false 2013-04-19 19:37:23 +02:00
mark_story
efd86a498a Do type checks when looking for models in Controller::$uses.
This solves issues with models not being added when $uses = true.

Fixes #3774
2013-04-19 12:20:46 -04:00
mark_story
0f3d28c6ea Fix condition parsing in mysql specific cases.
When using collation + array values the incorrect operator would be
used. IN should be used over =.

Fixes #3772
2013-04-18 21:52:22 -04:00
mark_story
4d8dd12449 Add support for key => value cookies.
This makes using simple arrays easier, and I feel it is a long standing
omission from HttpSocket.

Fixes #3771
2013-04-18 21:22:50 -04:00
ADmad
ba56fb7064 Fixed issue where incorrect cached filesize was reported when appending to file. 2013-04-13 19:45:20 +05:30
mark_story
ed435870ae Fix secure field lists when select elements have custom name attributes.
When a select element had a custom name attribute the secured field name
was incorrect.

Fixes #3753
2013-04-12 12:30:05 -04:00
mark_story
8bd1980dd4 DateTime::getTimestamp() is PHP5.3+ 2013-04-11 13:39:05 -04:00
ADmad
548cccbbe2 "maxlength" is not a valid attribute for input element of type "number" in html5. 2013-04-11 21:06:52 +05:30
mark_story
0e646a2a4d Fix incorrect timestamp values when using fromString()
When using fromString() on DateTime objects that were in the global
timezone, an incorrect value would be returned.

Fixes #3743
2013-04-09 21:30:20 -04:00
mark_story
d8d8e9644d Fix array('disabled') and array('disabled' => true) working differently.
The shortform should work the same as the longer form with regards to
disabling field locking with SecurityComponent.

Fixes #3734
2013-04-03 12:46:39 -04:00
mark_story
2d6ee3cdb1 Remove pointless code.
Add a missing call to parent::setUp() and remove code that it takes
care of.
2013-04-01 22:30:27 -04:00
ADmad
7b90542230 Fix CS error 2013-03-31 00:23:03 +05:30
mark_story
ceb46b5d2c Try to fix random test failures on postgres.
Sorting in postgres is undefined and no based on the primary key when
sorting is not supplied.
2013-03-30 13:38:47 -04:00
Mark Story
84c0de7e2d Merge pull request #1203 from cincodenada/patch_httpsocket
Add a bit of backwards compatibility for specifying auth in the config.

Restore compatibility with older versions when providing auth data in the
request data.
2013-03-29 18:19:46 -07:00
Joel Bradshaw
ece6ac3663 Backwards compat for auth in the config array of HttpSocket::request()
Brings functionality back in line with docs as well
2013-03-29 15:46:42 -07:00
Renan Gonçalves
96c9174ee2 Fixing tag generation for Html::script() and Html::css() when using 'fullBase' => true.
Changing values on array_diff_key() from empty ('') to null as they have no consequences and offer better readability.
2013-03-29 15:24:08 +01:00
ADmad
342bf65811 Ensure referrer is saved in session even when AuthComponent::$loginRedirect is set.
Clarified redirectUrl() docblock.
2013-03-27 15:11:02 +05:30
euromark
3a1ff36d5e correct coding standards 2013-03-25 13:06:38 +01:00
mark_story
a7708c914f Remove test case that is no longer useful.
It is impossible for the current test to ever fail in the test suite, as
PHPUnit will always be loaded.
2013-03-22 21:36:11 -04:00
mark_story
5d6a6fa203 Fix error when generating Xml.
Fix warnings/un-escaped entities with deeply nested elements.

Fixes #3718
2013-03-21 21:12:21 -04:00
mark_story
729ef8fe58 Fix default null not being reflected by SqlServer
Apply patch from 'Josh Rehm' to fix null default values from being
stomped on when reflecting table schema.

Fixes #3615
2013-03-19 21:02:27 -04:00
mark_story
b821505014 Merge branch 'phantom-master'
Refs GH-1182
2013-03-18 21:40:14 -04:00
mark_story
37532389d6 Add test cases for GH-1182
Add tests for afternoon times with an interval and 12 hour time format.
2013-03-18 21:37:38 -04:00
Ceeram
99fba8c601 more coding standards fixes, minor rectaoring of testcase 2013-03-18 11:38:50 +01:00
Ceeram
89100f9476 fix coding standards 2013-03-18 11:12:28 +01:00