Test Failed
Push — master ( cd42b5...841446 )
by
unknown
16:44 queued 06:09
created

defaults.php (1 issue)

Severity
1
<?php
2
/**
3
 * This file is used to set configuration options to a default value that have
4
 * not been set in the config.php.Each definition of a configuration value must
5
 * be preceded by 'if(!defined("KEY"))'
6
 */
7
8
require_once(__DIR__ . '/server/includes/core/constants.php');
9
10
// Comment next line to disable the config check (or set FALSE to log the config errors)
11
if(!defined("CONFIG_CHECK")) define("CONFIG_CHECK", TRUE);
12
if(!defined("CONFIG_CHECK_COOKIES_HTTP")) define("CONFIG_CHECK_COOKIES_HTTP", FALSE);
13
if(!defined("CONFIG_CHECK_COOKIES_SSL")) define("CONFIG_CHECK_COOKIES_SSL", FALSE);
14
15
// Time that the state files are allowed to survive (in seconds)
16
// For filesystems on which relatime is used, this value should be larger then the relatime_interval
17
// for kernels 2.6.30 and above relatime is enabled by default, and the relatime_interval is set to
18
// 24 hours.
19
if(!defined("STATE_FILE_MAX_LIFETIME")) define("STATE_FILE_MAX_LIFETIME", 28*60*60);
20
21
// Time that attachments are allowed to survive (in seconds)
22
if(!defined("UPLOADED_ATTACHMENT_MAX_LIFETIME")) define("UPLOADED_ATTACHMENT_MAX_LIFETIME", 6*60*60);
23
24
// Set true to show public folders in hierarchy, false will disable public folders in hierarchy.
25
if(!defined("ENABLE_PUBLIC_FOLDERS")) define("ENABLE_PUBLIC_FOLDERS", true);
26
27
/**
28
 * Set to true to give users the option to enable file previewer in their settings
29
 * Set to false to hide the setting and disable file previewer for all users
30
 */
31
if(!defined("ENABLE_FILE_PREVIEWER")) define("ENABLE_FILE_PREVIEWER", true);
32
33
/**
34
 * Enable iconsets.
35
 */
36
if(!defined("ENABLE_ICONSETS")) define("ENABLE_ICONSETS", true);
37
38
/**
39
 * Set to true to give users the possibility to edit and create mail filters on the store
40
 * of other users. The user needs owner permissions on the store and folder permissions on
41
 * the inbox of the other user.
42
 * SECURITY NOTE: This makes it possible for a user to create a filter on a folder for which
43
 * he does not have read permissions to forward e-mail to his own mailbox and read it anyway.
44
 */
45
if(!defined("ENABLE_SHARED_RULES")) define("ENABLE_SHARED_RULES", false);
46
47
// Enable GZIP compression for responses
48
if(!defined("ENABLE_RESPONSE_COMPRESSION")) define("ENABLE_RESPONSE_COMPRESSION", true);
49
50
// Type of full-text search engine in sqlite
51
if(!defined("SQLITE_FTS_ENGINE")) define("SQLITE_FTS_ENGINE", "fts5");
52
53
// Tokenizer for sqlite full text search engine
54
// can be simple, unicode61, icu, ascii, porter
55
if(!defined("SQLITE_FTS_TOKENIZER")) define("SQLITE_FTS_TOKENIZER", "unicode61");
56
57
/**
58
 * When set to true this enable the fitlering of the HTML body using DOMPurify.
59
 */
60
if(!defined("ENABLE_DOMPURIFY_FILTER")) define("ENABLE_DOMPURIFY_FILTER", true);
61
62
/**
63
 * Set to false to enable login with Single Sign-On (SSO) on SSO environments.
64
 */
65
if(!defined("ENABLE_REMOTE_USER_LOGIN")) define("ENABLE_REMOTE_USER_LOGIN", true);
66
67
/**
68
 * When set to false this disables the welcome screen shown to new users.
69
 */
70
if(!defined("ENABLE_WELCOME_SCREEN")) define("ENABLE_WELCOME_SCREEN", true);
71
72
/**
73
 * Set to true to disable the "What's new dialog" that will be shown to users to introduce new features.
74
 */
75
if(!defined("ENABLE_WHATS_NEW_DIALOG")) define("ENABLE_WHATS_NEW_DIALOG", true);
76
77
/**
78
 * By default we won't disable the FULL GAB, as it is a performance option
79
 * which, when enabled, prevents the full GAB to be loaded'
80
 */
