/
ConfigTemplates.php
1343 lines (1343 loc) · 48.5 KB
/
ConfigTemplates.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/**
* Main config.
*
* @copyright YetiForce Sp. z o.o
* @license YetiForce Public License 4.0 (licenses/LicenseEN.txt or yetiforce.com)
*/
return [
'api' => [
'enabledServices' => [
'default' => [],
'description' => 'List of active services. Available: dav, webservice',
'validation' => function () {
$arg = func_get_arg(0);
return \is_array($arg) && empty(array_diff($arg, ['dav', 'webservice']));
}
],
'enableBrowser' => [
'default' => false,
'description' => 'Dav configuration. Available: false, true',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'enableCardDAV' => [
'default' => false,
'description' => 'Dav configuration. Available: false, true',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'enableCalDAV' => [
'default' => false,
'description' => 'Dav configuration. Available: false, true',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'enableWebDAV' => [
'default' => false,
'description' => 'Dav configuration. Available: false, true',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'enableEmailPortal' => [
'default' => true,
'description' => 'Webservice config. Enabling contact notifications about the new account in the portal. Available: false, true',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'ENCRYPT_DATA_TRANSFER' => [
'default' => false,
'description' => 'Webservice config. Available: false, true',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'AUTH_METHOD' => [
'default' => 'Basic',
'description' => 'Webservice config.',
'validation' => function () {
return 'Basic' === func_get_arg(0);
}
],
'PRIVATE_KEY' => [
'default' => 'config/private.key',
'description' => 'Webservice config.'
],
'PUBLIC_KEY' => [
'default' => 'config/public.key',
'description' => 'Webservice config.'
]
],
'main' => [
'USE_RTE' => [
'default' => true,
'description' => 'Use rte',
],
'PORTAL_URL' => [
'default' => '',
'description' => 'Url for customer portal (Example: https://portal.yetiforce.com/)',
],
// 'HELPDESK_SUPPORT_NAME' => [
// 'default' => 'your-support name',
// 'description' => 'Helpdesk support email id and support name (Example: "support@yetiforce.com" and "yetiforce support")',
// 'validation' => ''
// ],
'HELPDESK_SUPPORT_EMAIL_REPLY' => [
'default' => '',
'description' => 'Help desk support email reply',
],
'site_URL' => [
'default' => '',
'description' => 'Backslash is required at the end of URL',
'validation' => '\App\Validator::url'
],
'cache_dir' => [
'default' => 'cache/',
'description' => 'Cache directory path'
],
'tmp_dir' => [
'type' => 'function',
'default' => 'return self::$cache_dir . "images/";',
'description' => 'Default value prepended by cache_dir = images/',
],
'upload_maxsize' => [
'default' => 52428800,
'description' => 'Maximum file size for uploaded files in bytes also used when uploading import files: upload_maxsize default value = 52428800 (50MB)',
'validation' => function () {
$arg = func_get_arg(0);
return $arg && \App\Validator::naturalNumber($arg) && ($arg * 1048576) <= \vtlib\Functions::getMaxUploadSize();
},
'sanitization' => function () {
return (int) func_get_arg(0) * 1048576;
}
],
'allow_exports' => [
'default' => 'all',
'description' => 'Flag to allow export functionality: "all" - to allow anyone to use exports, "admin" - to only allow admins to export, "none" - to block exports completely',
'validation' => function () {
$arg = func_get_arg(0);
return \in_array($arg, ['all', 'admin', 'none']);
}
],
'upload_badext' => [
'default' => ['php', 'php3', 'php4', 'php5', 'pl', 'cgi', 'py', 'asp', 'cfm', 'js', 'vbs', 'html', 'htm', 'exe', 'bin', 'bat', 'sh', 'dll', 'phps', 'phtml', 'xhtml', 'rb', 'msi', 'jsp', 'shtml', 'sth', 'shtm'],
'description' => 'Files with one of these extensions will have ".txt" appended to their filename on upload.'
],
'list_max_entries_per_page' => [
'default' => 20,
'description' => 'List max entries per page: default value = 20',
'validation' => function () {
$arg = func_get_arg(0);
return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg);
},
'sanitization' => function () {
return (int) func_get_arg(0);
}
],
'default_module' => [
'default' => 'Home',
'description' => 'Default module: default value = Home',
'validation' => function () {
$arg = func_get_arg(0);
return true === \App\Module::isModuleActive($arg);
}
],
'default_charset' => [
'default' => 'UTF-8',
'description' => 'Default charset: default value = "UTF-8"',
'validation' => function () {
return 'UTF-8' === func_get_arg(0);
}
],
'default_language' => [
'default' => 'en-US',
'description' => 'Default language: default value = en-US',
'validation' => '\App\Validator::languageTag',
],
'application_unique_key' => [
'default' => sha1(time() + random_int(1, 9999999)),
'description' => 'Unique Application Key',
'validation' => function () {
return !class_exists('\\Config\\Main');
},
'sanitization' => function () {
return sha1(time() + random_int(1, 9999999));
}
],
'listview_max_textlength' => [
'default' => 40,
'description' => 'Trim descriptions, titles in listviews to this value',
'validation' => function () {
$arg = func_get_arg(0);
return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg);
},
'sanitization' => function () {
return (int) func_get_arg(0);
}
],
'php_max_execution_time' => [
'default' => 0,
'description' => 'Maximum time limit for PHP script execution (in seconds)'
],
'default_timezone' => [
'default' => '_TIMEZONE_',
'description' => 'Set the default timezone as per your preference',
'validation' => function () {
$arg = func_get_arg(0);
return \in_array($arg, timezone_identifiers_list());
}
],
'title_max_length' => [
'default' => 60,
'description' => 'Maximum length of characters for title',
'validation' => function () {
$arg = func_get_arg(0);
return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg);
},
'sanitization' => function () {
return (int) func_get_arg(0);
}
],
'href_max_length' => [
'default' => 35,
'description' => 'Maximum length for href tag',
'validation' => function () {
$arg = func_get_arg(0);
return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg);
},
'sanitization' => function () {
return (int) func_get_arg(0);
}
],
'MINIMUM_CRON_FREQUENCY' => [
'default' => 1,
'description' => 'Minimum cron frequency [min]',
'validation' => function () {
$arg = func_get_arg(0);
return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg);
},
'sanitization' => function () {
return (int) func_get_arg(0);
}
],
'davStorageDir' => [
'default' => 'storage/Files',
'description' => 'Update the current session id with a newly generated one after login',
],
'systemMode' => [
'default' => 'prod',
'description' => 'System mode. Available: prod, demo, test',
'validationValues' => ['prod', 'demo', 'test']
],
'listMaxEntriesMassEdit' => [
'default' => 500,
'description' => 'Maximum number of records in a mass edition',
'validation' => function () {
$arg = func_get_arg(0);
return $arg && \App\Validator::naturalNumber($arg) && (5000 >= $arg);
},
'sanitization' => function () {
return (int) func_get_arg(0);
}
],
'backgroundClosingModal' => [
'default' => true,
'description' => 'Enable closing of modal window by clicking on the background',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'isActiveSendingMails' => [
'default' => true,
'description' => 'Is sending emails active?'
],
'isActiveRecordTemplate' => [
'default' => false,
'description' => 'Activates / deactivates batch adding of records',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'unblockedTimeoutCronTasks' => [
'default' => true,
'description' => 'Should the task in cron be unblocked if the script execution time was exceeded?'
],
'maxExecutionCronTime' => [
'default' => 3600,
'description' => 'The maximum time of executing a cron. Recommended the same as the max_exacution_time parameter value.'
],
'langInLoginView' => [
'default' => false,
'description' => "System's language selection in the login window (true/false).",
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'layoutInLoginView' => [
'default' => false,
'description' => "System's layout selection in the login window (true/false)",
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'defaultLayout' => [
'default' => 'basic',
'description' => 'Set the default layout',
'validation' => function () {
return isset(\App\Layout::getAllLayouts()[func_get_arg(0)]);
}
],
'phoneFieldAdvancedVerification' => [
'default' => true,
'description' => 'Enable advanced phone number validation. Enabling it will block saving invalid phone number.'
],
'phoneFieldAdvancedHrefFormat' => [
'default' => new \Nette\PhpGenerator\PhpLiteral('\libphonenumber\PhoneNumberFormat::RFC3966'),
'description' => "Phone number display format. Values:\nfalse - formatting is disabled \n\\libphonenumber\\PhoneNumberFormat::RFC3966 - +48-44-668-18-00\n\\libphonenumber\\PhoneNumberFormat::E164 - +48446681800 \n\\libphonenumber\\PhoneNumberFormat::INTERNATIONAL - 044 668 18 00\n\\libphonenumber\\PhoneNumberFormat::NATIONAL - +48 44 668 18 00",
'validation' => function () {
return \in_array(func_get_arg(0), [
false,
\libphonenumber\PhoneNumberFormat::RFC3966,
\libphonenumber\PhoneNumberFormat::E164,
\libphonenumber\PhoneNumberFormat::INTERNATIONAL,
\libphonenumber\PhoneNumberFormat::NATIONAL
]);
}
],
'headerAlertMessage' => [
'default' => '',
'description' => 'Header alert message'
],
'headerAlertType' => [
'default' => '',
'description' => 'Header alert type, ex. alert-primary, alert-danger, alert-warning, alert-info'
],
'headerAlertIcon' => [
'default' => '',
'description' => 'Header alert icon, ex. fas fa-exclamation-triangle, fas fa-exclamation-circle, fas fa-exclamation, far fa-question-circle, fas fa-info-circle'
],
'loginPageAlertMessage' => [
'default' => '',
'description' => 'Login page alert message'
],
'loginPageAlertType' => [
'default' => '',
'description' => 'Login page alert type, ex. alert-primary, alert-danger, alert-warning, alert-info'
],
'loginPageAlertIcon' => [
'default' => '',
'description' => 'Login page alert icon, ex. fas fa-exclamation-triangle, fas fa-exclamation-circle, fas fa-exclamation, far fa-question-circle, fas fa-info-circle'
],
'showRegistrationAlert' => [
'default' => true,
'description' => 'Show the alert when the system is incorrectly registered',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
],
'debug' => [
'LOG_TO_FILE' => [
'default' => false,
'description' => 'Enable saving logs to file. Values: false/true',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'LOG_TO_PROFILE' => [
'default' => false,
'description' => 'Enable saving logs profiling. Values: false/true',
],
'LOG_PROFILE_CATEGORIES' => [
'default' => [],
'description' => 'Categories to be registered in profiling, an empty value means all categories. ex. "yii\db\Command::query", "Integrations/MagentoApi"'
],
'LOG_LEVELS' => [
'default' => false,
'description' => 'Level of saved/displayed logs. Values: false = All / 3 = error and warning / ["error", "warning", "info", "trace", "profile"]',
'validation' => function () {
$arg = func_get_arg(0);
return false === $arg || (\is_array($arg) && array_diff(['error', 'warning', 'info', 'trace', 'profile'], $arg));
},
],
'LOG_TRACE_LEVEL' => [
'default' => 0,
'description' => 'Level of saved/displayed tracerts. // Values: int',
'validation' => '\App\Validator::naturalNumber',
],
'SQL_DIE_ON_ERROR' => [
'default' => false,
'description' => 'Stop the running process of the system if there is an error in sql query'
],
'EXCEPTION_ERROR_TO_SHOW' => [
'default' => false,
'description' => 'Display errors',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'DISPLAY_EXCEPTION_BACKTRACE' => [
'default' => false,
'description' => 'Displays information about the tracking code when an error occurs. Available only with the active SQL_DIE_ON_ERROR = true',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'DISPLAY_EXCEPTION_LOGS' => [
'default' => false,
'description' => 'Display logs when error exception occurs',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'EXCEPTION_ERROR_HANDLER' => [
'default' => false,
'description' => 'Turn on/off the error handler',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'EXCEPTION_ERROR_TO_FILE' => [
'default' => false,
'description' => 'Save logs to file (cache/logs/errors.log)',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'DISPLAY_DEBUG_CONSOLE' => [
'default' => false,
'description' => 'Display main debug console'
],
'DISPLAY_LOGS_IN_CONSOLE' => [
'default' => false,
'description' => 'Enable displaying logs in debug console. Values: false/true'
],
'DISPLAY_CONFIG_IN_CONSOLE' => [
'default' => false,
'description' => 'Enable displaying logs in debug console. Values: false/true'
],
'DEBUG_CONSOLE_ALLOWED_IPS' => [
'default' => false,
'description' => 'List of IP addresses allowed to display debug console. Values: false = All IPS / "192.168.1.10" / ["192.168.1.10","192.168.1.11"]',
],
'DEBUG_CONSOLE_ALLOWED_USERS' => [
'default' => [],
'description' => 'List of user IDs allowed to display debug console. ',
],
'DEBUG_CRON' => [
'default' => false,
'description' => 'Debug cron => cache/logs/cron/',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'DEBUG_VIEWER' => [
'default' => false,
'description' => 'Debug Viewer => cache/logs/viewer-debug.log'
],
'DISPLAY_DEBUG_VIEWER' => [
'default' => false,
'description' => 'Display Smarty Debug Console'
],
'SMARTY_ERROR_REPORTING' => [
'default' => new \Nette\PhpGenerator\PhpLiteral('E_ALL & ~E_NOTICE'),
'description' => 'Do not show Smarty Notice in phpError.log',
'validation' => function () {
$arg = (string) func_get_arg(0);
return \in_array($arg, ['E_ALL', 'E_ALL & ~E_NOTICE']);
},
],
'EXCEPTION_ERROR_LEVEL' => [
'default' => new \Nette\PhpGenerator\PhpLiteral('E_ALL & ~E_NOTICE'),
'description' => "Set the error reporting level. The parameter is either an integer representing a bit field, or named constants.\nhttps://secure.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting\nAll errors - E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED / Critical errors - E_ERROR | E_WARNING | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR",
'validation' => function () {
$arg = (string) func_get_arg(0);
return \in_array($arg, ['E_ALL', 'E_ALL & ~E_NOTICE']);
},
],
'JS_DEBUG' => [
'default' => true,
'description' => 'Turn on/off error debugging in javascript',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'apiShowExceptionMessages' => [
'default' => false,
'description' => '[WebServices/API] Show exception messages in response body',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'apiShowExceptionReasonPhrase' => [
'default' => false,
'description' => '[WebServices/API] Show exception reason phrase in response header',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'apiShowExceptionBacktrace' => [
'default' => false,
'description' => '[WebServices/API] Show exception backtrace in response body',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'apiLogException' => [
'default' => false,
'description' => '[WebServices/API] Log to file only exception errors in the logs',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'apiLogAllRequests' => [
'default' => false,
'description' => '[WebServices/API] Log to file all communications data (request + response)',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'DAV_DEBUG_EXCEPTIONS' => [
'default' => false,
'description' => 'API - Sabre dav - This is a flag that allows (or not) showing file, line, and code of the exception in the returned XML',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'DAV_DEBUG_PLUGIN' => [
'default' => false,
'description' => 'Activate the plugin recording log in DAV',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'MAILER_DEBUG' => [
'default' => false,
'description' => 'Mailer debug',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'ROUNDCUBE_DEBUG_LEVEL' => [
'default' => 1,
'description' => 'System error reporting, sum of: 1 = log; 4 = show, 8 = trace'
],
'ROUNDCUBE_DEVEL_MODE' => [
'default' => false,
'description' => 'Devel_mode this will print real PHP memory usage into logs/console and do not compress JS libraries'
],
'ROUNDCUBE_PER_USER_LOGGING' => [
'default' => false,
'description' => "Activate this option if logs should be written to per-user directories.\nData will only be logged if a directory cache/logs/<username>/ exists and is writable."
],
'ROUNDCUBE_SMTP_LOG' => [
'default' => false,
'description' => 'Log sent messages to cache/logs/sendmail or to syslog'
],
'ROUNDCUBE_LOG_LOGINS' => [
'default' => false,
'description' => 'Log successful/failed logins to cache/logs/userlogins or to syslog'
],
'ROUNDCUBE_LOG_SESSION' => [
'default' => false,
'description' => 'Log session authentication errors to cache/logs/session or to syslog'
],
'ROUNDCUBE_SQL_DEBUG' => [
'default' => false,
'description' => 'Log SQL queries to cache/logs/sql or to syslog'
],
'ROUNDCUBE_IMAP_DEBUG' => [
'default' => false,
'description' => 'Log IMAP conversation to cache/logs/imap or to syslog'
],
'ROUNDCUBE_LDAP_DEBUG' => [
'default' => false,
'description' => 'Log LDAP conversation to cache/logs/ldap or to syslog'
],
'ROUNDCUBE_SMTP_DEBUG' => [
'default' => false,
'description' => 'Log SMTP conversation to cache/logs/smtp or to syslog'
],
],
'developer' => [
'CHANGE_GENERATEDTYPE' => [
'default' => false,
'description' => 'Turn the possibility to change generatedtype',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'MINIMIZE_JS' => [
'default' => true,
'description' => 'Enable minimize JS files',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'MINIMIZE_CSS' => [
'default' => true,
'description' => ' Enable minimize CSS files',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'CHANGE_VISIBILITY' => [
'default' => false,
'description' => 'Change of fields visibility',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'CHANGE_RELATIONS' => [
'default' => false,
'description' => 'Adding/Deleting relations between modules.',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'MISSING_LIBRARY_DEV_MODE' => [
'default' => false,
'description' => 'Developer libraries update mode',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'LANGUAGES_UPDATE_DEV_MODE' => [
'default' => false,
'description' => 'Developer libraries update mode',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'updaterDevMode' => [
'default' => false,
'description' => 'Developer updater mode',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
]
],
'layout' => [
'breadcrumbs' => [
'default' => true,
'description' => 'Should menu breadcrumbs be visible? true = show, false = hide',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'breadcrumbsHref' => [
'default' => true,
'description' => 'Should the breadcrumb menu have href enabled? true = enabled, false = off',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
]
],
'performance' => [
'CACHING_DRIVER' => [
'default' => 'Base',
'description' => 'Data caching is about storing some PHP variables in cache and retrieving it later from cache. Drivers: Base, Apcu',
'validation' => function () {
$arg = func_get_arg(0);
return 'Basic' === $arg || 'Apcu' === $arg;
}
],
'ENABLE_CACHING_USERS' => [
'default' => false,
'description' => 'Enable caching of user data',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'ENABLE_CACHING_DB_CONNECTION' => [
'default' => false,
'description' => 'Enable caching database instance, accelerate time database connection',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'DB_DEFAULT_CHARSET_UTF8' => [
'default' => true,
'description' => 'If database default charset is UTF-8, set this to true. This avoids executing the SET NAMES SQL for each query!',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'LISTVIEW_COMPUTE_PAGE_COUNT' => [
'default' => false,
'description' => 'Compute list view record count while loading listview each time. Recommended value false',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'AUTO_REFRESH_RECORD_LIST_ON_SELECT_CHANGE' => [
'default' => true,
'description' => 'Enable automatic records list refreshing while changing the value of the selection list',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'SEARCH_SHOW_OWNER_ONLY_IN_LIST' => [
'default' => false,
'description' => 'Show in search engine/filters only users and groups available in records list. It might result in a longer search time.',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'INTERVAL_FOR_NOTIFICATION_NUMBER_CHECK' => [
'default' => 100,
'description' => 'Time to update number of notifications in seconds',
'validation' => '\App\Validator::naturalNumber'
],
'SEARCH_OWNERS_BY_AJAX' => [
'default' => false,
'description' => 'Search owners by AJAX. We recommend selecting the "true" value if there are numerous users in the system.',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'SEARCH_ROLES_BY_AJAX' => [
'default' => false,
'description' => 'Search roles by AJAX',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'SEARCH_REFERENCE_BY_AJAX' => [
'default' => false,
'description' => 'Search reference by AJAX. We recommend selecting the "true" value if there are numerous users in the system.',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'MAX_NUMBER_EXPORT_RECORDS' => [
'default' => 500,
'description' => 'Max number of exported records',
'validation' => '\App\Validator::naturalNumber'
],
'maxMassDeleteRecords' => [
'default' => 1000,
'description' => 'Max number of mass deleted records',
],
'maxMassTransferOwnershipRecords' => [
'default' => 1000,
'description' => 'Max number of transfer ownership records',
],
'OWNER_MINIMUM_INPUT_LENGTH' => [
'default' => 2,
'description' => 'Minimum number of characters to search for record owner',
'validation' => '\App\Validator::naturalNumber'
],
'ROLE_MINIMUM_INPUT_LENGTH' => [
'default' => 2,
'description' => 'Minimum number of characters to search for role',
'validation' => '\App\Validator::naturalNumber'
],
'NUMBERS_EMAILS_DOWNLOADED_DURING_ONE_SCANNING' => [
'default' => 100,
'description' => 'The numbers of emails downloaded during one scanning',
'validation' => '\App\Validator::naturalNumber'
],
'CRON_MAX_NUMBERS_RECORD_PRIVILEGES_UPDATER' => [
'default' => 1000000,
'description' => 'The maximum number of global search permissions that cron can update during a single execution',
'validation' => '\App\Validator::naturalNumber'
],
'CRON_MAX_NUMBERS_RECORD_ADDRESS_BOOK_UPDATER' => [
'default' => 10000,
'description' => 'The maximum number of records in address book to be updated in cron',
'validation' => '\App\Validator::naturalNumber'
],
'CRON_MAX_NUMBERS_RECORD_LABELS_UPDATER' => [
'default' => 10000,
'description' => 'The maximum number of record labels that cron can update during a single execution',
'validation' => '\App\Validator::naturalNumber'
],
'CRON_MAX_NUMBERS_SENDING_MAILS' => [
'default' => 1000,
'description' => 'The maximum number of emails that cron can send during a single execution. Pay attention to the server limits.',
'validation' => '\App\Validator::naturalNumber'
],
'CRON_MAX_NUMBERS_SENDING_SMS' => [
'default' => 10,
'description' => 'The maximum number of sms that cron can send during a single execution',
'validation' => '\App\Validator::naturalNumber'
],
'CRON_MAX_ATACHMENTS_DELETE' => [
'default' => 1000,
'description' => 'The maximum number of attachments that cron can delete during a single execution',
'validation' => '\App\Validator::naturalNumber'
],
'LOAD_CUSTOM_FILES' => [
'default' => false,
'description' => "Parameter that allows to disable file overwriting.\nAfter enabling it the system will additionally check whether the file exists in the custom directory. Ex. custom/modules/Assets/Assets.php.",
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'SHOW_ADMIN_PANEL' => [
'default' => false,
'description' => 'Parameter that determines whether admin panel should be available to admin by default',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'SHOW_ADMINISTRATORS_IN_USERS_LIST' => [
'default' => true,
'description' => 'Display administrators in the list of users (Assigned To)',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'GLOBAL_SEARCH' => [
'default' => true,
'description' => 'Global search: true/false',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'BROWSING_HISTORY_WORKING' => [
'default' => true,
'description' => 'Browsing history working if true',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'BROWSING_HISTORY_VIEW_LIMIT' => [
'default' => 20,
'description' => 'Number of browsing history steps',
'validation' => '\App\Validator::naturalNumber'
],
'BROWSING_HISTORY_DELETE_AFTER' => [
'default' => 7,
'description' => 'Number of days after which browsing history will be deleted',
'validation' => '\App\Validator::naturalNumber'
],
'SESSION_DRIVER' => [
'default' => 'File',
'description' => 'Session handler name, handler dir: app/Session/',
'validation' => '\App\Validator::naturalNumber'
],
'CHART_MULTI_FILTER_LIMIT' => [
'default' => 5,
'description' => 'Charts multi filter limit',
'validation' => '\App\Validator::naturalNumber'
],
'CHART_ADDITIONAL_FILTERS_LIMIT' => [
'default' => 6,
'description' => "Additional filters limit for ChartFilter's",
'validation' => '\App\Validator::naturalNumber'
],
'MAX_MERGE_RECORDS' => [
'default' => 4,
'description' => 'Maximum number of merged records',
'validation' => '\App\Validator::naturalNumber'
],
'ACCESS_TO_INTERNET' => [
'default' => true,
'description' => 'Can CRM have access to the Internet?',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'CHANGE_LOCALE' => [
'default' => true,
'description' => 'Change the locale for sort the data',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'INVENTORY_EDIT_VIEW_LAYOUT' => [
'default' => true,
'description' => 'Is divided layout style on edit view in modules with products',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'MODULES_SPLITTED_EDIT_VIEW_LAYOUT' => [
'default' => [],
'description' => 'List of modules with splitted edit view layout',
'validation' => function () {
$arg = func_get_arg(0);
return \is_array($arg) && array_diff($arg, App\Module::getAllModuleNames());
}
],
'RECORD_POPOVER_DELAY' => [
'default' => 500,
'description' => "Popover record's trigger delay in ms",
'validation' => '\App\Validator::naturalNumber'
],
'PICKLIST_DEPENDENCY_DEFAULT_EMPTY' => [
'default' => true,
'description' => 'Empty value when there is selected item in picklist dependency',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'picklistLimit' => [
'default' => 50,
'description' => 'Number of items displayed in picklists.',
'validation' => '\App\Validator::naturalNumber',
],
'recursiveTranslate' => [
'default' => false,
'description' => 'If there is no translation in the chosen language, then get from the default language.'
],
'quickEditLayout' => [
'default' => 'blocks',
'description' => 'Parameter defining how fields are displayed in quick edit. Available values: standard,blocks,vertical',
'validationValues' => ['blocks', 'standard', 'vertical']
],
'quickCreateLayout' => [
'default' => 'blocks',
'description' => 'Parameter defining how fields are displayed in quick create. Available values: blocks,standard',
'validationValues' => ['blocks', 'standard']
],
'REPORT_RECORD_NUMBERS' => [
'default' => 10,
'description' => 'Number of records that can be shown in report mail',
'validation' => '\App\Validator::naturalNumber'
],
'LOGIN_HISTORY_VIEW_LIMIT' => [
'default' => 30,
'description' => 'Number of records that can be shown in history login modal',
'validation' => '\App\Validator::naturalNumber'
],
],
'relation' => [
'COMMENT_MAX_LENGTH' => [
'default' => 20,
'description' => 'Maximum length of a comment visible in the related module',
'validation' => '\App\Validator::naturalNumber',
'sanitization' => function () {
return (int) func_get_arg(0);
}
],
'SHOW_RELATED_MODULE_NAME' => [
'default' => true,
'description' => 'Show related modules names',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'SHOW_RELATED_ICON' => [
'default' => true,
'description' => 'Show related modules icon',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'SHOW_RECORDS_COUNT' => [
'default' => false,
'description' => 'Show record count in tabs of related modules',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'addSearchParamsToCreateView' => [
'default' => true,
'description' => 'Fill in the record creation form with the data used in filtering (search_params)',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'separateChangeRelationButton' => [
'default' => false,
'description' => 'Separate change relation button in related module',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
],
'search' => [
'GLOBAL_SEARCH_SELECT_MODULE' => [
'default' => true,
'description' => 'Auto select current module in global search (true/false)',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'GLOBAL_SEARCH_MODAL_MAX_NUMBER_RESULT' => [
'default' => 100,
'description' => 'Auto select current module in global search (int)',
'validation' => '\App\Validator::naturalNumber',
],
'GLOBAL_SEARCH_SORTING_RESULTS' => [
'default' => 0,
'description' => 'Global search - Should the results be sorted in MySQL or PHP while displaying (None = 0, PHP = 1, Mysql = 2). The parameter impacts system efficiency.',
'validation' => function () {
$arg = func_get_arg(0);
return \is_int($arg) && \in_array($arg, [0, 1, 2]);
}
],
'GLOBAL_SEARCH_CURRENT_MODULE_TO_TOP' => [
'default' => true,
'description' => 'Global search - Show current module as first in search results (true/false).',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'GLOBAL_SEARCH_AUTOCOMPLETE' => [
'default' => 1,
'description' => 'Global search - Search for records while entering text (1/0).',
'validation' => function () {
$arg = func_get_arg(0);
return \is_int($arg) && \in_array($arg, [0, 1]);
}
],
'GLOBAL_SEARCH_AUTOCOMPLETE_LIMIT' => [
'default' => 15,
'description' => 'Global search - Max number of displayed results. The parameter impacts system efficiency.',
'validation' => '\App\Validator::naturalNumber'
],
'GLOBAL_SEARCH_AUTOCOMPLETE_MIN_LENGTH' => [
'default' => 3,
'description' => 'Global search - The minimum number of characters a user must type before a search is performed. The parameter impacts system efficiency',
'validation' => '\App\Validator::naturalNumber'
],
'GLOBAL_SEARCH_OPERATOR_SELECT' => [
'default' => true,
'description' => 'Global search - Show operator list.',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'LIST_ENTITY_STATE_COLOR' => [
'default' => [
'Archived' => '#0032a2',
'Trash' => '#ab0505',
'Active' => '#009405',
],
'description' => 'Colors for record state will be displayed in list view, history, and preview.',
],
],
'securityKeys' => [
'encryptionPass' => [
'default' => 'yeti',
'description' => 'Key to encrypt passwords, changing the key results in the loss of all encrypted data.',
'validation' => function () {
return true;
}
],
'encryptionMethod' => [
'default' => 'aes-256-cbc',
'description' => 'Encryption method.',
'validation' => function () {
$arg = func_get_arg(0);
return empty($arg) || ($arg && \in_array($arg, \App\Encryption::getMethods()));
}
],
],
'security' => [
'USER_ENCRYPT_PASSWORD_COST' => [
'default' => 10,
'description' => "Password encrypt algorithmic cost. Numeric values - we recommend values greater than 10.\nThe greater the value, the longer it takes to encrypt the password."
],
'RESET_LOGIN_PASSWORD' => [
'default' => false,
'description' => 'Possible to reset the password while logging in (true/false)',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'SHOW_MY_PREFERENCES' => [
'default' => true,
'description' => 'Show my preferences',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'CHANGE_LOGIN_PASSWORD' => [
'default' => true,
'description' => 'Changing the settings by the user is possible true/false',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'
],
'PERMITTED_BY_ROLES' => [
'default' => true,
'description' => 'Permitted by roles.',
'validation' => '\App\Validator::bool',
'sanitization' => '\App\Purifier::bool'