From fcda1eb2e8b53ec496aa6933ec784a88bde98e72 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Fri, 24 Apr 2020 13:31:55 +0200 Subject: [PATCH] No carddav plugin without a server ! What the fuck !!! What an idea to add the plugin without a server, it breaks roundcube ! --- scripts/install | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 82334d0..c0bb6fe 100644 --- a/scripts/install +++ b/scripts/install @@ -157,6 +157,7 @@ then ynh_composer_exec --commands="require roundcube/carddav $carddav_version" carddav_tmp_config="../conf/carddav.config.inc.php" + carddav_server=0 # Look for installed and supported CardDAV servers for carddav_app in "owncloud" "nextcloud" "baikal" @@ -165,6 +166,7 @@ then --output-as json | grep -Po '"id":[ ]?"\K.*?(?=")' | head -1) if [ -n "$carddav_app_id" ] then + carddav_server=1 # Retrieve app settings and enable relevant preset carddav_domain=$(ynh_app_setting_get --app=$carddav_app_id --key=domain) carddav_path=$(ynh_app_setting_get --app=$carddav_app_id --key=path) @@ -178,7 +180,11 @@ then # Copy the plugin configuration file cp "$carddav_tmp_config" ""$final_path/plugins/carddav/config.inc.php"" - installed_plugins+=" 'carddav'," + # Do not actualy add the carddav plugin if there's no carddav server available... + if [ $carddav_server -eq 1 ] + then + installed_plugins+=" 'carddav'," + fi fi # Install Enigma plugin