Merge branch '15.4'

This commit is contained in:
王怡栋
2021-09-02 19:21:30 +08:00
35 changed files with 228 additions and 146 deletions

View File

@@ -182,7 +182,10 @@ class program extends control
$program = $this->program->getByID($programID);
$parentProgram = $program->parent ? $this->program->getByID($program->parent) : '';
$parents = $this->program->getParentPairs();
unset($parents[$programID]);
/* Remove children program from parents. */
$children = $this->dao->select('*')->from(TABLE_PROGRAM)->where('path')->like("%,$programID,%")->fetchPairs('id', 'id');
foreach($children as $childID) unset($parents[$childID]);
$this->view->title = $this->lang->program->edit;
$this->view->position[] = $this->lang->program->edit;