@@ -937,21 +937,30 @@ function comment_render($node, $cid = 0) {
*/
functioncomment_admin_edit($cid){
// comment edits need to be saved.
// Comment edits need to be saved.
if($_POST['op']==t('Submit')){
$edit=$_POST['edit'];
$output=comment_save($edit['cid'],$edit);
comment_save($edit['cid'],$edit);
drupal_goto('admin/comment');
}
// if we're not saving our changes above, we're editing it.
// If we're not saving our changes above, we're editing it.
$result=db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status != 2',$cid);
@@ -1002,7 +1011,7 @@ function comment_delete($cid) {
}
functioncomment_save($id,$edit){
db_query("UPDATE {comments} SET subject = '%s', comment = '%s', status = %d, format = '%s' WHERE cid = %d",$edit['subject'],$edit['comment'],$edit['status'],$edit['format'],$id);
db_query("UPDATE {comments} SET subject = '%s', comment = '%s', status = %d, format = '%s', name = '%s', mail = '%s', homepage = '%s' WHERE cid = %d",$edit['subject'],$edit['comment'],$edit['status'],$edit['format'],$edit['name'],$edit['mail'],$edit['homepage'],$id);
@@ -937,21 +937,30 @@ function comment_render($node, $cid = 0) {
*/
functioncomment_admin_edit($cid){
// comment edits need to be saved.
// Comment edits need to be saved.
if($_POST['op']==t('Submit')){
$edit=$_POST['edit'];
$output=comment_save($edit['cid'],$edit);
comment_save($edit['cid'],$edit);
drupal_goto('admin/comment');
}
// if we're not saving our changes above, we're editing it.
// If we're not saving our changes above, we're editing it.
$result=db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status != 2',$cid);
@@ -1002,7 +1011,7 @@ function comment_delete($cid) {
}
functioncomment_save($id,$edit){
db_query("UPDATE {comments} SET subject = '%s', comment = '%s', status = %d, format = '%s' WHERE cid = %d",$edit['subject'],$edit['comment'],$edit['status'],$edit['format'],$id);
db_query("UPDATE {comments} SET subject = '%s', comment = '%s', status = %d, format = '%s', name = '%s', mail = '%s', homepage = '%s' WHERE cid = %d",$edit['subject'],$edit['comment'],$edit['status'],$edit['format'],$edit['name'],$edit['mail'],$edit['homepage'],$id);