Ignore:
Timestamp:
10/08/13 11:59:12 (11 years ago)
Author:
angelo
Message:

Ticket #3491 - Compatibilizar Expresso com novas versoes do PHP

Location:
sandbox/2.5.1-evolucao/expressoAdmin1_2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.5.1-evolucao/expressoAdmin1_2/controller.php

    r7655 r8231  
    2222        //      Explode action from cExecuteForm function 
    2323        $cExecuteFormReturn = false; 
    24         if($_POST['_action']) {                  
     24        if(isset($_POST['_action'])) {           
    2525                if($_FILES) { 
    2626                        $count_files = $_POST['countFiles']; 
     
    3636        } 
    3737        //      Explode action from cExecute function 
    38         else if($_GET['action']) 
    39                 list($app,$class,$method) = explode('.',@$_GET['action']); 
     38        else if($_GET['action']){ 
     39                $exp = explode('.',@$_GET['action']); 
     40                //avoiding undefined offsets 
     41                if (count($exp) > 1) 
     42                        list($app,$class,$method) = explode('.',@$_GET['action']); 
     43                else 
     44                        $app = $exp[0]; 
     45        } 
    4046        // NO ACTION 
    4147        else 
    4248                return $_SESSION['response'] = 'false'; 
    43          
    4449        // Load dinamically class file. 
    4550        if($app == '$this') 
  • sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.db_functions.inc.php

    r8204 r8231  
    1010                \**************************************************************************/  
    1111                 
    12 define('PHPGW_INCLUDE_ROOT','../');      
    13 define('PHPGW_API_INC','../phpgwapi/inc'); 
     12if (!defined('PHPGW_INCLUDE_ROOT')) define('PHPGW_INCLUDE_ROOT','../');  
     13if (!defined('PHPGW_API_INC')) define('PHPGW_API_INC','../phpgwapi/inc'); 
    1414include_once(PHPGW_API_INC.'/class.db.inc.php'); 
    1515 
  • sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.functions.inc.php

    r7769 r8231  
    833833                                if (($i +1) % 3 == 1) 
    834834                                { 
    835                                         $checked = $user_applications[$app] ? 'CHECKED' : ''; 
     835                                        $checked = is_array($user_applications) && $user_applications[$app] ? 'CHECKED' : ''; 
    836836                                        $app_col1 = sprintf("<td>%s</td><td width='10'><input type='checkbox' name='apps[%s]' value='1' %s %s></td>\n", 
    837837                                        $data['title'],$app,$checked, $disabled); 
     
    843843                                if (($i +1) % 3 == 2) 
    844844                                { 
    845                                         $checked = $user_applications[$app] ? 'CHECKED' : ''; 
     845                                        $checked = is_array($user_applications) && $user_applications[$app] ? 'CHECKED' : ''; 
    846846                                        $app_col2 = sprintf("<td>%s</td><td width='10'><input type='checkbox' name='apps[%s]' value='1' %s %s></td>\n", 
    847847                                        $data['title'],$app,$checked, $disabled); 
     
    853853                                if (($i +1) % 3 == 0) 
    854854                                { 
    855                                         $checked = $user_applications[$app] ? 'CHECKED' : ''; 
     855                                        $checked = is_array($user_applications) && $user_applications[$app] ? 'CHECKED' : ''; 
    856856                                        $app_col3 = sprintf("<td>%s</td><td width='10'><input type='checkbox' name='apps[%s]' value='1' %s %s></td>\n", 
    857857                                        $data['title'],$app,$checked, $disabled); 
Note: See TracChangeset for help on using the changeset viewer.