More RST fixes

This commit is contained in:
Pinga 2025-04-28 16:59:04 +03:00
parent 193cac6d0e
commit 454b754f7f
5 changed files with 29 additions and 11 deletions

View file

@ -524,4 +524,14 @@ function generateSerial($soa_type = null) {
default:
return time();
}
}
function getClid(PDO $db, int $registrar_id): ?string {
$stmt = $db->prepare("SELECT clid FROM registrar WHERE id = :id LIMIT 1");
$stmt->bindParam(':id', $registrar_id, PDO::PARAM_INT);
$stmt->execute();
$result = $stmt->fetch(PDO::FETCH_ASSOC);
return $result ? (string)$result['clid'] : null;
}