From 6593181f5580758c56d097bb12de3738d4e5c279 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 24 May 2020 21:49:08 +0200 Subject: [PATCH] Remove DB connect with DSN --- include/lib/database_core.class.php | 36 +---------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/include/lib/database_core.class.php b/include/lib/database_core.class.php index 4e4bac2dc..2bcba2307 100644 --- a/include/lib/database_core.class.php +++ b/include/lib/database_core.class.php @@ -75,44 +75,10 @@ class DatabaseCore } $this->is_open = TRUE; + } - /** - * Connect by DSN : description of database connection like - * return a Database_Core object - * @code - * port=6002 host=x.x.x.x dbname=dbname user=admin password=www - * @endcode - * - * @param string $p_dsn describing the connection - * - */ - function connect_dsn($p_dsn) - { - $this->db =pg_connect($p_dsn); - if ( $this->db == false ) - { - if (DEBUG) { - echo '

Impossible de se connecter à postgreSql !

'; - echo '

'; - echo "Vos paramètres sont incorrectes :
"; - echo "
"; - echo "base de donnée : $p_dsn
"; - echo '

'; - - exit ("Connection impossible : vérifiez vos paramètres de base - de données"); - } else { - echo '

' . _('Erreur de connexion !') . '

'; - $this->is_open = false; - throw new Exception(_('Erreur Connexion')); - } - - } - $this->is_open=TRUE; - return $this; - } public function verify() {