Aleksander Machniak
2012-05-09 66510e20d36cb8da4f3012ef063de7bfce9b51aa
program/include/rcube_output.php
@@ -54,6 +54,18 @@
    /**
     * Magic getter
     */
    public function __get($var)
    {
        // allow read-only access to $env
        if ($var == 'env')
            return $this->env;
        return null;
    }
    /**
     * Setter for page title
     *
     * @param string $title Page title
@@ -215,7 +227,7 @@
        header("X-DNS-Prefetch-Control: off");
        // We need to set the following headers to make downloads work using IE in HTTPS mode.
        if ($this->browser->ie && rcube_ui::https_check()) {
        if ($this->browser->ie && rcube_utils::https_check()) {
            header('Pragma: private');
            header("Cache-Control: private, must-revalidate");
        }
@@ -225,6 +237,21 @@
        }
    }
    /**
     * Send header with expire date 30 days in future
     *
     * @param int Expiration time in seconds
     */
    public function future_expire_header($offset = 2600000)
    {
        if (headers_sent())
            return;
        header("Expires: " . gmdate("D, d M Y H:i:s", time()+$offset) . " GMT");
        header("Cache-Control: max-age=$offset");
        header("Pragma: ");
    }
    /**
     * Show error page and terminate script execution