diff --git a/include/dblayer/sqlite3.php b/include/dblayer/sqlite3.php index f3072a00d..17ff176ab 100644 --- a/include/dblayer/sqlite3.php +++ b/include/dblayer/sqlite3.php @@ -32,7 +32,7 @@ class DBLayer ); - function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) + function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) { // Prepend $db_name with the path to the forum root directory $db_name = PUN_ROOT.$db_name; @@ -53,6 +53,12 @@ function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_ } + function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect) + { + $this->__construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect); + } + + function start_transaction() { return $this->pdo->beginTransaction(); @@ -426,7 +432,7 @@ function add_field($table_name, $field_name, $field_type, $allow_null, $default_ if (!$allow_null) $query .= ' NOT NULL'; - + if ($default_value === '') $default_value = '\'\'';