Commit graph

6232 commits

Author SHA1 Message Date
Hans-Joachim Michl
b4620b4c6c Fixes #2707
When the first variable argument = null, but there are more arguments given.
Added testcases to show the change (to fail before the fix)
2014-08-24 14:27:49 +00:00
mathieu strauch
85cd11384a fix failing testLogError 2014-08-24 15:46:44 +02:00
mark_story
f0f1531fac Add test for #4309
The Router internals don't handle // which is good.
2014-08-24 12:13:05 +02:00
mark_story
cd7438d33d Fix 0 index not being properly parsed for files. 2014-08-23 13:05:16 +02:00
Karma Dice
f03393a2a3 Preventing multiple iterations 2014-08-23 15:47:12 +05:30
Jeremy Harris
8f420d74fa HttpSocket: not overwriting auth header if it is set in request configuration 2014-08-21 11:24:10 -05:00
Majna
380ac9e88e Optimize FileEngine::gc()
SplFileObject constructor throws an exception if the file does not exist or is a directory.
2014-08-20 23:56:26 +02:00
Mark Story
90499971e0 Merge pull request #4304 from mtak3/ignore_exception_cache_file_engine
Ignore RuntimeException
2014-08-20 21:24:39 +02:00
mark_story
0400a63004 Forward port fixes for #4294 from 1.3 to 2.x
CakeTime was broken in the same way as TimeHelper was in 1.x. Getting
1969 on invalid input can be very confusing and un-helpful.

Refs #4294
2014-08-20 00:25:01 +02:00
euromark
07937d5a5f Correct typo. 2014-08-19 13:49:34 +02:00
mtak3
6b95764619 Ignore RuntimeException
RuntimeException is thrown at race condition.
However, since for the processing at Garbage Collection, other processes
is determined that the expired.
this process is acceptable to ignore the RuntimeException even if there is
missing file.
2014-08-19 17:44:25 +09:00
Brian Porter
5c69ac5578 All CakeSchema doc blocks conform to coding standards.
As laid out here: http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html#typehinting
2014-08-12 12:55:55 -05:00
Brian Porter
4a0f42e179 Doc block capitalization corrections as requested. 2014-08-12 10:48:12 -05:00
Brian Porter
7d8d2f2f18 Code sniff fix. 2014-08-11 11:51:09 -05:00
Brian Porter
9b9600fe18 CakeSchema naming fallback.
Abstracts the `require_once` of the schema file so it can be done twice. The added second call is a fallback for the previous APP_DIR-based naming to provide backwards compatibility.

Removes now-obsolete CakeSchema tests that involved `Configure::read('App.dir')`. The CakeSchema::name is now always static (and predictable) in the default case.
2014-08-11 10:40:57 -05:00
Brian Porter
543e520ccb Corrects logic to only apply default filename in **all** cases where none provided. 2014-08-11 10:34:30 -05:00
Brian Porter
6358208e32 Figures it'd be a missing paren. 2014-08-11 09:23:56 -05:00
Brian Porter
be9be48c46 More predictable default for CakeShema class naming.
Instead of using the `APP_DIR` constant, which may change between developer installations of a project and cause issues loading Schemas generated elsewhere, use a fixed string, 'App'.

This is related to CakeDC/migrations#184 and should fully resolve #4174.
2014-08-11 09:12:16 -05:00
Brian Porter
f93029b29f SchemaShell always uses --file param when present.
Addresses **part** of the problem described in #4174.

Corrects SchemaShell's startup logic so that when a `--file` param is provided by the user, it is always used even in the case that it matches the default file name (schema.php). This solves a problem when a user wishes to provide a classname using `--name`, but still wants to use the default filename.
2014-08-11 09:08:59 -05:00
Marc Würth
120bd37ffa Be forward compatible to PHP 7's "Uniform Variable Syntax"
https://wiki.php.net/rfc/uniform_variable_syntax
2014-08-11 01:33:25 +02:00
mark_story
d114fa1431 Update join building to not error out on empty conditions.
When conditions are empty we can assume one of two things:

* The person made a mistake.
* The person is doing the join conditions in the where clause.

In both cases we should attempt to generate proper SQL.

