Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
captcha
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
captcha
Commits
465def89
Commit
465def89
authored
Dec 23, 2006
by
Fabiano Sant'Ana
Browse files
Options
Downloads
Patches
Plain Diff
Fixed
#102755
, thanks Drumm.
Fixed
#102271
, thanks incrn8.
parent
bd813a19
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
captcha.module
+36
-10
36 additions, 10 deletions
captcha.module
with
36 additions
and
10 deletions
captcha.module
+
36
−
10
View file @
465def89
...
...
@@ -62,6 +62,21 @@ function captcha_settings() {
'#description'
=>
t
(
'Select what kind of challenge you want to pose to the user'
)
);
$form
[
'captcha_description'
]
=
array
(
'#type'
=>
'textfield'
,
'#title'
=>
t
(
'Additional response description text'
),
'#default_value'
=>
variable_get
(
'captcha_description'
,
''
),
'#description'
=>
t
(
'This text will be added below the captcha response field.'
),
);
$form
[
'captcha_override_module_description'
]
=
array
(
'#type'
=>
'checkbox'
,
'#title'
=>
t
(
'Override module's form item description?'
),
'#default_value'
=>
variable_get
(
'captcha_override_module_description'
,
0
),
'#description'
=>
t
(
'Override the captcha module's form item description to the one set above.'
),
);
return
$form
;
}
...
...
@@ -93,6 +108,17 @@ function captcha_form_alter($formid, &$form) {
//use call_func because module_invoke does not allow call by reference.
if
(
module_hook
(
$captcha_type
,
'captchachallenge'
))
{
call_user_func_array
(
$captcha_type
.
'_captchachallenge'
,
array
(
&
$form
,
&
$_SESSION
[
'captcha'
]));
if
(
variable_get
(
'captcha_override_module_description'
,
0
))
{
unset
(
$form
[
'captcha_response'
][
'#description'
]);
}
if
(
strlen
(
variable_get
(
'captcha_description'
,
''
))
>
0
)
{
if
(
isset
(
$form
[
'captcha_response'
][
'#description'
]))
{
$form
[
'captcha_response'
][
'#description'
]
.
=
' '
.
variable_get
(
'captcha_description'
,
''
);
}
else
{
$form
[
'captcha_response'
][
'#description'
]
=
variable_get
(
'captcha_description'
,
''
);
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment