if (sqgetGlobalVar('SERVER_PORT', $server_port, SQ_SERVER)) {
if (($server_port != 80 && $proto == 'http://') ||
($server_port != 443 && $proto == 'https://' &&
- $forwarded_proto != 'https')) {
+ strcasecmp($forwarded_proto, 'https') !== 0)) {
$port = sprintf(':%d', $server_port);
}
}
}
+/**
+ * Get Message List URI
+ *
+ * @param string $mailbox Current mailbox name (unencoded/raw)
+ * @param string $startMessage The mailbox page offset
+ * @param string $what Any current search parameters (OPTIONAL;
+ * default empty string)
+ *
+ * @return string The message list URI
+ *
+ * @since 1.5.2
+ *
+ */
+function get_message_list_uri($mailbox, $startMessage, $what='') {
+
+ global $base_uri;
+
+ $urlMailbox = urlencode($mailbox);
+
+ $list_xtra = "?where=read_body.php&what=$what&mailbox=" . $urlMailbox.
+ "&startMessage=$startMessage";
+
+ return $base_uri .'src/right_main.php'. $list_xtra;
+}
+
+
/**
* Encrypts password
*
*/
function show_readable_size($bytes) {
$bytes /= 1024;
- $type = 'KiB';
+ $type = _("KiB");
if ($bytes / 1024 > 1) {
$bytes /= 1024;
- $type = 'MiB';
+ $type = _("MiB");
}
if ($bytes < 10) {