]> git.wh0rd.org - tt-rss.git/blobdiff - classes/db.php
unify houskeeping stuff, increase spawn interval
[tt-rss.git] / classes / db.php
index f31a2a9a313f008e0a90f4cc11c2c4b26735d4d3..695ca6ea2e47bcd2e523474bf5acafd769a05049 100644 (file)
@@ -29,7 +29,7 @@ class Db implements IDb {
 
                if (!$this->adapter) die("Error initializing database adapter for " . DB_TYPE);
 
-               $this->link = $this->adapter->connect(DB_HOST, DB_USER, DB_PASS, DB_NAME, defined('DB_PORT') ? DB_PORT : false);
+               $this->link = $this->adapter->connect(DB_HOST, DB_USER, DB_PASS, DB_NAME, defined('DB_PORT') ? DB_PORT : "");
 
                if (!$this->link) {
                        die("Error connecting through adapter: " . $this->adapter->last_error());
@@ -53,6 +53,10 @@ class Db implements IDb {
                return("'$str'");
        }
 
+       function reconnect() {
+               $this->link = $this->adapter->connect(DB_HOST, DB_USER, DB_PASS, DB_NAME, defined('DB_PORT') ? DB_PORT : "");
+       }
+
        function connect($host, $user, $pass, $db, $port) {
                //return $this->adapter->connect($host, $user, $pass, $db, $port);
                return ;