From db7101b922979c3773d0e53a2da587415de984bf Mon Sep 17 00:00:00 2001 From: Emmanuel ROY Date: Wed, 4 Dec 2019 15:52:04 +0100 Subject: [PATCH] ajout de la lib Encoding et mise en place de la class caracter du projet VLAN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FIXME: appel curl ou fopen d'une methode http depuis une action ou un controlleur. TODO: sécuriser les accès HTTP1.1 par un fichier config similaire a l'applet Discourse faite pour Tinternet TODO: ajouter un plug-in symfony permettant de charger un utilisateur dans les apps a partir de l'authentification multiple TODO: lire les documentation officielles provenant des 4 plate-formes tranquillement afin de comprendre commet doit on tester ces type d'auth quitte a créé un sous domaine particulier directement hebergé sur gittea -->Sécuriser le serveur de dev --- .idea/MVC---Objet.iml | 1 + .idea/php.xml | 1 + application/class/Bdd.php | 9 ++-- application/class/Caracter.php | 80 ++++++++++++++++++++++++++++++++++ application/parameters.php | 7 ++- composer.json | 3 +- 6 files changed, 96 insertions(+), 5 deletions(-) create mode 100644 application/class/Caracter.php diff --git a/.idea/MVC---Objet.iml b/.idea/MVC---Objet.iml index 6ec0a77..143bc94 100644 --- a/.idea/MVC---Objet.iml +++ b/.idea/MVC---Objet.iml @@ -11,6 +11,7 @@ + diff --git a/.idea/php.xml b/.idea/php.xml index c3ead44..026b825 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -12,6 +12,7 @@ + diff --git a/application/class/Bdd.php b/application/class/Bdd.php index 4510b78..e65e1f7 100644 --- a/application/class/Bdd.php +++ b/application/class/Bdd.php @@ -11,12 +11,12 @@ class Bdd switch($bdd) { case 'bdd1': $this->bdd = new PDO(DSN_BDD1, USER_BDD1, PASS_BDD1); - break; + break; case 'bdd2': $this->bdd = new PDO(DSN_BDD2, USER_BDD2, PASS_BDD2); - break; + break; default: - $this->bdd = new PDO(DSN_FICHES, USER_FICHES, PASS_FICHES); + $this->bdd = new PDO(DSN_BDD_DEFAULT, USER_BDD_DEFAULT, PASS_BDD_DEFAULT); } } @@ -30,6 +30,9 @@ class Bdd $tab = array(); foreach($res as $key => $row){ + if (is_string($row)) { + $row = Caracter::normalise_ChaineDeCaracteresDownload($row); + } $tab[$key] = $row; } return $tab; diff --git a/application/class/Caracter.php b/application/class/Caracter.php new file mode 100644 index 0000000..a170028 --- /dev/null +++ b/application/class/Caracter.php @@ -0,0 +1,80 @@ +