81
if(!defined("ENABLE_FULL_GAB")) define("ENABLE_FULL_GAB", true);
82
83
/**
84
 * Set a maximum number of (search) results for the addressbook
85
 * When more results are found no results will be displayed in the client.
86
 * Set to 0 to disable this feature and show all results.
87
 */
88
if(!defined("MAX_GAB_RESULTS")) define("MAX_GAB_RESULTS", 0);
89
90
/**
91
 * By default we disable the public contact folders,
92
 * as it may increase address-book loading time.
93
 */
94
if(!defined("ENABLE_PUBLIC_CONTACT_FOLDERS")) define("ENABLE_PUBLIC_CONTACT_FOLDERS", false);
95
96
/**
97
 * By default we disable the shared contact folders, as it is a performance option
98
 * which, when enabled, may cause delay in loading of address-book
99
 */
100
if(!defined("ENABLE_SHARED_CONTACT_FOLDERS")) define("ENABLE_SHARED_CONTACT_FOLDERS", false);
101
102
/**
103
 * Limit the amount of members shown in the addressbook details dialog for a distlist. If the list
104
 * is too great the browser will hang loading and rendering all the items. By default set to 0
105
 * which means it loads all members.
106
 */
107
if(!defined("ABITEMDETAILS_MAX_NUM_DISTLIST_MEMBERS")) define("ABITEMDETAILS_MAX_NUM_DISTLIST_MEMBERS", 0);
108
109
/**
110
 * Use direct booking by default (books resources directly in the calendar instead of sending a meeting
111
 * request)
112
 * Booking method (true = direct booking, false = send meeting request)
113
 */
114
if(!defined("ENABLE_DIRECT_BOOKING")) define("ENABLE_DIRECT_BOOKING", true);
115
116
/**
117
 * Defines enabled languages
118
 */
119
if (!defined('ENABLED_LANGUAGES')) define("ENABLED_LANGUAGES",
120
	"af_ZA;am_ET;ar_SA;as_IN;az_AZ;".
121
	"be_BY;bg_BG;bn_BD;bn_IN;bs_BA;".
122
	"ca_ES;ca_ES@valencia;cs_CZ;cy_GB;".
123
	"da_DK;de_DE;el_GR;en_US;es_ES;et_EE;eu_ES;".
124
	"fa_IR;fi_FI;fil_PH;fr_FR;".
125
	"ga_IE;gd_GB;gl_ES;gu_IN;".
126
	"he_IL;hi_IN;hr_HR;hu_HU;hy_AM;".
127
	"id_ID;is_IS;it_IT;".
128
	"ja_JP;".
129
	"ka_GE;kk_KZ;km_KH;kn_IN;ko_KR;kok_IN;ky_KG;".
130
	"lb_LU;lt_LT;lv_LV;".
131
	"mi_NZ;mk_MK;ml_IN;mn_MN;mr_IN;ms_MY;mt_MT;".
132
	"nb_NO;ne_NP;nl_NL;nn_NO;".
133
	"or_IN;".
134
	"pa_IN;pl_PL;prs_AF;pt_BR;pt_PT;".
135
	"quz_PE;".
136
	"ro_RO;ru_RU;".
137
	"sd_IN;si_LK;sk_SK;sl_SI;sq_AL;sr_RS;sr_RS@latin;sv_SE;sw_KE;".
138
	"ta_IN;te_IN;th_TH;tk_TM;tr_TR;tt_RU;".
139
	"ug_CN;uk_UA;ur_PK;uz_UZ;".
140
	"vi_VN;".
141
	"zh_CN;zh_TW"
142
);
143
144
/**
145
 * Defines the base URL where the User Manual for grommunio Web can be found
146
 */
147
if(!defined("PLUGIN_WEBAPPMANUAL_URL")) define("PLUGIN_WEBAPPMANUAL_URL", "https://docs.grommunio.com/web");
148
149
/**
150
 * Defines the domains to which redirection after login is allowed. The redirect url will be read from
151
 * the GET-parameter 'continue'.
152
 * Add http(s):// to the domains and separate domains with spaces.
153
 * Note: The domain under which grommunio Web runs, is always allowed and does
154
 * not need to be added here.
155
 */
156
if(!defined("REDIRECT_ALLOWED_DOMAINS")) define("REDIRECT_ALLOWED_DOMAINS", '');
157
158
/**
159
 * Enable plugins
160
 */
161
if(!defined("ENABLE_PLUGINS")) define("ENABLE_PLUGINS", true);
162
163
/**
164
 * Defines the plugin directory
165
 */
166
if(!defined("PATH_PLUGIN_CONFIG_DIR")) define("PATH_PLUGIN_CONFIG_DIR", PATH_PLUGIN_DIR);
167
168
/**
169
 * Enable widgets/today context.
170
 */
