* Finish task #42851.

This commit is contained in:
dingna
2021-09-24 09:31:23 +08:00
parent f182feb33c
commit 27670f7b3a
8 changed files with 9 additions and 1 deletions

View File

@@ -379,6 +379,9 @@ class program extends control
$childrenCount = $this->dao->select('count(*) as count')->from(TABLE_PROGRAM)->where('parent')->eq($programID)->andWhere('deleted')->eq(0)->fetch('count');
if($childrenCount) die(js::alert($this->lang->program->hasChildren));
$productCount = $this->dao->select('count(*) as count')->from(TABLE_PRODUCT)->where('program')->eq($programID)->andWhere('deleted')->eq(0)->fetch('count');
if($productCount) die(js::alert($this->lang->program->hasProduct));
$program = $this->dao->select('*')->from(TABLE_PROGRAM)->where('id')->eq($programID)->fetch();
if($confirm == 'no') die(js::confirm($this->lang->program->confirmDelete, $this->createLink('program', 'delete', "programID=$programID&confirm=yes")));