Merge branch '15.0' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -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
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user