171
if(!defined("ENABLE_WIDGETS")) define("ENABLE_WIDGETS", true);
172
173
/**
174
 * Defines a list of plugins that cannot be disabled by users.
175
 */
176
if(!defined("ALWAYS_ENABLED_PLUGINS_LIST")) define("ALWAYS_ENABLED_PLUGINS_LIST", "");
177
178
/**
179
 * Enable themes.
180
 */
181
if(!defined("ENABLE_THEMES")) define("ENABLE_THEMES", true);
182
183
/**
184
 * A theme. When this is not defined or empty or 'default', the default theme will be loaded.
185
 * The theme should the (directory)name of a installed theme plugin.
186
 */
187
if(!defined("THEME")) define("THEME", "");
188
189
/**
190
 * Use the classic icons as default iconset
191
 */
192
if(!defined("ICONSET")) define("ICONSET", "breeze");
193
194
/**
195
 * Disable/enabled advanced settings
196
 */
197
if(!defined("ENABLE_ADVANCED_SETTINGS")) define("ENABLE_ADVANCED_SETTINGS", false);
198
199
/**
200
 * Freebusy start offset that will be used to load freebusy data in appointments, number is subtracted from current time
201
 */
202
if(!defined("FREEBUSY_LOAD_START_OFFSET")) define("FREEBUSY_LOAD_START_OFFSET", 7);
203
204
/** 
205
 * Freebusy end offset that will be used to load freebusy data in appointments, number is added to current time
206
 */
207
if(!defined("FREEBUSY_LOAD_END_OFFSET")) define("FREEBUSY_LOAD_END_OFFSET", 90);
208
209
/**
210
 * Maximum eml files to be included in a single ZIP archive
211
 */
212
if(!defined("MAX_EML_FILES_IN_ZIP")) define("MAX_EML_FILES_IN_ZIP", 50);
213
214
/**
215
 * CONTACT_PREFIX used for contact name
216
 */
217
if (!defined("CONTACT_PREFIX")) define("CONTACT_PREFIX", false);
218
219
/**
220
 * CONTACT_SUFFIX used for contact name
221
 */
222
if (!defined("CONTACT_SUFFIX")) define("CONTACT_SUFFIX", false);
223
224
/**
225
 * Color schemes used for the calendars
226
 */
227
if (!defined("COLOR_SCHEMES")) define("COLOR_SCHEMES", json_encode(array(
228
	array(
229
		'name' => 'pink',
230
		'displayName' => _('Pink'),
231
		'base' => '#ff0099'
232
	),
233
	array(
234
		'name' => 'charmpink',
235
		'displayName' => _('Charm pink'),
236
		'base' => '#f17daa'
237
	),
238
	array(
239
		'name' => 'cadmiumred',
240
		'displayName' => _('Cadmium red'),
241
		'base' => '#e30022'
242
	),
243
	array(
244
		'name' => 'apricot',
245
		'displayName' => _('Apricot'),
246
		'base' => '#f7b884'
247
	),
248
	array(
249
		'name' => 'california',
250
		'displayName' => _('California'),
251
		'base' => '#f89406'
252
	),
253
	array(
254
		'name' => 'yellow',
255
		'displayName' => _('Yellow'),
256
		'base' => '#f7ca18'
257
	),
258
	array(
259
		'name' => 'softgreen',
260
		'displayName' => _('Soft green'),
261
		'base' => '#d3e28b'
262
	),
263
	array(
264
		'name' => 'green',
265
		'displayName' => _('Green'),
266
		'base' => '#5ab557'
267
	),
268
	array(
269
		'name' => 'mint',
270
		'displayName' => _('Mint'),
271
		'base' => '#1fa480'
272
	),
273
	array(
274
		'name' => 'pearlaqua',
275
		'displayName' => _('Pearl aqua'),
276
		'base' => '#88d8c0'
277
	),
278
	array(
279
		'name' => 'grommunioblue',
280
		'displayName' => _('Grommunio blue'),
281
		'base' => '#00b3f0'
282
	),
283
	array(
284
		'name' => 'babyblue',
285
		'displayName' => _('Baby blue'),
286
		'base' => '#7bd0f0'
287
	),
288
	array(
289
		'name' => 'blue',
290
		'displayName' => _('Blue'),
291
		'base' => '#0f70bd'
292
	),
293
	array(
294
		'name' => 'mauve',
295
		'displayName' => _('Mauve'),
296
		'base' => '#9a8bbc'
297
	),
298
	array(
299
		'name' => 'purple',
300
		'displayName' => _('Purple'),
301
		'base' => '#912787'
302
	),
303
	array(
304
		'name' => 'silversand',
305
		'displayName' => _('Silver sand'),
306
		'base' => '#bdc3c7'
307
	)
308
)));
309
310
/**
311
 * Predefined categories. Categories should have at least a name and a color. The
312
 * quickAccess property can be set to true to 'pin' the category to the menu. (i.e. it
313
 * will be shown in the categories menu). The sortIndex property can be used to support
314
 * the categories in the menu and 'Manage categories' dialog.
315
 *
316
 * The first six categories have the additional fields standardIndex. This field maps
317
 * these categories to the colored flag that could have been set on an item. These
318
 * flags will be shown as categories in grommunio Web.
319
 */
