Test Failed
Push — master ( cd42b5...841446 )
by
unknown
16:44 queued 06:09
created
defaults.php 1 patch
Indentation   +326 added lines, -326 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
 
9 9
 // Comment next line to disable the config check (or set FALSE to log the config errors)
10 10
 if (!defined("CONFIG_CHECK")) {
11
-	define("CONFIG_CHECK", true);
11
+    define("CONFIG_CHECK", true);
12 12
 }
13 13
 if (!defined("CONFIG_CHECK_COOKIES_HTTP")) {
14
-	define("CONFIG_CHECK_COOKIES_HTTP", false);
14
+    define("CONFIG_CHECK_COOKIES_HTTP", false);
15 15
 }
16 16
 if (!defined("CONFIG_CHECK_COOKIES_SSL")) {
17
-	define("CONFIG_CHECK_COOKIES_SSL", false);
17
+    define("CONFIG_CHECK_COOKIES_SSL", false);
18 18
 }
19 19
 
20 20
 // Time that the state files are allowed to survive (in seconds)
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
 // for kernels 2.6.30 and above relatime is enabled by default, and the relatime_interval is set to
23 23
 // 24 hours.
24 24
 if (!defined("STATE_FILE_MAX_LIFETIME")) {
25
-	define("STATE_FILE_MAX_LIFETIME", 28 * 60 * 60);
25
+    define("STATE_FILE_MAX_LIFETIME", 28 * 60 * 60);
26 26
 }
27 27
 
28 28
 // Time that attachments are allowed to survive (in seconds)
29 29
 if (!defined("UPLOADED_ATTACHMENT_MAX_LIFETIME")) {
30
-	define("UPLOADED_ATTACHMENT_MAX_LIFETIME", 6 * 60 * 60);
30
+    define("UPLOADED_ATTACHMENT_MAX_LIFETIME", 6 * 60 * 60);
31 31
 }
32 32
 
33 33
 // Set true to show public folders in hierarchy, false will disable public folders in hierarchy.
34 34
 if (!defined("ENABLE_PUBLIC_FOLDERS")) {
35
-	define("ENABLE_PUBLIC_FOLDERS", true);
35
+    define("ENABLE_PUBLIC_FOLDERS", true);
36 36
 }
37 37
 
38 38
 /*
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
  * Set to false to hide the setting and disable file previewer for all users
41 41
  */
42 42
 if (!defined("ENABLE_FILE_PREVIEWER")) {
43
-	define("ENABLE_FILE_PREVIEWER", true);
43
+    define("ENABLE_FILE_PREVIEWER", true);
44 44
 }
45 45
 
46 46
 /*
47 47
  * Enable iconsets.
48 48
  */
49 49
 if (!defined("ENABLE_ICONSETS")) {
50
-	define("ENABLE_ICONSETS", true);
50
+    define("ENABLE_ICONSETS", true);
51 51
 }
52 52
 
53 53
 /*
@@ -58,51 +58,51 @@  discard block
 block discarded – undo
58 58
  * he does not have read permissions to forward e-mail to his own mailbox and read it anyway.
59 59
  */
60 60
 if (!defined("ENABLE_SHARED_RULES")) {
61
-	define("ENABLE_SHARED_RULES", false);
61
+    define("ENABLE_SHARED_RULES", false);
62 62
 }
63 63
 
64 64
 // Enable GZIP compression for responses
65 65
 if (!defined("ENABLE_RESPONSE_COMPRESSION")) {
66
-	define("ENABLE_RESPONSE_COMPRESSION", true);
66
+    define("ENABLE_RESPONSE_COMPRESSION", true);
67 67
 }
68 68
 
69 69
 // Type of full-text search engine in sqlite
70 70
 if (!defined("SQLITE_FTS_ENGINE")) {
71
-	define("SQLITE_FTS_ENGINE", "fts5");
71
+    define("SQLITE_FTS_ENGINE", "fts5");
72 72
 }
73 73
 
74 74
 // Tokenizer for sqlite full text search engine
75 75
 // can be simple, unicode61, icu, ascii, porter
76 76
 if (!defined("SQLITE_FTS_TOKENIZER")) {
77
-	define("SQLITE_FTS_TOKENIZER", "unicode61");
77
+    define("SQLITE_FTS_TOKENIZER", "unicode61");
78 78
 }
79 79
 
80 80
 /*
81 81
  * When set to true this enable the fitlering of the HTML body using DOMPurify.
82 82
  */
83 83
 if (!defined("ENABLE_DOMPURIFY_FILTER")) {
84
-	define("ENABLE_DOMPURIFY_FILTER", true);
84
+    define("ENABLE_DOMPURIFY_FILTER", true);
85 85
 }
86 86
 
87 87
 /*
88 88
  * Set to false to enable login with Single Sign-On (SSO) on SSO environments.
89 89
  */
90 90
 if (!defined("ENABLE_REMOTE_USER_LOGIN")) {
91
-	define("ENABLE_REMOTE_USER_LOGIN", true);
91
+    define("ENABLE_REMOTE_USER_LOGIN", true);
92 92
 }
93 93
 
94 94
 /*
95 95
  * When set to false this disables the welcome screen shown to new users.
96 96
  */
97 97
 if (!defined("ENABLE_WELCOME_SCREEN")) {
98
-	define("ENABLE_WELCOME_SCREEN", true);
98
+    define("ENABLE_WELCOME_SCREEN", true);
99 99
 }
100 100
 
101 101
 /*
102 102
  * Set to true to disable the "What's new dialog" that will be shown to users to introduce new features.
103 103
  */
104 104
 if (!defined("ENABLE_WHATS_NEW_DIALOG")) {
105
-	define("ENABLE_WHATS_NEW_DIALOG", true);
105
+    define("ENABLE_WHATS_NEW_DIALOG", true);
106 106
 }
107 107
 
108 108
 /*
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
  * which, when enabled, prevents the full GAB to be loaded'
111 111
  */
112 112
 if (!defined("ENABLE_FULL_GAB")) {
113
-	define("ENABLE_FULL_GAB", true);
113
+    define("ENABLE_FULL_GAB", true);
114 114
 }
115 115
 
116 116
 /*
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
  * Set to 0 to disable this feature and show all results.
120 120
  */
121 121
 if (!defined("MAX_GAB_RESULTS")) {
122
-	define("MAX_GAB_RESULTS", 0);
122
+    define("MAX_GAB_RESULTS", 0);
123 123
 }
124 124
 
125 125
 /*
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
  * as it may increase address-book loading time.
128 128
  */
129 129
 if (!defined("ENABLE_PUBLIC_CONTACT_FOLDERS")) {
130
-	define("ENABLE_PUBLIC_CONTACT_FOLDERS", false);
130
+    define("ENABLE_PUBLIC_CONTACT_FOLDERS", false);
131 131
 }
132 132
 
133 133
 /*
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
  * which, when enabled, may cause delay in loading of address-book
136 136
  */
137 137
 if (!defined("ENABLE_SHARED_CONTACT_FOLDERS")) {
138
-	define("ENABLE_SHARED_CONTACT_FOLDERS", false);
138
+    define("ENABLE_SHARED_CONTACT_FOLDERS", false);
139 139
 }
140 140
 
141 141
 /*
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
  * which means it loads all members.
145 145
  */
146 146
 if (!defined("ABITEMDETAILS_MAX_NUM_DISTLIST_MEMBERS")) {
147
-	define("ABITEMDETAILS_MAX_NUM_DISTLIST_MEMBERS", 0);
147
+    define("ABITEMDETAILS_MAX_NUM_DISTLIST_MEMBERS", 0);
148 148
 }
149 149
 
150 150
 /*
@@ -153,45 +153,45 @@  discard block
 block discarded – undo
153 153
  * Booking method (true = direct booking, false = send meeting request)
154 154
  */
155 155
 if (!defined("ENABLE_DIRECT_BOOKING")) {
156
-	define("ENABLE_DIRECT_BOOKING", true);
156
+    define("ENABLE_DIRECT_BOOKING", true);
157 157
 }
158 158
 
159 159
 /*
160 160
  * Defines enabled languages
161 161
  */
162 162
 if (!defined('ENABLED_LANGUAGES')) {
163
-	define(
164
-		"ENABLED_LANGUAGES",
165
-		"af_ZA;am_ET;ar_SA;as_IN;az_AZ;" .
166
-	"be_BY;bg_BG;bn_BD;bn_IN;bs_BA;" .
167
-	"ca_ES;ca_ES@valencia;cs_CZ;cy_GB;" .
168
-	"da_DK;de_DE;el_GR;en_US;es_ES;et_EE;eu_ES;" .
169
-	"fa_IR;fi_FI;fil_PH;fr_FR;" .
170
-	"ga_IE;gd_GB;gl_ES;gu_IN;" .
171
-	"he_IL;hi_IN;hr_HR;hu_HU;hy_AM;" .
172
-	"id_ID;is_IS;it_IT;" .
173
-	"ja_JP;" .
174
-	"ka_GE;kk_KZ;km_KH;kn_IN;ko_KR;kok_IN;ky_KG;" .
175
-	"lb_LU;lt_LT;lv_LV;" .
176
-	"mi_NZ;mk_MK;ml_IN;mn_MN;mr_IN;ms_MY;mt_MT;" .
177
-	"nb_NO;ne_NP;nl_NL;nn_NO;" .
178
-	"or_IN;" .
179
-	"pa_IN;pl_PL;prs_AF;pt_BR;pt_PT;" .
180
-	"quz_PE;" .
181
-	"ro_RO;ru_RU;" .
182
-	"sd_IN;si_LK;sk_SK;sl_SI;sq_AL;sr_RS;sr_RS@latin;sv_SE;sw_KE;" .
183
-	"ta_IN;te_IN;th_TH;tk_TM;tr_TR;tt_RU;" .
184
-	"ug_CN;uk_UA;ur_PK;uz_UZ;" .
185
-	"vi_VN;" .
186
-	"zh_CN;zh_TW"
187
-	);
163
+    define(
164
+        "ENABLED_LANGUAGES",
165
+        "af_ZA;am_ET;ar_SA;as_IN;az_AZ;" .
166
+    "be_BY;bg_BG;bn_BD;bn_IN;bs_BA;" .
167
+    "ca_ES;ca_ES@valencia;cs_CZ;cy_GB;" .
168
+    "da_DK;de_DE;el_GR;en_US;es_ES;et_EE;eu_ES;" .
169
+    "fa_IR;fi_FI;fil_PH;fr_FR;" .
170
+    "ga_IE;gd_GB;gl_ES;gu_IN;" .
171
+    "he_IL;hi_IN;hr_HR;hu_HU;hy_AM;" .
172
+    "id_ID;is_IS;it_IT;" .
173
+    "ja_JP;" .
174
+    "ka_GE;kk_KZ;km_KH;kn_IN;ko_KR;kok_IN;ky_KG;" .
175
+    "lb_LU;lt_LT;lv_LV;" .
176
+    "mi_NZ;mk_MK;ml_IN;mn_MN;mr_IN;ms_MY;mt_MT;" .
177
+    "nb_NO;ne_NP;nl_NL;nn_NO;" .
178
+    "or_IN;" .
179
+    "pa_IN;pl_PL;prs_AF;pt_BR;pt_PT;" .
180
+    "quz_PE;" .
181
+    "ro_RO;ru_RU;" .
182
+    "sd_IN;si_LK;sk_SK;sl_SI;sq_AL;sr_RS;sr_RS@latin;sv_SE;sw_KE;" .
183
+    "ta_IN;te_IN;th_TH;tk_TM;tr_TR;tt_RU;" .
184
+    "ug_CN;uk_UA;ur_PK;uz_UZ;" .
185
+    "vi_VN;" .
186
+    "zh_CN;zh_TW"
187
+    );
188 188
 }
