Ignore:
Timestamp:
07/08/10 17:52:20 (14 years ago)
Author:
amuller
Message:

Ticket #1135 - Aplicando alterações do branches 2.0 no branches 2.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/phpgwapi/inc/functions.inc.php

    r1463 r3018  
    2929 
    3030        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         
    3932        include(PHPGW_API_INC.'/common_functions.inc.php'); 
    4033         
     
    378371                reset($GLOBALS['phpgw_info']['flags']); 
    379372 
     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 
    380384                /*************************************************************************\ 
    381385                * These lines load up the templates class                                 * 
     
    390394                } 
    391395 
    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                         else 
    402                         { 
    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                 else 
    414                 { 
    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                 else 
    430                 { 
    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); 
    439396 
    440397                /*************************************************************************\ 
     
    488445                } 
    489446 
    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.