Changeset 3018 for branches/2.2/phpgwapi/inc/functions.inc.php
- Timestamp:
- 07/08/10 17:52:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/phpgwapi/inc/functions.inc.php
r1463 r3018 29 29 30 30 error_reporting(error_reporting() & ~E_NOTICE); 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 31 39 32 include(PHPGW_API_INC.'/common_functions.inc.php'); 40 33 … … 378 371 reset($GLOBALS['phpgw_info']['flags']); 379 372 373 374 if(!include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme')) 375 { 376 /* Hope we don't get to this point. Better then the user seeing a */ 377 /* complety back screen and not know whats going on */ 378 echo '<body bgcolor="FFFFFF">'; 379 $GLOBALS['phpgw']->log->write(array('text'=>'F-Abort, No themes found')); 380 381 exit; 382 } 383 380 384 /*************************************************************************\ 381 385 * These lines load up the templates class * … … 390 394 } 391 395 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 396 440 397 /*************************************************************************\ … … 488 445 } 489 446 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 } 447 }
Note: See TracChangeset
for help on using the changeset viewer.