Removing the pconnect option from BSDb and it's children.
authorRobert Sesek <rsesek@bluestatic.org>
Sat, 28 Jul 2007 17:42:38 +0000 (17:42 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sat, 28 Jul 2007 17:42:38 +0000 (17:42 +0000)
* Db.php:
(BSDb::connect): Removing the $pconnect paramater
(BSDb::_pConnect): Removed.
* DbMySql.php:
(BSDbMySql::_pConnect): Removed
* DbMySqlI.php:
(BSDbMySqlI::_pConnect): Removed
* DbPostgreSql.php:
(BSDbPostgreSql::_pConnect): Removed

Db.php
DbMySql.php
DbMySqlI.php
DbPostgreSql.php

diff --git a/Db.php b/Db.php
index 7fbb29e6f10a7ce86b30882f613c320fa8751624..e39addd22b94438a07cb3dd8388e37b12bb23a35 100644 (file)
--- a/Db.php
+++ b/Db.php
@@ -106,15 +106,14 @@ abstract class BSDb
        * @param        string  User name
        * @param        string  Password
        * @param        string  Database name
-       * @param        bool    Use p-connect?
        *
        * @return       bool    Result of connect
        */
-       public function connect($server, $user, $password, $database, $pconnect)
+       public function connect($server, $user, $password, $database)
        {
                if ($this->dblink == false)
                {
-                       $this->dblink = $this->{($pconnect ? '_connect' : '_pConnect')}($server, $user, $password, $database);
+                       $this->dblink = $this->_connect($server, $user, $password, $database);
                        
                        if ($this->dblink == false)
                        {
@@ -139,19 +138,6 @@ abstract class BSDb
        */
        protected abstract function _connect($server, $user, $password, $database);
        
-       /**
-       * Abstract function that returns a database link after establishing a connection. This just
-       * calls the function and does not do any checking
-       *
-       * @param        string  Server name
-       * @param        string  User name
-       * @param        string  Password
-       * @param        string  Database name
-       *
-       * @return       resource        Database link
-       */
-       protected abstract function _pConnect($server, $user, $password, $database);
-       
        // ###################################################################
        /**
        * Send a query to the open database link
index c4a6371c9e91fa6dc8bb758634e830086c9c13ee..c009152d8b0f400a32601682a8cc4c3e3d2f8724 100644 (file)
@@ -55,22 +55,7 @@ class BSDbMySql extends BSDb
                
                return $link;
        }
-       
-       // ###################################################################
-       /**
-       * Wrapper: mysql_pconnect
-       */
-       protected function _pConnect($server, $user, $password, $database)
-       {
-               $link = @mysql_pconnect($server, $user, $password);
-               if ($link)
-               {
-                       $this->_selectDb($database, $link);
-               }
-               
-               return $link;
-       }
-       
+
        // ###################################################################
        /**
        * Opens a connection to the specified database name
index 161f008d428057104c3cd3091f6bc7e28b267b59..9e0dec08528956561fa57fb792c83145483bd461 100644 (file)
@@ -50,15 +50,6 @@ class BSDbMySqlI extends BSDb
                return mysqli_connect($server, $user, $password, $database);
        }
        
-       // ###################################################################
-       /**
-       * Wrapper: mysql_pconnect
-       */
-       protected function _pConnect($server, $user, $password, $database)
-       {
-               return mysqli_connect($server, $user, $password, $database);
-       }
-       
        // ###################################################################
        /**
        * Wrapper: mysql_query
index a079cb06714f241850f252363a5f8c1a42a775f3..c49fd3bb453175f831e0d7b9d036b611c827b7c0 100644 (file)
@@ -67,15 +67,6 @@ class BSDbPostgreSql extends BSDb
                return pg_connect("host='$server' port={$this->port} user='$user' password='$password' dbname='$database'");
        }
        
-       // ###################################################################
-       /**
-       * Wrapper: pg_pconnect
-       */
-       protected function _pConnect($server, $user, $password, $database)
-       {
-               return pg_pconnect("host='$server' port={$this->port} user='$user' password='$password' dbname='$database'");
-       }
-       
        // ###################################################################
        /**
        * Wrapper: pg_escape_string