* Delete the unused code.

This commit is contained in:
hufangzhou
2021-08-04 13:11:51 +08:00
parent 6621d2971f
commit 59b31b5b1e
3 changed files with 0 additions and 41 deletions
-16
View File
@@ -106,15 +106,6 @@ class stakeholderModel extends model
if($stakeholder->objectType == 'project' and $stakeholder->objectID)
{
$this->loadModel('project')->updateInvolvedUserView($stakeholder->objectID, $stakeholder->user);
/* Update the viewers of the project main doc library. */
$authorizedUsers = $this->dao->select('users')->from(TABLE_DOCLIB)->where('type')->eq('project')->andWhere('project')->eq($stakeholder->objectID)->andWhere('main')->eq(1)->fetch();
$authorizedUsers = empty($authorizedUsers) ? array() : explode(',', trim($authorizedUsers->users, ','));
if(!in_array($stakeholder->user, $authorizedUsers))
{
$authorizedUsers = ',' . implode(',', $authorizedUsers) . ',' . $stakeholder->user . ',';
$this->dao->update(TABLE_DOCLIB)->set('users')->eq($authorizedUsers)->where('type')->eq('project')->andWhere('project')->eq($stakeholder->objectID)->andWhere('main')->eq(1)->exec();
}
}
if($stakeholder->objectType == 'program' and $stakeholder->objectID)
@@ -182,13 +173,6 @@ class stakeholderModel extends model
$this->loadModel('project')->updateInvolvedUserView($projectID, $changedAccounts);
/* Update the viewers of the project main doc library. */
$authorizedUsers = $this->dao->select('users')->from(TABLE_DOCLIB)->where('type')->eq('project')->andWhere('project')->eq($stakeholder->objectID)->andWhere('main')->eq(1)->fetch();
$authorizedUsers = empty($authorizedUsers) ? array() : explode(',', trim($authorizedUsers->users, ','));
$authorizedUsers = array_merge($authorizedUsers, array_filter($accounts));
$authorizedUsers = ',' . implode(',', array_unique($authorizedUsers)) . ',';
$this->dao->update(TABLE_DOCLIB)->set('users')->eq($authorizedUsers)->where('type')->eq('project')->andWhere('project')->eq($stakeholder->objectID)->andWhere('main')->eq(1)->exec();
if($stakeholder->objectType == 'program' and $stakeholder->objectID)
{
$programID = $stakeholder->objectID;