Changeset 7631
- Timestamp:
- 12/10/12 10:17:26 (11 years ago)
- Location:
- trunk/zpush
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zpush/backend/expresso/providers/contactProvider.php
r7589 r7631 134 134 $ids = array(); 135 135 try { 136 $result = pg_query($this->db,"BEGIN;");137 136 if ($result == FALSE) throw new Exception(pg_last_error($this->db)); 138 137 $result = pg_query($this->db, "select given_names, family_names, last_update, id_contact from phpgw_cc_contact where id_owner = " . $this->_uidnumber . ";"); … … 145 144 $messages[] = $message; 146 145 } 147 $result = pg_query($this->db,"COMMIT;");148 146 if ($result == FALSE) throw new Exception(pg_last_error($this->db)); 149 147 } catch (Exception $e) { 150 pg_query($this->db,"ROLLBACK;");151 148 // debugLog("exception -> " . $e->getMessage() . " - ARQUIVO: " . $e->getFile() . " - LINHA: " . $e->getLine()); 152 149 } … … 176 173 $message = new SyncContact(); 177 174 try { 178 $result = pg_query($this->db,"BEGIN;");179 if ($result == FALSE) throw new Exception(pg_last_error($this->db));180 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 . ";"); 181 176 if ($result_contact == FALSE) throw new Exception(pg_last_error($this->db)); … … 363 358 } 364 359 } 365 $result = pg_query($this->db,"COMMIT;");366 if ($result == FALSE) throw new Exception(pg_last_error($this->db));367 360 } catch (Exception $e) { 368 pg_query($this->db,"ROLLBACK;");369 361 debugLog("exception -> " . $e->getMessage() . " - ARQUIVO: " . $e->getFile() . " - LINHA: " . $e->getLine()); 370 362 return; -
trunk/zpush/config.php
r7629 r7631 176 176 177 177 178 // ************************179 // BackendIMAP settings180 // ************************181 // Defines the server to which we want to connect182 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 emails188 // 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 used190 // '@mydomain.com' - the username is used and the given string will be appended191 define('IMAP_DEFAULTFROM', '');192 // copy outgoing mail to this folder. If not set z-push will try the default folders193 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 used197 define('IMAP_USE_IMAPMAIL', true);198 199 178 200 179 // ************************ … … 300 279 301 280 $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 302 310 $rs = pg_query( $GLOBALS['connections']['db'], 'SELECT app_id FROM phpgw_applications WHERE app_name = \'zpush\'' ); 303 311 $row = pg_fetch_assoc( $rs );
Note: See TracChangeset
for help on using the changeset viewer.