mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
Merge pull request #53 from YunoHost-Apps/fix-nextcloud
Add nextcloud support, and remove sed -i
This commit is contained in:
commit
9727331700
3 changed files with 58 additions and 38 deletions
|
@ -1,41 +1,59 @@
|
|||
<?php
|
||||
|
||||
//// RCMCardDAV Plugin Admin Settings
|
||||
// RCMCardDAV Plugin Admin Settings
|
||||
|
||||
//// ** ADDRESSBOOK PRESETS
|
||||
// ** ADDRESSBOOK PRESETS
|
||||
|
||||
//// PRESET FOR: baikal
|
||||
//$prefs['Baïkal'] = array(
|
||||
// // required attributes
|
||||
// 'name' => 'Baïkal',
|
||||
// 'username' => '%u',
|
||||
// 'password' => '%p',
|
||||
// 'url' => '{baikal_url}/card.php/addressbooks/%u/',
|
||||
//
|
||||
// // optional attributes
|
||||
// 'active' => true,
|
||||
// 'readonly' => false,
|
||||
// 'refresh_time' => '00:05:00',
|
||||
//
|
||||
// 'fixed' => array('username', 'password'),
|
||||
// 'hide' => false,
|
||||
//);
|
||||
//// END: baikal
|
||||
/* PRESET FOR: baikal
|
||||
$prefs['Baïkal'] = array(
|
||||
// required attributes
|
||||
'name' => 'Baïkal',
|
||||
'username' => '%u',
|
||||
'password' => '%p',
|
||||
'url' => '{baikal_url}/card.php/addressbooks/%u/',
|
||||
|
||||
//// PRESET FOR: owncloud
|
||||
//$prefs['ownCloud'] = array(
|
||||
// // required attributes
|
||||
// 'name' => 'ownCloud',
|
||||
// 'username' => '%u',
|
||||
// 'password' => '%p',
|
||||
// 'url' => '{owncloud_url}/remote.php/dav/addressbooks/users/%u/default/',
|
||||
//
|
||||
// // optional attributes
|
||||
// 'active' => true,
|
||||
// 'readonly' => false,
|
||||
// 'refresh_time' => '00:05:00',
|
||||
//
|
||||
// 'fixed' => array('username', 'password'),
|
||||
// 'hide' => false,
|
||||
//);
|
||||
//// END: owncloud
|
||||
// optional attributes
|
||||
'active' => true,
|
||||
'readonly' => false,
|
||||
'refresh_time' => '00:05:00',
|
||||
|
||||
'fixed' => array('username', 'password'),
|
||||
'hide' => false,
|
||||
);
|
||||
END: baikal */
|
||||
|
||||
/* PRESET FOR: owncloud
|
||||
$prefs['ownCloud'] = array(
|
||||
// required attributes
|
||||
'name' => 'ownCloud',
|
||||
'username' => '%u',
|
||||
'password' => '%p',
|
||||
'url' => '{owncloud_url}/remote.php/dav/addressbooks/users/%u/default/',
|
||||
|
||||
// optional attributes
|
||||
'active' => true,
|
||||
'readonly' => false,
|
||||
'refresh_time' => '00:05:00',
|
||||
|
||||
'fixed' => array('username', 'password'),
|
||||
'hide' => false,
|
||||
);
|
||||
END: owncloud */
|
||||
|
||||
/* PRESET FOR: nextcloud
|
||||
$prefs['NextCloud'] = array(
|
||||
// required attributes
|
||||
'name' => 'nextCloud',
|
||||
'username' => '%u',
|
||||
'password' => '%p',
|
||||
'url' => '{nextcloud_url}/remote.php/dav/addressbooks/users/%u/contacts/',
|
||||
|
||||
// optional attributes
|
||||
'active' => true,
|
||||
'readonly' => false,
|
||||
'refresh_time' => '00:05:00',
|
||||
|
||||
'fixed' => array('username', 'password'),
|
||||
'hide' => false,
|
||||
);
|
||||
END: nextcloud */
|
||||
|
|
|
@ -176,7 +176,8 @@ then
|
|||
carddav_path=$(ynh_app_setting_get $carddav_app_id path)
|
||||
carddav_url="https://${carddav_domain}${carddav_path%/}"
|
||||
ynh_replace_string "{${carddav_app}_url}" "$carddav_url" "$carddav_tmp_config"
|
||||
sed -i "/\/\/\/\/ PRESET FOR: $carddav_app/,/\/\/\/\/ END: $carddav_app/s/^\/\///" "$carddav_tmp_config"
|
||||
ynh_replace_string "/* PRESET FOR: $carddav_app" "" "$carddav_tmp_config"
|
||||
ynh_replace_string "END: $carddav_app */" "" "$carddav_tmp_config"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -202,7 +202,8 @@ then
|
|||
carddav_path=$(ynh_app_setting_get $carddav_app_id path)
|
||||
carddav_url="https://${carddav_domain}${carddav_path%/}"
|
||||
ynh_replace_string "{${carddav_app}_url}" "$carddav_url" "$carddav_tmp_config"
|
||||
sed -i "/\/\/\/\/ PRESET FOR: $carddav_app/,/\/\/\/\/ END: $carddav_app/s/^\/\///" "$carddav_tmp_config"
|
||||
ynh_replace_string "\/\* PRESET FOR: $carddav_app" "" "$carddav_tmp_config"
|
||||
ynh_replace_string "END: $carddav_app \*\/" "" "$carddav_tmp_config"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue