changed review message email to include the comment text

This commit is contained in:
hyung-hwan 2016-01-07 11:52:58 +00:00
parent 59eb080fc3
commit 93f7486dfb
5 changed files with 14 additions and 10 deletions

View File

@ -859,7 +859,7 @@ class Code extends Controller
'New review message #%d for r%d by %s in %s',
$review_sno, $rev, $login['id'], $projectid
);
$email_message = 'See ' . current_url();
$email_message = current_url() . "\r\n" . $review_comment;
$this->projects->emailMessageToMembers (
$projectid, $this->login, $email_subject, $email_message
);

View File

@ -661,7 +661,7 @@ DEPRECATED
// TODO: add a project option to accept an issue from anonymous users, logged-in users or just members.
else if (!$login['sysadmin?'] &&
$this->projects->projectHasMember($projectid, $login['id']) === FALSE &&
$this->issues->isCreatedBy($projectid, $issueid, $login['id']) === FALSE)
$this->issues->isIssueCreatedBy($projectid, $issueid, $login['id']) === FALSE)
{
$status = "error - not a member nor a creator - {$login['id']}";
}
@ -792,7 +792,7 @@ DEPRECATED
// TODO: add a project option to accept an issue from anonymous users, logged-in users or just members.
else if (!$login['sysadmin?'] &&
$this->projects->projectHasMember($projectid, $login['id']) === FALSE &&
$this->issues->isCreatedBy($projectid, $issueid, $login['id']) === FALSE)
$this->issues->isIssueCreatedBy($projectid, $issueid, $login['id']) === FALSE)
{
$status = "error - not a member nor a creator - {$login['id']}";
}
@ -873,7 +873,7 @@ DEPRECATED
// TODO: add a project option to accept an issue from anonymous users, logged-in users or just members.
else if (!$login['sysadmin?'] &&
$this->projects->projectHasMember($projectid, $login['id']) === FALSE &&
$this->issues->isCreatedBy($projectid, $issueid, $login['id']) === FALSE)
$this->issues->isIssueCreatedBy($projectid, $issueid, $login['id']) === FALSE)
{
$status = "error - not a member nor a creator - {$login['id']}";
}

View File

@ -900,7 +900,7 @@ class IssueModel extends Model
return $x;
}
function isCreatedBy ($projectid, $issueid, $userid)
function isIssueCreatedBy ($projectid, $issueid, $userid)
{
$this->db->trans_begin (); // manual transaction. not using trans_start().

View File

@ -581,10 +581,12 @@ class ProjectModel extends Model
}
$additional_headers = '';
$additional_headers .= "Content-Type: text/plain\r\n";
$additional_headers .= "Content-Transfer-Encoding: base64\r\n";
if (CODEPOT_EMAIL_SENDER != '') $additional_headers .= 'From: ' . CODEPOT_EMAIL_SENDER . "\r\n";
if (empty($recipients)) return FALSE;
mail ($recipients, $subject, $message, $additional_headers);
mail ($recipients, $subject, base64_encode($message), $additional_headers);
return TRUE;
}
}

View File

@ -134,9 +134,10 @@ $(function() {
);
<?php
for ($i = $review_count; $i > 0; $i--)
for ($i = 0; $i < $review_count; )
{
$rc = $reviews[$i - 1];
$rc = $reviews[$i];
$i++;
if ($login['id'] == $rc->updatedby)
{
$edit_title = $this->lang->line('Comment') . " {$i}";
@ -526,9 +527,10 @@ $history = $file['history'];
<div id="code_revision_mainarea_review_comment" class="collapsible-box-panel">
<?php
for ($i = $review_count; $i > 0; $i--)
for ($i = 0; $i < $review_count; )
{
$rc = $reviews[$i - 1];
$rc = $reviews[$i];
$i++;
print "<div id='code_revision_mainarea_review_comment_title_{$i}' class='review_comment_title'>\n";
printf (" <span class='review_comment_title_no'>%d</span>", $rc->sno);
printf (" <span class='review_comment_title_updatedby'>%s</span>", $rc->updatedby);