]> git.agnieray.net Git - galette.git/commitdiff
Non UTF8 db connection is an old hack, may be removed now certainly
authorJohan Cwiklinski <johan@x-tnd.be>
Thu, 22 Feb 2024 09:43:03 +0000 (10:43 +0100)
committerJohan Cwiklinski <johan@x-tnd.be>
Tue, 27 Feb 2024 09:05:33 +0000 (10:05 +0100)
Add message when deprecated constant is used

galette/lib/Galette/Controllers/AuthController.php
galette/lib/Galette/Core/Db.php

index 60cd2ce7817a8033a732f41d5f428b8554317533..fbffe67e6bc88eda2ef45e5217b41032aaea8d0b 100644 (file)
@@ -122,6 +122,13 @@ class AuthController extends AbstractController
                 || $this->login->isAdmin()
                 || $this->login->isStaff()
             ) {
+                if (defined('NON_UTF_DBCONNECT')) {
+                    $this->flash->addMessage(
+                        'warning',
+                        'It appears you are using NON_UTF_DBCONNECT constant, that has been removed in current release.'
+                    );
+                }
+
                 try {
                     $release = new Release();
                     if ($release->checkNewRelease()) {
index 62d93cd9461d83838cc5ec0559b68fe969202216..c1b43a9aeee2d502ecc34a559edf917a533b1c52 100644 (file)
@@ -118,7 +118,7 @@ class Db
                 'password' => $_pwd_db,
                 'database' => $_name_db
             );
-            if ($_type_db === self::MYSQL && !defined('NON_UTF_DBCONNECT')) {
+            if ($_type_db === self::MYSQL) {
                 $this->options['charset'] = 'utf8mb4';
             }