Support relative URLs in kolab_freebusy_server setting (#3487)
This commit is contained in:
parent
c15bec9ae6
commit
5c895e27a1
1 changed files with 6 additions and 6 deletions
|
@ -245,13 +245,16 @@ class kolab_storage
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Returns Free-busy server URL
|
||||||
*/
|
*/
|
||||||
public static function get_freebusy_server()
|
public static function get_freebusy_server()
|
||||||
{
|
{
|
||||||
return unslashify(self::$config->get('kolab_freebusy_server', 'https://' . $_SESSION['imap_host'] . '/freebusy'));
|
$url = 'https://' . $_SESSION['imap_host'] . '/freebusy';
|
||||||
}
|
$url = self::$config->get('kolab_freebusy_server', $url);
|
||||||
|
$url = rcube_utils::resolve_url($url);
|
||||||
|
|
||||||
|
return unslashify($url);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compose an URL to query the free/busy status for the given user
|
* Compose an URL to query the free/busy status for the given user
|
||||||
|
@ -261,7 +264,6 @@ class kolab_storage
|
||||||
return self::get_freebusy_server() . '/' . $email . '.ifb';
|
return self::get_freebusy_server() . '/' . $email . '.ifb';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates folder ID from folder name
|
* Creates folder ID from folder name
|
||||||
*
|
*
|
||||||
|
@ -276,7 +278,6 @@ class kolab_storage
|
||||||
asciiwords(strtr($folder, '/.-', '___'));
|
asciiwords(strtr($folder, '/.-', '___'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode the given ID to a safe ascii representation
|
* Encode the given ID to a safe ascii representation
|
||||||
*
|
*
|
||||||
|
@ -300,7 +301,6 @@ class kolab_storage
|
||||||
return base64_decode(str_pad(strtr($id, '-_', '+/'), strlen($id) % 4, '=', STR_PAD_RIGHT));
|
return base64_decode(str_pad(strtr($id, '-_', '+/'), strlen($id) % 4, '=', STR_PAD_RIGHT));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the (first) path of the requested IMAP namespace
|
* Return the (first) path of the requested IMAP namespace
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue