|
|
@ -827,26 +827,17 @@ class rcmail extends rcube
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($absolute || $full) {
|
|
|
|
if ($absolute || $full) {
|
|
|
|
$prefix = '';
|
|
|
|
// add base path to this Roundcube installation
|
|
|
|
|
|
|
|
$base_path = preg_replace('![^/]+$!', '', strval($_SERVER['SCRIPT_NAME']));
|
|
|
|
|
|
|
|
if ($base_path == '') $base_path = '/';
|
|
|
|
|
|
|
|
$prefix = $base_path;
|
|
|
|
|
|
|
|
|
|
|
|
// prepend protocol://hostname:port
|
|
|
|
// prepend protocol://hostname:port
|
|
|
|
if ($full) {
|
|
|
|
if ($full) {
|
|
|
|
$schema = 'http';
|
|
|
|
$prefix = rcube_utils::resolve_url($prefix);
|
|
|
|
$default_port = 80;
|
|
|
|
|
|
|
|
if (rcube_utils::https_check()) {
|
|
|
|
|
|
|
|
$schema = 'https';
|
|
|
|
|
|
|
|
$default_port = 443;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$prefix = $schema . '://' . preg_replace('/:\d+$/', '', $_SERVER['HTTP_HOST']);
|
|
|
|
|
|
|
|
if ($_SERVER['SERVER_PORT'] != $default_port) {
|
|
|
|
|
|
|
|
$prefix .= ':' . $_SERVER['SERVER_PORT'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// add base path to this Roundcube installation
|
|
|
|
$prefix = rtrim($prefix, '/') . '/';
|
|
|
|
$base_path = preg_replace('![^/]+$!', '', strval($_SERVER['SCRIPT_NAME']));
|
|
|
|
|
|
|
|
if ($base_path == '') $base_path = '/';
|
|
|
|
|
|
|
|
$prefix .= $base_path;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$prefix = './';
|
|
|
|
$prefix = './';
|
|
|
|