From d5a46f344d9b5434830e4e00dab72d92cab0ef19 Mon Sep 17 00:00:00 2001 From: prashant Date: Tue, 24 Feb 2015 17:16:10 +0530 Subject: done minor changes --- cloud_comments.module | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cloud_comments.module b/cloud_comments.module index cb02710..5eb556b 100755 --- a/cloud_comments.module +++ b/cloud_comments.module @@ -86,7 +86,11 @@ function cloud_comments_all($example_id=0) { $page_content .= t("

Comment:
") . $row->comment . t("
"); if ($row->reply) { - $page_content .= t("

Reply Sent:
") . $row->reply . t("
"); + if(!$row->user){ + $page_content .= t("

Reply Sent:
") . $row->reply . t("
"); + }else{ + $page_content .= t("

Reply Sent By ".$row->user.":
") . $row->reply . t("
"); + } } else { if (user_access("reply cloud_comments")) { @@ -136,8 +140,10 @@ function cloud_comments_reply_form($form_state, $comment_id) { } // function reply_form function cloud_comments_reply_form_submit($form, &$form_state) { - $query = "UPDATE {scilab_cloud_comment} SET reply = '%s', reply_status = 1 WHERE id = %d"; - $query_result = db_query($query, $form_state["values"]["content"], $form_state["values"]["hidden"]); + global $user; + + $query = "UPDATE {scilab_cloud_comment} SET reply = '%s', user= '%s' reply_status = 1 WHERE id = %d"; + $query_result = db_query($query, $form_state["values"]["content"], $user->name, $form_state["values"]["hidden"]); $email_query = "SELECT email FROM {scilab_cloud_comment} WHERE id = %d"; $result = db_query($email_query, $form_state["values"]["hidden"]); -- cgit