189 189
 
190 190
 /*
191 191
  * Defines the base URL where the User Manual for grommunio Web can be found
192 192
  */
193 193
 if (!defined("PLUGIN_WEBAPPMANUAL_URL")) {
194
-	define("PLUGIN_WEBAPPMANUAL_URL", "https://docs.grommunio.com/web");
194
+    define("PLUGIN_WEBAPPMANUAL_URL", "https://docs.grommunio.com/web");
195 195
 }
196 196
 
197 197
 /*
@@ -202,42 +202,42 @@  discard block
 block discarded – undo
202 202
  * not need to be added here.
203 203
  */
204 204
 if (!defined("REDIRECT_ALLOWED_DOMAINS")) {
205
-	define("REDIRECT_ALLOWED_DOMAINS", '');
205
+    define("REDIRECT_ALLOWED_DOMAINS", '');
206 206
 }
207 207
 
208 208
 /*
209 209
  * Enable plugins
210 210
  */
211 211
 if (!defined("ENABLE_PLUGINS")) {
212
-	define("ENABLE_PLUGINS", true);
212
+    define("ENABLE_PLUGINS", true);
213 213
 }
214 214
 
215 215
 /*
216 216
  * Defines the plugin directory
217 217
  */
218 218
 if (!defined("PATH_PLUGIN_CONFIG_DIR")) {
219
-	define("PATH_PLUGIN_CONFIG_DIR", PATH_PLUGIN_DIR);
219
+    define("PATH_PLUGIN_CONFIG_DIR", PATH_PLUGIN_DIR);
220 220
 }
221 221
 
222 222
 /*
223 223
  * Enable widgets/today context.
224 224
  */
225 225
 if (!defined("ENABLE_WIDGETS")) {
226
-	define("ENABLE_WIDGETS", true);
226
+    define("ENABLE_WIDGETS", true);
227 227
 }
228 228
 
229 229
 /*
230 230
  * Defines a list of plugins that cannot be disabled by users.
231 231
  */
232 232
 if (!defined("ALWAYS_ENABLED_PLUGINS_LIST")) {
233
-	define("ALWAYS_ENABLED_PLUGINS_LIST", "");
233
+    define("ALWAYS_ENABLED_PLUGINS_LIST", "");
234 234
 }
235 235
 
236 236
 /*
237 237
  * Enable themes.
238 238
  */
239 239
 if (!defined("ENABLE_THEMES")) {
240
-	define("ENABLE_THEMES", true);
240
+    define("ENABLE_THEMES", true);
241 241
 }
242 242
 
243 243
 /*
@@ -245,144 +245,144 @@  discard block
 block discarded – undo
245 245
  * The theme should the (directory)name of a installed theme plugin.
246 246
  */
247 247
 if (!defined("THEME")) {
248
-	define("THEME", "");
248
+    define("THEME", "");
249 249
 }
250 250
 
251 251
 /*
252 252
  * Use the classic icons as default iconset
253 253
  */
254 254
 if (!defined("ICONSET")) {
255
-	define("ICONSET", "breeze");
255
+    define("ICONSET", "breeze");
256 256
 }
257 257
 
258 258
 /*
259 259
  * Disable/enabled advanced settings
260 260
  */
261 261
 if (!defined("ENABLE_ADVANCED_SETTINGS")) {
262
-	define("ENABLE_ADVANCED_SETTINGS", false);
262
+    define("ENABLE_ADVANCED_SETTINGS", false);
263 263
 }
264 264
 
265 265
 /*
266 266
  * Freebusy start offset that will be used to load freebusy data in appointments, number is subtracted from current time
267 267
  */
268 268
 if (!defined("FREEBUSY_LOAD_START_OFFSET")) {
269
-	define("FREEBUSY_LOAD_START_OFFSET", 7);
269
+    define("FREEBUSY_LOAD_START_OFFSET", 7);
270 270
 }
271 271
 
272 272
 /*
273 273
  * Freebusy end offset that will be used to load freebusy data in appointments, number is added to current time
274 274
  */
275 275
 if (!defined("FREEBUSY_LOAD_END_OFFSET")) {
276
-	define("FREEBUSY_LOAD_END_OFFSET", 90);
276
+    define("FREEBUSY_LOAD_END_OFFSET", 90);
277 277
 }
278 278
 
279 279
 /*
280 280
  * Maximum eml files to be included in a single ZIP archive
281 281
  */
282 282
 if (!defined("MAX_EML_FILES_IN_ZIP")) {
283
-	define("MAX_EML_FILES_IN_ZIP", 50);
283
+    define("MAX_EML_FILES_IN_ZIP", 50);
284 284
 }
285 285
 
286 286
 /*
287 287
  * CONTACT_PREFIX used for contact name
288 288
  */
289 289
 if (!defined("CONTACT_PREFIX")) {
290
-	define("CONTACT_PREFIX", false);
290
+    define("CONTACT_PREFIX", false);
291 291
 }
292 292
 
293 293
 /*
294 294
  * CONTACT_SUFFIX used for contact name
295 295
  */
296 296
 if (!defined("CONTACT_SUFFIX")) {
297
-	define("CONTACT_SUFFIX", false);
297
+    define("CONTACT_SUFFIX", false);
298 298
 }
299 299
 
300 300
 /*
301 301
  * Color schemes used for the calendars
302 302
  */
303 303
 if (!defined("COLOR_SCHEMES")) {
304
-	define("COLOR_SCHEMES", json_encode([
305
-		[
306
-			'name' => 'pink',
307
-			'displayName' => _('Pink'),
308
-			'base' => '#ff0099',
309
-		],
310
-		[
311
-			'name' => 'charmpink',
312
-			'displayName' => _('Charm pink'),
313
-			'base' => '#f17daa',
314
-		],
315
-		[
316
-			'name' => 'cadmiumred',
317
-			'displayName' => _('Cadmium red'),
318
-			'base' => '#e30022',
319
-		],
320
-		[
321
-			'name' => 'apricot',
322
-			'displayName' => _('Apricot'),
323
-			'base' => '#f7b884',
324
-		],
325
-		[
326
-			'name' => 'california',
327
-			'displayName' => _('California'),
328
-			'base' => '#f89406',
329
-		],
330
-		[
331
-			'name' => 'yellow',
332
-			'displayName' => _('Yellow'),
333
-			'base' => '#f7ca18',
334
-		],
335
-		[
336
-			'name' => 'softgreen',
337
-			'displayName' => _('Soft green'),
338
-			'base' => '#d3e28b',
339
-		],
340
-		[
341
-			'name' => 'green',
342
-			'displayName' => _('Green'),
343
-			'base' => '#5ab557',
344
-		],
345
-		[
346
-			'name' => 'mint',
347
-			'displayName' => _('Mint'),
348
-			'base' => '#1fa480',
349
-		],
350
-		[
351
-			'name' => 'pearlaqua',
352
-			'displayName' => _('Pearl aqua'),
353
-			'base' => '#88d8c0',
354
-		],
355
-		[
356
-			'name' => 'grommunioblue',
357
-			'displayName' => _('Grommunio blue'),
358
-			'base' => '#00b3f0',
359
-		],
360
-		[
361
-			'name' => 'babyblue',
362
-			'displayName' => _('Baby blue'),
363
-			'base' => '#7bd0f0',
364
-		],
365
-		[
366
-			'name' => 'blue',
367
-			'displayName' => _('Blue'),
368
-			'base' => '#0f70bd',
369
-		],
370
-		[
371
-			'name' => 'mauve',
372
-			'displayName' => _('Mauve'),
373
-			'base' => '#9a8bbc',
374
-		],
375
-		[
376
-			'name' => 'purple',
377
-			'displayName' => _('Purple'),
378
-			'base' => '#912787',
379
-		],
380
-		[
381
-			'name' => 'silversand',
382
-			'displayName' => _('Silver sand'),
383
-			'base' => '#bdc3c7',
384
-		],
385
-	]));
304
+    define("COLOR_SCHEMES", json_encode([
305
+        [
306
+            'name' => 'pink',
307
+            'displayName' => _('Pink'),
308
+            'base' => '#ff0099',
309
+        ],
310
+        [
311
+            'name' => 'charmpink',
312
+            'displayName' => _('Charm pink'),
313
+            'base' => '#f17daa',
314
+        ],
315
+        [
316
+            'name' => 'cadmiumred',
317
+            'displayName' => _('Cadmium red'),
318
+            'base' => '#e30022',
319
+        ],
320
+        [
321
+            'name' => 'apricot',
322
+            'displayName' => _('Apricot'),
323
+            'base' => '#f7b884',
324
+        ],
325
+        [
326
+            'name' => 'california',
327
+            'displayName' => _('California'),
328
+            'base' => '#f89406',
329
+        ],
330
+        [
331
+            'name' => 'yellow',
332
+            'displayName' => _('Yellow'),
333
+            'base' => '#f7ca18',
334
+        ],
335
+        [
336
+            'name' => 'softgreen',
337
+            'displayName' => _('Soft green'),
338
+            'base' => '#d3e28b',
339
+        ],
340
+        [
341
+            'name' => 'green',
342
+            'displayName' => _('Green'),
343
+            'base' => '#5ab557',
344
+        ],
345
+        [
346
+            'name' => 'mint',
347
+            'displayName' => _('Mint'),
348
+            'base' => '#1fa480',
349
+        ],
350
+        [
351
+            'name' => 'pearlaqua',
352
+            'displayName' => _('Pearl aqua'),
353
+            'base' => '#88d8c0',
354
+        ],
355
+        [
356
+            'name' => 'grommunioblue',
357
+            'displayName' => _('Grommunio blue'),
358
+            'base' => '#00b3f0',
359
+        ],
360
+        [
361
+            'name' => 'babyblue',
362
+            'displayName' => _('Baby blue'),
363
+            'base' => '#7bd0f0',
364
+        ],
365
+        [
366
+            'name' => 'blue',
367
+            'displayName' => _('Blue'),
368
+            'base' => '#0f70bd',
369
+        ],
370
+        [
371
+            'name' => 'mauve',
372
+            'displayName' => _('Mauve'),
373
+            'base' => '#9a8bbc',
374
+        ],
375
+        [
376
+            'name' => 'purple',
377
+            'displayName' => _('Purple'),
378
+            'base' => '#912787',
379
+        ],
380
+        [
381
+            'name' => 'silversand',
382
+            'displayName' => _('Silver sand'),
383
+            'base' => '#bdc3c7',
384
+        ],
385
+    ]));
386 386
 }
