mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-01 00:23:19 +02:00
Work on #63; hidden software version
This commit is contained in:
parent
a69a642a12
commit
5156802dc3
3 changed files with 23 additions and 4 deletions
|
@ -930,19 +930,29 @@ class SystemController extends Controller
|
|||
return $response->withHeader('Location', '/registry/reserved')->withStatus(302);
|
||||
|
||||
}
|
||||
|
||||
|
||||
$db = $this->container->get('db');
|
||||
$types = $db->select("SELECT DISTINCT type FROM reserved_domain_names");
|
||||
// Get the current URI
|
||||
$uri = $request->getUri()->getPath();
|
||||
|
||||
// Set default types if $types is empty
|
||||
if (empty($types)) {
|
||||
$types = [
|
||||
['type' => 'reserved'],
|
||||
['type' => 'restricted']
|
||||
];
|
||||
}
|
||||
|
||||
$categories = [];
|
||||
foreach ($types as $type) {
|
||||
$typeNames = $db->select(
|
||||
'SELECT name FROM reserved_domain_names WHERE type = ?',
|
||||
[ $type['type'] ]
|
||||
);
|
||||
$categories[$type['type']] = array_column($typeNames, 'name');
|
||||
);
|
||||
|
||||
// Initialize the type with an empty array if no names are found
|
||||
$categories[$type['type']] = $typeNames ? array_column($typeNames, 'name') : [];
|
||||
}
|
||||
|
||||
return view($response,'admin/system/manageReserved.twig', [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue