From 9f7568c0ea4185a9013dda5775afff82e631e7e1 Mon Sep 17 00:00:00 2001
From: Pascal de Bruijn
Date: Mon, 22 Jun 2020 10:24:46 +0200
Subject: [PATCH] KickstartForm: add 'UTF8' to array of allowed charsets, to
support Postgres
Followup to eae7a8ab86f404b20ec425531fbcda5339d94df1
UTF8 without a dash is the proper encoding shown by psql -c '\l'
---
application/forms/KickstartForm.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/forms/KickstartForm.php b/application/forms/KickstartForm.php
index 6fc14307..928502a4 100644
--- a/application/forms/KickstartForm.php
+++ b/application/forms/KickstartForm.php
@@ -197,7 +197,7 @@ class KickstartForm extends DirectorForm
if ($resourceName = $this->getResourceName()) {
$resourceConfig = ResourceFactory::getResourceConfig($resourceName);
if (! isset($resourceConfig->charset)
- || ! in_array($resourceConfig->charset, array('utf8', 'utf8mb4', 'UTF-8'))
+ || ! in_array($resourceConfig->charset, array('utf8', 'utf8mb4', 'UTF8', 'UTF-8'))
) {
if ($resource = $this->getElement('resource')) {
$resource->addError('Please change the encoding for the director database to utf8');