* finish task #2784.

This commit is contained in:
chenfeiCF
2016-11-15 16:59:44 +08:00
parent ce574424d3
commit c4878d4522
7 changed files with 26 additions and 6 deletions
+9 -2
View File
@@ -974,7 +974,7 @@ class projectModel extends model
* @access public
* @return array
*/
public function getProjectsToImport($projectIds)
public function getProjectsToImport($projectIds, $containDoing = 'false')
{
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
->where('id')->in($projectIds)
@@ -986,7 +986,14 @@ class projectModel extends model
$now = date('Y-m-d');
foreach($projects as $id => $project)
{
if($this->checkPriv($project) and ($project->status == 'done' or $project->end < $now)) $pairs[$id] = ucfirst(substr($project->code, 0, 1)) . ':' . $project->name;
if($containDoing)
{
if($this->checkPriv($project) and ($project->status == 'done' or $project->status == 'doing' or $project->end < $now)) $pairs[$id] = ucfirst(substr($project->code, 0, 1)) . ':' . $project->name;
}
else
{
if($this->checkPriv($project) and ($project->status == 'done' or $project->end < $now)) $pairs[$id] = ucfirst(substr($project->code, 0, 1)) . ':' . $project->name;
}
}
return $pairs;
}