Ignore:
Timestamp:
10/14/13 17:18:20 (10 years ago)
Author:
angelo
Message:

Ticket #3491 - Compatibilizar Expresso com novas versoes do PHP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.db_functions.inc.php

    r8236 r8237  
    350350                                        $user_app[] = $this->db->row(); 
    351351                                         
    352                                 if (count($user_app) == 0) 
     352                                if (isset($user_app) && count($user_app) == 0) 
    353353                                { 
    354354                                        $sql = "INSERT INTO phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) " 
     
    411411        function get_user_info($uidnumber) 
    412412        { 
     413                $user_app = array(); 
    413414                // Groups 
    414415                $query = "SELECT acl_location FROM phpgw_acl WHERE acl_appname = 'phpgw_group' AND acl_account = '".$uidnumber."'"; 
     
    424425                $query = "SELECT acl_rights FROM phpgw_acl WHERE acl_appname = 'preferences' AND acl_location = 'changepassword' AND acl_account = '".$uidnumber."'"; 
    425426                $this->db->query($query); 
     427                $changepassword = array(); 
    426428                while($this->db->next_record()) 
    427429                        $changepassword[] = $this->db->row(); 
    428                 $return['changepassword'] = $changepassword[0]['acl_rights']; 
     430                $return['changepassword'] = isset($changepassword[0]) ? $changepassword[0]['acl_rights'] : ''; 
    429431                 
    430432                // Apps 
     
    434436                        $user_apps[] = $this->db->row(); 
    435437                         
    436                 if ($user_apps) 
     438                if (isset($user_apps) && $user_apps) 
    437439                {                        
    438440                        foreach ($user_apps as $app) 
     
    538540        function delete_user($user_info) 
    539541        { 
     542                $ids = array(); 
    540543                // AGENDA 
    541544                $this->db->query('SELECT calendar_id FROM calendar_signature WHERE user_uidnumber ='.$user_info['uidnumber'] . ' AND is_owner = 1' ); 
     
    723726                while($this->db->next_record()) 
    724727                        $result[] = $this->db->row(); 
    725                 if (count($result) > 0) 
     728                if (isset($result) && count($result) > 0) 
    726729                        return true; 
    727730                else 
     
    839842                $this->db->select('phpgw_acl', $colunas, $where, null, null); 
    840843 
    841                 $return; 
     844                $return = array(); 
    842845 
    843846                include_once 'class.ldap_functions.inc.php'; 
Note: See TracChangeset for help on using the changeset viewer.