--- nfo/site/htdocs/inc/common/common.php.inc 2004/09/01 08:58:40 1.7 +++ nfo/site/htdocs/inc/common/common.php.inc 2004/09/03 22:44:57 1.8 @@ -4,7 +4,7 @@ --- Setup and common functions include file. -------------------------------------------------------------------------------- --- rabit, 04:31 24.08.2004 ---- $Id: common.php.inc,v 1.7 2004/09/01 08:58:40 rabit Exp $ +--- $Id: common.php.inc,v 1.8 2004/09/03 22:44:57 joko Exp $ ------------------------------------------------------------------------------*/ //------------------------------------------------------------------------------ @@ -102,11 +102,15 @@ //------------------------------------------------------------------------------ //- Session setup: -// Neither proxies, nor the clients are allowed to cache session data: -session_cache_limiter('nocache'); +if ($common['client']['session_enabled']) { -// This is neccessary to make the $_SESSION global available: -session_start(); + // Neither proxies, nor the clients are allowed to cache session data: + session_cache_limiter('nocache'); + + // This is neccessary to make the $_SESSION global available: + session_start(); + +} common_benchmark_addstep('common: session init'); @@ -323,7 +327,12 @@ //---------------------------------------------------------- //- File functions: - +//---------------------------------------------------------- +//- Utility functions: +function common_get_baseurl() { + $baseurl = "http://" . $_SERVER['SERVER_NAME'] . "" . $_SERVER['SCRIPT_NAME'] . "/"; + return $baseurl; +} //------------------------------------------------------------------------------