| 94 | | global $CFG; |
|---|
| 95 | | |
|---|
| 96 | | $newcomment = new stdClass; |
|---|
| 97 | | $newcomment->wallowner = $wall_id; |
|---|
| 98 | | $newcomment->comment_owner = $poster_id; |
|---|
| 99 | | $newcomment->content = $text; |
|---|
| 100 | | $newcomment->posted = time(); |
|---|
| 101 | | |
|---|
| 102 | | if ($newcomment->ident = insert_record("commentwall", $newcomment)) { |
|---|
| | 94 | global $CFG; |
|---|
| | 95 | |
|---|
| | 96 | $newcomment = new stdClass; |
|---|
| | 97 | $newcomment->wallowner = $wall_id; |
|---|
| | 98 | $newcomment->comment_owner = $poster_id; |
|---|
| | 99 | $newcomment->content = $text; |
|---|
| | 100 | $newcomment->posted = time(); |
|---|
| | 101 | |
|---|
| | 102 | if ($newcomment->ident = insert_record("commentwall", $newcomment)) { |
|---|
| 104 | | message_user($wall_id, $poster_id, __gettext("Someone has posted to your comment wall"), __gettext("Check it out") . ": " . $CFG->wwwroot . user_info("username", $wall_id) . "/profile/"); |
|---|
| | 104 | |
|---|
| | 105 | $message = __gettext(sprintf("You have received a comment from %s on your comment wall:", user_name($newcomment->comment_owner), stripslashes($object_title))); |
|---|
| | 106 | $message .= "\n\n" . stripslashes($newcomment->content) . "\n\n"; |
|---|
| | 107 | $message .= __gettext(sprintf("To reply on %s's comment wall, click here: %s", user_name($newcomment->comment_owner), $CFG->wwwroot . user_info("username", $newcomment->comment_owner) . "/profile/")) . "\n"; |
|---|
| | 108 | $message .= __gettext(sprintf("To see other comments on your wall, click here: %s", $CFG->wwwroot . user_info("username", $newcomment->wallowner) . "/profile/")); |
|---|
| | 109 | $message = wordwrap($message); |
|---|
| | 110 | |
|---|
| | 111 | message_user($wall_id, $newcomment->comment_owner, __gettext(sprintf("%s has posted to your comment wall", user_name($newcomment->comment_owner))), $message); |
|---|