387 387
 
388 388
 /*
@@ -396,201 +396,201 @@  discard block
 block discarded – undo
396 396
  * flags will be shown as categories in grommunio Web.
397 397
  */
398 398
 if (!defined("DEFAULT_CATEGORIES")) {
399
-	define("DEFAULT_CATEGORIES", json_encode([
400
-		[
401
-			'name' => _('Red'),
402
-			'color' => '#e40023',
403
-			'standardIndex' => 6,
404
-			'quickAccess' => true,
405
-			'sortIndex' => 0,
406
-			'used' => false,
407
-		],
408
-		[
409
-			'name' => _('Orange'),
410
-			'color' => '#f99406',
411
-			'standardIndex' => 2,
412
-			'quickAccess' => true,
413
-			'sortIndex' => 1,
414
-			'used' => false,
415
-		],
416
-		[
417
-			'name' => _('Yellow'),
418
-			'color' => '#f7ca17',
419
-			'standardIndex' => 4,
420
-			'quickAccess' => true,
421
-			'sortIndex' => 2,
422
-			'used' => false,
423
-		],
424
-		[
425
-			'name' => _('Green'),
426
-			'color' => '#5ab556',
427
-			'standardIndex' => 3,
428
-			'quickAccess' => true,
429
-			'sortIndex' => 3,
430
-			'used' => false,
431
-		],
432
-		[
433
-			'name' => _('Blue'),
434
-			'color' => '#0f70bd',
435
-			'standardIndex' => 5,
436
-			'quickAccess' => true,
437
-			'sortIndex' => 4,
438
-			'used' => false,
439
-		],
440
-		[
441
-			'name' => _('Purple'),
442
-			'color' => '#912887',
443
-			'standardIndex' => 1,
444
-			'quickAccess' => true,
445
-			'sortIndex' => 5,
446
-			'used' => false,
447
-		],
448
-		[
449
-			'name' => _('Important'),
450
-			'color' => '#F4B7B5',
451
-		],
452
-		[
453
-			'name' => _('Work'),
454
-			'color' => '#B6CAE9',
455
-		],
456
-		[
457
-			'name' => _('Personal'),
458
-			'color' => '#D9E9B6',
459
-		],
460
-		[
461
-			'name' => _('Holiday'),
462
-			'color' => '#EBDA6C',
463
-		],
464
-		[
465
-			'name' => _('Required'),
466
-			'color' => '#E9DAB6',
467
-		],
468
-		[
469
-			'name' => _('Travel Required'),
470
-			'color' => '#B6DDE9',
471
-		],
472
-		[
473
-			'name' => _('Preparation Required'),
474
-			'color' => '#B6B6E9',
475
-		],
476
-		[
477
-			'name' => _('Birthday'),
478
-			'color' => '#DCB6E9',
479
-		],
480
-		[
481
-			'name' => _('Special Date'),
482
-			'color' => '#E9BBB6',
483
-		],
484
-		[
485
-			'name' => _('Phone Interview'),
486
-			'color' => '#C1E9B6',
487
-		],
488
-		[
489
-			'name' => _('Business'),
490
-			'color' => '#BDC3C7',
491
-		],
492
-		[
493
-			'name' => _('Competition'),
494
-			'color' => '#BDC3C7',
495
-		],
496
-		[
497
-			'name' => _('Favorites'),
498
-			'color' => '#BDC3C7',
499
-		],
500
-		[
501
-			'name' => _('Gifts'),
502
-			'color' => '#BDC3C7',
503
-		],
504
-		[
505
-			'name' => _('Goals/Objectives'),
506
-			'color' => '#BDC3C7',
507
-		],
508
-		[
509
-			'name' => _('Holiday Cards'),
510
-			'color' => '#BDC3C7',
511
-		],
512
-		[
513
-			'name' => _('Hot Contacts'),
514
-			'color' => '#BDC3C7',
515
-		],
516
-		[
517
-			'name' => _('Ideas'),
518
-			'color' => '#BDC3C7',
519
-		],
520
-		[
521
-			'name' => _('International'),
522
-			'color' => '#BDC3C7',
523
-		],
524
-		[
525
-			'name' => _('Key Customer'),
526
-			'color' => '#BDC3C7',
527
-		],
528
-		[
529
-			'name' => _('Miscellaneous'),
530
-			'color' => '#BDC3C7',
531
-		],
532
-		[
533
-			'name' => _('Phone Calls'),
534
-			'color' => '#BDC3C7',
535
-		],
536
-		[
537
-			'name' => _('Status'),
538
-			'color' => '#BDC3C7',
539
-		],
540
-		[
541
-			'name' => _('Strategies'),
542
-			'color' => '#BDC3C7',
543
-		],
544
-		[
545
-			'name' => _('Suppliers'),
546
-			'color' => '#BDC3C7',
547
-		],
548
-		[
549
-			'name' => _('Time & Expenses'),
550
-			'color' => '#BDC3C7',
551
-		],
552
-		[
553
-			'name' => _('VIP'),
554
-			'color' => '#BDC3C7',
555
-		],
556
-		[
557
-			'name' => _('Waiting'),
558
-			'color' => '#BDC3C7',
559
-		],
560
-	]));
399
+    define("DEFAULT_CATEGORIES", json_encode([
400
+        [
401
+            'name' => _('Red'),
402
+            'color' => '#e40023',
403
+            'standardIndex' => 6,
404
+            'quickAccess' => true,
405
+            'sortIndex' => 0,
406
+            'used' => false,
407
+        ],
408
+        [
409
+            'name' => _('Orange'),
410
+            'color' => '#f99406',
411
+            'standardIndex' => 2,
412
+            'quickAccess' => true,
413
+            'sortIndex' => 1,
414
+            'used' => false,
415
+        ],
416
+        [
417
+            'name' => _('Yellow'),
418
+            'color' => '#f7ca17',
419
+            'standardIndex' => 4,
420
+            'quickAccess' => true,
421
+            'sortIndex' => 2,
422
+            'used' => false,
423
+        ],
424
+        [
425
+            'name' => _('Green'),
426
+            'color' => '#5ab556',
427
+            'standardIndex' => 3,
428
+            'quickAccess' => true,
429
+            'sortIndex' => 3,
430
+            'used' => false,
431
+        ],
432
+        [
433
+            'name' => _('Blue'),
434
+            'color' => '#0f70bd',
435
+            'standardIndex' => 5,
436
+            'quickAccess' => true,
437
+            'sortIndex' => 4,
438
+            'used' => false,
439
+        ],
440
+        [
441
+            'name' => _('Purple'),
442
+            'color' => '#912887',
443
+            'standardIndex' => 1,
444
+            'quickAccess' => true,
445
+            'sortIndex' => 5,
446
+            'used' => false,
447
+        ],
448
+        [
449
+            'name' => _('Important'),
450
+            'color' => '#F4B7B5',
451
+        ],
452
+        [
453
+            'name' => _('Work'),
454
+            'color' => '#B6CAE9',
455
+        ],
456
+        [
457
+            'name' => _('Personal'),
458
+            'color' => '#D9E9B6',
459
+        ],
460
+        [
461
+            'name' => _('Holiday'),
462
+            'color' => '#EBDA6C',
463
+        ],
464
+        [
465
+            'name' => _('Required'),
466
+            'color' => '#E9DAB6',
467
+        ],
468
+        [
469
+            'name' => _('Travel Required'),
470
+            'color' => '#B6DDE9',
471
+        ],
472
+        [
473
+            'name' => _('Preparation Required'),
474
+            'color' => '#B6B6E9',
475
+        ],
476
+        [
477
+            'name' => _('Birthday'),
478
+            'color' => '#DCB6E9',
479
+        ],
480
+        [
481
+            'name' => _('Special Date'),
482
+            'color' => '#E9BBB6',
483
+        ],
484
+        [
485
+            'name' => _('Phone Interview'),
486
+            'color' => '#C1E9B6',
487
+        ],
488
+        [
489
+            'name' => _('Business'),
490
+            'color' => '#BDC3C7',
491
+        ],
492
+        [
493
+            'name' => _('Competition'),
494
+            'color' => '#BDC3C7',
495
+        ],
496
+        [
497
+            'name' => _('Favorites'),
498
+            'color' => '#BDC3C7',
499
+        ],
500
+        [
501
+            'name' => _('Gifts'),
502
+            'color' => '#BDC3C7',
503
+        ],
504
+        [
505
+            'name' => _('Goals/Objectives'),
506
+            'color' => '#BDC3C7',
507
+        ],
508
+        [
509
+            'name' => _('Holiday Cards'),
510
+            'color' => '#BDC3C7',
511
+        ],
512
+        [
513
+            'name' => _('Hot Contacts'),
514
+            'color' => '#BDC3C7',
515
+        ],
516
+        [
517
+            'name' => _('Ideas'),
518
+            'color' => '#BDC3C7',
519
+        ],
520
+        [
521
+            'name' => _('International'),
522
+            'color' => '#BDC3C7',
523
+        ],
524
+        [
525
+            'name' => _('Key Customer'),
526
+            'color' => '#BDC3C7',
527
+        ],
528
+        [
529
+            'name' => _('Miscellaneous'),
530
+            'color' => '#BDC3C7',
531
+        ],
532
+        [
533
+            'name' => _('Phone Calls'),
534
+            'color' => '#BDC3C7',
535
+        ],
536
+        [
537
+            'name' => _('Status'),
538
+            'color' => '#BDC3C7',
539
+        ],
540
+        [
541
+            'name' => _('Strategies'),
542
+            'color' => '#BDC3C7',
543
+        ],
544
+        [
545
+            'name' => _('Suppliers'),
546
+            'color' => '#BDC3C7',
547
+        ],
548
+        [
549
+            'name' => _('Time & Expenses'),
550
+            'color' => '#BDC3C7',
551
+        ],
552
+        [
553
+            'name' => _('VIP'),
554
+            'color' => '#BDC3C7',
555
+        ],
556
+        [
557
+            'name' => _('Waiting'),
558
+            'color' => '#BDC3C7',
559
+        ],
560
+    ]));
561 561
 }
