fixed a bug of sending a wrong URL in review comment notification

This commit is contained in:
hyung-hwan 2016-01-11 05:17:39 +00:00
parent 777771a95c
commit 9774974aa9
2 changed files with 3 additions and 1 deletions

View File

@ -751,6 +751,7 @@ class Code extends Controller
} }
else else
{ {
$review_url = $this->input->post('code_new_review_url');
$review_comment = $this->input->post('code_new_review_comment'); $review_comment = $this->input->post('code_new_review_comment');
if ($review_comment === FALSE || ($review_comment = trim($review_comment)) == '') if ($review_comment === FALSE || ($review_comment = trim($review_comment)) == '')
{ {
@ -774,7 +775,7 @@ class Code extends Controller
'New review message #%d for r%d by %s in %s', 'New review message #%d for r%d by %s in %s',
$review_sno, $rev, $login['id'], $projectid $review_sno, $rev, $login['id'], $projectid
); );
$email_message = current_url() . "\r\n" . $review_comment; $email_message = $review_url . "\r\n" . $review_comment;
$this->projects->emailMessageToMembers ( $this->projects->emailMessageToMembers (
$projectid, $this->login, $email_subject, $email_message $projectid, $this->login, $email_subject, $email_message
); );

View File

@ -296,6 +296,7 @@ $(function() {
var form_data = new FormData(); var form_data = new FormData();
form_data.append ('code_new_review_comment', $('#code_revision_new_review_comment').val()); form_data.append ('code_new_review_comment', $('#code_revision_new_review_comment').val());
form_data.append ('code_new_review_url', codepot_merge_path('<?php print site_url(); ?>', '<?php print "/code/revision/{$project->id}/{$hex_headpath}{$revreq}"; ?>'));
$('#code_revision_new_review_comment_form').dialog('disable'); $('#code_revision_new_review_comment_form').dialog('disable');
$.ajax({ $.ajax({