diff --git a/codepot/src/codepot/controllers/code.php b/codepot/src/codepot/controllers/code.php index a997c1d5..4928b63f 100644 --- a/codepot/src/codepot/controllers/code.php +++ b/codepot/src/codepot/controllers/code.php @@ -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 ); diff --git a/codepot/src/codepot/controllers/issue.php b/codepot/src/codepot/controllers/issue.php index 7c3319cb..e1077b14 100644 --- a/codepot/src/codepot/controllers/issue.php +++ b/codepot/src/codepot/controllers/issue.php @@ -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']}"; } diff --git a/codepot/src/codepot/models/issuemodel.php b/codepot/src/codepot/models/issuemodel.php index 2c11dbae..cc157838 100644 --- a/codepot/src/codepot/models/issuemodel.php +++ b/codepot/src/codepot/models/issuemodel.php @@ -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(). diff --git a/codepot/src/codepot/models/projectmodel.php b/codepot/src/codepot/models/projectmodel.php index 14897583..b2cc69ee 100644 --- a/codepot/src/codepot/models/projectmodel.php +++ b/codepot/src/codepot/models/projectmodel.php @@ -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; } } diff --git a/codepot/src/codepot/views/code_revision.php b/codepot/src/codepot/views/code_revision.php index c3a37ffd..d33c6fb7 100644 --- a/codepot/src/codepot/views/code_revision.php +++ b/codepot/src/codepot/views/code_revision.php @@ -134,9 +134,10 @@ $(function() { ); 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'];