562 562
 
563 563
 /*
564 564
  * Maximum reminder items we can show on client side.
565 565
  */
566 566
 if (!defined("MAX_NUM_REMINDERS")) {
567
-	define("MAX_NUM_REMINDERS", 99);
567
+    define("MAX_NUM_REMINDERS", 99);
568 568
 }
569 569
 
570 570
 /*
571 571
  * Set true to default soft delete the shared store items
572 572
  */
573 573
 if (!defined("ENABLE_DEFAULT_SOFT_DELETE")) {
574
-	define("ENABLE_DEFAULT_SOFT_DELETE", false);
574
+    define("ENABLE_DEFAULT_SOFT_DELETE", false);
575 575
 }
576 576
 
577 577
 /*
578 578
  * Shared store polling timer in minutes
579 579
  */
580 580
 if (!defined("SHARED_STORE_POLLING_INTERVAL")) {
581
-	define("SHARED_STORE_POLLING_INTERVAL", 15);
581
+    define("SHARED_STORE_POLLING_INTERVAL", 15);
582 582
 }
583 583
 
584 584
 /*
585 585
  * Prefetch email count
586 586
  */
587 587
 if (!defined("PREFETCH_EMAIL_COUNT")) {
588
-	define("PREFETCH_EMAIL_COUNT", 10);
588
+    define("PREFETCH_EMAIL_COUNT", 10);
589 589
 }
590 590
 
591 591
 // Define the interval between loading of new emails in the background.
592 592
 if (!defined("PREFETCH_EMAIL_INTERVAL")) {
593
-	define("PREFETCH_EMAIL_INTERVAL", 30);
593
+    define("PREFETCH_EMAIL_INTERVAL", 30);
594 594
 }
595 595
 
596 596
 /*\
@@ -600,52 +600,52 @@  discard block
 block discarded – undo
600 600
 // Options for TinyMCE's powerpaste plugin, see https://www.tiny.cloud/docs/plugins/powerpaste/#configurationoptions
601 601
 // for more details.
602 602
 if (!defined("POWERPASTE_WORD_IMPORT")) {
603
-	define("POWERPASTE_WORD_IMPORT", "merge");
603
+    define("POWERPASTE_WORD_IMPORT", "merge");
604 604
 }
605 605
 if (!defined("POWERPASTE_HTML_IMPORT")) {
606
-	define("POWERPASTE_HTML_IMPORT", "merge");
606
+    define("POWERPASTE_HTML_IMPORT", "merge");
607 607
 }
608 608
 if (!defined("POWERPASTE_ALLOW_LOCAL_IMAGES")) {
609
-	define("POWERPASTE_ALLOW_LOCAL_IMAGES", true);
609
+    define("POWERPASTE_ALLOW_LOCAL_IMAGES", true);
610 610
 }
611 611
 
612 612
 /*
613 613
  * Defaults for sqlite search index
614 614
  */
615 615
 if (!defined("MAX_FTS_RESULT_ITEMS")) {
616
-	define("MAX_FTS_RESULT_ITEMS", 2000);
616
+    define("MAX_FTS_RESULT_ITEMS", 2000);
617 617
 }
618 618
 
619 619
 /*
620 620
  * The following options are taken from the debug.php
621 621
  */
622 622
 if (!defined("DEBUG_LOADER")) {
623
-	define("DEBUG_LOADER", LOAD_RELEASE);
623
+    define("DEBUG_LOADER", LOAD_RELEASE);
624 624
 }
625 625
 if (!defined("DEBUG_JSONOUT")) {
626
-	define("DEBUG_JSONOUT", false);
626
+    define("DEBUG_JSONOUT", false);
627 627
 }
628 628
 if (!defined("DEBUG_JSONOUT_DIR")) {
629
-	define("DEBUG_JSONOUT_DIR", 'debug_json/');
629
+    define("DEBUG_JSONOUT_DIR", 'debug_json/');
630 630
 }
631 631
 if (!defined("DEBUG_JSONOUT_GZIP")) {
632
-	define("DEBUG_JSONOUT_GZIP", false);
632
+    define("DEBUG_JSONOUT_GZIP", false);
633 633
 }
634 634
 if (!defined("DEBUG_PLUGINS")) {
635
-	define("DEBUG_PLUGINS", false);
635
+    define("DEBUG_PLUGINS", false);
636 636
 }
637 637
 if (!defined("DEBUG_PLUGINS_DISABLE_CACHE")) {
638
-	define("DEBUG_PLUGINS_DISABLE_CACHE", false);
638
+    define("DEBUG_PLUGINS_DISABLE_CACHE", false);
639 639
 }
640 640
 if (!defined("DEBUG_DUMP_FILE")) {
641
-	define("DEBUG_DUMP_FILE", "debug.txt");
641
+    define("DEBUG_DUMP_FILE", "debug.txt");
642 642
 }
643 643
 
644 644
 /*
645 645
  * Defaults for Logger
646 646
  */
647 647
 if (!defined("LOG_USER_LEVEL")) {
648
-	define("LOG_USER_LEVEL", LOGLEVEL_OFF);
648
+    define("LOG_USER_LEVEL", LOGLEVEL_OFF);
649 649
 }
650 650
 
651 651
 // To save e.g. user activity data only for selected users, provide the username followed by semicolon.
@@ -653,14 +653,14 @@  discard block
 block discarded – undo
653 653
 // Users have to be encapsulated in quotes, several users are semicolon separated, like:
654 654
 // define('LOG_USERS', 'user1;user2;user3');
655 655
 if (!defined("LOG_USERS")) {
656
-	define("LOG_USERS", "");
656
+    define("LOG_USERS", "");
657 657
 }
658 658
 
659 659
 // Location of the log directory
660 660
 // e.g /var/log/grommunio/
661 661
 if (!defined("LOG_FILE_DIR")) {
662
-	define("LOG_FILE_DIR", "");
662
+    define("LOG_FILE_DIR", "");
663 663
 }
664 664
 if (!defined("LOG_SUCCESSFUL_LOGINS")) {
665
-	define("LOG_SUCCESSFUL_LOGINS", false);
665
+    define("LOG_SUCCESSFUL_LOGINS", false);
666 666
 }
