Ignore:
Timestamp:
12/10/12 13:38:57 (11 years ago)
Author:
cristiano
Message:

Ticket #3209 - Retirado configurações estaticas, comandos desnecessarios do conctactProvider

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zpush/backend/expresso/providers/contactProvider.php

    r7632 r7633  
    133133        $messages = array(); 
    134134        $ids = array(); 
    135         try { 
    136             if ($result == FALSE) throw new Exception(pg_last_error($this->db)); 
    137             $result = pg_query($this->db, "select given_names, family_names, last_update, id_contact from phpgw_cc_contact where id_owner = " . $this->_uidnumber . ";"); 
    138             if ($result == FALSE) throw new Exception(pg_last_error($this->db)); 
    139             while ($row = pg_fetch_row($result)) { 
    140                 $message = array(); 
    141                 $message["id"] = $row[3]; 
    142                 $message["mod"] = substr($row[2], 0, strlen($row[2])-3); 
    143                 $message["flags"] = 1; // always 'read' 
    144                 $messages[] = $message; 
    145             } 
    146             if ($result == FALSE) throw new Exception(pg_last_error($this->db)); 
    147         } catch (Exception $e) { 
    148        //     debugLog("exception -> " . $e->getMessage() . " - ARQUIVO: " . $e->getFile() . " - LINHA: " . $e->getLine()); 
     135 
     136        $result = pg_query($this->db, "select given_names, family_names, last_update, id_contact from phpgw_cc_contact where id_owner = " . $this->_uidnumber . ";"); 
     137        if ($result == FALSE) throw new Exception(pg_last_error($this->db)); 
     138        while ($row = pg_fetch_row($result)) { 
     139          $message = array(); 
     140          $message["id"] = $row[3]; 
     141          $message["mod"] = substr($row[2], 0, strlen($row[2])-3); 
     142          $message["flags"] = 1; // always 'read' 
     143          $messages[] = $message; 
    149144        } 
    150  
    151145 
    152146        return $messages; 
     
    172166        // Parse the database into object 
    173167        $message = new SyncContact(); 
    174         try { 
    175             $result_contact = pg_query($this->db, "select id_contact, id_owner, id_status, photo, alias, id_prefix, given_names, family_names, names_ordered, id_suffix, birthdate, sex, pgp_key, notes, is_global, last_status, last_update, category, web_page, corporate_name, job_title, department from phpgw_cc_contact where id_contact = " . $id . ";"); 
     168        $result_contact = pg_query($this->db, "select id_contact, id_owner, id_status, photo, alias, id_prefix, given_names, family_names, names_ordered, id_suffix, birthdate, sex, pgp_key, notes, is_global, last_status, last_update, category, web_page, corporate_name, job_title, department from phpgw_cc_contact where id_contact = " . $id . ";"); 
    176169            if ($result_contact == FALSE) throw new Exception(pg_last_error($this->db)); 
    177170            while ($row_contact = pg_fetch_row($result_contact)) { 
     
    358351                } 
    359352            } 
    360         } catch (Exception $e) { 
    361             debugLog("exception -> " . $e->getMessage() . " - ARQUIVO: " . $e->getFile() . " - LINHA: " . $e->getLine()); 
    362             return; 
    363         } 
     353 
    364354        return $message; 
    365355    } 
     
    386376        ZLog::Write(LOGLEVEL_DEBUG, "ExpressoContactProvider->StatMessage()"); 
    387377 
    388         try { 
    389  
    390378            $result_contact = pg_query($this->db, "select last_update from phpgw_cc_contact where id_contact = " . $id . ";"); 
    391379            if ($result_contact == FALSE) throw new Exception(pg_last_error($this->db)); 
     
    399387                } 
    400388            } 
    401  
    402         } catch (Exception $e) { 
    403             debugLog("exception -> " . $e->getMessage() . " - ARQUIVO: " . $e->getFile() . " - LINHA: " . $e->getLine()); 
    404         } 
    405389        return false; 
    406390    } 
Note: See TracChangeset for help on using the changeset viewer.