From 054384fe6990ce18f14e28cc62e059cd7a07ff5e Mon Sep 17 00:00:00 2001 From: liyang Date: Thu, 21 Nov 2024 11:24:58 +0800 Subject: [PATCH] * [task#132867] add active control method. --- module/system/control.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/module/system/control.php b/module/system/control.php index dc7e929e52..3bbbfece49 100644 --- a/module/system/control.php +++ b/module/system/control.php @@ -625,4 +625,24 @@ class system extends control $this->view->systemList = $this->system->getPairs('0'); $this->display(); } + + /** + * 上架应用。 + * Active application. + * + * @param int $id + * @access public + * @return void + */ + public function active(int $id) + { + $system = new stdclass(); + $system->status = 'active'; + + $this->system->update($id, $system, false); + if(dao::isError()) return $this->sendError(dao::getError()); + + $this->loadModel('action')->create('system', $id, 'active'); + $this->sendSuccess(array('load' => true)); + } }