1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:45:56 +00:00

reinstate error handlers; better DB error reporting on failed queries

This commit is contained in:
Andrew Dolgov
2013-04-17 16:05:52 +04:00
parent 404e2e3603
commit aca75cb5cb
6 changed files with 17 additions and 20 deletions

View File

@@ -13,11 +13,10 @@ class Db implements IDb {
$this->adapter = new Db_Pgsql();
break;
default:
user_error("Unknown DB_TYPE: " . DB_TYPE);
die("Unknown DB_TYPE: " . DB_TYPE);
}
$this->link = $this->adapter->connect(DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_PORT);
}
private function __clone() {
@@ -35,10 +34,6 @@ class Db implements IDb {
return("'$str'");
}
function init() {
//
}
function connect($host, $user, $pass, $db, $port) {
//return $this->adapter->connect($host, $user, $pass, $db, $port);
return $this->link;