This commit is contained in:
wangyidong
2021-06-22 11:36:46 +08:00
3 changed files with 22 additions and 5 deletions
+8 -2
View File
@@ -1107,10 +1107,16 @@ class docModel extends model
/* Sort project. */
$orderedProjects = array();
$objects = $this->program->getList('all', 'order_asc', null, true);
$objects = $this->dao->select('*')->from(TABLE_PROJECT)
->where('type')->eq('project')
->andWhere('deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->orderBy('order_asc')
->fetchAll('id');
foreach($objects as $objectID => $object)
{
if($object->type == 'program') continue;
$object->parent = $this->program->getTopByID($object->parent);
$orderedProjects[$objectID] = $object;
unset($objects[$object->id]);
+12 -1
View File
@@ -113,7 +113,18 @@ class project extends control
/* Sort project. */
$programs = array();
$orderedProjects = array();
$objects = $this->program->getList('all', 'order_asc', null, true);
$objects = $this->dao->select('*')->from(TABLE_PROGRAM)
->where('type')->in('program,project')
->andWhere('deleted')->eq(0)
->beginIF(!$this->app->user->admin)
->andWhere('(id')->in($this->app->user->view->programs)
->orWhere('id')->in($this->app->user->view->projects)
->markRight(1)
->fi()
->orderBy('id_asc')
->fetchAll('id');
foreach($objects as $objectID => $object)
{
if($object->type == 'program')
+2 -2
View File
File diff suppressed because one or more lines are too long