From 581b6b41fd51549fe05afede9da647ccf6297660 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 27 Aug 2014 08:46:57 -0400
Subject: [PATCH] Make possible to set vacation start/end date and time
---
program/include/rcmail.php | 32 ++++++++++++++------------------
1 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index bb2346f..ece0606 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -147,8 +147,13 @@
$this->task = $task;
$this->comm_path = $this->url(array('task' => $this->task));
+ if (!empty($_REQUEST['_framed'])) {
+ $this->comm_path .= '&_framed=1';
+ }
+
if ($this->output) {
$this->output->set_env('task', $this->task);
+ $this->output->set_env('comm_path', $this->comm_path);
}
}
@@ -168,7 +173,7 @@
setlocale(LC_ALL, $lang . '.utf8', $lang . '.UTF-8', 'en_US.utf8', 'en_US.UTF-8');
// workaround for http://bugs.php.net/bug.php?id=18556
- if (version_compare(PHP_VERSION, '5.5.0', '<') && in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) {
+ if (PHP_VERSION_ID < 50500 && in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) {
setlocale(LC_CTYPE, 'en_US.utf8', 'en_US.UTF-8');
}
}
@@ -822,26 +827,17 @@
}
if ($absolute || $full) {
- $prefix = '';
-
- // prepend protocol://hostname:port
- if ($full) {
- $schema = 'http';
- $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
$base_path = preg_replace('![^/]+$!', '', strval($_SERVER['SCRIPT_NAME']));
if ($base_path == '') $base_path = '/';
- $prefix .= $base_path;
+ $prefix = $base_path;
+
+ // prepend protocol://hostname:port
+ if ($full) {
+ $prefix = rcube_utils::resolve_url($prefix);
+ }
+
+ $prefix = rtrim($prefix, '/') . '/';
}
else {
$prefix = './';
--
Gitblit v1.9.1