Please login to merge, or discard this patch.
grommunio.php 2 patches
Indentation   +175 added lines, -175 removed lines patch added patch discarded remove patch
@@ -1,181 +1,181 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-	/**
4
-	 * This file is the dispatcher of the whole application, every request for data enters
5
-	 * here. JSON is received and send to the client.
6
-	 */
7
-
8
-	// Bootstrap the script
9
-	require_once 'server/includes/bootstrap.grommunio.php';
10
-
11
-	// Callback function for unserialize
12
-	// Notifier objects of the previous request are stored in the session. With this
13
-	// function they are restored to PHP objects.
14
-	ini_set("unserialize_callback_func", "sessionNotifierLoader");
15
-
16
-	// Try to authenticate the user
17
-	WebAppAuthentication::authenticate();
18
-
19
-	// Globals suck, but we use it still in many files, so we will
20
-	// store the mapisession as global
21
-	$GLOBALS["mapisession"] = WebAppAuthentication::getMapiSession();
22
-
23
-	// Get the language from the session
24
-	// before we close the session.
25
-	if (isset($_SESSION["lang"])) {
26
-		$session_lang = $_SESSION["lang"];
27
-	}
28
-	else {
29
-		$session_lang = LANG;
30
-	}
31
-
32
-	// Set headers for JSON
33
-	header("Content-Type: application/json; charset=utf-8");
34
-	header("Expires: " . gmdate("D, d M Y H:i:s") . "GMT");
35
-	header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
36
-	header("Cache-Control: no-cache, must-revalidate");
37
-	header("Pragma: no-cache");
38
-	if (WebAppAuthentication::isAuthenticated()) {
39
-		header("X-grommunio: " . trim(file_get_contents(BASE_PATH . 'version')));
40
-	}
41
-
42
-	// If a service request was sent (a REST call), the service controller will handle it.
43
-	if (isset($_GET['service'])) {
44
-		require_once BASE_PATH . 'server/includes/controllers/service.php';
45
-
46
-		exit();
47
-	}
48
-
49
-	// Close the session now, so we're not blocking other requests
50
-	session_write_close();
51
-
52
-	// If a ping request was sent, we the ping controller will handle it.
53
-	if (isset($_GET['ping'])) {
54
-		require_once BASE_PATH . 'server/includes/controllers/ping.php';
55
-
56
-		exit();
57
-	}
58
-
59
-	if (!WebAppAuthentication::isAuthenticated()) {
60
-		if (WebAppAuthentication::getErrorCode() === MAPI_E_NETWORK_ERROR) {
61
-			// The user is not logged in because the Gromox server could not be reached.
62
-			// Return a HTTP 503 error so the client can act upon this event correctly.
63
-			header('HTTP/1.1 503 Service unavailable');
64
-			header("X-grommunio-Hresult: " . get_mapi_error_name(WebAppAuthentication::getErrorCode()));
65
-		}
66
-		else {
67
-			// The session expired, or the user is otherwise not logged on.
68
-			// Return a HTTP 401 error so the client can act upon this event correctly.
69
-			header('HTTP/1.1 401 Unauthorized');
70
-			header("X-grommunio-Hresult: " . get_mapi_error_name(WebAppAuthentication::getErrorCode()));
71
-		}
72
-
73
-		exit();
74
-	}
75
-
76
-	// Instantiate Plugin Manager
77
-	$GLOBALS['PluginManager'] = new PluginManager(ENABLE_PLUGINS);
78
-	$GLOBALS['PluginManager']->detectPlugins(DISABLED_PLUGINS_LIST);
79
-
80
-	// Initialize plugins and prevent any output which might be written as
81
-	// plugins might be uncleanly output white-space and other stuff. We must
82
-	// not allow this here as it can destroy the response data.
83
-	ob_start();
84
-	$GLOBALS['PluginManager']->initPlugins(DEBUG_LOADER);
85
-	ob_end_clean();
86
-
87
-	// Create global dispatcher object
88
-	$GLOBALS["dispatcher"] = new Dispatcher();
89
-
90
-	// Create global operations object
91
-	$GLOBALS["operations"] = new Operations();
92
-
93
-	// Create global language object
94
-	$Language = new Language();
95
-
96
-	// Create global settings object
97
-	$GLOBALS["settings"] = new Settings($Language);
98
-
99
-	// Set the correct language
100
-	$Language->setLanguage($session_lang);
101
-
102
-	// Get the state information for this subsystem
103
-	$subsystem = sanitizeGetValue('subsystem', 'anonymous', ID_REGEX);
104
-
105
-	$state = new State($subsystem);
106
-
107
-	// Lock the state of this subsystem
108
-	$state->open();
109
-
110
-	// Get the bus object for this subsystem
111
-	$bus = $state->read("bus");
112
-
113
-	if (!$bus) {
114
-		// Create global bus object
115
-		$bus = new Bus();
116
-	}
117
-
118
-	// Make bus global
119
-	$GLOBALS["bus"] = $bus;
120
-
121
-	// Reset any spurious information in the bus state
122
-	$GLOBALS["bus"]->reset();
123
-
124
-	// Create global properties object
125
-	$properties = $state->read("properties");
126
-
127
-	if (!$properties) {
128
-		$properties = new Properties();
129
-	}
130
-	$GLOBALS["properties"] = $properties;
131
-
132
-	// Reset any spurious information in the properties state
133
-	$GLOBALS["properties"]->reset();
134
-
135
-	// Create new request object
136
-	$request = new JSONRequest();
137
-
138
-	// Get the JSON that the client sent with the request
139
-	$json = readData();
140
-
141
-	if (DEBUG_JSONOUT) {
142
-		dump_json($json, "in"); // debugging
143
-	}
144
-
145
-	// Execute the request
146
-	try {
147
-		$json = $request->execute($json);
148
-	}
149
-	catch (Exception $e) {
150
-		// invalid requestdata exception
151
-		dump($e);
152
-	}
153
-
154
-	if (DEBUG_JSONOUT) {
155
-		dump_json($json, "out"); // debugging
156
-	}
157
-
158
-	// Check if we can use gzip compression
159
-	if (ENABLE_RESPONSE_COMPRESSION && function_exists("gzencode") && isset($_SERVER["HTTP_ACCEPT_ENCODING"]) && strpos($_SERVER["HTTP_ACCEPT_ENCODING"], "gzip") !== false) {
160
-		// Set the correct header and compress the response
161
-		header("Content-Encoding: gzip");
162
-		echo gzencode($json);
163
-	}
164
-	else {
165
-		echo $json;
166
-	}
3
+    /**
4
+     * This file is the dispatcher of the whole application, every request for data enters
5
+     * here. JSON is received and send to the client.
6
+     */
7
+
8
+    // Bootstrap the script
9
+    require_once 'server/includes/bootstrap.grommunio.php';
10
+
11
+    // Callback function for unserialize
12
+    // Notifier objects of the previous request are stored in the session. With this
13
+    // function they are restored to PHP objects.
14
+    ini_set("unserialize_callback_func", "sessionNotifierLoader");
15
+
16
+    // Try to authenticate the user
17
+    WebAppAuthentication::authenticate();
18
+
19
+    // Globals suck, but we use it still in many files, so we will
20
+    // store the mapisession as global
21
+    $GLOBALS["mapisession"] = WebAppAuthentication::getMapiSession();
22
+
23
+    // Get the language from the session
24
+    // before we close the session.
25
+    if (isset($_SESSION["lang"])) {
26
+        $session_lang = $_SESSION["lang"];
27
+    }
28
+    else {
29
+        $session_lang = LANG;
30
+    }
31
+
32
+    // Set headers for JSON
33
+    header("Content-Type: application/json; charset=utf-8");
34
+    header("Expires: " . gmdate("D, d M Y H:i:s") . "GMT");
35
+    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
36
+    header("Cache-Control: no-cache, must-revalidate");
37
+    header("Pragma: no-cache");
38
+    if (WebAppAuthentication::isAuthenticated()) {
39
+        header("X-grommunio: " . trim(file_get_contents(BASE_PATH . 'version')));
40
+    }
41
+
42
+    // If a service request was sent (a REST call), the service controller will handle it.
43
+    if (isset($_GET['service'])) {
44
+        require_once BASE_PATH . 'server/includes/controllers/service.php';
45
+
46
+        exit();
47
+    }
48
+
49
+    // Close the session now, so we're not blocking other requests
50
+    session_write_close();
51
+
52
+    // If a ping request was sent, we the ping controller will handle it.
53
+    if (isset($_GET['ping'])) {
54
+        require_once BASE_PATH . 'server/includes/controllers/ping.php';
55
+
56
+        exit();
57
+    }
58
+
59
+    if (!WebAppAuthentication::isAuthenticated()) {
60
+        if (WebAppAuthentication::getErrorCode() === MAPI_E_NETWORK_ERROR) {
61
+            // The user is not logged in because the Gromox server could not be reached.
62
+            // Return a HTTP 503 error so the client can act upon this event correctly.
63
+            header('HTTP/1.1 503 Service unavailable');
64
+            header("X-grommunio-Hresult: " . get_mapi_error_name(WebAppAuthentication::getErrorCode()));
65
+        }
66
+        else {
67
+            // The session expired, or the user is otherwise not logged on.
68
+            // Return a HTTP 401 error so the client can act upon this event correctly.
69
+            header('HTTP/1.1 401 Unauthorized');
70
+            header("X-grommunio-Hresult: " . get_mapi_error_name(WebAppAuthentication::getErrorCode()));
71
+        }
72
+
73
+        exit();
74
+    }
75
+
76
+    // Instantiate Plugin Manager
77
+    $GLOBALS['PluginManager'] = new PluginManager(ENABLE_PLUGINS);
78
+    $GLOBALS['PluginManager']->detectPlugins(DISABLED_PLUGINS_LIST);
79
+
80
+    // Initialize plugins and prevent any output which might be written as
81
+    // plugins might be uncleanly output white-space and other stuff. We must
82
+    // not allow this here as it can destroy the response data.
83
+    ob_start();
84
+    $GLOBALS['PluginManager']->initPlugins(DEBUG_LOADER);
85
+    ob_end_clean();
86
+
87
+    // Create global dispatcher object
88
+    $GLOBALS["dispatcher"] = new Dispatcher();
89
+
90
+    // Create global operations object
91
+    $GLOBALS["operations"] = new Operations();
92
+
93
+    // Create global language object
94
+    $Language = new Language();
95
+
96
+    // Create global settings object
97
+    $GLOBALS["settings"] = new Settings($Language);
98
+
99
+    // Set the correct language
100
+    $Language->setLanguage($session_lang);
101
+
102
+    // Get the state information for this subsystem
103
+    $subsystem = sanitizeGetValue('subsystem', 'anonymous', ID_REGEX);
104
+
105
+    $state = new State($subsystem);
106
+
107
+    // Lock the state of this subsystem
108
+    $state->open();
109
+
110
+    // Get the bus object for this subsystem
111
+    $bus = $state->read("bus");
112
+
113
+    if (!$bus) {
114
+        // Create global bus object
115
+        $bus = new Bus();
116
+    }
117
+
118
+    // Make bus global
119
+    $GLOBALS["bus"] = $bus;
120
+
121
+    // Reset any spurious information in the bus state
122
+    $GLOBALS["bus"]->reset();
123
+
124
+    // Create global properties object
125
+    $properties = $state->read("properties");
126
+
127
+    if (!$properties) {
128
+        $properties = new Properties();
129
+    }
130
+    $GLOBALS["properties"] = $properties;
131
+
132
+    // Reset any spurious information in the properties state
133
+    $GLOBALS["properties"]->reset();
134
+
135
+    // Create new request object
136
+    $request = new JSONRequest();
137
+
138
+    // Get the JSON that the client sent with the request
139
+    $json = readData();
140
+
141
+    if (DEBUG_JSONOUT) {
142
+        dump_json($json, "in"); // debugging
143
+    }
144
+
145
+    // Execute the request
146
+    try {
147
+        $json = $request->execute($json);
148
+    }
149
+    catch (Exception $e) {
150
+        // invalid requestdata exception
151
+        dump($e);
152
+    }
153
+
154
+    if (DEBUG_JSONOUT) {
155
+        dump_json($json, "out"); // debugging
156
+    }
157
+
158
+    // Check if we can use gzip compression
159
+    if (ENABLE_RESPONSE_COMPRESSION && function_exists("gzencode") && isset($_SERVER["HTTP_ACCEPT_ENCODING"]) && strpos($_SERVER["HTTP_ACCEPT_ENCODING"], "gzip") !== false) {
160
+        // Set the correct header and compress the response
161
+        header("Content-Encoding: gzip");
162
+        echo gzencode($json);
163
+    }
164
+    else {
165
+        echo $json;
166
+    }
167 167
 
