Changeset 7631


Ignore:
Timestamp:
12/10/12 10:17:26 (7 years ago)
Author:
cristiano
Message:

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

Location:
trunk/zpush
Files:
2 edited

Legend:

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

    r7589 r7631  
    134134        $ids = array(); 
    135135        try { 
    136             $result = pg_query($this->db,"BEGIN;"); 
    137136            if ($result == FALSE) throw new Exception(pg_last_error($this->db)); 
    138137            $result = pg_query($this->db, "select given_names, family_names, last_update, id_contact from phpgw_cc_contact where id_owner = " . $this->_uidnumber . ";"); 
     
    145144                $messages[] = $message; 
    146145            } 
    147             $result = pg_query($this->db,"COMMIT;"); 
    148146            if ($result == FALSE) throw new Exception(pg_last_error($this->db)); 
    149147        } catch (Exception $e) { 
    150             pg_query($this->db,"ROLLBACK;"); 
    151148       //     debugLog("exception -> " . $e->getMessage() . " - ARQUIVO: " . $e->getFile() . " - LINHA: " . $e->getLine()); 
    152149        } 
     
    176173        $message = new SyncContact(); 
    177174        try { 
    178             $result = pg_query($this->db,"BEGIN;"); 
    179             if ($result == FALSE) throw new Exception(pg_last_error($this->db)); 
    180175            $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 . ";"); 
    181176            if ($result_contact == FALSE) throw new Exception(pg_last_error($this->db)); 
     
    363358                } 
    364359            } 
    365             $result = pg_query($this->db,"COMMIT;"); 
    366             if ($result == FALSE) throw new Exception(pg_last_error($this->db)); 
    367360        } catch (Exception $e) { 
    368             pg_query($this->db,"ROLLBACK;"); 
    369361            debugLog("exception -> " . $e->getMessage() . " - ARQUIVO: " . $e->getFile() . " - LINHA: " . $e->getLine()); 
    370362            return; 
  • trunk/zpush/config.php

    r7629 r7631  
    176176 
    177177 
    178     // ************************ 
    179     //  BackendIMAP settings 
    180     // ************************ 
    181     // Defines the server to which we want to connect 
    182     define('IMAP_SERVER', 'localhost'); 
    183     // connecting to default port (143) 
    184     define('IMAP_PORT', 143); 
    185     // best cross-platform compatibility (see http://php.net/imap_open for options) 
    186     define('IMAP_OPTIONS', '/notls/norsh'); 
    187     // overwrite the "from" header if it isn't set when sending emails 
    188     // options: 'username'    - the username will be set (usefull if your login is equal to your emailaddress) 
    189     //        'domain'    - the value of the "domain" field is used 
    190     //        '@mydomain.com' - the username is used and the given string will be appended 
    191     define('IMAP_DEFAULTFROM', ''); 
    192     // copy outgoing mail to this folder. If not set z-push will try the default folders 
    193     define('IMAP_SENTFOLDER', 'INBOX/Sent'); 
    194     // forward messages inline (default false - as attachment) 
    195     define('IMAP_INLINE_FORWARD', false); 
    196     // use imap_mail() to send emails (default) - if false mail() is used 
    197     define('IMAP_USE_IMAPMAIL', true); 
    198  
    199178 
    200179    // ************************ 
     
    300279 
    301280    $GLOBALS['connections']['db'] = pg_connect( $rs ); 
     281 
     282 
     283    $rs = pg_query( $GLOBALS['connections']['db'], 'SELECT * FROM phpgw_emailadmin' ); 
     284    $row = pg_fetch_assoc( $rs ); 
     285 
     286    // ************************ 
     287    //  BackendIMAP settings 
     288    // ************************ 
     289    // Defines the server to which we want to connect 
     290    define('IMAP_SERVER', $row['imapserver']); 
     291    // connecting to default port (143) 
     292    define('IMAP_PORT', $row['imapport']); 
     293    // best cross-platform compatibility (see http://php.net/imap_open for options) 
     294    define('IMAP_OPTIONS', $row['imapTLSEncryption'] == 'yes' ? '/tls/norsh' : '/notls/norsh'); 
     295 
     296    // overwrite the "from" header if it isn't set when sending emails 
     297    // options: 'username'    - the username will be set (usefull if your login is equal to your emailaddress) 
     298    //        'domain'    - the value of the "domain" field is used 
     299    //        '@mydomain.com' - the username is used and the given string will be appended 
     300 
     301    define('IMAP_DEFAULTFROM', ''); 
     302    // copy outgoing mail to this folder. If not set z-push will try the default folders 
     303    define('IMAP_SENTFOLDER', 'INBOX' . $row['imapdelimiter'] . $row['imapdefaultsentfolder']); 
     304    // forward messages inline (default false - as attachment) 
     305    define('IMAP_INLINE_FORWARD', false); 
     306    // use imap_mail() to send emails (default) - if false mail() is used 
     307    define('IMAP_USE_IMAPMAIL', true); 
     308 
     309 
    302310    $rs = pg_query( $GLOBALS['connections']['db'], 'SELECT app_id FROM phpgw_applications WHERE app_name = \'zpush\'' ); 
    303311    $row = pg_fetch_assoc( $rs ); 
Note: See TracChangeset for help on using the changeset viewer.