1 | <?php |
---|
2 | /** |
---|
3 | * Zarafa Z-Merge |
---|
4 | * |
---|
5 | * Copyright (C) 2005 - 2008 Zarafa B.V. |
---|
6 | * |
---|
7 | * This program is free software: you can redistribute it and/or modify |
---|
8 | * it under the terms of the GNU Affero General Public License, version 3, |
---|
9 | * and under the terms of the GNU General Public License, version 3, |
---|
10 | * as published by the Free Software Foundation. |
---|
11 | * |
---|
12 | * This program is distributed in the hope that it will be useful, |
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | * GNU (Affero) General Public License for more details. |
---|
16 | * |
---|
17 | * You should have received a copy of the GNU Affero General Public License |
---|
18 | * and the GNU General Public License along with this program. |
---|
19 | * If not, see <http://www.gnu.org/licenses/>. |
---|
20 | * |
---|
21 | * Created on 10.11.2007 by Sebastian Kummer & Manfred Kutas |
---|
22 | * |
---|
23 | * @package Z-Merge |
---|
24 | */ |
---|
25 | |
---|
26 | |
---|
27 | /** |
---|
28 | * installation directory - must terminate with / |
---|
29 | */ |
---|
30 | define('ZMERGE_DIR', '/usr/lib/z-merge/'); |
---|
31 | |
---|
32 | /** |
---|
33 | * Z-Merge PID file |
---|
34 | */ |
---|
35 | define('ZMERGE_PID', '/var/run/z-merge.pid'); |
---|
36 | |
---|
37 | |
---|
38 | /** |
---|
39 | * logger options |
---|
40 | * |
---|
41 | * Valid loglevels: FATAL, ERROR, WARN, INFO, DEBUG |
---|
42 | * Logsize is in MegaBytes |
---|
43 | */ |
---|
44 | |
---|
45 | define('ZMERGE_LOGFILE' , '/var/log/z-merge/z-merge.log'); |
---|
46 | define('ZMERGE_ERRORLOGFILE' , '/var/log/z-merge/z-merge-errors.log'); |
---|
47 | define('ZMERGE_LOGLEVEL' , INFO); |
---|
48 | define('ZMERGE_LOGSIZE' , 5); |
---|
49 | |
---|
50 | /** |
---|
51 | * Log conflict reason level |
---|
52 | * |
---|
53 | * if that parameter is set to a loglevel, the logfile will show |
---|
54 | * the reason for a synchronization conflict case (offline sync) |
---|
55 | * |
---|
56 | * ATTENTION: Be aware that the logfile will contain personal information |
---|
57 | * from the synchronized objects that may be violating personal |
---|
58 | * rights of your users! |
---|
59 | * |
---|
60 | * Valid values: FATAL, ERROR, WARN, INFO, DEBUG, false (to disable) |
---|
61 | */ |
---|
62 | define('ZMERGE_LOGCONFLICTREASONLEVEL' , false); |
---|
63 | |
---|
64 | |
---|
65 | /** |
---|
66 | * start livesync with one or more servers down? |
---|
67 | */ |
---|
68 | define('ZMERGE_FORCELIVESYNC', false); |
---|
69 | |
---|
70 | |
---|
71 | /** |
---|
72 | * reconnect offline servers after X minutes - default: 1 |
---|
73 | */ |
---|
74 | define('ZMERGE_RECONNECT', 1); |
---|
75 | |
---|
76 | |
---|
77 | /** |
---|
78 | * send Z-Merge errors to this email address --> to disable set to false |
---|
79 | */ |
---|
80 | define('ZMERGE_SENDERRORS', false); |
---|
81 | |
---|
82 | /** |
---|
83 | * Max number of transmitted objects per SOAP request |
---|
84 | */ |
---|
85 | define("MAX_OBJECTS", 50); |
---|
86 | |
---|
87 | /** |
---|
88 | * Z-Merge database configuration |
---|
89 | * |
---|
90 | * ZMERGE_DB_TRYCOUNT if connection is lost, try to establish for several times before exiting |
---|
91 | * default: 5 |
---|
92 | * |
---|
93 | * ZMERGE_DB_TYPE type of the database used. |
---|
94 | * tested and supported is 'mysql' |
---|
95 | * |
---|
96 | * ZMERGE_DB_HOSTNAME hostname used connecting to the database |
---|
97 | * |
---|
98 | * ZMERGE_DB_USERNAME username used connecting to the database |
---|
99 | * (when database is not existent, needs to be an administrative user) |
---|
100 | * |
---|
101 | * ZMERGE_DB_PASSWORD password used connecting to the database |
---|
102 | * |
---|
103 | * ZMERGE_DB_DATABASE database name to save data |
---|
104 | * |
---|
105 | * ZMERGE_DB_DEBUGLEVEL advanced Pear::MDB options - consult MDB manual for details |
---|
106 | * |
---|
107 | * ZMERGE_DB_PORTABILITY advanced Pear::MDB options - consult MDB manual for details |
---|
108 | * |
---|
109 | */ |
---|
110 | define('ZMERGE_DB_TRYCOUNT', 5); |
---|
111 | |
---|
112 | define('ZMERGE_DB_TYPE', 'mysql'); |
---|
113 | define('ZMERGE_DB_HOSTNAME', 'localhost'); |
---|
114 | define('ZMERGE_DB_USERNAME', 'z-merge-agent'); |
---|
115 | define('ZMERGE_DB_PASSWORD', '%mysql_passwd%'); |
---|
116 | define('ZMERGE_DB_DATABASE', 'z-merge-agent'); |
---|
117 | |
---|
118 | define('ZMERGE_DB_DEBUGLEVEL', 2); |
---|
119 | define('ZMERGE_DB_PORTABILITY', MDB2_PORTABILITY_ALL); |
---|
120 | |
---|
121 | |
---|
122 | |
---|
123 | /** |
---|
124 | * Z-Merge server merge options |
---|
125 | * |
---|
126 | * SERVER_NAME Servername. Must be the same as configured in the Z-Merge DB (lastmodes table) |
---|
127 | * |
---|
128 | * SERVER_TYPE Servertype: SugarCRM or ZARAFA |
---|
129 | * |
---|
130 | * SERVER_URL URL of the Z-Merge SOAP connector on the server |
---|
131 | * |
---|
132 | * SERVER_PROXY Proxyinformation necessary to connect to the server (optional) |
---|
133 | * |
---|
134 | * SERVER_EVENTDRIVEN if the SOAP interface itself waits for change events |
---|
135 | * |
---|
136 | * SERVER_NOEVENTQUERY if the SOAP interface don't support events, |
---|
137 | * time before quering the server again for changes (default >5) |
---|
138 | * |
---|
139 | * SERVER_TIMEOUT seconds before timing out trying to reach the server |
---|
140 | * |
---|
141 | * SERVER_WAITTIMEOUT time in seconds to wait for an answer from the server |
---|
142 | * should be greater than configured on the server |
---|
143 | * |
---|
144 | * SERVER_DUPLICATOR indicates if this server is the best to produce duplicates. |
---|
145 | * in general that applies to a server who has real groups |
---|
146 | * |
---|
147 | */ |
---|
148 | $servers = array( |
---|
149 | // Zarafa Server |
---|
150 | array( |
---|
151 | SERVER_NAME => "Zarafa", |
---|
152 | SERVER_TYPE => ZARAFA, |
---|
153 | SERVER_URL => "http://127.0.0.1/syn3/z-merge-zarafa", |
---|
154 | SERVER_USERNAME => "administrator", |
---|
155 | SERVER_PASSWORD => "syn3", |
---|
156 | SERVER_PROXY => array('host' => '', 'port' => '', 'username' => '', 'password' => ''), |
---|
157 | SERVER_EVENTDRIVEN => true, |
---|
158 | SERVER_NOEVENTQUERY => 5, |
---|
159 | SERVER_TIMEOUT => 10, |
---|
160 | SERVER_WAITTIMEOUT => 120, |
---|
161 | SERVER_DUPLICATOR => false, |
---|
162 | ), |
---|
163 | |
---|
164 | // SugarCRM Server |
---|
165 | array( |
---|
166 | SERVER_NAME => "Sugar", |
---|
167 | SERVER_TYPE => SUGARCRM, |
---|
168 | SERVER_URL => "http://127.0.0.1/syn3/sugarcrm", |
---|
169 | SERVER_USERNAME => "administrator", |
---|
170 | SERVER_PASSWORD => "syn3", |
---|
171 | SERVER_PROXY => array('host' => '', 'port' => '', 'username' => '', 'password' => ''), |
---|
172 | SERVER_EVENTDRIVEN => true, |
---|
173 | SERVER_NOEVENTQUERY => 5, |
---|
174 | SERVER_TIMEOUT => 10, |
---|
175 | SERVER_WAITTIMEOUT => 120, |
---|
176 | SERVER_DUPLICATOR => true, |
---|
177 | ), |
---|
178 | |
---|
179 | ); |
---|
180 | |
---|
181 | |
---|
182 | |
---|
183 | /** |
---|
184 | * Z-Merge conflict resolution options |
---|
185 | * |
---|
186 | * GENERAL_PROCEDURE What to do, if a duplicate is found (when offline synching). |
---|
187 | * options: DUPLICATE |
---|
188 | * |
---|
189 | * DUPLICATION_INDICATION Updates a field in each ObjectType with a indication. |
---|
190 | * default: true |
---|
191 | * |
---|
192 | * DUPLICATION_INDICATE_FIELD For each type of object, one or more fields can me |
---|
193 | * modified to indicate the conflict when duplicating. |
---|
194 | * |
---|
195 | * Possible values can be found in 'mergeObjects/SyncDefs.php'. |
---|
196 | * Each object you want to be modified, needs ONE field definition |
---|
197 | * You can define the string that should be prepended or appended to the variable. |
---|
198 | * Only normal variables can be used (STREAMER_VAR). |
---|
199 | * Only strings can be modified. |
---|
200 | * |
---|
201 | * ATTENTION: THE CHOOSEN VARIABLE MUST BE MAPPED IN EACH |
---|
202 | * ---------- SERVER-TRANSFORMATION-OBJECT CONNECTED IN THE SYSTEM |
---|
203 | * |
---|
204 | */ |
---|
205 | $conflict_resolution = array( |
---|
206 | GENERAL_PROCEDURE => DUPLICATE, |
---|
207 | DUPLICATION_INDICATION => true, |
---|
208 | DUPLICATION_INDICATE_FIELD => array( |
---|
209 | SYNC_POOMTASKS_SUBJECT => array('CONFLICT: ', SYNC_POOMTASKS_SUBJECT), |
---|
210 | SYNC_POOMCONTACTS_LASTNAME => array(SYNC_POOMCONTACTS_LASTNAME, ' (CONFLICT)'), |
---|
211 | SYNC_POOMCONTACTS_FILEAS => array('CONFLICT: ', SYNC_POOMCONTACTS_FILEAS), |
---|
212 | SYNC_POOMCAL_SUBJECT => array('CONFLICT: ', SYNC_POOMCAL_SUBJECT), |
---|
213 | SYNC_POOMNOTE_SUBJECT => array('CONFLICT: ', SYNC_POOMNOTE_SUBJECT), |
---|
214 | ) |
---|
215 | ); |
---|
216 | |
---|
217 | |
---|
218 | ?> |
---|