Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
304
Merge Requests
304
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
aade5fbf
Commit
aade5fbf
authored
Aug 02, 2008
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#237636
by marcingy: comment status field should match node status field.
parent
e1dd1e34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
modules/comment/comment.install
modules/comment/comment.install
+14
-2
modules/comment/comment.module
modules/comment/comment.module
+4
-4
No files found.
modules/comment/comment.install
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'
,
...
...
modules/comment/comment.module
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.
...
...
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