Fixes #4189
2014-08-08 10:02:09 -04:00
Marc Würth
49bdde88d2 Added links to book 2014-08-07 01:56:53 +02:00
euromark
5f5218f3b2 Fix cookie reading. 2014-08-06 22:53:54 +02:00
Mark S.
2471c64aae Merge pull request #4158 from dereuromark/master-cakesession-hotfix
Fix notice in CakeSession.
2014-08-06 18:25:55 +02:00
José Lorenzo Rodríguez
64e74cbaac Merge pull request #4175 from chinpei215/master-issue2268-fix
Fix afterFind() called twice with belongsTo and hasOne relationships
2014-08-06 10:48:45 +02:00
Mark Story
221fc862aa Merge pull request #4140 from chinpei215/master-issue2849-fix
Fix transactions do not get rollbacked in saveAssociated/saveMany.

Fixes #2849
2014-08-05 20:05:15 -04:00
chinpei215
1fe943d6f1 Fix afterFind() called twice with belongsTo and hasOne relationships
Refs #2268
2014-08-06 07:27:04 +09:00
Mathew Foscarini
4957418a4b Added missing return statement.
PhpStorm is flagging this function as missing a return statement. Using a return statement (instead of the default) makes the intent of the source code clearer.
2014-08-05 08:39:19 -04:00
euromark
9ef7b5713a CS fixes. 2014-08-04 13:53:52 +02:00
euromark
864f5e06f6 Fix notice in CakeSession. 2014-08-04 13:32:20 +02:00
mark_story
4e168ca004 Fix incorrect docs. 2014-08-03 20:36:31 -04:00
chinpei215
cb376bf420 Add some more transaction tests
And remove 2 else clauses.
2014-08-03 22:34:11 +09:00
ADmad
c193ce708a Throw exception instead of logging in debug mode. 2014-08-03 03:16:39 +05:30
chinpei215
799500ce6d Fix transactions do not get rollbacked in saveAssociated/saveMany
Refs #2849
2014-08-02 10:12:33 +09:00
chinpei215
3d77ce5d34 Fix serveral tests pass regardless of whether data is valid or not 2014-08-02 09:55:29 +09:00
William Notowidagdo
23954e6ad3 Update HtmlHelper.php
No need to add `null` to `$options` param as mentioned in the docs section: [Using blocks for script and CSS files](http://book.cakephp.org/2.0/en/views.html#using-blocks-for-script-and-css-files)
2014-08-01 11:22:29 +07:00
Mark Story
a6caf28ea6 Merge pull request #4122 from chinpei215/master-scaffold-error-fix
Fix a fatal error occurs in combination with a scaffold error.
2014-07-31 10:44:33 -04:00
chinpei215
f3e1a18740 Fix a fatal error occurs in combination with a scaffold error. 2014-07-31 05:49:23 +09:00
Anthony GRASSIOT
aa42b80a4d a / an typo fixes fot API 2014-07-30 22:11:03 +02:00
mark_story
f9785042bc Fix indentation.
Refs #4108
2014-07-29 21:53:55 -04:00
Steve Tauber
e6f6ded334 Adding unit test for HTTP DELETE and RequestHandlerComponent::requestedWith 2014-07-29 16:34:11 +02:00
Steve Tauber
0af698c591 Updating RequestHandlerComponent to accept body of HTTP Delete requests 2014-07-29 16:08:33 +02:00
euromark
b188d670b7 Make year range validation less strict by default. 2014-07-26 04:06:26 +02:00
euromark
99d6932ecc Fix project baking 2014-07-24 18:43:48 +02:00
Mark Story
adf739b893 Merge pull request #4011 from ndm2/stmp-auth-reponse-evaluation-fix
Make SMTP auth reply code checks work properly.
2014-07-24 08:42:22 -04:00
Rachman Chavik
aad89444d1 Fix: Blackholed request when POSTing to a URL with space
Eg:

Actual Posted URL:
    /admin/settings/settings/prefix/Access%20Control
$_GET value:
    /admin/settings/settings/prefix/Access_Control

Since $unsetUrl differs, the $_GET value will get copied in to
CakeRequest::$query, causing CakeRequest::here() to return:

    /admin/settings/settings/prefix/Access%20Control?%2Fadmin%2Fsettings%2Fsettings%2Fprefix%2FAccess_Control=

This confuses SecurityComponent in the following line:

    f23d811ff5/lib/Cake/Controller/Component/SecurityComponent.php (L514)
2014-07-24 16:25:03 +07:00
mark_story
08de917b3c Fix accidental typo in SQL file.
Fixes #4061
2014-07-22 09:38:46 -04:00
David Steinsland
6e777a54a3 Mocking _sendHeader instead of send() 2014-07-22 15:05:06 +02:00
David Steinsland
d98abc58d1 Added test case for CakeResponse::send() and ajaxLogin 2014-07-22 14:45:18 +02:00
David Steinsland
b61972871a Fixed sending of headers when ajaxLogin is set 2014-07-22 13:21:42 +02:00
mark_story
9b8e6403fd Add indexes to db_acl.sql in skel directory.
Copy changes in app/Config/Schema into the skel directory.

Refs #4052
2014-07-21 21:31:05 -04:00
mark_story
ac9af7e326 Update version number to 2.5.3 2014-07-20 22:20:47 -04:00
mark_story
0dfce1abf3 Add . to the list of allowed characters.
This was missed when the email validation rules were relaxed in
dc34d80f6f.

Fixes #4027
2014-07-19 19:57:33 -04:00
David Yell
28ec1c40a5 When specifying Session as a component and using Session flash messages, you end up with 'Paginator, Session, Session' which doesn't make sense. Added an array_unique to remove any duplicated components. 2014-07-18 15:37:22 +01:00
ndm2
f03bf8067c Add some more exception message checks 2014-07-18 14:56:10 +02:00
ndm2
bf7d01ac66 Make SMTP auth reply code checks work properly. 2014-07-18 14:53:22 +02:00
Carl Sutton
8d58d93636 Make the error message better for fixture errors
The stack trace has no details about which fixture is the actual problem.
2014-07-15 13:21:48 +01:00
chinpei215
ca93bbcd15 Fix CS 2014-07-14 01:21:09 +09:00
chinpei215
ace30fdd8a Fix a race condition problem
Prevents Model::save() from generating a query with WHERE 1 = 1 on race condition.

Refs #3857
2014-07-12 23:27:39 +09:00
mark_story
03c2a8b722 Unify datetime column default values between MySQL and Postgres.
Datetime columns should have 'default' => null, in both Postgres and
MySQL.

Fixes #3837
2014-07-11 23:10:16 -04:00
mark_story
a098d96c94 Remove flaky test that was of questionable value. 2014-07-10 14:39:20 -04:00
chinpei215
1a58b76e42 A micro optimization of h()
In most cases, the first argument of h() will be a string.
2014-07-10 20:53:10 +09:00
David Yell
79be5e6805 Update Model.php
Fixed the case on the link to the book, to match the anchor in the page.
2014-07-10 10:46:48 +01:00
chinpei215
0c1fc36b14 Fix an infinite recursion caused by missing plugin
When a MissingPluginException has caught when rendering an exception,
we should disable the plugin as needed to prevent an infinite recursion.
2014-07-09 15:55:41 +09:00
mark_story
b3dfad614a Correct pattern matching.
Instead of 10 digits, it should limit at 10 groups.

Refs 1988e89e73
2014-07-06 09:42:20 -04:00
Schlaefer
1e961a8aac increases time window in CSRF token expiry tests to 2 seconds
travis-cs failed with 1 second margin
2014-07-06 13:54:24 +02:00
Schlaefer
9fa7afa354 fixes #3887 CSRF reusable token expires 2014-07-06 10:39:00 +02:00
José Lorenzo Rodríguez
396725dc8c Merge pull request #3880 from markstory/incorrect-validation
Fix issues with Validation::inList() and SecurityComponent
2014-07-05 14:41:15 +02:00
Ceeram
a266a9493d minor optimisation, refs comments on 81875cfeb1 2014-07-04 17:25:41 +02:00
ADmad
1eccec02e4 Merge pull request #3872 from CostaC/response-sharable-fix
Fix for CakeResponse::sharable() header to include private caches
2014-07-04 10:32:51 +05:30
mark_story
3936cce4b8 Disallow hexadecimal input with inList.
Instead of turning on/off strict mode based on the user supplied input,
cast everything to strings and always use a strict check. This avoids
the potential issue of a bad user using hexadecimal when they should not
be allowed to do so. Thanks to 'Kurita Takashi' for pointing this out.
2014-07-03 22:10:49 -04:00
mark_story
1988e89e73 Add an upper bound to the POST data SecurityComponent will consider.
'Kurita Takashi' has let us know that the previous patterns could be
abused by an evil doer. One could potentially send a very large deeply
nested POST data structure. Matching that structure could overflow the
PCRE limits causing a segmentation fault. Adding an upper bound will
solve the problem and I doubt anyone is doing POST data structures with
more than 10 levels of nesting.
2014-07-03 22:02:00 -04:00
mark_story
765be87d88 Overwrite the schemaName property if it is not defined in the class.
If a model class does not define a schemaName we should use the
datasource's schemaName. We can assume that people using schemaName want
to lock the model onto a specific schema given the changes in #3210

Fixes #3720
2014-07-03 21:53:54 -04:00
Costa Caruso
8bfebd64fb Fix for failing test "Whitespace found at end of line" 2014-07-03 15:45:03 -04:00
Costa Caruso
4f559f5cc9 Fixed failing test for CakeResponse::sharable + spacing 2014-07-03 15:03:48 -04:00
euromark
974ca851c2 Correct doc blocks according to cs guidelines.
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
mark_story
33a5b6e451 Fix additional missing API doc tags. 2014-07-02 23:38:34 -04:00
Costa Caruso
1164c0bcad Fix for CakeResponse::sharable() header to include private caches 2014-07-02 17:34:09 -04:00
Mark Story
2c53bc8a1b Merge pull request #3838 from cakephp/revert-3646-no-truncate-fixture
Revert "No truncate when drop table."

Not truncating tables when they are created causes a number of 
issues in ControllerTestCases as indicated by the comments in #3646 post merge.
2014-07-01 22:02:57 -04:00
mark_story
adcf9ab723 Fix failing test.
CakeEmail now has a default validation pattern.

Refs #3742
2014-06-30 13:29:39 -04:00
mark_story
dc34d80f6f Relax email validation rules even more.
While filter_var() allows a number of email addresses that
Validation::email() does not, it misses out of email address that
contain IDN host names, and unicode mailboxes. Both of these are
generally deliverable, and should be permitted. filter_var() also fails
on local mailboxes like `root@localhost` which is useful in the context
of cron jobs.

Fixes #3742
2014-06-30 10:42:37 -04:00
Mark
1686edf016 Revert "No truncate when drop table." 2014-06-30 14:14:20 +02:00
Mark Story
a966f089d2 Merge pull request #3832 from ADmad/2.5-inflector
Add pluralization rule for "stadia" to uninflected list.
2014-06-29 09:34:09 -04:00
ADmad
607200fa7b Add pluralization rule for "stadia".
Refs #3830
2014-06-29 14:51:23 +05:30
mark_story
91721244a4 Fix more doc block errors in lib/ 2014-06-27 22:58:34 -04:00
Bryan Crowe
a1ae31e554 Fix identifier typos 2014-06-26 23:06:08 -04:00
euromark
73dcb2cb91 cs correction 2014-06-26 14:22:34 +02:00
Renan Gonçalves
1a89a3cb9d Exiting with 1 when Exception::getCode() returns non-integer values.
From php.net/exception.getcode
> Returns the exception code as integer in Exception but possibly as other type in Exception descendants (for example as string in PDOException).
2014-06-26 13:26:20 +02:00
euromark
b3507b199a Update doc blocks regarding return $this 2014-06-25 00:06:51 +02:00
José Lorenzo Rodríguez
bf33e1cf57 Merge pull request #3761 from aka-toxa/master
improving acl perfomance
2014-06-24 21:58:30 +02:00
José Lorenzo Rodríguez
3df972faa2 Merge pull request #3782 from cakephp/issue-3779
Whitelist more URL-y characters in digest parsing.
2014-06-24 21:56:40 +02:00
José Lorenzo Rodríguez
e9e09bf19a Merge pull request #3788 from dereuromark/master-composer
Fix composer app issues with cake.php
2014-06-24 21:56:01 +02:00
euromark
05709908a7 Fix composer app issues with cake.php 2014-06-24 17:49:18 +02:00
suzuki86
8f9589f7c8 Fix typo 2014-06-25 00:20:54 +09:00
euromark
26fe1265ab Mark App::pluginPath as deprecated and don't use it anymore. 2014-06-24 11:52:29 +02:00
mark_story
b4bcd74e60 Whitelist more URL-y characters in digest parsing.
Android clients include a full URL instead of just the URI. Also handle
situations where URLencoded bytes and document fragments are used.

Refs #3779
2014-06-23 14:39:35 -04:00
Anatoliy Petrovskiy
ad678e3988 improving acl perfomance 2014-06-23 13:51:52 +03:00
mark_story
59c3b73f7a Skip autoloaders for APCIterator
We can skip autoloaders for this class as it is provided by
a C extension and will never come from userland code.
2014-06-22 21:22:00 -04:00
mark_story
ffe811935c Remove else.
By returning early we can avoid the else statement entirely.
2014-06-20 16:07:47 -04:00
mark_story
e683616329 Apply patch from 'biesbjerg' to ApcEngine
This set of changes allows ApcEngine to work with APCu and newer
versions of APC.

Fixes #3749
2014-06-20 13:59:05 -04:00
Anatoliy Petrovskiy
bb15271622 improving acl perfomance by adding indexes on acl tables and reorganization joins in getting acl node function 2014-06-20 20:49:02 +03:00
euromark
d81d568cc0 make coredispatcher fully BC again 2014-06-20 14:05:18 +02:00
Mark Story
282a5d1cb5 Merge pull request #3731 from cakephp/issue-3656
Fix TextHelper::autoLinkEmail() near HTML

Refs #3656
2014-06-18 09:53:30 -04:00
Mark Story
163cacbd1d Merge pull request #3734 from voycey/patch-1
Add 'research' to the list of uninflected words.
2014-06-18 09:31:54 -04:00
Mark Story
c99c68684b Merge pull request #3646 from nanapi/no-truncate-fixture
Don't truncate test fixtures when the table has been freshly created.
2014-06-18 09:18:24 -04:00
Mark Story
562ed73562 Merge pull request #3726 from dereuromark/master-console-cake-unification
DS console cake unification
2014-06-18 08:55:53 -04:00
Dan Voyce
4915639efb Update Inflector.php
Added Research
2014-06-18 11:48:16 +10:00
euromark
6161aae54e also bring template one in sync. 2014-06-17 13:08:13 +02:00
euromark
a927f5d954 remove wrong App::uses() call 2014-06-17 05:10:19 +02:00
Bryan Crowe
1db10b4dd1 Basic grammar update to BasicAuthenticate docblock 2014-06-16 21:48:35 -04:00
mark_story
9136f63874 Fix autoLinkEmail() not working when emails are adjacent to HTML.
When an email address is adjacent to HTML it should be autolinked
correctly.

Refs #3656
2014-06-16 21:48:30 -04:00
mark_story
74d8e9ea40 Convert test to use a dataprovider instead of multiple calls.
Dataproviders are generally a bit easier to work with in the future.
2014-06-16 21:46:34 -04:00
euromark
a9de83daeb console cake cleanup and unification
remove duplicate define
2014-06-17 02:28:52 +02:00
mark_story
96df2c4b68 Update version number to 2.5.2 2014-06-14 21:36:39 -04:00
mark_story
fa19c34580 Fix Hash::extract() not matching 1/0 to true/false.
Historically [prop=1] has matched prop=true as well. This restores that
and also fixes [prop=0] not finding falsey values.

This makes the typing less strict in Hash::extract() but I don't think
it is unreasonable given PHP's type juggling.

Refs #3288
2014-06-12 11:30:48 -04:00
Bryan Crowe
d8b4c3967c Fix typo 2014-06-10 23:31:42 -04:00
ADmad
0b4ba0b049 Fix api docblocks for behaviors. 2014-06-10 00:38:44 +05:30
ADmad
4ee7cf6564 Remove lies from API docblock for BasicAuthenticate class.
Add info on how to configure for cookieless/stateless operation without redirection.
2014-06-08 14:05:08 +05:30
mark_story
146053c980 Update datasource API docs. 2014-06-06 14:06:32 -04:00
mark_story
d8b0083632 Fix api doc errors in TestSuite/ 2014-06-06 13:57:48 -04:00
mark_story
07b43403fb Fix doc errors in Component/Acl. 2014-06-06 13:57:15 -04:00
mark_story
849ad9a4f5 Remove dead, untested and unreachable code in FormHelper.
Closes #3650
2014-06-06 08:17:49 -04:00
akiyan
6d2402fbf6 No truncate when drop table. 2014-06-05 13:37:22 +09:00
mark_story
ab5da2a09f Fix the test suite package doc block errors. 2014-06-05 00:24:01 -04:00
mark_story
7058921275 Fix doc comment errors in Acl classes. 2014-06-05 00:15:45 -04:00
ADmad
1d40f3e685 Fix API docblock CS errors. 2014-06-05 00:28:55 +05:30
mark_story
55672b6df3 Merge branch 'router-stars' from Hikkijp
Refs #3582, #3581
2014-06-02 22:38:27 -04:00
mark_story
4362f7bf8b Add tests for CakeRoute::match() and trailing * routes.
Add tests for /pages/** routes, and fix coding standards errors.

Refs #3581
2014-06-02 22:37:37 -04:00
mark_story
9ba7abd89f Merge branch 'FormAuthenticate_empty_fix' from KeinBaum
Closes #3624
2014-06-02 22:03:40 -04:00
mark_story
975e4c3af0 Allow username of 0 in basic authentication.
Refs #3624
2014-06-02 22:02:28 -04:00
mark_story
d1e4dfac47 Add tests for #3624
The username of '0' should be accepted by FormAuthenticate.

Refs #3624
2014-06-02 21:58:50 -04:00
KeinBaum
88b3629f4f #3623: Allow username "0" with FormAuthenticate 2014-06-02 19:11:02 +02:00
ADmad
e7debd8692 More API docblock CS fixes. 2014-06-02 18:27:11 +05:30
Stefan Dickmann
91907b5c6c correct docblock
invalid certificate domain
2014-06-01 13:23:47 +02:00
mark_story
47ce5928e1 Fix api doc errors in Cache. 2014-05-31 22:02:55 -04:00
mark_story
86a071353d Fix api doc comment errors in Error/ 2014-05-31 21:57:17 -04:00
mark_story
fe2003888b Fix api doc errors in basics.php 2014-05-31 21:53:54 -04:00
mark_story
15f63e9c81 Removing peer verification failure test.
Since we are not running a domain with an invalid certificate relying on
someone else to do that is quite unreliable.
2014-05-31 21:51:03 -04:00
Mark Story
e467457319 Merge pull request #3612 from cakephp/api-doc-comments
More API docblock fixes.
2014-05-31 19:12:20 -04:00
ADmad
3d9b2b80cb More API docblock fixes. 2014-06-01 03:06:05 +05:30
MaziyarMK
596c1c27cb added HTML for styling tables
added <thead> and <tbody> to table for easier styling of generated templates.
2014-05-31 20:50:29 +00:00
ADmad
543066f34a Set default sort direction to 'asc'. 2014-05-30 19:43:09 +05:30
ADmad
16df061d66 Fix api docblocks for View layer classes. 2014-05-30 01:23:12 +05:30
mark_story
390441d3b9 Accept older blowfish hashes.
Both `2a` and `2x` are valid types of blowfish hashes, that while being
older should be accepted.

Backport 00c94bd582b83f8b92228b750aea0e8816a4ea89 from 3.x to 2.5.x,
I see this as a bug fix as it fixes incompatibilities with hashes
created by hash_password().

Refs #3575
2014-05-28 22:53:21 -04:00
ADmad
7a4244d0a6 More docblock CS fixes. 2014-05-28 22:09:54 +05:30
mark_story
f6c868d706 Fix remaining doc block errors in Console/ 2014-05-27 23:34:53 -04:00
mark_story
8f5acb0932 Fix CS errors in skel/ 2014-05-27 23:21:32 -04:00
mark_story
bb58bbe642 Fix API doc errors in Console/ 2014-05-27 23:16:05 -04:00
Mark Story
f287bc76c0 Force .bat files to have CRLF endings.
Newer versions of git convert line endings on checkout. This also causes
these files to show up as always modified when the repo is cloned
because the index and working copy have different line endings.

Hopefully this fixes the issue.

Fixes #3585
2014-05-27 19:06:08 -04:00
Hikkijp
c622a9dfc2 Fixes bug #3581
Fixes bug #3581 and the issue noticed by markstory
2014-05-27 17:30:38 -03:00