asdasd
All checks were successful
Deploy / deploy (push) Successful in 53s

This commit is contained in:
2026-08-17 00:49:49 +02:00
parent f7a6b34a97
commit c2eaa5c186
8 changed files with 86 additions and 37 deletions

View File

@@ -368,6 +368,29 @@ final class ListingCatalog
}
}
public function resolveExistingCategorySlug(string $input): ?string
{
$this->ensureSchema();
$input = trim($input);
if ($input === '') {
return null;
}
$stmt = $this->pdo->prepare(
'SELECT slug
FROM listing_categories
WHERE slug = :slug OR LOWER(title) = LOWER(:title)
ORDER BY sort_order ASC, id ASC
LIMIT 1'
);
$stmt->execute([
'slug' => $input,
'title' => $input,
]);
$slug = $stmt->fetchColumn();
return $slug !== false ? (string)$slug : null;
}
public function listPublishedDirectoryEntries(): array
{
$this->ensureSchema();