Changeset 2174
- Timestamp:
- 03/05/10 14:38:42 (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/functions.inc.php
r1463 r2174 30 30 error_reporting(error_reporting() & ~E_NOTICE); 31 31 32 if (!function_exists('version_compare'))//version_compare() is only available in PHP4.1+33 {34 echo 'eGroupWare requires PHP 4.1 or greater.<br>';35 echo 'Please contact your System Administrator';36 exit;37 }38 39 32 include(PHPGW_API_INC.'/common_functions.inc.php'); 40 33 … … 365 358 $GLOBALS['phpgw']->preferences->verify_basic_settings(); 366 359 367 /********* Optional classes, which can be disabled for performance increases *********/368 while ($phpgw_class_name = each($GLOBALS['phpgw_info']['flags']))369 {370 if (ereg('enable_',$phpgw_class_name[0]))371 {372 $enable_class = str_replace('enable_','',$phpgw_class_name[0]);373 $enable_class = str_replace('_class','',$enable_class);374 eval('$GLOBALS["phpgw"]->' . $enable_class . ' = createobject(\'phpgwapi.' . $enable_class . '\');');375 }376 }377 unset($enable_class);378 360 reset($GLOBALS['phpgw_info']['flags']); 379 361 … … 390 372 } 391 373 392 /*************************************************************************\393 * These lines load up the themes *394 \*************************************************************************/395 if (! $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'])396 {397 if (@$GLOBALS['phpgw_info']['server']['template_set'] == 'user_choice')398 {399 $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = 'default';400 }401 else402 {403 $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = $GLOBALS['phpgw_info']['server']['template_set'];404 }405 }406 if (@$GLOBALS['phpgw_info']['server']['force_theme'] == 'user_choice')407 {408 if (!isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))409 {410 $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = 'default';411 }412 }413 else414 {415 if (isset($GLOBALS['phpgw_info']['server']['force_theme']))416 {417 $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = $GLOBALS['phpgw_info']['server']['force_theme'];418 }419 }420 421 if(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] . '.theme'))422 {423 include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] . '.theme');424 }425 elseif(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme'))426 {427 include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme');428 }429 else430 {431 /* Hope we don't get to this point. Better then the user seeing a */432 /* complety back screen and not know whats going on */433 echo '<body bgcolor="FFFFFF">';434 $GLOBALS['phpgw']->log->write(array('text'=>'F-Abort, No themes found'));435 436 exit;437 }438 unset($theme_to_load);439 374 440 375 /*************************************************************************\ … … 487 422 $GLOBALS['phpgw']->common->phpgw_header(); 488 423 } 489 490 /*************************************************************************\ 491 * Load the app include files if the exists * 492 \*************************************************************************/ 493 /* Then the include file */ 494 if (PHPGW_APP_INC != "" && 495 ! preg_match ("/phpgwapi/i", PHPGW_APP_INC) && 496 file_exists(PHPGW_APP_INC . '/functions.inc.php') && 497 !isset($_GET['menuaction'])) 498 { 499 include(PHPGW_APP_INC . '/functions.inc.php'); 500 } 501 if (!@$GLOBALS['phpgw_info']['flags']['noheader'] && 502 !@$GLOBALS['phpgw_info']['flags']['noappheader'] && 503 file_exists(PHPGW_APP_INC . '/header.inc.php') && !isset($_GET['menuaction'])) 504 { 505 include(PHPGW_APP_INC . '/header.inc.php'); 506 } 507 } 424 }
Note: See TracChangeset
for help on using the changeset viewer.