Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
honeypot-2997609
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
honeypot-2997609
Commits
3e681cc5
Commit
3e681cc5
authored
12 years ago
by
Hugues Lesecq
Committed by
Jeff Geerling
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1489700
by hles: Allow comment form settings only when comment module is actually enabled.
parent
166bf0c9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
honeypot.admin.inc
+10
-8
10 additions, 8 deletions
honeypot.admin.inc
with
10 additions
and
8 deletions
honeypot.admin.inc
+
10
−
8
View file @
3e681cc5
...
...
@@ -117,14 +117,16 @@ function honeypot_admin_form($form, &$form_state) {
}
// Comment forms.
$form
[
'enabled_forms'
][
'comment_forms'
]
=
array
(
'#markup'
=>
'<h5>'
.
t
(
'Comment Forms'
)
.
'</h5>'
);
foreach
(
$types
as
$type
)
{
$id
=
'honeypot_form_comment_node_'
.
$type
->
type
.
'_form'
;
$form
[
'enabled_forms'
][
$id
]
=
array
(
'#type'
=>
'checkbox'
,
'#title'
=>
t
(
'@name comment form'
,
array
(
'@name'
=>
$type
->
name
)),
'#default_value'
=>
variable_get
(
$id
,
0
),
);
if
(
module_exists
(
'comment'
))
{
$form
[
'enabled_forms'
][
'comment_forms'
]
=
array
(
'#markup'
=>
'<h5>'
.
t
(
'Comment Forms'
)
.
'</h5>'
);
foreach
(
$types
as
$type
)
{
$id
=
'honeypot_form_comment_node_'
.
$type
->
type
.
'_form'
;
$form
[
'enabled_forms'
][
$id
]
=
array
(
'#type'
=>
'checkbox'
,
'#title'
=>
t
(
'@name comment form'
,
array
(
'@name'
=>
$type
->
name
)),
'#default_value'
=>
variable_get
(
$id
,
0
),
);
}
}
}
...
...
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