* [task#132867] add active control method.

This commit is contained in:
liyang
2024-11-21 11:28:50 +08:00
committed by 曹延义
parent 6209ffa599
commit 054384fe69
+20
View File
@@ -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));
}
}