* Remove useless code.

This commit is contained in:
sunguangming
2023-12-26 17:28:10 +08:00
parent 916ab0e029
commit 7205c59a0d
2 changed files with 0 additions and 269 deletions
-58
View File
@@ -563,48 +563,6 @@ class instance extends control
$this->send(array('result' => 'success', 'message' => ''));
}
/**
* 启用/禁用LDAP。
* Switch LDAP between enable and disable by ajax.
*
* @param int $instanceID
* @access public
* @return void
*/
public function ajaxSwitchLDAP(int $instanceID)
{
$instance = $this->instance->getByID($instanceID);
$postData = fixer::input('post')->get();
if($this->instance->switchLDAP($instance, $postData->enableLDAP == 'true'))
{
$this->send(array('result' => 'success', 'message' => ''));
}
$this->send(array('result' => 'fail', 'message' => $this->lang->instance->errors->switchLDAPFailed));
}
/**
* 启用/禁用SMTP。
* Switch SMTP between enable and disable by ajax.
*
* @param int $instanceID
* @access public
* @return void
*/
public function ajaxSwitchSMTP($instanceID)
{
$instance = $this->instance->getByID($instanceID);
$postData = fixer::input('post')->get();
if($this->instance->switchSMTP($instance, $postData->enableSMTP == 'true'))
{
$this->send(array('result' => 'success', 'message' => ''));
}
$this->send(array('result' => 'fail', 'message' => $this->lang->instance->errors->switchSMTPFailed));
}
/**
* 更新自定义配置。
* Update custom settings by ajax. For example: env variables.
@@ -634,22 +592,6 @@ class instance extends control
$this->send(array('result' => 'fail', 'message' => $this->lang->instance->errors->setEnvFailed));
}
/**
* 删除过期的demo实例。
* Delete expired demo instance by cron.
*
* @access public
* @return void
*/
public function deleteExpiredDemoInstance()
{
if(empty($this->config->demoAccounts)) return $this->send(array('result' => 'fail', 'message' => 'This api is only for demo enviroment.'));
$this->instance->deleteExpiredDemoInstance();
$this->send(array('result' => 'success', 'message' => ''));
}
/**
* 获取实例信息。
* Get instance info for q tool in console.