From 399db1b647e14947e97a865c09215969f56a7efe Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 27 Apr 2013 18:31:40 +0200 Subject: 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 --- program/lib/Roundcube/rcube_db.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'program/lib/Roundcube/rcube_db.php') 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; -- cgit v1.2.3