From 5f71a7e50a6225e30e0767dcc3ded0b557e90418 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 4 Mar 2005 14:44:21 +0000 Subject: [PATCH] fix to work with an old header (to be able to upgrade) --- setup/inc/functions.inc.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setup/inc/functions.inc.php b/setup/inc/functions.inc.php index f16d3e5251..a713d476a7 100644 --- a/setup/inc/functions.inc.php +++ b/setup/inc/functions.inc.php @@ -17,11 +17,16 @@ /* $Id$ */ error_reporting(error_reporting() & ~E_NOTICE); - + + // for an old header, we need to setup the reference before including it + if (!is_array($GLOBALS['phpgw_info'])) $GLOBALS['phpgw_info'] =& $GLOBALS['egw_info']; + if(file_exists('../header.inc.php')) { include('../header.inc.php'); } + // for an old header we need to setup a reference for the domains + if (!is_array($GLOBALS['egw_domain'])) $GLOBALS['egw_domain'] =& $GLOBALS['phpgw_domain']; if (!function_exists('version_compare'))//version_compare() is only available in PHP4.1+ { @@ -57,7 +62,7 @@ { $vars = array($m1,$m2,$m3,$m4,$m5,$m6,$m7,$m8,$m9,$m10); } - $value = $GLOBALS['phpgw_setup']->translation->translate("$key", $vars ); + $value = $GLOBALS['egw_setup']->translation->translate("$key", $vars ); return $value; }