168
-	// Reset the BUS, and save it to the state file
169
-	$GLOBALS["bus"]->reset();
170
-	$state->write("bus", $GLOBALS["bus"], false);
168
+    // Reset the BUS, and save it to the state file
169
+    $GLOBALS["bus"]->reset();
170
+    $state->write("bus", $GLOBALS["bus"], false);
171 171
 
172
-	// Reset the properties and save it to the state file
173
-	$GLOBALS["properties"]->reset();
174
-	$state->write("properties", $GLOBALS["properties"], false);
172
+    // Reset the properties and save it to the state file
173
+    $GLOBALS["properties"]->reset();
174
+    $state->write("properties", $GLOBALS["properties"], false);
175 175
 
176
-	// Write all changes to disk
177
-	$state->flush();
176
+    // Write all changes to disk
177
+    $state->flush();
178 178
 
179
-	// You can skip this as well because the lock is freed after the PHP script ends
180
-	// anyway. (only for PHP < 5.3.2)
181
-	$state->close();
179
+    // You can skip this as well because the lock is freed after the PHP script ends
180
+    // anyway. (only for PHP < 5.3.2)
181
+    $state->close();
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
 	// before we close the session.
25 25
 	if (isset($_SESSION["lang"])) {
26 26
 		$session_lang = $_SESSION["lang"];
27
-	}
28
-	else {
27
+	} else {
29 28
 		$session_lang = LANG;
30 29
 	}
31 30
 
@@ -62,8 +61,7 @@  discard block
 block discarded – undo
62 61
 			// Return a HTTP 503 error so the client can act upon this event correctly.
63 62
 			header('HTTP/1.1 503 Service unavailable');
64 63
 			header("X-grommunio-Hresult: " . get_mapi_error_name(WebAppAuthentication::getErrorCode()));
65
-		}
66
-		else {
64
+		} else {
67 65
 			// The session expired, or the user is otherwise not logged on.
68 66
 			// Return a HTTP 401 error so the client can act upon this event correctly.
69 67
 			header('HTTP/1.1 401 Unauthorized');
@@ -145,8 +143,7 @@  discard block
 block discarded – undo
145 143
 	// Execute the request
146 144
 	try {
147 145
 		$json = $request->execute($json);
148
-	}
149
-	catch (Exception $e) {
146
+	} catch (Exception $e) {
150 147
 		// invalid requestdata exception
151 148
 		dump($e);
152 149
 	}
@@ -160,8 +157,7 @@  discard block
 block discarded – undo
160 157
 		// Set the correct header and compress the response
161 158
 		header("Content-Encoding: gzip");
162 159
 		echo gzencode($json);
163
-	}
164
-	else {
160
+	} else {
165 161
 		echo $json;
166 162
 	}
167 163
 
Please login to merge, or discard this patch.
init.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-	// Load the release files (concatenated, compressed)
4
-	define("LOAD_RELEASE", 1);
5
-	// Load the debug files (concatenated, not compressed)
6
-	define("LOAD_DEBUG", 2);
7
-	// Load the original source files (for developers)
8
-	define("LOAD_SOURCE", 3);
3
+    // Load the release files (concatenated, compressed)
4
+    define("LOAD_RELEASE", 1);
5
+    // Load the debug files (concatenated, not compressed)
6
+    define("LOAD_DEBUG", 2);
7
+    // Load the original source files (for developers)
8
+    define("LOAD_SOURCE", 3);
9 9
 
10
-	// Defines the base path on the server, terminated by a slash
11
-	define('BASE_PATH', realpath(dirname(__FILE__)) . '/');
10
+    // Defines the base path on the server, terminated by a slash
11
+    define('BASE_PATH', realpath(dirname(__FILE__)) . '/');
Please login to merge, or discard this patch.
tools/loadorder.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -15,27 +15,27 @@  discard block
 block discarded – undo
15 15
 include 'server/includes/core/class.pluginmanager.php';
16 16
 
17 17
 function create_arg($files) {
18
-	$output = '';
19
-	foreach ($files as $file) {
20
-		$output .= file_get_contents($file);
21
-	}
18
+    $output = '';
19
+    foreach ($files as $file) {
20
+        $output .= file_get_contents($file);
21
+    }
22 22
 
23
-	return $output;
23
+    return $output;
24 24
 }
25 25
 
26 26
 // Only include extjs-mod
27 27
 function filter_extjsmod($file) {
28
-	return strpos($file, "extjs-mod") !== false;
28
+    return strpos($file, "extjs-mod") !== false;
29 29
 }
30 30
 
31 31
 if ($argc < 3) {
32
-	exit("Usage: loadorder <extjs|grommunio> <filename>\n");
32
+    exit("Usage: loadorder <extjs|grommunio> <filename>\n");
33 33
 }
34 34
 
35 35
 $arg = $argv[1];
36 36
 $filename = $argv[2];
37 37
 if ($arg !== "extjs" && $arg !== "grommunio") {
38
-	exit("Invalid argument {$arg}");
38
+    exit("Invalid argument {$arg}");
39 39
 }
40 40
 
41 41
 # TODO: refactor pluginmanager out
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 $loader = new FileLoader();
44 44
 
45 45
 if ($arg === "extjs") {
46
-	$files = array_filter($loader->getExtjsJavascriptFiles(LOAD_SOURCE), "filter_extjsmod");
47
-	file_put_contents($filename, create_arg($files));
46
+    $files = array_filter($loader->getExtjsJavascriptFiles(LOAD_SOURCE), "filter_extjsmod");
47
+    file_put_contents($filename, create_arg($files));
48 48
 }
49 49
 
50 50
 if ($arg === "grommunio") {
51
-	$files = $loader->getZarafaJavascriptFiles(LOAD_SOURCE);
52
-	file_put_contents($filename, create_arg($files));
51
+    $files = $loader->getZarafaJavascriptFiles(LOAD_SOURCE);
52
+    file_put_contents($filename, create_arg($files));
53 53
 }
Please login to merge, or discard this patch.
plugins/maps/php/plugin.maps.php 1 patch
Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -6,87 +6,87 @@
 block discarded – undo
6 6
  * Makes possible to see contact location on openstreetmap
7 7
  */
