* Check auth.

This commit is contained in:
zhujinyong
2022-01-05 09:05:32 +08:00
parent 087cc82369
commit ff9ceaccad
11 changed files with 449 additions and 99 deletions
-19
View File
@@ -29,25 +29,6 @@ class project extends control
$this->display();
}
/**
* Update children user view.
*
* @param int $projectID
* @param array $account
* @access public
* @return void
*/
public function updateChildUserView($projectID = 0, $account = array())
{
$childPrograms = $this->dao->select('id')->from(TABLE_PROJECT)->where('path')->like("%,$projectID,%")->andWhere('type')->eq('project')->fetchPairs();
$childProjects = $this->dao->select('id')->from(TABLE_PROJECT)->where('path')->like("%,$projectID,%")->andWhere('type')->eq('project')->fetchPairs();
$childProducts = $this->dao->select('id')->from(TABLE_PRODUCT)->where('project')->eq($projectID)->fetchPairs();
if(!empty($childPrograms)) $this->user->updateUserView($childPrograms, 'project', array($account));
if(!empty($childProjects)) $this->user->updateUserView($childProjects, 'project', array($account));
if(!empty($childProducts)) $this->user->updateUserView($childProducts, 'product', array($account));
}
/**
* Export project.
*