allow multiple abook URIs, separated by comma
This commit is contained in:
parent
2eca13d7a2
commit
076cb751d7
1 changed files with 13 additions and 11 deletions
|
@ -70,7 +70,7 @@ function abook_carddav_init(&$argv) {
|
||||||
textdomain ('abook_carddav');
|
textdomain ('abook_carddav');
|
||||||
|
|
||||||
// TODO: consider multiple uris
|
// TODO: consider multiple uris
|
||||||
$abook_uri = getPref($data_dir, $username, 'plugin_abook_carddav_abook_uri');
|
$abook_uris = getPref($data_dir, $username, 'plugin_abook_carddav_abook_uri');
|
||||||
$abook_base_uri = getPref($data_dir, $username, 'plugin_abook_carddav_base_uri');
|
$abook_base_uri = getPref($data_dir, $username, 'plugin_abook_carddav_base_uri');
|
||||||
$abook_username = getPref($data_dir, $username, 'plugin_abook_carddav_username');
|
$abook_username = getPref($data_dir, $username, 'plugin_abook_carddav_username');
|
||||||
$abook_password_text = getPref($data_dir, $username, 'plugin_abook_carddav_password');
|
$abook_password_text = getPref($data_dir, $username, 'plugin_abook_carddav_password');
|
||||||
|
@ -78,6 +78,7 @@ function abook_carddav_init(&$argv) {
|
||||||
$abook_password = abook_get_password($abook_password_text, $abook_password_opt);
|
$abook_password = abook_get_password($abook_password_text, $abook_password_opt);
|
||||||
$abook_writeable = getPref($data_dir, $username, 'plugin_abook_carddav_writeable');
|
$abook_writeable = getPref($data_dir, $username, 'plugin_abook_carddav_writeable');
|
||||||
$abook_listing = getPref($data_dir, $username, 'plugin_abook_carddav_listing');
|
$abook_listing = getPref($data_dir, $username, 'plugin_abook_carddav_listing');
|
||||||
|
foreach(explode(',', $abook_uris) as $abook_uri){
|
||||||
if(substr($abook_uri, 0,4) == 'http'){
|
if(substr($abook_uri, 0,4) == 'http'){
|
||||||
$r=$abook->add_backend('carddav',array(
|
$r=$abook->add_backend('carddav',array(
|
||||||
'name'=>_("CardDAV Address Book"),
|
'name'=>_("CardDAV Address Book"),
|
||||||
|
@ -89,6 +90,7 @@ function abook_carddav_init(&$argv) {
|
||||||
'listing'=>$abook_listing,
|
'listing'=>$abook_listing,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bindtextdomain ('squirrelmail', SM_PATH . 'locale');
|
bindtextdomain ('squirrelmail', SM_PATH . 'locale');
|
||||||
textdomain ('squirrelmail');
|
textdomain ('squirrelmail');
|
||||||
|
|
Loading…
Reference in a new issue