summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-12-08 09:11:32 +0000
committerDries Buytaert <dries@buytaert.net>2005-12-08 09:11:32 +0000
commit3ae534a64eb32686a54efd5d312c21ba06d9cfa1 (patch)
tree5530a0e6cafd256c15ef018ee7e03ef12defdf95
parentac3b446e4b3ccb69bb77bb2a18975ef7afc36aa1 (diff)
downloadbrdo-3ae534a64eb32686a54efd5d312c21ba06d9cfa1.tar.gz
brdo-3ae534a64eb32686a54efd5d312c21ba06d9cfa1.tar.bz2
- Patch #28595 by Cvbge: fixed problems with bulk comment operations.
-rw-r--r--modules/comment.module10
-rw-r--r--modules/comment/comment.module10
2 files changed, 10 insertions, 10 deletions
diff --git a/modules/comment.module b/modules/comment.module
index ce0c4c973..efca38ca5 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -1007,20 +1007,20 @@ function comment_delete($cid) {
function comment_operations($action = NULL) {
if ($action == 'publish') {
$operations = array(
- 'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = COMMENT_PUBLISHED WHERE cid = %d'),
+ 'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_PUBLISHED .' WHERE cid = %d'),
'delete' => array(t('Delete the selected comments'), '')
);
}
else if ($action == 'unpublish') {
$operations = array(
- 'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = COMMENT_NOT_PUBLISHED WHERE cid = %d'),
+ 'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_NOT_PUBLISHED .' WHERE cid = %d'),
'delete' => array(t('Delete the selected comments'), '')
);
}
else {
$operations = array(
- 'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = COMMENT_PUBLISHED WHERE cid = %d'),
- 'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = COMMENT_NOT_PUBLISHED WHERE cid = %d'),
+ 'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_PUBLISHED .' WHERE cid = %d'),
+ 'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_NOT_PUBLISHED .' WHERE cid = %d'),
'delete' => array(t('Delete the selected comments'), '')
);
}
@@ -1052,7 +1052,7 @@ function comment_admin_overview($type = 'new') {
// load the comments that we want to display
$status = ($type == 'approval') ? COMMENT_NOT_PUBLISHED : COMMENT_PUBLISHED;
- $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.status = '. db_escape_string($status));
+ $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.status = '. $status);
// build a table listing the appropriate comments
$destination = drupal_get_destination();
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index ce0c4c973..efca38ca5 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1007,20 +1007,20 @@ function comment_delete($cid) {
function comment_operations($action = NULL) {
if ($action == 'publish') {
$operations = array(
- 'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = COMMENT_PUBLISHED WHERE cid = %d'),
+ 'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_PUBLISHED .' WHERE cid = %d'),
'delete' => array(t('Delete the selected comments'), '')
);
}
else if ($action == 'unpublish') {
$operations = array(
- 'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = COMMENT_NOT_PUBLISHED WHERE cid = %d'),
+ 'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_NOT_PUBLISHED .' WHERE cid = %d'),
'delete' => array(t('Delete the selected comments'), '')
);
}
else {
$operations = array(
- 'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = COMMENT_PUBLISHED WHERE cid = %d'),
- 'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = COMMENT_NOT_PUBLISHED WHERE cid = %d'),
+ 'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_PUBLISHED .' WHERE cid = %d'),
+ 'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_NOT_PUBLISHED .' WHERE cid = %d'),
'delete' => array(t('Delete the selected comments'), '')
);
}
@@ -1052,7 +1052,7 @@ function comment_admin_overview($type = 'new') {
// load the comments that we want to display
$status = ($type == 'approval') ? COMMENT_NOT_PUBLISHED : COMMENT_PUBLISHED;
- $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.status = '. db_escape_string($status));
+ $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.status = '. $status);
// build a table listing the appropriate comments
$destination = drupal_get_destination();