8 8
 class Pluginmaps extends Plugin {
9
-	public function __construct() {
10
-	}
9
+    public function __construct() {
10
+    }
11 11
 
12
-	/**
13
-	 * Function initializes the Plugin and registers all hooks.
14
-	 */
15
-	public function init() {
16
-		$this->registerHook('server.core.settings.init.before');
17
-		$this->registerHook('server.main.include.cssfiles');
18
-		$this->registerHook('server.main.include.jsfiles');
19
-	}
12
+    /**
13
+     * Function initializes the Plugin and registers all hooks.
14
+     */
15
+    public function init() {
16
+        $this->registerHook('server.core.settings.init.before');
17
+        $this->registerHook('server.main.include.cssfiles');
18
+        $this->registerHook('server.main.include.jsfiles');
19
+    }
20 20
 
21
-	/**
22
-	 * Function is executed when a hook is triggered by the PluginManager.
23
-	 *
24
-	 * @param string $eventID the id of the triggered hook
25
-	 * @param mixed  $data    object(s) related to the hook
26
-	 */
27
-	public function execute($eventID, &$data) {
28
-		switch ($eventID) {
29
-			case 'server.core.settings.init.before':
30
-				$this->injectPluginSettings($data);
31
-				break;
21
+    /**
22
+     * Function is executed when a hook is triggered by the PluginManager.
23
+     *
24
+     * @param string $eventID the id of the triggered hook
25
+     * @param mixed  $data    object(s) related to the hook
26
+     */
27
+    public function execute($eventID, &$data) {
28
+        switch ($eventID) {
29
+            case 'server.core.settings.init.before':
30
+                $this->injectPluginSettings($data);
31
+                break;
32 32
 
33
-			case 'server.main.include.jsfiles':
34
-				$this->addLeafletJsFile($data);
35
-				break;
33
+            case 'server.main.include.jsfiles':
34
+                $this->addLeafletJsFile($data);
35
+                break;
36 36
 
37
-			case 'server.main.include.cssfiles':
38
-				$this->addLeafletCssFile($data);
39
-				break;
40
-		}
41
-	}
37
+            case 'server.main.include.cssfiles':
38
+                $this->addLeafletCssFile($data);
39
+                break;
40
+        }
41
+    }
42 42
 
43
-	/**
44
-	 * Function includes the the files necessary for using
45
-	 * leaflet.
46
-	 *
47
-	 *  @param $data
48
-	 */
49
-	public function addLeafletJsFile(&$data) {
50
-		// make sure to load remote files only when plugin is enabled
51
-		if ($GLOBALS['settings']->get('zarafa/v1/plugins/maps/enable') == true) {
52
-			// removing https: provides protocols compatibility, especially in IE9
53
-			$data['files'][] = 'plugins/maps/js/external/leaflet.js';
54
-			$data['files'][] = 'plugins/maps/js/external/geocoder.js';
55
-		}
56
-	}
43
+    /**
44
+     * Function includes the the files necessary for using
45
+     * leaflet.
46
+     *
47
+     *  @param $data
48
+     */
49
+    public function addLeafletJsFile(&$data) {
50
+        // make sure to load remote files only when plugin is enabled
51
+        if ($GLOBALS['settings']->get('zarafa/v1/plugins/maps/enable') == true) {
52
+            // removing https: provides protocols compatibility, especially in IE9
53
+            $data['files'][] = 'plugins/maps/js/external/leaflet.js';
54
+            $data['files'][] = 'plugins/maps/js/external/geocoder.js';
55
+        }
56
+    }
57 57
 
58
-	/**
59
-	 * Function includes the the files necessary for using
60
-	 * leaflet.
61
-	 *
62
-	 *  @param $data
63
-	 */
64
-	public function addLeafletCssFile(&$data) {
65
-		// make sure to load remote files only when plugin is enabled
66
-		if ($GLOBALS['settings']->get('zarafa/v1/plugins/maps/enable') == true) {
67
-			// removing https: provides protocols compatibility, especially in IE9
68
-			$data['files'][] = 'plugins/maps/resources/css/leaflet.css';
69
-			$data['files'][] = 'plugins/maps/resources/css/geocoder.css';
70
-		}
71
-	}
58
+    /**
59
+     * Function includes the the files necessary for using
60
+     * leaflet.
61
+     *
62
+     *  @param $data
63
+     */
64
+    public function addLeafletCssFile(&$data) {
65
+        // make sure to load remote files only when plugin is enabled
66
+        if ($GLOBALS['settings']->get('zarafa/v1/plugins/maps/enable') == true) {
67
+            // removing https: provides protocols compatibility, especially in IE9
68
+            $data['files'][] = 'plugins/maps/resources/css/leaflet.css';
69
+            $data['files'][] = 'plugins/maps/resources/css/geocoder.css';
70
+        }
71
+    }
72 72
 
73
-	/**
74
-	 * Called when the core Settings class is initialized and ready to accept sysadmin default
75
-	 * settings. Registers the sysadmin defaults for the Maps plugin.
76
-	 *
77
-	 * @param array $data Reference to the data of the triggered hook
78
-	 */
79
-	public function injectPluginSettings(&$data) {
80
-		$data['settingsObj']->addSysAdminDefaults([
81
-			'zarafa' => [
82
-				'v1' => [
83
-					'plugins' => [
84
-						'maps' => [
85
-							'enable' => PLUGIN_MAPS_USER_DEFAULT_ENABLE,
86
-						],
87
-					],
88
-				],
89
-			],
90
-		]);
91
-	}
73
+    /**
74
+     * Called when the core Settings class is initialized and ready to accept sysadmin default
75
+     * settings. Registers the sysadmin defaults for the Maps plugin.
76
+     *
77
+     * @param array $data Reference to the data of the triggered hook
78
+     */
79
+    public function injectPluginSettings(&$data) {
80
+        $data['settingsObj']->addSysAdminDefaults([
81
+            'zarafa' => [
82
+                'v1' => [
83
+                    'plugins' => [
84
+                        'maps' => [
85
+                            'enable' => PLUGIN_MAPS_USER_DEFAULT_ENABLE,
86
+                        ],
87
+                    ],
88
+                ],
89
+            ],
90
+        ]);
91
+    }
92 92
 }
Please login to merge, or discard this patch.
plugins/archive/php/plugin.archive.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -4,51 +4,51 @@
 block discarded – undo
4 4
  * Plugin which will enable desktop notifications for new mails.
5 5
  */
6 6
 class PluginArchive extends Plugin {
7
-	/**
8
-	 * Function initializes the Plugin and registers all hooks.
9
-	 */
10
-	public function init() {
11
-		$this->registerHook('server.core.settings.init.before');
12
-	}
7
+    /**
8
+     * Function initializes the Plugin and registers all hooks.
9
+     */
10
+    public function init() {
11
+        $this->registerHook('server.core.settings.init.before');
12
+    }
13 13
 
14
-	/**
15
-	 * Function is executed when a hook is triggered by the PluginManager.
16
-	 *
17
-	 * @param string $eventID the id of the triggered hook
18
-	 * @param mixed  $data    object(s) related to the hook
19
-	 */
20
-	public function execute($eventID, &$data) {
21
-		switch ($eventID) {
22
-			case 'server.core.settings.init.before':
23
-				$this->injectPluginSettings($data);
24
-				break;
25
-		}
26
-	}
14
+    /**
15
+     * Function is executed when a hook is triggered by the PluginManager.
16
+     *
17
+     * @param string $eventID the id of the triggered hook
18
+     * @param mixed  $data    object(s) related to the hook
19
+     */
20
+    public function execute($eventID, &$data) {
21
+        switch ($eventID) {
22
+            case 'server.core.settings.init.before':
23
+                $this->injectPluginSettings($data);
24
+                break;
25
+        }
26
+    }
27 27
 
28
-	/**
29
-	 * Called when the core Settings class is initialized and ready to accept sysadmin default
30
-	 * settings. Registers the sysadmin defaults for the desktopnotifications plugin.
31
-	 *
32
-	 * @param array $data Reference to the data of the triggered hook
33
-	 */
34
-	public function injectPluginSettings(&$data) {
35
-		$defaultIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjYuMDA5IiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMi42MTMxIiBkPSJNNC4yMTMgMy4wMDVjLS4zMjggMC0uNjE0LjEwMy0uODQuMzQ4LS4yNDYuMjQ2LS4zNjguNTMyLS4zNjguODR2MjguNDQ2YzAgLjMwOC4xMjIuNTczLjM2OC43NzguMjI2LjIwNS41MTIuMzA4Ljg0LjMwOGgxMjAuNDYzYy4zMjggMCAuNjE0LS4xMDMuODQtLjMwOC4yNDYtLjIwNS4zNjgtLjQ3MS4zNjgtLjc3OFY0LjE5MmMwLS4zMDgtLjEyMi0uNTk0LS4zNjgtLjg0LS4yMjYtLjI0NS0uNTEyLS4zNDgtLjg0LS4zNDhINC4yMTN2LjAwMXptNiAzMC43OTNjLS4yMzUgMC0uNDcxLjEwMy0uNjc1LjMwNy0uMTg1LjIwNS0uMjg3LjQ0LS4yODcuNjU2djc3LjQ0MmMwIC4yMTYuMTAzLjQ1MS4yODcuNjU1YS45MS45MSAwIDAgMCAuNjc1LjI4N2gxMDguNDYyYS45MS45MSAwIDAgMCAuNjc2LS4yODdjLjE4NS0uMjA0LjI4Ny0uNDMuMjg3LS42NTVWMzQuNzYxYzAtLjIyNi0uMTAzLS40NTEtLjI4Ny0uNjU2LS4yMDQtLjIwNC0uNDM5LS4zMDctLjY3Ni0uMzA3SDEwLjIxM2gwem0zNy43ODYgMTguNDNIODAuODljMS43NjIgMCAzLjI1Ny42MTQgNC40ODUgMS44NDQgMS4yNDkgMS4yNDkgMS44NjMgMi43NDQgMS44NjMgNC41MDVoMGMwIDEuNzYxLS42MTQgMy4yNzctMS44NjMgNC41NjctMS4yMjkgMS4yNy0yLjcyNSAxLjkyNS00LjQ4NSAxLjkyNUg0Ny45OTljLTEuNzYxIDAtMy4yNTctLjY1NS00LjQ4NS0xLjkyNS0xLjI0OS0xLjI5LTEuODYzLTIuODA3LTEuODYzLTQuNTY3aDBjMC0xLjc2MS42MTQtMy4yNTYgMS44NjMtNC41MDUgMS4yMjgtMS4yMyAyLjcyMy0xLjg0NCA0LjQ4NS0xLjg0NGgweiIgZmlsbD0iIzZkNmQ3MCIvPjwvc3ZnPgo=';
36
-		$pluginData = [
37
-			'enable' => PLUGIN_ARCHIVE_USER_DEFAULT_ENABLE,
38
-			'button-title' => _('Archive'),
39
-			'url' => PLUGIN_ARCHIVE_URL,
40
-			'autostart' => defined('PLUGIN_ARCHIVE_AUTOSTART') ? (bool) PLUGIN_ARCHIVE_AUTOSTART : false,
41
-			'icon' => $defaultIcon,
42
-		];
28
+    /**
29
+     * Called when the core Settings class is initialized and ready to accept sysadmin default
30
+     * settings. Registers the sysadmin defaults for the desktopnotifications plugin.
31
+     *
32
+     * @param array $data Reference to the data of the triggered hook
33
+     */
34
+    public function injectPluginSettings(&$data) {
35
+        $defaultIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjYuMDA5IiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMi42MTMxIiBkPSJNNC4yMTMgMy4wMDVjLS4zMjggMC0uNjE0LjEwMy0uODQuMzQ4LS4yNDYuMjQ2LS4zNjguNTMyLS4zNjguODR2MjguNDQ2YzAgLjMwOC4xMjIuNTczLjM2OC43NzguMjI2LjIwNS41MTIuMzA4Ljg0LjMwOGgxMjAuNDYzYy4zMjggMCAuNjE0LS4xMDMuODQtLjMwOC4yNDYtLjIwNS4zNjgtLjQ3MS4zNjgtLjc3OFY0LjE5MmMwLS4zMDgtLjEyMi0uNTk0LS4zNjgtLjg0LS4yMjYtLjI0NS0uNTEyLS4zNDgtLjg0LS4zNDhINC4yMTN2LjAwMXptNiAzMC43OTNjLS4yMzUgMC0uNDcxLjEwMy0uNjc1LjMwNy0uMTg1LjIwNS0uMjg3LjQ0LS4yODcuNjU2djc3LjQ0MmMwIC4yMTYuMTAzLjQ1MS4yODcuNjU1YS45MS45MSAwIDAgMCAuNjc1LjI4N2gxMDguNDYyYS45MS45MSAwIDAgMCAuNjc2LS4yODdjLjE4NS0uMjA0LjI4Ny0uNDMuMjg3LS42NTVWMzQuNzYxYzAtLjIyNi0uMTAzLS40NTEtLjI4Ny0uNjU2LS4yMDQtLjIwNC0uNDM5LS4zMDctLjY3Ni0uMzA3SDEwLjIxM2gwem0zNy43ODYgMTguNDNIODAuODljMS43NjIgMCAzLjI1Ny42MTQgNC40ODUgMS44NDQgMS4yNDkgMS4yNDkgMS44NjMgMi43NDQgMS44NjMgNC41MDVoMGMwIDEuNzYxLS42MTQgMy4yNzctMS44NjMgNC41NjctMS4yMjkgMS4yNy0yLjcyNSAxLjkyNS00LjQ4NSAxLjkyNUg0Ny45OTljLTEuNzYxIDAtMy4yNTctLjY1NS00LjQ4NS0xLjkyNS0xLjI0OS0xLjI5LTEuODYzLTIuODA3LTEuODYzLTQuNTY3aDBjMC0xLjc2MS42MTQtMy4yNTYgMS44NjMtNC41MDUgMS4yMjgtMS4yMyAyLjcyMy0xLjg0NCA0LjQ4NS0xLjg0NGgweiIgZmlsbD0iIzZkNmQ3MCIvPjwvc3ZnPgo=';
36
+        $pluginData = [
37
+            'enable' => PLUGIN_ARCHIVE_USER_DEFAULT_ENABLE,
38
+            'button-title' => _('Archive'),
39
+            'url' => PLUGIN_ARCHIVE_URL,
40
+            'autostart' => defined('PLUGIN_ARCHIVE_AUTOSTART') ? (bool) PLUGIN_ARCHIVE_AUTOSTART : false,
41
+            'icon' => $defaultIcon,
42
+        ];
43 43
 
44
-		$data['settingsObj']->addSysAdminDefaults([
45
-			'zarafa' => [
46
-				'v1' => [
47
-					'plugins' => [
48
-						'archive' => $pluginData,
49
-					],
50
-				],
51
-			],
52
-		]);
53
-	}
44
+        $data['settingsObj']->addSysAdminDefaults([
45
+            'zarafa' => [
46
+                'v1' => [
47
+                    'plugins' => [
48
+                        'archive' => $pluginData,
49
+                    ],
50
+                ],
51
+            ],
52
+        ]);
53
+    }
54 54
 }
