From bf0e5e2d90f2a6d1316138a9ca5da2369ee2bbdd Mon Sep 17 00:00:00 2001 From: ceb Date: Sat, 4 Jan 2003 00:54:55 +0000 Subject: [PATCH] update --- index.php | 21 ++++++++++++++++----- phpgwapi/inc/class.common.inc.php | 6 ++++-- phpgwapi/inc/functions.inc.php | 8 -------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/index.php b/index.php index f61ab48b30..0d774fd387 100755 --- a/index.php +++ b/index.php @@ -8,10 +8,9 @@ * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ - /* $Id$ */ - $phpgw_info = array(); + $GLOBALS['phpgw_info'] = array(); $GLOBALS['sessionid'] = @$GLOBALS['HTTP_GET_VARS']['sessionid'] ? @$GLOBALS['HTTP_GET_VARS']['sessionid'] : @$GLOBALS['HTTP_COOKIE_VARS']['sessionid']; if (! $GLOBALS['sessionid']) { @@ -47,11 +46,23 @@ $api_requested = True; } - $GLOBALS['phpgw_info']['flags'] = array( - 'noheader' => True, - 'nonavbar' => True, + $GLOBALS['phpgw_info']['flags'] = array + ( + //'noheader' => True, 'currentapp' => $app ); + + /* dont call the xslt_app_tpl if app isnt ported to xslt yet. + this is only temporarily. when more apps use xslt we should change it to ask for non xslt apps*/ + + switch($app) + { + case 'notes': + case 'property': + $GLOBALS['phpgw_info']['flags']['xslt_app'] = True; + break; + } + include('./header.inc.php'); if ($app == 'home' && ! $api_requested) diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index ad070443a5..611f33c9c1 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -1320,8 +1320,10 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info' if ($menuaction && $GLOBALS['phpgw_info']['flags']['xslt_app']) { - $app_function = strrchr($menuaction,'.'); - $var['app_tpl'] = substr($app_function,1,strlen($app_function)); + list($app,$class,$method) = explode('.',$menuaction); + $var['app_tpl'] = $method; + //$app_function = strrchr($menuaction,'.'); + //$var['app_tpl'] = substr($app_function,1,strlen($app_function)); } $var['lang_powered_by'] = lang('powered by'); diff --git a/phpgwapi/inc/functions.inc.php b/phpgwapi/inc/functions.inc.php index 7cb5f02417..d4cc151652 100644 --- a/phpgwapi/inc/functions.inc.php +++ b/phpgwapi/inc/functions.inc.php @@ -386,14 +386,6 @@ } } - /* dont call the xslt_app_tpl if app isnt ported to xslt */ - switch($GLOBALS['phpgw_info']['flags']['currentapp']) - { - case 'notes': - $GLOBALS['phpgw_info']['flags']['xslt_app'] = True; - break; - } - if($continue_app_data) { /* Make sure user is keeping his password in order */