From b99b20836ed6926ae42e05005f206e41338ec839 Mon Sep 17 00:00:00 2001 From: liyang Date: Tue, 26 Nov 2024 14:20:58 +0800 Subject: [PATCH] * [task#133161] add releases and build check. --- module/system/control.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module/system/control.php b/module/system/control.php index 747ceb1735..03d9e16513 100644 --- a/module/system/control.php +++ b/module/system/control.php @@ -684,6 +684,12 @@ class system extends control */ public function delete(int $id) { + $releases = $this->system->getReleasesByID($id); + if(!empty($releases)) return $this->sendError($this->lang->system->releaseExist); + + $builds = $this->system->getBuildsByID($id); + if(!empty($builds)) return $this->sendError($this->lang->system->buildExist); + $this->system->delete(TABLE_SYSTEM, $id); if(dao::isError()) return $this->sendError(dao::getError());