From 9774974aa9c9196d2f399d3f1ef250c11f9dd82c Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 11 Jan 2016 05:17:39 +0000 Subject: [PATCH] fixed a bug of sending a wrong URL in review comment notification --- codepot/src/codepot/controllers/code.php | 3 ++- codepot/src/codepot/views/code_revision.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/codepot/src/codepot/controllers/code.php b/codepot/src/codepot/controllers/code.php index f45e48f0..d179e3a0 100644 --- a/codepot/src/codepot/controllers/code.php +++ b/codepot/src/codepot/controllers/code.php @@ -751,6 +751,7 @@ class Code extends Controller } else { + $review_url = $this->input->post('code_new_review_url'); $review_comment = $this->input->post('code_new_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', $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 ( $projectid, $this->login, $email_subject, $email_message ); diff --git a/codepot/src/codepot/views/code_revision.php b/codepot/src/codepot/views/code_revision.php index 50aae70d..2e9b4f20 100644 --- a/codepot/src/codepot/views/code_revision.php +++ b/codepot/src/codepot/views/code_revision.php @@ -296,6 +296,7 @@ $(function() { var form_data = new FormData(); form_data.append ('code_new_review_comment', $('#code_revision_new_review_comment').val()); + form_data.append ('code_new_review_url', codepot_merge_path('', 'id}/{$hex_headpath}{$revreq}"; ?>')); $('#code_revision_new_review_comment_form').dialog('disable'); $.ajax({