From 399db1b647e14947e97a865c09215969f56a7efe Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 27 Apr 2013 12:31:40 -0400
Subject: [PATCH] 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 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php
index 9cda023..d86e3dd 100644
--- a/program/lib/Roundcube/rcube_db.php
+++ b/program/lib/Roundcube/rcube_db.php
@@ -846,11 +846,9 @@
{
$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;
--
Gitblit v1.9.1