Use new core utility function to create valid absolute URLs (#3265).
ATTENTION: requires https://github.com/roundcube/roundcubemail/commit/06fdaf8
This commit is contained in:
parent
befcf32baf
commit
31ee64d7e1
1 changed files with 1 additions and 15 deletions
|
@ -2778,21 +2778,7 @@ class calendar extends rcube_plugin
|
|||
public function get_url($param = array())
|
||||
{
|
||||
$param += array('task' => 'calendar');
|
||||
|
||||
$schema = 'http';
|
||||
$default_port = 80;
|
||||
if (rcube_https_check()) {
|
||||
$schema = 'https';
|
||||
$default_port = 443;
|
||||
}
|
||||
$url = $schema . '://' . preg_replace('/:\d+$/', '', $_SERVER['HTTP_HOST']);
|
||||
if ($_SERVER['SERVER_PORT'] != $default_port)
|
||||
$url .= ':' . $_SERVER['SERVER_PORT'];
|
||||
if (dirname($_SERVER['SCRIPT_NAME']) != '/')
|
||||
$url .= dirname($_SERVER['SCRIPT_NAME']);
|
||||
$url .= preg_replace('!^\./!', '/', $this->rc->url($param));
|
||||
|
||||
return $url;
|
||||
return $this->rc->url($param, true, true);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue