summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_db.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-04-27 18:31:40 +0200
committerAleksander Machniak <alec@alec.pl>2013-04-27 18:31:40 +0200
commit399db1b647e14947e97a865c09215969f56a7efe (patch)
tree4801fc0482e3e6fe94fd6668dae03b13926b9d17 /program/lib/Roundcube/rcube_db.php
parentd7fcd8ce422a24f794d18e2212163690bf3ca753 (diff)
Add db_prefix configuration option in place of db_table_*/db_sequence_* options
Make possible to use db_prefix for schema initialization in Installer (#1489067) Fix updatedb.sh script so it recognizes also table prefix for external DDL files
Diffstat (limited to 'program/lib/Roundcube/rcube_db.php')
-rw-r--r--program/lib/Roundcube/rcube_db.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php
index 9cda023bf..d86e3dd98 100644
--- a/program/lib/Roundcube/rcube_db.php
+++ b/program/lib/Roundcube/rcube_db.php
@@ -846,11 +846,9 @@ class rcube_db
{
$rcube = rcube::get_instance();
- // return table name if configured
- $config_key = 'db_table_'.$table;
-
- if ($name = $rcube->config->get($config_key)) {
- return $name;
+ // add prefix to the table name if configured
+ if ($prefix = $rcube->config->get('db_prefix')) {
+ return $prefix . $table;
}
return $table;