dynamically autoloading sub-object of egw-object, moved __wakeup methods to concerned classes and other "modernsations" ;-)

This commit is contained in:
Ralf Becker 2008-03-21 20:12:57 +00:00
parent 3bf9ad5efa
commit f7d571a952

View File

@ -58,9 +58,6 @@
'flags' => array( 'flags' => array(
'noheader' => True, 'noheader' => True,
'nonavbar' => True, 'nonavbar' => True,
'enable_network_class' => True,
'enable_contacts_class' => True,
'enable_nextmatchs_class' => True,
'currentapp' => $app 'currentapp' => $app
) )
); );
@ -111,9 +108,6 @@
$GLOBALS['egw_info']['flags'] = array( $GLOBALS['egw_info']['flags'] = array(
'noheader' => False, 'noheader' => False,
'nonavbar' => False, 'nonavbar' => False,
'enable_network_class' => True,
'enable_contacts_class' => True,
'enable_nextmatchs_class' => True,
'currentapp' => 'eGroupWare' 'currentapp' => 'eGroupWare'
); );
$GLOBALS['egw']->common->egw_header(); $GLOBALS['egw']->common->egw_header();
@ -127,10 +121,11 @@
$app = 'phpgwapi'; $app = 'phpgwapi';
} }
$GLOBALS[$class] = CreateObject($app.'.'.$class); // dont use =& with $GLOBALS, it does NOT behave as expected require_once(EGW_INCLUDE_ROOT.'/'.$app.'/inc/class.'.$class.'.inc.php');
if((is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions[$method]) && !$invalid_data) $obj = new $class();
if((is_array($obj->public_functions) && $obj->public_functions[$method]) && !$invalid_data)
{ {
execmethod($_GET['menuaction']); $obj->$method();
unset($app); unset($app);
unset($class); unset($class);
unset($method); unset($method);
@ -177,4 +172,3 @@
$GLOBALS['egw']->common->egw_footer(); $GLOBALS['egw']->common->egw_footer();
} }
} }
?>