summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-06-19 12:00:07 +0200
committerAleksander Machniak <alec@alec.pl>2012-06-19 12:00:07 +0200
commit91f2271fac29340b5eee3bb6657456bd5d161548 (patch)
tree6412657c45bfc05877de4831ea608a8dc7ace13c
parent75666d3db2692d799bc719a917f7c31e22a269e3 (diff)
Replace rcube_mdb2 with rcube_db
-rwxr-xr-xbin/update.sh2
-rw-r--r--installer/test.php2
-rw-r--r--plugins/password/drivers/sql.php2
-rw-r--r--plugins/squirrelmail_usercopy/squirrelmail_usercopy.php6
4 files changed, 6 insertions, 6 deletions
diff --git a/bin/update.sh b/bin/update.sh
index 83dd4a196..aa10c2fd7 100755
--- a/bin/update.sh
+++ b/bin/update.sh
@@ -137,7 +137,7 @@ if ($RCI->configured) {
// check database schema
if ($RCI->config['db_dsnw']) {
- $DB = new rcube_db::factory($RCI->config['db_dsnw'], '', false);
+ $DB = rcube_db::factory($RCI->config['db_dsnw'], '', false);
$DB->db_connect('w');
if ($db_error_msg = $DB->is_error()) {
echo "Error connecting to database: $db_error_msg\n";
diff --git a/installer/test.php b/installer/test.php
index 87896009c..f09b2f7c7 100644
--- a/installer/test.php
+++ b/installer/test.php
@@ -125,7 +125,7 @@ else {
$db_working = false;
if ($RCI->configured) {
if (!empty($RCI->config['db_dsnw'])) {
- $DB = new rcube_db::factory($RCI->config['db_dsnw'], '', false);
+ $DB = rcube_db::factory($RCI->config['db_dsnw'], '', false);
$DB->db_connect('w');
if (!($db_error_msg = $DB->is_error())) {
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php
index e9207300e..449e2df5b 100644
--- a/plugins/password/drivers/sql.php
+++ b/plugins/password/drivers/sql.php
@@ -26,7 +26,7 @@ class rcube_sql_password
else if (!is_array($dsn) && !preg_match('/\?new_link=true/', $dsn))
$dsn .= '?new_link=true';
- $db = new rcube_mdb2($dsn, '', FALSE);
+ $db = rcube_db::factory($dsn, '', false);
$db->set_debug((bool)$rcmail->config->get('sql_debug'));
$db->db_connect('w');
}
diff --git a/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php b/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
index ee6bcc04b..bfa489ae5 100644
--- a/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
+++ b/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
@@ -151,10 +151,10 @@ class squirrelmail_usercopy extends rcube_plugin
$this->prefs = array();
/* connect to squirrelmail database */
- $db = new rcube_mdb2($rcmail->config->get('squirrelmail_dsn'));
- $db->db_connect('r'); // connect in read mode
+ $db = rcube_db::factory($rcmail->config->get('squirrelmail_dsn'));
- // $db->set_debug(true);
+ $db->set_debug($rcmail->config->get('sql_debug'));
+ $db->db_connect('r'); // connect in read mode
/* retrieve prefs */
$userprefs_table = $rcmail->config->get('squirrelmail_userprefs_table');