From 6912d82b2611fe47e354f2765da0cbf3da938318 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 27 Jun 2004 10:02:15 +0000 Subject: [PATCH] fixed nocachecontrol to allow caching of certain files, eg. the generated javascript for jscalendar and htmlarea which include the language-settings and preferences --- header.inc.php.template | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/header.inc.php.template b/header.inc.php.template index 0a584046c2..47048ae33d 100644 --- a/header.inc.php.template +++ b/header.inc.php.template @@ -2,7 +2,7 @@ /**************************************************************************\ * eGroupWare * * http://www.egroupware.org * - * This file written by Dan Kuykendall * + * This file was originaly written by Dan Kuykendall * * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * @@ -59,20 +59,23 @@ */ $GLOBALS['phpgw_info']['server']['mcrypt_iv'] = '{MCRYPT_IV}'; - /* If you want eGroupWare to be cached by proxy servers, uncomment the following */ - /* This is NOT recommended, but eGroupWare should still work fine. */ - if(!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol'] == True) + if(!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol']) { header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 header('Pragma: no-cache'); // HTTP/1.0 } + else + { + // allow caching by browser + session_cache_limiter(PHP_VERSION >= 4.2 ? 'private_no_expire' : 'privat'); + } /* debugging settings */ define('DEBUG_APP', False); define('DEBUG_API', False); define('DEBUG_DATATYPES', True); define('DEBUG_LEVEL', 3); - define('DEBUG_OUTPUT', 2); /* 1 = screen, 2 = DB (not supported with PHP3). For both use 3. */ + define('DEBUG_OUTPUT', 2); /* 1 = screen, 2 = DB. For both use 3. */ define('DEBUG_TIMER', False); function perfgetmicrotime() @@ -94,7 +97,7 @@ $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version']; $GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header']; unset($setup_info); - $GLOBALS['phpgw_info']['server']['versions']['header'] = '1.26'; + $GLOBALS['phpgw_info']['server']['versions']['header'] = '1.27'; /* This is a fix for NT */ if(!isset($GLOBALS['phpgw_info']['flags']['noapi']) || !$GLOBALS['phpgw_info']['flags']['noapi'] == True) {