Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
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
drupal
Commits
aade5fbf
Commit
aade5fbf
authored
Aug 2, 2008
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#237636
by marcingy: comment status field should match node status field.
parent
e1dd1e34
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/comment/comment.install
+14
-2
14 additions, 2 deletions
modules/comment/comment.install
modules/comment/comment.module
+4
-4
4 additions, 4 deletions
modules/comment/comment.module
with
18 additions
and
6 deletions
modules/comment/comment.install
+
14
−
2
View file @
aade5fbf
...
...
@@ -96,6 +96,18 @@ function comment_update_7000() {
return
array
(
array
(
'success'
=>
TRUE
,
'query'
=>
'Comment order settings removed.'
));
}
/**
* Change comment status from published being 0 to being 1
*/
function
comment_update_7001
()
{
$ret
=
array
();
$ret
[]
=
update_sql
(
"UPDATE
{
comments
}
SET status = 3 WHERE status = 0"
);
$ret
[]
=
update_sql
(
"UPDATE
{
comments
}
SET status = 0 WHERE status = 1"
);
$ret
[]
=
update_sql
(
"UPDATE
{
comments
}
SET status = 1 WHERE status = 3"
);
return
$ret
;
}
/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
...
...
@@ -161,9 +173,9 @@ function comment_schema() {
'type'
=>
'int'
,
'unsigned'
=>
TRUE
,
'not null'
=>
TRUE
,
'default'
=>
0
,
'default'
=>
1
,
'size'
=>
'tiny'
,
'description'
=>
t
(
'The published status of a comment. (0 = Published, 1 =
Not
Published)'
),
'description'
=>
t
(
'The published status of a comment. (0 =
Not
Published, 1 = Published)'
),
),
'format'
=>
array
(
'type'
=>
'int'
,
...
...
This diff is collapsed.
Click to expand it.
modules/comment/comment.module
+
4
−
4
View file @
aade5fbf
...
...
@@ -11,14 +11,14 @@
*/
/**
* Comment is
published
.
* Comment is
awaiting approval
.
*/
define
(
'COMMENT_PUBLISHED'
,
0
);
define
(
'COMMENT_
NOT_
PUBLISHED'
,
0
);
/**
* Comment is
awaiting approval
.
* Comment is
published
.
*/
define
(
'COMMENT_
NOT_
PUBLISHED'
,
1
);
define
(
'COMMENT_PUBLISHED'
,
1
);
/**
* Comments are displayed in a flat list - collapsed.
...
...
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