mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-19 17:15:55 +02:00
Quite a few fixes in the CP, logs now match the rest
This commit is contained in:
parent
d312db4f14
commit
09a3ae3cc4
5 changed files with 71 additions and 65 deletions
|
@ -32,8 +32,8 @@ class AuthController extends Controller
|
|||
* @throws \DI\NotFoundException
|
||||
*/
|
||||
public function createLogin(Request $request, Response $response){
|
||||
$isWebAuthnEnabled = envi('WEB_AUTHN_ENABLED') === 'true';
|
||||
return view($response, 'auth/login.twig', ['isWebaEnabled' => $isWebaEnabled]);
|
||||
$isWebAuthnEnabled = (envi('WEB_AUTHN_ENABLED') === 'true') ? true : false;
|
||||
return view($response, 'auth/login.twig', ['isWebaEnabled' => $isWebAuthnEnabled]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2046,14 +2046,16 @@ class DomainsController extends Controller
|
|||
[ $domain_id ]
|
||||
);
|
||||
|
||||
foreach ($results as $row) {
|
||||
$status = $row['status'];
|
||||
if (preg_match('/.*(UpdateProhibited|DeleteProhibited)$/', $status) || preg_match('/^pending/', $status)) {
|
||||
$this->container->get('flash')->addMessage('error', 'It has a status that does not allow deletion, first change the status');
|
||||
return $response->withHeader('Location', '/domains')->withStatus(302);
|
||||
if (is_array($results) && !empty($results)) {
|
||||
foreach ($results as $row) {
|
||||
$status = $row['status'];
|
||||
if (preg_match('/.*(UpdateProhibited|DeleteProhibited)$/', $status) || preg_match('/^pending/', $status)) {
|
||||
$this->container->get('flash')->addMessage('error', 'It has a status that does not allow deletion, first change the status');
|
||||
return $response->withHeader('Location', '/domains')->withStatus(302);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$grace_period = 30;
|
||||
|
||||
$db->delete(
|
||||
|
@ -2111,31 +2113,33 @@ class DomainsController extends Controller
|
|||
'SELECT id FROM host WHERE domain_id = ?',
|
||||
[$domain_id]
|
||||
);
|
||||
|
||||
foreach ($hostIds as $host) {
|
||||
$host_id = $host['id'];
|
||||
|
||||
// Delete operations
|
||||
$db->delete(
|
||||
'host_addr',
|
||||
[
|
||||
'host_id' => $host_id
|
||||
]
|
||||
);
|
||||
$db->delete(
|
||||
'host_status',
|
||||
[
|
||||
'host_id' => $host_id
|
||||
]
|
||||
);
|
||||
$db->delete(
|
||||
'domain_host_map',
|
||||
[
|
||||
'host_id' => $host_id
|
||||
]
|
||||
);
|
||||
if (is_array($hostIds) && !empty($hostIds)) {
|
||||
foreach ($hostIds as $host) {
|
||||
$host_id = $host['id'];
|
||||
|
||||
// Delete operations
|
||||
$db->delete(
|
||||
'host_addr',
|
||||
[
|
||||
'host_id' => $host_id
|
||||
]
|
||||
);
|
||||
$db->delete(
|
||||
'host_status',
|
||||
[
|
||||
'host_id' => $host_id
|
||||
]
|
||||
);
|
||||
$db->delete(
|
||||
'domain_host_map',
|
||||
[
|
||||
'host_id' => $host_id
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Delete domain related records
|
||||
$db->delete(
|
||||
'domain_contact_map',
|
||||
|
|
|
@ -185,10 +185,10 @@ class HomeController extends Controller
|
|||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function mode(Request $request, Response $response)
|
||||
{
|
||||
if ($_SESSION['_screen_mode'] == 'dark') {
|
||||
if (isset($_SESSION['_screen_mode']) && $_SESSION['_screen_mode'] == 'dark') {
|
||||
$_SESSION['_screen_mode'] = 'light';
|
||||
} else {
|
||||
$_SESSION['_screen_mode'] = 'dark';
|
||||
|
|
|
@ -692,14 +692,16 @@ class SystemController extends Controller
|
|||
return $response->withHeader('Location', '/registry/tld/'.$tld_extension)->withStatus(302);
|
||||
}
|
||||
|
||||
if ($data['dnssec_enable'] === 'on' && $data['bind9_enable'] === 'on') {
|
||||
$dnssec_both = 1;
|
||||
} elseif ($data['dnssec_enable'] === 'on' && $data['bind9_enable'] !== 'on') {
|
||||
$this->container->get('flash')->addMessage('error', 'DNSSEC can be only enabled for BIND9');
|
||||
return $response->withHeader('Location', '/registry/tld/'.$tld_extension)->withStatus(302);
|
||||
} elseif ($data['dnssec_enable'] !== 'on' && $data['bind9_enable'] === 'on') {
|
||||
$this->container->get('flash')->addMessage('error', 'DNSSEC can be only enabled for BIND9');
|
||||
return $response->withHeader('Location', '/registry/tld/'.$tld_extension)->withStatus(302);
|
||||
if (isset($data['dnssec_enable'], $data['bind9_enable'])) {
|
||||
if ($data['dnssec_enable'] === 'on' && $data['bind9_enable'] === 'on') {
|
||||
$dnssec_both = 1;
|
||||
} elseif ($data['dnssec_enable'] === 'on' && $data['bind9_enable'] !== 'on') {
|
||||
$this->container->get('flash')->addMessage('error', 'DNSSEC can be only enabled for BIND9');
|
||||
return $response->withHeader('Location', '/registry/tld/'.$tld_extension)->withStatus(302);
|
||||
} elseif ($data['dnssec_enable'] !== 'on' && $data['bind9_enable'] === 'on') {
|
||||
$this->container->get('flash')->addMessage('error', 'DNSSEC can be only enabled for BIND9');
|
||||
return $response->withHeader('Location', '/registry/tld/'.$tld_extension)->withStatus(302);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue