Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
captcha
Commits
3f885933
Commit
3f885933
authored
Sep 08, 2015
by
Fabiano Sant'Ana
Browse files
Issue #2522040 by wundo, Michelle: Backporting changes from Drupal 7
parent
37ef1489
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
captcha.inc
captcha.inc
+3
-3
No files found.
captcha.inc
View file @
3f885933
...
...
@@ -29,7 +29,7 @@ function captcha_set_form_id_setting($form_id, $captcha_type) {
elseif
(
$captcha_type
==
NULL
)
{
db_query
(
"DELETE FROM
{
captcha_points
}
WHERE form_id = '%s'"
,
$form_id
);
}
elseif
(
is_object
(
$captcha_type
)
&&
isset
(
$captcha_type
->
module
)
&&
isset
(
$captcha_type
->
captcha_type
))
{
elseif
(
is_object
(
$captcha_type
)
&&
!
empty
(
$captcha_type
->
module
)
&&
!
empty
(
$captcha_type
->
captcha_type
))
{
db_query
(
"DELETE FROM
{
captcha_points
}
WHERE form_id = '%s'"
,
$form_id
);
db_query
(
"INSERT INTO
{
captcha_points
}
(form_id, module, captcha_type) VALUES ('%s', '%s', '%s')"
,
$form_id
,
$captcha_type
->
module
,
$captcha_type
->
captcha_type
);
}
...
...
@@ -72,7 +72,7 @@ function captcha_get_form_id_setting($form_id, $symbolic=FALSE) {
if
(
!
$captcha_point
)
{
$captcha_point
=
NULL
;
}
elseif
(
$captcha_point
->
captcha_type
==
'default'
)
{
elseif
(
!
empty
(
$captcha_point
->
captcha_type
)
&&
$captcha_point
->
captcha_type
==
'default'
)
{
if
(
!
$symbolic
)
{
list
(
$module
,
$type
)
=
explode
(
'/'
,
variable_get
(
'captcha_default_challenge'
,
'captcha/Math'
));
$captcha_point
->
module
=
$module
;
...
...
@@ -82,7 +82,7 @@ function captcha_get_form_id_setting($form_id, $symbolic=FALSE) {
$captcha_point
=
'default'
;
}
}
elseif
(
$captcha_point
->
module
==
NULL
&&
$captcha_point
->
captcha_type
==
NULL
&&
$symbolic
)
{
elseif
(
empty
(
$captcha_point
->
module
)
&&
empty
(
$captcha_point
->
captcha_type
)
&&
$symbolic
)
{
$captcha_point
=
'none'
;
}
elseif
(
$symbolic
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment