From 9198b4ec2fe3832311194aa7797539a66168ecab Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Tue, 29 Mar 2016 15:37:56 +0200 Subject: [PATCH] Fixed dbTablePrefix starting with an underscore when using an old Lychee installation --- php/define.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/php/define.php b/php/define.php index a215adc..d7bebb7 100644 --- a/php/define.php +++ b/php/define.php @@ -26,7 +26,7 @@ define('LYCHEE_URL_UPLOADS_BIG', 'uploads/big/'); define('LYCHEE_URL_UPLOADS_MEDIUM', 'uploads/medium/'); define('LYCHEE_URL_UPLOADS_THUMB', 'uploads/thumb/'); -function defineTablePrefix($dbTablePrefix = '') { +function defineTablePrefix($dbTablePrefix) { // This part is wrapped into a function, because it needs to be called // after the config-file has been loaded. Other defines are available @@ -34,6 +34,7 @@ function defineTablePrefix($dbTablePrefix = '') { // Parse table prefix // Old users do not have the table prefix stored in their config-file + if (isset($dbTablePrefix)===false) $dbTablePrefix = ''; if ($dbTablePrefix!=='') $dbTablePrefix .= '_'; // Define tables