320
if (!defined("DEFAULT_CATEGORIES")) define("DEFAULT_CATEGORIES", json_encode(array(
321
	array(
322
		'name' => _('Red'),
323
		'color' => '#e40023',
324
		'standardIndex' => 6,
325
		'quickAccess' => true,
326
		'sortIndex' => 0,
327
		'used' => false
328
	),
329
	array(
330
		'name' => _('Orange'),
331
		'color' => '#f99406',
332
		'standardIndex' => 2,
333
		'quickAccess' => true,
334
		'sortIndex' => 1,
335
		'used' => false
336
	),
337
	array(
338
		'name' => _('Yellow'),
339
		'color' => '#f7ca17',
340
		'standardIndex' => 4,
341
		'quickAccess' => true,
342
		'sortIndex' => 2,
343
		'used' => false
344
	),
345
	array(
346
		'name' => _('Green'),
347
		'color' => '#5ab556',
348
		'standardIndex' => 3,
349
		'quickAccess' => true,
350
		'sortIndex' => 3,
351
		'used' => false
352
	),
353
	array(
354
		'name' => _('Blue'),
355
		'color' => '#0f70bd',
356
		'standardIndex' => 5,
357
		'quickAccess' => true,
358
		'sortIndex' => 4,
359
		'used' => false
360
	),
361
	array(
362
		'name' => _('Purple'),
363
		'color' => '#912887',
364
		'standardIndex' => 1,
365
		'quickAccess' => true,
366
		'sortIndex' => 5,
367
		'used' => false
368
	),
369
	array(
370
		'name' => _('Important'),
371
		'color' => '#F4B7B5'
372
	),
373
	array(
374
		'name' => _('Work'),
375
		'color' => '#B6CAE9'
376
	),
377
	array(
378
		'name' => _('Personal'),
379
		'color' => '#D9E9B6'
380
	),
381
	array(
382
		'name' => _('Holiday'),
383
		'color' => '#EBDA6C'
384
	),
385
	array(
386
		'name' => _('Required'),
387
		'color' => '#E9DAB6'
388
	),
389
	array(
390
		'name' => _('Travel Required'),
391
		'color' => '#B6DDE9'
392
	),
393
	array(
394
		'name' => _('Preparation Required'),
395
		'color' => '#B6B6E9'
396
	),
397
	array(
398
		'name' => _('Birthday'),
399
		'color' => '#DCB6E9'
400
	),
401
	array(
402
		'name' => _('Special Date'),
403
		'color' => '#E9BBB6'
404
	),
405
	array(
406
		'name' => _('Phone Interview'),
407
		'color' => '#C1E9B6'
408
	),
409
	array(
410
		'name' => _('Business'),
411
		'color' => '#BDC3C7'
412
	),
413
	array(
414
		'name' => _('Competition'),
415
		'color' => '#BDC3C7'
416
	),
417
	array(
418
		'name' => _('Favorites'),
419
		'color' => '#BDC3C7'
420
	),
421
	array(
422
		'name' => _('Gifts'),
423
		'color' => '#BDC3C7'
424
	),
425
	array(
426
		'name' => _('Goals/Objectives'),
427
		'color' => '#BDC3C7'
428
	),
429
	array(
430
		'name' => _('Holiday Cards'),
431
		'color' => '#BDC3C7'
432
	),
433
	array(
434
		'name' => _('Hot Contacts'),
435
		'color' => '#BDC3C7'
436
	),
437
	array(
438
		'name' => _('Ideas'),
439
		'color' => '#BDC3C7'
440
	),
441
	array(
442
		'name' => _('International'),
443
		'color' => '#BDC3C7'
444
	),
445
	array(
446
		'name' => _('Key Customer'),
447
		'color' => '#BDC3C7'
448
	),
449
	array(
450
		'name' => _('Miscellaneous'),
451
		'color' => '#BDC3C7'
452
	),
453
	array(
454
		'name' => _('Phone Calls'),
455
		'color' => '#BDC3C7'
456
	),
457
	array(
458
		'name' => _('Status'),
459
		'color' => '#BDC3C7'
460
	),
461
	array(
462
		'name' => _('Strategies'),
463
		'color' => '#BDC3C7'
464
	),
465
	array(
466
		'name' => _('Suppliers'),
467
		'color' => '#BDC3C7'
468
	),
469
	array(
470
		'name' => _('Time & Expenses'),
471
		'color' => '#BDC3C7'
472
	),
473
	array(
474
		'name' => _('VIP'),
475
		'color' => '#BDC3C7'
476
	),
477
	array(
478
		'name' => _('Waiting'),
479
		'color' => '#BDC3C7'
480
	)
481
)));
482
483
/**
484
 * Maximum reminder items we can show on client side.
485
 */
