From 0dcbac882083af0d0f7f167dce7405f3dbcea3ee Mon Sep 17 00:00:00 2001 From: Techwolf Date: Wed, 4 Jan 2017 19:01:26 -0800 Subject: [PATCH] Allow a custom data path to be set directly in `include.php`. --- makedeb.sh | 1 - rainloop/v/0.0.0/include.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/makedeb.sh b/makedeb.sh index 367d2c230..7e576bb52 100755 --- a/makedeb.sh +++ b/makedeb.sh @@ -33,7 +33,6 @@ mv data $DIR/var/lib/rainloop; #Update settings for Debian package sed -i "s/\$sCustomDataPath = '';/\$sCustomDataPath = '\/var\/lib\/rainloop';/" $DIR/usr/share/rainloop/rainloop/v/$VERSION/include.php -sed -i "s/\$sCustomDataPath = \(.*\) : '';/\$sCustomDataPath = \1 : \$sCustomDataPath;/" $DIR/usr/share/rainloop/rainloop/v/$VERSION/include.php #Set up Debian packaging tools cd $DIR; diff --git a/rainloop/v/0.0.0/include.php b/rainloop/v/0.0.0/include.php index 56e0d2646..bf53ad0b8 100644 --- a/rainloop/v/0.0.0/include.php +++ b/rainloop/v/0.0.0/include.php @@ -55,7 +55,7 @@ include_once APP_INDEX_ROOT_PATH.'include.php'; } - $sCustomDataPath = function_exists('__get_custom_data_full_path') ? rtrim(trim(__get_custom_data_full_path()), '\\/') : ''; + $sCustomDataPath = function_exists('__get_custom_data_full_path') ? rtrim(trim(__get_custom_data_full_path()), '\\/') : $sCustomDataPath; define('APP_DATA_FOLDER_PATH', 0 === strlen($sCustomDataPath) ? APP_INDEX_ROOT_PATH.'data/' : $sCustomDataPath.'/'); unset($sCustomDataPath);