Fixed the review backend to support multiple patches per review and line level comments.

This commit is contained in:
Loic d'Anterroches
2009-07-16 10:04:58 +02:00
parent dd56d681b3
commit 99992442f5
12 changed files with 270 additions and 243 deletions

View File

@@ -126,11 +126,25 @@ class IDF_Review extends Pluf_Model
'join_tags' =>
array(
'join' => 'LEFT JOIN '.$table
.' ON idf_issue_id=id',
.' ON idf_review_id=id',
),
);
}
/**
* Iterate through the patches and comments to get the reviewers.
*/
function getReviewers()
{
$rev = new ArrayObject();
foreach ($this->get_patches_list() as $p) {
foreach ($p->get_comments_list() as $c) {
$rev[] = $c->get_submitter();
}
}
return Pluf_Model_RemoveDuplicates($rev);
}
function __toString()
{
return $this->id.' - '.$this->summary;
@@ -149,7 +163,7 @@ class IDF_Review extends Pluf_Model
function preSave($create=false)
{
if ($this->id == '') {
if ($create) {
$this->creation_dtime = gmdate('Y-m-d H:i:s');
}
$this->modif_dtime = gmdate('Y-m-d H:i:s');