486
if(!defined("MAX_NUM_REMINDERS")) define("MAX_NUM_REMINDERS", 99);
487
488
/**
489
 * Set true to default soft delete the shared store items
490
 */
491
if(!defined("ENABLE_DEFAULT_SOFT_DELETE")) define("ENABLE_DEFAULT_SOFT_DELETE", false);
492
493
/**
494
 * Shared store polling timer in minutes
495
 */
496
if(!defined("SHARED_STORE_POLLING_INTERVAL")) define("SHARED_STORE_POLLING_INTERVAL", 15);
497
498
/**
499
 * Prefetch email count
500
 */
501
if(!defined("PREFETCH_EMAIL_COUNT")) define("PREFETCH_EMAIL_COUNT", 10);
502
503
// Define the interval between loading of new emails in the background.
504
if(!defined("PREFETCH_EMAIL_INTERVAL")) define("PREFETCH_EMAIL_INTERVAL", 30);
505
506
/**************************************\
507
* Powerpaste                           *
508
\**************************************/
509
510
// Options for TinyMCE's powerpaste plugin, see https://www.tiny.cloud/docs/plugins/powerpaste/#configurationoptions
511
// for more details.
512
if(!defined("POWERPASTE_WORD_IMPORT")) define("POWERPASTE_WORD_IMPORT", "merge");
513
if(!defined("POWERPASTE_HTML_IMPORT")) define("POWERPASTE_HTML_IMPORT", "merge");
514
if(!defined("POWERPASTE_ALLOW_LOCAL_IMAGES")) define("POWERPASTE_ALLOW_LOCAL_IMAGES", true);
515
516
/**
517
 * Defaults for sqlite search index
518
 */
519
if(!defined("MAX_FTS_RESULT_ITEMS")) define("MAX_FTS_RESULT_ITEMS", 2000);
520
521
/**
522
 * The following options are taken from the debug.php
523
 */
524
if(!defined("DEBUG_LOADER")) define("DEBUG_LOADER", LOAD_RELEASE);
525
if(!defined("DEBUG_JSONOUT")) define("DEBUG_JSONOUT", false);
526
if(!defined("DEBUG_JSONOUT_DIR")) define("DEBUG_JSONOUT_DIR", 'debug_json/');
527
if(!defined("DEBUG_JSONOUT_GZIP")) define("DEBUG_JSONOUT_GZIP", false);
528
if(!defined("DEBUG_PLUGINS")) define("DEBUG_PLUGINS", false);
529
if(!defined("DEBUG_PLUGINS_DISABLE_CACHE")) define("DEBUG_PLUGINS_DISABLE_CACHE", false);
530
if(!defined("DEBUG_DUMP_FILE")) define("DEBUG_DUMP_FILE", "debug.txt");
531
532
/**
533
 * Defaults for Logger
534
 */
535
if(!defined("LOG_USER_LEVEL")) define("LOG_USER_LEVEL", LOGLEVEL_OFF);
536
537
// To save e.g. user activity data only for selected users, provide the username followed by semicolon.
538
// The data will be saved into a dedicated file per user in the LOG_FILE_DIR
539
// Users have to be encapsulated in quotes, several users are semicolon separated, like:
540
// define('LOG_USERS', 'user1;user2;user3');
541
if(!defined("LOG_USERS")) define("LOG_USERS", "");
542
543
// Location of the log directory
544
// e.g /var/log/grommunio/
545
if(!defined("LOG_FILE_DIR")) define("LOG_FILE_DIR", "");
546
if(!defined("LOG_SUCCESSFUL_LOGINS")) define("LOG_SUCCESSFUL_LOGINS", false);
547
?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
548