changed review message email to include the comment text
This commit is contained in:
parent
59eb080fc3
commit
93f7486dfb
@ -859,7 +859,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 = 'See ' . current_url();
|
$email_message = current_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
|
||||||
);
|
);
|
||||||
|
@ -661,7 +661,7 @@ DEPRECATED
|
|||||||
// TODO: add a project option to accept an issue from anonymous users, logged-in users or just members.
|
// TODO: add a project option to accept an issue from anonymous users, logged-in users or just members.
|
||||||
else if (!$login['sysadmin?'] &&
|
else if (!$login['sysadmin?'] &&
|
||||||
$this->projects->projectHasMember($projectid, $login['id']) === FALSE &&
|
$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']}";
|
$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.
|
// TODO: add a project option to accept an issue from anonymous users, logged-in users or just members.
|
||||||
else if (!$login['sysadmin?'] &&
|
else if (!$login['sysadmin?'] &&
|
||||||
$this->projects->projectHasMember($projectid, $login['id']) === FALSE &&
|
$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']}";
|
$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.
|
// TODO: add a project option to accept an issue from anonymous users, logged-in users or just members.
|
||||||
else if (!$login['sysadmin?'] &&
|
else if (!$login['sysadmin?'] &&
|
||||||
$this->projects->projectHasMember($projectid, $login['id']) === FALSE &&
|
$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']}";
|
$status = "error - not a member nor a creator - {$login['id']}";
|
||||||
}
|
}
|
||||||
|
@ -900,7 +900,7 @@ class IssueModel extends Model
|
|||||||
return $x;
|
return $x;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isCreatedBy ($projectid, $issueid, $userid)
|
function isIssueCreatedBy ($projectid, $issueid, $userid)
|
||||||
{
|
{
|
||||||
$this->db->trans_begin (); // manual transaction. not using trans_start().
|
$this->db->trans_begin (); // manual transaction. not using trans_start().
|
||||||
|
|
||||||
|
@ -581,10 +581,12 @@ class ProjectModel extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
$additional_headers = '';
|
$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 (CODEPOT_EMAIL_SENDER != '') $additional_headers .= 'From: ' . CODEPOT_EMAIL_SENDER . "\r\n";
|
||||||
|
|
||||||
if (empty($recipients)) return FALSE;
|
if (empty($recipients)) return FALSE;
|
||||||
mail ($recipients, $subject, $message, $additional_headers);
|
mail ($recipients, $subject, base64_encode($message), $additional_headers);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,9 +134,10 @@ $(function() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
<?php
|
<?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)
|
if ($login['id'] == $rc->updatedby)
|
||||||
{
|
{
|
||||||
$edit_title = $this->lang->line('Comment') . " {$i}";
|
$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">
|
<div id="code_revision_mainarea_review_comment" class="collapsible-box-panel">
|
||||||
<?php
|
<?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";
|
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_no'>%d</span>", $rc->sno);
|
||||||
printf (" <span class='review_comment_title_updatedby'>%s</span>", $rc->updatedby);
|
printf (" <span class='review_comment_title_updatedby'>%s</span>", $rc->updatedby);
|
||||||
|
Loading…
Reference in New Issue
Block a user