diff --git a/module/my/css/index.css b/module/my/css/index.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/module/program/model.php b/module/program/model.php index 44f3f5a5f9..e6d6fb614f 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -875,4 +875,34 @@ class programModel extends model } return $stats; } + + /** + * Get project team member pairs. + * + * @param int $programID + * @access public + * @return array + */ + public function getProjectTeamMemberPairs($programID = 0) + { + $projectList = $this->getPRJPairs($programID); + if(!$projectList) return array('' => ''); + + $users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1') + ->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account') + ->where('t1.root')->in(array_keys($projectList)) + ->andWhere('t1.type')->eq('project') + ->andWhere('t2.deleted')->eq(0) + ->fetchAll('account'); + if(!$users) return array('' => ''); + + foreach($users as $account => $user) + { + $firstLetter = ucfirst(substr($user->account, 0, 1)) . ':'; + if(!empty($this->config->isINT)) $firstLetter = ''; + $users[$account] = $firstLetter . ($user->realname ? $user->realname : $user->account); + } + + return array('' => '') + $users; + } }