Please login to merge, or discard this patch.
plugins/meet/config.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 define('MEET_DEFAULTS', [
4
-	// Base URL of your Meet installation:
5
-	'server' => 'https://' . $_SERVER['HTTP_HOST'] . '/meet/',
4
+    // Base URL of your Meet installation:
5
+    'server' => 'https://' . $_SERVER['HTTP_HOST'] . '/meet/',
6 6
 
7
-	// Uncomment to enable the plugin by default
8
-	// 'enable' => true,
7
+    // Uncomment to enable the plugin by default
8
+    // 'enable' => true,
9 9
 
10
-	// Uncomment to change default meeting opening behaviour, possible values: web browser popup
11
-	'openin' => 'web',
10
+    // Uncomment to change default meeting opening behaviour, possible values: web browser popup
11
+    'openin' => 'web',
12 12
 
13
-	// Uncomment to hide the main toolbar button by default
14
-	// 'hidetabbarbutton' => true,
13
+    // Uncomment to hide the main toolbar button by default
14
+    // 'hidetabbarbutton' => true,
15 15
 
16
-	// Uncomment to disable addition of the meeting url to the location instead of overwriting
17
-	// 'locationoverride' => true,
16
+    // Uncomment to disable addition of the meeting url to the location instead of overwriting
17
+    // 'locationoverride' => true,
18 18
 
19
-	// Uncomment to disable protection of the url in the meeting location from automatic removal
20
-	// 'nolocationfix' => true,
19
+    // Uncomment to disable protection of the url in the meeting location from automatic removal
20
+    // 'nolocationfix' => true,
21 21
 
22
-	// Uncomment to disable addition of the Message template to appontments
23
-	// 'noinvitation' => true,
22
+    // Uncomment to disable addition of the Message template to appontments
23
+    // 'noinvitation' => true,
24 24
 
25
-	// Template for the meeting invitation, must contain %url% as a placeholder for the meeting url, text only
26
-	'invitationmessage' => '
25
+    // Template for the meeting invitation, must contain %url% as a placeholder for the meeting url, text only
26
+    'invitationmessage' => '
27 27
 ________________________________________________________________________________
28 28
 grommunio Meet
29 29
 Join the created meeting with your browser or mobile app.
Please login to merge, or discard this patch.
plugins/meet/php/settings.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class Pluginmeet extends Plugin {
4
-	public function init() {
5
-		$this->registerHook('server.core.settings.init.before');
6
-	}
4
+    public function init() {
5
+        $this->registerHook('server.core.settings.init.before');
6
+    }
7 7
 
8
-	/**
9
-	 * Function is executed when a hook is triggered by the PluginManager.
10
-	 *
11
-	 * @param string $eventID the id of the triggered hook
12
-	 * @param mixed  $data    object(s) related to the hook
13
-	 */
14
-	public function execute($eventID, &$data) {
15
-		if ($eventID == 'server.core.settings.init.before') {
16
-			$this->injectPluginSettings($data);
17
-		}
18
-	}
8
+    /**
9
+     * Function is executed when a hook is triggered by the PluginManager.
10
+     *
11
+     * @param string $eventID the id of the triggered hook
12
+     * @param mixed  $data    object(s) related to the hook
13
+     */
14
+    public function execute($eventID, &$data) {
15
+        if ($eventID == 'server.core.settings.init.before') {
16
+            $this->injectPluginSettings($data);
17
+        }
18
+    }
19 19
 
20
-	/**
21
-	 * Called when the core Settings class is initialized and ready to accept sysadmin default
22
-	 * settings.
23
-	 *
24
-	 * @param array $data Reference to the data of the triggered hook
25
-	 */
26
-	public function injectPluginSettings(&$data) {
27
-		if (defined('MEET_DEFAULTS') && is_array(MEET_DEFAULTS)) {
28
-			$data['settingsObj']->addSysAdminDefaults(
29
-				[
30
-					'zarafa' => [
31
-						'v1' => [
32
-							'plugins' => [
33
-								'meet' => MEET_DEFAULTS,
34
-							],
35
-						],
36
-					],
37
-				]
38
-			);
39
-		}
40
-	}
20
+    /**
21
+     * Called when the core Settings class is initialized and ready to accept sysadmin default
22
+     * settings.
23
+     *
24
+     * @param array $data Reference to the data of the triggered hook
25
+     */
26
+    public function injectPluginSettings(&$data) {
27
+        if (defined('MEET_DEFAULTS') && is_array(MEET_DEFAULTS)) {
28
+            $data['settingsObj']->addSysAdminDefaults(
29
+                [
30
+                    'zarafa' => [
31
+                        'v1' => [
32
+                            'plugins' => [
33
+                                'meet' => MEET_DEFAULTS,
34
+                            ],
35
+                        ],
36
+                    ],
37
+                ]
38
+            );
39
+        }
40
+    }
41 41
 }
Please login to merge, or discard this patch.
plugins/desktopnotifications/php/plugin.desktopnotifications.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -4,44 +4,44 @@
 block discarded – undo
4 4
  * Plugin which will enable desktop notifications for new mails.
5 5
  */
6 6
 class Plugindesktopnotifications extends Plugin {
7
-	/**
8
-	 * Function initializes the Plugin and registers all hooks.
9
-	 */
10
-	public function init() {
11
-		$this->registerHook('server.core.settings.init.before');
12
-	}
7
+    /**
8
+     * Function initializes the Plugin and registers all hooks.
9
+     */
10
+    public function init() {
11
+        $this->registerHook('server.core.settings.init.before');
12
+    }
13 13
 
14
-	/**
15
-	 * Function is executed when a hook is triggered by the PluginManager.
16
-	 *
17
-	 * @param string $eventID the id of the triggered hook
18
-	 * @param mixed  $data    object(s) related to the hook
19
-	 */
20
-	public function execute($eventID, &$data) {
21
-		switch ($eventID) {
22
-			case 'server.core.settings.init.before':
23
-				$this->injectPluginSettings($data);
24
-				break;
25
-		}
26
-	}
14
+    /**
15
+     * Function is executed when a hook is triggered by the PluginManager.
16
+     *
17
+     * @param string $eventID the id of the triggered hook
18
+     * @param mixed  $data    object(s) related to the hook
19
+     */
20
+    public function execute($eventID, &$data) {
21
+        switch ($eventID) {
22
+            case 'server.core.settings.init.before':
23
+                $this->injectPluginSettings($data);
24
+                break;
25
+        }
26
+    }
27 27
 
28
-	/**
29
-	 * Called when the core Settings class is initialized and ready to accept sysadmin default
30
-	 * settings. Registers the sysadmin defaults for the desktopnotifications plugin.
31
-	 *
32
-	 * @param array $data Reference to the data of the triggered hook
33
-	 */
34
-	public function injectPluginSettings(&$data) {
35
-		$data['settingsObj']->addSysAdminDefaults([
36
-			'zarafa' => [
37
-				'v1' => [
38
-					'plugins' => [
39
-						'desktopnotifications' => [
40
-							'enable' => PLUGIN_DESKTOPNOTIFICATION_USER_DEFAULT_ENABLE,
41
-						],
42
-					],
43
-				],
44
-			],
45
-		]);
46
-	}
28
+    /**
29
+     * Called when the core Settings class is initialized and ready to accept sysadmin default
30
+     * settings. Registers the sysadmin defaults for the desktopnotifications plugin.
31
+     *
32
+     * @param array $data Reference to the data of the triggered hook
33
+     */
34
+    public function injectPluginSettings(&$data) {
35
+        $data['settingsObj']->addSysAdminDefaults([
36
+            'zarafa' => [
37
+                'v1' => [
38
+                    'plugins' => [
39
+                        'desktopnotifications' => [
40
+                            'enable' => PLUGIN_DESKTOPNOTIFICATION_USER_DEFAULT_ENABLE,
41
+                        ],
42
+                    ],
43
+                ],
44
+            ],
45
+        ]);
46
+    }
47 47
 }
Please login to merge, or discard this patch.