noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 07/39: Remove DB connect with DSN


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 07/39: Remove DB connect with DSN
Date: Sat, 11 Jul 2020 13:20:36 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 6593181f5580758c56d097bb12de3738d4e5c279
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sun May 24 21:49:08 2020 +0200

    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 4e4bac2..2bcba23 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 '<h2 class="error">Impossible de se connecter &agrave; 
postgreSql !</h2>';
-            echo '<p>';
-            echo "Vos param&egrave;tres sont incorrectes : <br>";
-            echo "<br>";
-            echo "base de donn&eacute;e : $p_dsn<br>";
-            echo '</p>';
-
-            exit ("Connection impossible : v&eacute;rifiez vos 
param&egrave;tres de base
-                  de donn&eacute;es");
-            } else {
-                echo '<h2 class="error">' . _('Erreur de connexion !') . 
'</h2>';
-                $this->is_open = false;
-                throw new Exception(_('Erreur Connexion'));
-            }
 
-        }
-        $this->is_open=TRUE;
-        return $this;
-    }
 
     public function verify()
     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]