mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-10 14:02:12 +09:00
Implement domain deletion
This commit is contained in:
parent
1feb506b3c
commit
e7c5d884e8
6 changed files with 62 additions and 4 deletions
|
|
@ -1152,6 +1152,41 @@ class adminAdminController extends admin
|
|||
$this->setRedirectUrl(Context::get('success_return_url') ?: getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdminConfigGeneral'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete domain
|
||||
* @return void
|
||||
*/
|
||||
function procAdminDeleteDomain()
|
||||
{
|
||||
// Get selected domain.
|
||||
$domain_srl = strval(Context::get('domain_srl'));
|
||||
if ($domain_srl === '')
|
||||
{
|
||||
return new Object(-1, 'msg_domain_not_found');
|
||||
}
|
||||
$domain_info = getModel('module')->getSiteInfo($domain_srl);
|
||||
if ($domain_info->domain_srl != $domain_srl)
|
||||
{
|
||||
return new Object(-1, 'msg_domain_not_found');
|
||||
}
|
||||
if ($domain_info->is_default_domain === 'Y')
|
||||
{
|
||||
return new Object(-1, 'msg_cannot_delete_default_domain');
|
||||
}
|
||||
|
||||
// Delete the domain.
|
||||
$args = new stdClass();
|
||||
$args->domain_srl = $domain_srl;
|
||||
$output = executeQuery('module.deleteDomain', $args);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
// Clear cache.
|
||||
Rhymix\Framework\Cache::clearGroup('site_and_module');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update FTP configuration.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue