Index: /trunk/phpgwapi/inc/functions.inc.php
===================================================================
--- /trunk/phpgwapi/inc/functions.inc.php	(revision 1463)
+++ /trunk/phpgwapi/inc/functions.inc.php	(revision 2174)
@@ -30,11 +30,4 @@
 	error_reporting(error_reporting() & ~E_NOTICE);
 
-	if (!function_exists('version_compare'))//version_compare() is only available in PHP4.1+
-	{
-		echo 'eGroupWare requires PHP 4.1 or greater.<br>';
-		echo 'Please contact your System Administrator';
-		exit;
-	}
-
 	include(PHPGW_API_INC.'/common_functions.inc.php');
 	
@@ -365,15 +358,4 @@
 		$GLOBALS['phpgw']->preferences->verify_basic_settings();
 
-		/********* Optional classes, which can be disabled for performance increases *********/
-		while ($phpgw_class_name = each($GLOBALS['phpgw_info']['flags']))
-		{
-			if (ereg('enable_',$phpgw_class_name[0]))
-			{
-				$enable_class = str_replace('enable_','',$phpgw_class_name[0]);
-				$enable_class = str_replace('_class','',$enable_class);
-				eval('$GLOBALS["phpgw"]->' . $enable_class . ' = createobject(\'phpgwapi.' . $enable_class . '\');');
-			}
-		}
-		unset($enable_class);
 		reset($GLOBALS['phpgw_info']['flags']);
 
@@ -390,51 +372,4 @@
 		}
 
-		/*************************************************************************\
-		* These lines load up the themes                                          *
-		\*************************************************************************/
-		if (! $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'])
-		{
-			if (@$GLOBALS['phpgw_info']['server']['template_set'] == 'user_choice')
-			{
-				$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = 'default';
-			}
-			else
-			{
-				$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = $GLOBALS['phpgw_info']['server']['template_set'];
-			}
-		}
-		if (@$GLOBALS['phpgw_info']['server']['force_theme'] == 'user_choice')
-		{
-			if (!isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
-			{
-				$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = 'default';
-			}
-		}
-		else
-		{
-			if (isset($GLOBALS['phpgw_info']['server']['force_theme']))
-			{
-				$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = $GLOBALS['phpgw_info']['server']['force_theme'];
-			}
-		}
-
-		if(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] . '.theme'))
-		{
-			include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] . '.theme');
-		}
-		elseif(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme'))
-		{
-			include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme');
-		}
-		else
-		{
-			/* Hope we don't get to this point.  Better then the user seeing a */
-			/* complety back screen and not know whats going on                */
-			echo '<body bgcolor="FFFFFF">';
-			$GLOBALS['phpgw']->log->write(array('text'=>'F-Abort, No themes found'));
-
-			exit;
-		}
-		unset($theme_to_load);
 
 		/*************************************************************************\
@@ -487,21 +422,3 @@
 			$GLOBALS['phpgw']->common->phpgw_header();
 		}
-
-		/*************************************************************************\
-		* Load the app include files if the exists                                *
-		\*************************************************************************/
-		/* Then the include file */
-		if (PHPGW_APP_INC != "" &&
-                   ! preg_match ("/phpgwapi/i", PHPGW_APP_INC) &&
-                   file_exists(PHPGW_APP_INC . '/functions.inc.php') &&
-                   !isset($_GET['menuaction']))
-		{
-			include(PHPGW_APP_INC . '/functions.inc.php');
-		}
-		if (!@$GLOBALS['phpgw_info']['flags']['noheader'] &&
-			!@$GLOBALS['phpgw_info']['flags']['noappheader'] &&
-			file_exists(PHPGW_APP_INC . '/header.inc.php') && !isset($_GET['menuaction']))
-		{
-			include(PHPGW_APP_INC . '/header.inc.php');
-		}
-	}
+	}
