From 24c883a661b7a617e146b1036118c94bd2564430 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 24 Jan 2016 17:10:23 +0100 Subject: [PATCH] Use default value to define defineTablePrefix --- php/define.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/php/define.php b/php/define.php index 65b99d6..01b59fd 100644 --- a/php/define.php +++ b/php/define.php @@ -31,7 +31,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 @@ -39,8 +39,7 @@ function defineTablePrefix($dbTablePrefix) { # Parse table prefix # Old users do not have the table prefix stored in their config-file - if (!isset($dbTablePrefix)||$dbTablePrefix==='') $dbTablePrefix = ''; - else $dbTablePrefix .= '_'; + if ($dbTablePrefix!=='') $dbTablePrefix .= '_'; # Define tables define('LYCHEE_TABLE_ALBUMS', $dbTablePrefix . 'lychee_albums');