This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
1 | <?php |
||||
2 | /** |
||||
3 | * Main config. |
||||
4 | * |
||||
5 | * @copyright YetiForce S.A. |
||||
6 | * @license YetiForce Public License 6.5 (licenses/LicenseEN.txt or yetiforce.com) |
||||
7 | */ |
||||
8 | return [ |
||||
9 | 'api' => [ |
||||
10 | 'enabledServices' => [ |
||||
11 | 'default' => [], |
||||
12 | 'description' => 'List of active services. Available: dav, webservice', |
||||
13 | 'validation' => function () { |
||||
14 | $arg = func_get_arg(0); |
||||
15 | return \is_array($arg) && empty(array_diff($arg, ['dav', 'webservice'])); |
||||
16 | }, |
||||
17 | ], |
||||
18 | 'enableBrowser' => [ |
||||
19 | 'default' => false, |
||||
20 | 'description' => 'Dav configuration. Available: false, true', |
||||
21 | 'validation' => '\App\Validator::bool', |
||||
22 | 'sanitization' => '\App\Purifier::bool', |
||||
23 | ], |
||||
24 | 'enableCardDAV' => [ |
||||
25 | 'default' => false, |
||||
26 | 'description' => 'Dav configuration. Available: false, true', |
||||
27 | 'validation' => '\App\Validator::bool', |
||||
28 | 'sanitization' => '\App\Purifier::bool', |
||||
29 | ], |
||||
30 | 'enableCalDAV' => [ |
||||
31 | 'default' => false, |
||||
32 | 'description' => 'Dav configuration. Available: false, true', |
||||
33 | 'validation' => '\App\Validator::bool', |
||||
34 | 'sanitization' => '\App\Purifier::bool', |
||||
35 | ], |
||||
36 | 'enableWebDAV' => [ |
||||
37 | 'default' => false, |
||||
38 | 'description' => 'Dav configuration. Available: false, true', |
||||
39 | 'validation' => '\App\Validator::bool', |
||||
40 | 'sanitization' => '\App\Purifier::bool', |
||||
41 | ], |
||||
42 | 'enableEmailPortal' => [ |
||||
43 | 'default' => true, |
||||
44 | 'description' => 'Webservice config. Enabling contact notifications about the new account in the portal. Available: false, true', |
||||
45 | 'validation' => '\App\Validator::bool', |
||||
46 | 'sanitization' => '\App\Purifier::bool', |
||||
47 | ], |
||||
48 | 'ENCRYPT_DATA_TRANSFER' => [ |
||||
49 | 'default' => false, |
||||
50 | 'description' => 'Webservice config. Available: false, true', |
||||
51 | 'validation' => '\App\Validator::bool', |
||||
52 | 'sanitization' => '\App\Purifier::bool', |
||||
53 | ], |
||||
54 | 'AUTH_METHOD' => [ |
||||
55 | 'default' => 'Basic', |
||||
56 | 'description' => 'Webservice config.', |
||||
57 | 'validation' => fn () => 'Basic' === func_get_arg(0), |
||||
58 | ], |
||||
59 | 'PRIVATE_KEY' => [ |
||||
60 | 'default' => 'config/private.key', |
||||
61 | 'description' => 'Webservice config.', |
||||
62 | ], |
||||
63 | 'PUBLIC_KEY' => [ |
||||
64 | 'default' => 'config/public.key', |
||||
65 | 'description' => 'Webservice config.', |
||||
66 | ], |
||||
67 | ], |
||||
68 | 'main' => [ |
||||
69 | 'USE_RTE' => [ |
||||
70 | 'default' => true, |
||||
71 | 'description' => 'Use rte', |
||||
72 | ], |
||||
73 | 'PORTAL_URL' => [ |
||||
74 | 'default' => '', |
||||
75 | 'description' => 'Url for customer portal (Example: https://portal.yetiforce.com/)', |
||||
76 | ], |
||||
77 | // 'HELPDESK_SUPPORT_NAME' => [ |
||||
78 | // 'default' => 'your-support name', |
||||
79 | // 'description' => 'Helpdesk support email id and support name (Example: "[email protected]" and "yetiforce support")', |
||||
80 | // 'validation' => '' |
||||
81 | // ], |
||||
82 | 'HELPDESK_SUPPORT_EMAIL_REPLY' => [ |
||||
83 | 'default' => '', |
||||
84 | 'description' => 'Help desk support email reply', |
||||
85 | ], |
||||
86 | 'site_URL' => [ |
||||
87 | 'default' => '', |
||||
88 | 'description' => 'Backslash is required at the end of URL', |
||||
89 | 'validation' => '\App\Validator::url', |
||||
90 | ], |
||||
91 | 'cache_dir' => [ |
||||
92 | 'default' => 'cache/', |
||||
93 | 'description' => 'Cache directory path', |
||||
94 | ], |
||||
95 | 'tmp_dir' => [ |
||||
96 | 'type' => 'function', |
||||
97 | 'default' => 'return self::$cache_dir . "images/";', |
||||
98 | 'description' => 'Default value prepended by cache_dir = images/', |
||||
99 | ], |
||||
100 | 'upload_maxsize' => [ |
||||
101 | 'default' => 52428800, |
||||
102 | 'description' => 'Maximum file size for uploaded files in bytes also used when uploading import files: upload_maxsize default value = 52428800 (50MB)', |
||||
103 | 'validation' => function () { |
||||
104 | $arg = func_get_arg(0); |
||||
105 | return $arg && \App\Validator::naturalNumber($arg) && ($arg * 1048576) <= \App\Config::getMaxUploadSize(false); |
||||
106 | }, |
||||
107 | 'sanitization' => fn () => (int) func_get_arg(0) * 1048576, |
||||
108 | ], |
||||
109 | 'allow_exports' => [ |
||||
110 | 'default' => 'all', |
||||
111 | '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', |
||||
112 | 'validation' => function () { |
||||
113 | $arg = func_get_arg(0); |
||||
114 | return \in_array($arg, ['all', 'admin', 'none']); |
||||
115 | }, |
||||
116 | ], |
||||
117 | 'upload_badext' => [ |
||||
118 | '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'], |
||||
119 | 'description' => 'Files with one of these extensions will have ".txt" appended to their filename on upload.', |
||||
120 | ], |
||||
121 | 'list_max_entries_per_page' => [ |
||||
122 | 'default' => 20, |
||||
123 | 'description' => 'List max entries per page: default value = 20', |
||||
124 | 'validation' => function () { |
||||
125 | $arg = func_get_arg(0); |
||||
126 | return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg); |
||||
127 | }, |
||||
128 | 'sanitization' => fn () => (int) func_get_arg(0), |
||||
129 | ], |
||||
130 | 'default_module' => [ |
||||
131 | 'default' => 'Home', |
||||
132 | 'description' => 'Default module: default value = Home', |
||||
133 | 'validation' => function () { |
||||
134 | $arg = func_get_arg(0); |
||||
135 | return true === \App\Module::isModuleActive($arg); |
||||
136 | }, |
||||
137 | ], |
||||
138 | 'default_charset' => [ |
||||
139 | 'default' => 'UTF-8', |
||||
140 | 'description' => 'Default charset: default value = "UTF-8"', |
||||
141 | 'validation' => fn () => 'UTF-8' === func_get_arg(0), |
||||
142 | ], |
||||
143 | 'default_language' => [ |
||||
144 | 'default' => 'en-US', |
||||
145 | 'description' => 'Default language: default value = en-US', |
||||
146 | 'validation' => '\App\Validator::languageTag', |
||||
147 | ], |
||||
148 | 'application_unique_key' => [ |
||||
149 | 'default' => sha1(time() . '' . random_int(1, 9999999)), |
||||
150 | 'description' => 'Unique Application Key', |
||||
151 | 'validation' => fn () => !class_exists('\\Config\\Main'), |
||||
152 | 'sanitization' => fn () => sha1(time() . '' . random_int(1, 9999999)), |
||||
153 | ], |
||||
154 | 'listview_max_textlength' => [ |
||||
155 | 'default' => 40, |
||||
156 | 'description' => 'Trim descriptions, titles in listviews to this value', |
||||
157 | 'validation' => function () { |
||||
158 | $arg = func_get_arg(0); |
||||
159 | return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg); |
||||
160 | }, |
||||
161 | 'sanitization' => fn () => (int) func_get_arg(0), |
||||
162 | ], |
||||
163 | 'php_max_execution_time' => [ |
||||
164 | 'default' => 0, |
||||
165 | 'description' => 'Maximum time limit for PHP script execution (in seconds)', |
||||
166 | ], |
||||
167 | 'default_timezone' => [ |
||||
168 | 'default' => '_TIMEZONE_', |
||||
169 | 'description' => 'Set the default timezone as per your preference', |
||||
170 | 'validation' => function () { |
||||
171 | $arg = func_get_arg(0); |
||||
172 | return \in_array($arg, timezone_identifiers_list()); |
||||
0 ignored issues
–
show
timezone_identifiers_list() of type void is incompatible with the type array expected by parameter $haystack of in_array() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
173 | }, |
||||
174 | ], |
||||
175 | 'title_max_length' => [ |
||||
176 | 'default' => 60, |
||||
177 | 'description' => 'Maximum length of characters for title', |
||||
178 | 'validation' => function () { |
||||
179 | $arg = func_get_arg(0); |
||||
180 | return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg); |
||||
181 | }, |
||||
182 | 'sanitization' => fn () => (int) func_get_arg(0), |
||||
183 | ], |
||||
184 | 'href_max_length' => [ |
||||
185 | 'default' => 50, |
||||
186 | 'description' => 'Maximum length for href tag', |
||||
187 | 'validation' => function () { |
||||
188 | $arg = func_get_arg(0); |
||||
189 | return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg); |
||||
190 | }, |
||||
191 | 'sanitization' => fn () => (int) func_get_arg(0), |
||||
192 | ], |
||||
193 | 'MINIMUM_CRON_FREQUENCY' => [ |
||||
194 | 'default' => 1, |
||||
195 | 'description' => 'Minimum cron frequency [min]', |
||||
196 | 'validation' => function () { |
||||
197 | $arg = func_get_arg(0); |
||||
198 | return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg); |
||||
199 | }, |
||||
200 | 'sanitization' => fn () => (int) func_get_arg(0), |
||||
201 | ], |
||||
202 | 'davStorageDir' => [ |
||||
203 | 'default' => 'storage/Files', |
||||
204 | 'description' => 'Update the current session id with a newly generated one after login', |
||||
205 | ], |
||||
206 | 'systemMode' => [ |
||||
207 | 'default' => 'prod', |
||||
208 | 'description' => 'System mode. Available: prod, demo, test', |
||||
209 | 'validationValues' => ['prod', 'demo', 'test'], |
||||
210 | ], |
||||
211 | 'listMaxEntriesMassEdit' => [ |
||||
212 | 'default' => 500, |
||||
213 | 'description' => 'Maximum number of records in a mass edition', |
||||
214 | 'validation' => function () { |
||||
215 | $arg = func_get_arg(0); |
||||
216 | return $arg && \App\Validator::naturalNumber($arg) && (5000 >= $arg); |
||||
217 | }, |
||||
218 | 'sanitization' => fn () => (int) func_get_arg(0), |
||||
219 | ], |
||||
220 | 'backgroundClosingModal' => [ |
||||
221 | 'default' => true, |
||||
222 | 'description' => 'Enable closing of modal window by clicking on the background', |
||||
223 | 'validation' => '\App\Validator::bool', |
||||
224 | 'sanitization' => '\App\Purifier::bool', |
||||
225 | ], |
||||
226 | 'isActiveSendingMails' => [ |
||||
227 | 'default' => true, |
||||
228 | 'description' => 'Is sending emails active?', |
||||
229 | ], |
||||
230 | 'isActiveRecordTemplate' => [ |
||||
231 | 'default' => false, |
||||
232 | 'description' => 'Activates / deactivates batch adding of records', |
||||
233 | 'validation' => '\App\Validator::bool', |
||||
234 | 'sanitization' => '\App\Purifier::bool', |
||||
235 | ], |
||||
236 | 'unblockedTimeoutCronTasks' => [ |
||||
237 | 'default' => true, |
||||
238 | 'description' => 'Should the task in cron be unblocked if the script execution time was exceeded?', |
||||
239 | ], |
||||
240 | 'maxExecutionCronTime' => [ |
||||
241 | 'default' => 3600, |
||||
242 | 'description' => 'The maximum time of executing a cron. Recommended the same as the max_exacution_time parameter value.', |
||||
243 | ], |
||||
244 | 'langInLoginView' => [ |
||||
245 | 'default' => false, |
||||
246 | 'description' => "System's language selection in the login window (true/false).", |
||||
247 | 'validation' => '\App\Validator::bool', |
||||
248 | 'sanitization' => '\App\Purifier::bool', |
||||
249 | ], |
||||
250 | 'layoutInLoginView' => [ |
||||
251 | 'default' => false, |
||||
252 | 'description' => "System's layout selection in the login window (true/false)", |
||||
253 | 'validation' => '\App\Validator::bool', |
||||
254 | 'sanitization' => '\App\Purifier::bool', |
||||
255 | ], |
||||
256 | 'defaultLayout' => [ |
||||
257 | 'default' => 'basic', |
||||
258 | 'description' => 'Set the default layout', |
||||
259 | 'validation' => fn () => isset(\App\Layout::getAllLayouts()[func_get_arg(0)]), |
||||
260 | ], |
||||
261 | 'phoneFieldAdvancedVerification' => [ |
||||
262 | 'default' => true, |
||||
263 | 'description' => 'Enable advanced phone number validation. Enabling it will block saving invalid phone number.', |
||||
264 | ], |
||||
265 | 'phoneFieldAdvancedHrefFormat' => [ |
||||
266 | 'default' => new \Nette\PhpGenerator\PhpLiteral('\libphonenumber\PhoneNumberFormat::RFC3966'), |
||||
267 | '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", |
||||
268 | 'validation' => function () { |
||||
269 | return \in_array(func_get_arg(0), [ |
||||
270 | false, |
||||
271 | \libphonenumber\PhoneNumberFormat::RFC3966, |
||||
272 | \libphonenumber\PhoneNumberFormat::E164, |
||||
273 | \libphonenumber\PhoneNumberFormat::INTERNATIONAL, |
||||
274 | \libphonenumber\PhoneNumberFormat::NATIONAL, |
||||
275 | ]); |
||||
276 | }, |
||||
277 | ], |
||||
278 | 'headerAlertMessage' => [ |
||||
279 | 'default' => '', |
||||
280 | 'description' => 'Header alert message', |
||||
281 | ], |
||||
282 | 'headerAlertType' => [ |
||||
283 | 'default' => '', |
||||
284 | 'description' => 'Header alert type, ex. alert-primary, alert-danger, alert-warning, alert-info', |
||||
285 | ], |
||||
286 | 'headerAlertIcon' => [ |
||||
287 | 'default' => '', |
||||
288 | 'description' => 'Header alert icon, ex. fas fa-exclamation-triangle, fas fa-exclamation-circle, fas fa-exclamation, far fa-question-circle, fas fa-info-circle', |
||||
289 | ], |
||||
290 | 'loginPageAlertMessage' => [ |
||||
291 | 'default' => '', |
||||
292 | 'description' => 'Login page alert message', |
||||
293 | ], |
||||
294 | 'loginPageAlertType' => [ |
||||
295 | 'default' => '', |
||||
296 | 'description' => 'Login page alert type, ex. alert-primary, alert-danger, alert-warning, alert-info', |
||||
297 | ], |
||||
298 | 'loginPageAlertIcon' => [ |
||||
299 | 'default' => '', |
||||
300 | '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', |
||||
301 | ], |
||||
302 | ], |
||||
303 | 'debug' => [ |
||||
304 | 'LOG_TO_FILE' => [ |
||||
305 | 'default' => false, |
||||
306 | 'description' => 'Enable saving logs to file. Values: false/true', |
||||
307 | 'validation' => '\App\Validator::bool', |
||||
308 | 'sanitization' => '\App\Purifier::bool', |
||||
309 | ], |
||||
310 | 'LOG_TO_PROFILE' => [ |
||||
311 | 'default' => false, |
||||
312 | 'description' => 'Enable saving logs profiling. Values: false/true', |
||||
313 | ], |
||||
314 | 'LOG_PROFILE_CATEGORIES' => [ |
||||
315 | 'default' => [], |
||||
316 | 'description' => 'Categories to be registered in profiling, an empty value means all categories. ex. "yii\db\Command::query", "Integrations/MagentoApi"', |
||||
317 | ], |
||||
318 | 'LOG_LEVELS' => [ |
||||
319 | 'default' => false, |
||||
320 | 'description' => 'Level of saved/displayed logs. Values: false = All / 3 = error and warning / ["error", "warning", "info", "trace", "profile"]', |
||||
321 | 'validation' => function () { |
||||
322 | $arg = func_get_arg(0); |
||||
323 | return false === $arg || (\is_array($arg) && array_diff(['error', 'warning', 'info', 'trace', 'profile'], $arg)); |
||||
324 | }, |
||||
325 | ], |
||||
326 | 'LOG_TRACE_LEVEL' => [ |
||||
327 | 'default' => 0, |
||||
328 | 'description' => 'Level of saved/displayed tracerts. // Values: int', |
||||
329 | 'validation' => '\App\Validator::naturalNumber', |
||||
330 | ], |
||||
331 | 'SQL_DIE_ON_ERROR' => [ |
||||
332 | 'default' => false, |
||||
333 | 'description' => 'Stop the running process of the system if there is an error in sql query', |
||||
334 | ], |
||||
335 | 'EXCEPTION_ERROR_TO_SHOW' => [ |
||||
336 | 'default' => false, |
||||
337 | 'description' => 'Display errors', |
||||
338 | 'validation' => '\App\Validator::bool', |
||||
339 | 'sanitization' => '\App\Purifier::bool', |
||||
340 | ], |
||||
341 | 'DISPLAY_EXCEPTION_BACKTRACE' => [ |
||||
342 | 'default' => false, |
||||
343 | 'description' => 'Displays information about the tracking code when an error occurs. Available only with the active SQL_DIE_ON_ERROR = true', |
||||
344 | 'validation' => '\App\Validator::bool', |
||||
345 | 'sanitization' => '\App\Purifier::bool', |
||||
346 | ], |
||||
347 | 'DISPLAY_EXCEPTION_LOGS' => [ |
||||
348 | 'default' => false, |
||||
349 | 'description' => 'Display logs when error exception occurs', |
||||
350 | 'validation' => '\App\Validator::bool', |
||||
351 | 'sanitization' => '\App\Purifier::bool', |
||||
352 | ], |
||||
353 | 'EXCEPTION_ERROR_HANDLER' => [ |
||||
354 | 'default' => false, |
||||
355 | 'description' => 'Turn on/off the error handler', |
||||
356 | 'validation' => '\App\Validator::bool', |
||||
357 | 'sanitization' => '\App\Purifier::bool', |
||||
358 | ], |
||||
359 | 'EXCEPTION_ERROR_TO_FILE' => [ |
||||
360 | 'default' => false, |
||||
361 | 'description' => 'Save logs to file (cache/logs/errors.log)', |
||||
362 | 'validation' => '\App\Validator::bool', |
||||
363 | 'sanitization' => '\App\Purifier::bool', |
||||
364 | ], |
||||
365 | 'DISPLAY_DEBUG_CONSOLE' => [ |
||||
366 | 'default' => false, |
||||
367 | 'description' => 'Display main debug console', |
||||
368 | ], |
||||
369 | 'DISPLAY_LOGS_IN_CONSOLE' => [ |
||||
370 | 'default' => false, |
||||
371 | 'description' => 'Enable displaying logs in debug console. Values: false/true', |
||||
372 | ], |
||||
373 | 'DISPLAY_CONFIG_IN_CONSOLE' => [ |
||||
374 | 'default' => false, |
||||
375 | 'description' => 'Enable displaying logs in debug console. Values: false/true', |
||||
376 | ], |
||||
377 | 'DEBUG_CONSOLE_ALLOWED_IPS' => [ |
||||
378 | 'default' => false, |
||||
379 | '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"]', |
||||
380 | ], |
||||
381 | 'DEBUG_CONSOLE_ALLOWED_USERS' => [ |
||||
382 | 'default' => [], |
||||
383 | 'description' => 'List of user IDs allowed to display debug console. ', |
||||
384 | ], |
||||
385 | 'DEBUG_CRON' => [ |
||||
386 | 'default' => false, |
||||
387 | 'description' => 'Debug cron => cache/logs/cron/', |
||||
388 | 'validation' => '\App\Validator::bool', |
||||
389 | 'sanitization' => '\App\Purifier::bool', |
||||
390 | ], |
||||
391 | 'DEBUG_VIEWER' => [ |
||||
392 | 'default' => false, |
||||
393 | 'description' => 'Debug Viewer => cache/logs/viewer-debug.log', |
||||
394 | ], |
||||
395 | 'DISPLAY_DEBUG_VIEWER' => [ |
||||
396 | 'default' => false, |
||||
397 | 'description' => 'Display Smarty Debug Console', |
||||
398 | ], |
||||
399 | 'SMARTY_ERROR_REPORTING' => [ |
||||
400 | 'default' => new \Nette\PhpGenerator\PhpLiteral('E_ALL & ~E_NOTICE'), |
||||
401 | 'description' => 'Do not show Smarty Notice in phpError.log', |
||||
402 | 'validation' => function () { |
||||
403 | $arg = (string) func_get_arg(0); |
||||
404 | return \in_array($arg, ['E_ALL', 'E_ALL & ~E_NOTICE']); |
||||
405 | }, |
||||
406 | ], |
||||
407 | 'EXCEPTION_ERROR_LEVEL' => [ |
||||
408 | 'default' => new \Nette\PhpGenerator\PhpLiteral('E_ALL & ~E_NOTICE'), |
||||
409 | '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", |
||||
410 | 'validation' => function () { |
||||
411 | $arg = (string) func_get_arg(0); |
||||
412 | return \in_array($arg, ['E_ALL', 'E_ALL & ~E_NOTICE']); |
||||
413 | }, |
||||
414 | ], |
||||
415 | 'JS_DEBUG' => [ |
||||
416 | 'default' => true, |
||||
417 | 'description' => 'Turn on/off error debugging in javascript', |
||||
418 | 'validation' => '\App\Validator::bool', |
||||
419 | 'sanitization' => '\App\Purifier::bool', |
||||
420 | ], |
||||
421 | 'apiShowExceptionMessages' => [ |
||||
422 | 'default' => false, |
||||
423 | 'description' => '[WebServices/API] Show exception messages in response body', |
||||
424 | 'validation' => '\App\Validator::bool', |
||||
425 | 'sanitization' => '\App\Purifier::bool', |
||||
426 | ], |
||||
427 | 'apiShowExceptionReasonPhrase' => [ |
||||
428 | 'default' => false, |
||||
429 | 'description' => '[WebServices/API] Show exception reason phrase in response header', |
||||
430 | 'validation' => '\App\Validator::bool', |
||||
431 | 'sanitization' => '\App\Purifier::bool', |
||||
432 | ], |
||||
433 | 'apiShowExceptionBacktrace' => [ |
||||
434 | 'default' => false, |
||||
435 | 'description' => '[WebServices/API] Show exception backtrace in response body', |
||||
436 | 'validation' => '\App\Validator::bool', |
||||
437 | 'sanitization' => '\App\Purifier::bool', |
||||
438 | ], |
||||
439 | 'apiLogException' => [ |
||||
440 | 'default' => false, |
||||
441 | 'description' => '[WebServices/API] Log to file only exception errors in the logs', |
||||
442 | 'validation' => '\App\Validator::bool', |
||||
443 | 'sanitization' => '\App\Purifier::bool', |
||||
444 | ], |
||||
445 | 'apiLogAllRequests' => [ |
||||
446 | 'default' => false, |
||||
447 | 'description' => '[WebServices/API] Log to file all communications data (request + response)', |
||||
448 | 'validation' => '\App\Validator::bool', |
||||
449 | 'sanitization' => '\App\Purifier::bool', |
||||
450 | ], |
||||
451 | 'davDebugExceptions' => [ |
||||
452 | 'default' => false, |
||||
453 | 'description' => 'API - Sabre dav - This is a flag that allows (or not) showing file, line, and code of the exception in the returned XML', |
||||
454 | 'validation' => '\App\Validator::bool', |
||||
455 | 'sanitization' => '\App\Purifier::bool', |
||||
456 | ], |
||||
457 | 'davDebugPlugin' => [ |
||||
458 | 'default' => false, |
||||
459 | 'description' => 'Activate the plugin recording log in DAV', |
||||
460 | 'validation' => '\App\Validator::bool', |
||||
461 | 'sanitization' => '\App\Purifier::bool', |
||||
462 | ], |
||||
463 | 'MAILER_DEBUG' => [ |
||||
464 | 'default' => false, |
||||
465 | 'description' => 'Mailer debug', |
||||
466 | 'validation' => '\App\Validator::bool', |
||||
467 | 'sanitization' => '\App\Purifier::bool', |
||||
468 | ], |
||||
469 | 'ROUNDCUBE_DEBUG_LEVEL' => [ |
||||
470 | 'default' => 1, |
||||
471 | 'description' => 'System error reporting, sum of: 1 = log; 4 = show, 8 = trace', |
||||
472 | ], |
||||
473 | 'ROUNDCUBE_DEVEL_MODE' => [ |
||||
474 | 'default' => false, |
||||
475 | 'description' => 'Devel_mode this will print real PHP memory usage into logs/console and do not compress JS libraries', |
||||
476 | ], |
||||
477 | 'ROUNDCUBE_PER_USER_LOGGING' => [ |
||||
478 | 'default' => false, |
||||
479 | '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.", |
||||
480 | ], |
||||
481 | 'ROUNDCUBE_SMTP_LOG' => [ |
||||
482 | 'default' => false, |
||||
483 | 'description' => 'Log sent messages to cache/logs/sendmail or to syslog', |
||||
484 | ], |
||||
485 | 'ROUNDCUBE_LOG_LOGINS' => [ |
||||
486 | 'default' => false, |
||||
487 | 'description' => 'Log successful/failed logins to cache/logs/userlogins or to syslog', |
||||
488 | ], |
||||
489 | 'ROUNDCUBE_LOG_SESSION' => [ |
||||
490 | 'default' => false, |
||||
491 | 'description' => 'Log session authentication errors to cache/logs/session or to syslog', |
||||
492 | ], |
||||
493 | 'ROUNDCUBE_SQL_DEBUG' => [ |
||||
494 | 'default' => false, |
||||
495 | 'description' => 'Log SQL queries to cache/logs/sql or to syslog', |
||||
496 | ], |
||||
497 | 'ROUNDCUBE_IMAP_DEBUG' => [ |
||||
498 | 'default' => false, |
||||
499 | 'description' => 'Log IMAP conversation to cache/logs/imap or to syslog', |
||||
500 | ], |
||||
501 | 'ROUNDCUBE_LDAP_DEBUG' => [ |
||||
502 | 'default' => false, |
||||
503 | 'description' => 'Log LDAP conversation to cache/logs/ldap or to syslog', |
||||
504 | ], |
||||
505 | 'ROUNDCUBE_SMTP_DEBUG' => [ |
||||
506 | 'default' => false, |
||||
507 | 'description' => 'Log SMTP conversation to cache/logs/smtp or to syslog', |
||||
508 | ], |
||||
509 | ], |
||||
510 | 'developer' => [ |
||||
511 | 'CHANGE_GENERATEDTYPE' => [ |
||||
512 | 'default' => false, |
||||
513 | 'description' => 'Turn the possibility to change generatedtype', |
||||
514 | 'validation' => '\App\Validator::bool', |
||||
515 | 'sanitization' => '\App\Purifier::bool', |
||||
516 | ], |
||||
517 | 'MINIMIZE_JS' => [ |
||||
518 | 'default' => true, |
||||
519 | 'description' => 'Enable minimize JS files', |
||||
520 | 'validation' => '\App\Validator::bool', |
||||
521 | 'sanitization' => '\App\Purifier::bool', |
||||
522 | ], |
||||
523 | 'MINIMIZE_CSS' => [ |
||||
524 | 'default' => true, |
||||
525 | 'description' => ' Enable minimize CSS files', |
||||
526 | 'validation' => '\App\Validator::bool', |
||||
527 | 'sanitization' => '\App\Purifier::bool', |
||||
528 | ], |
||||
529 | 'CHANGE_VISIBILITY' => [ |
||||
530 | 'default' => false, |
||||
531 | 'description' => 'Change of fields visibility', |
||||
532 | 'validation' => '\App\Validator::bool', |
||||
533 | 'sanitization' => '\App\Purifier::bool', |
||||
534 | ], |
||||
535 | 'CHANGE_RELATIONS' => [ |
||||
536 | 'default' => false, |
||||
537 | 'description' => 'Adding/Deleting relations between modules.', |
||||
538 | 'validation' => '\App\Validator::bool', |
||||
539 | 'sanitization' => '\App\Purifier::bool', |
||||
540 | ], |
||||
541 | 'MISSING_LIBRARY_DEV_MODE' => [ |
||||
542 | 'default' => false, |
||||
543 | 'description' => 'Developer libraries update mode', |
||||
544 | 'validation' => '\App\Validator::bool', |
||||
545 | 'sanitization' => '\App\Purifier::bool', |
||||
546 | ], |
||||
547 | 'LANGUAGES_UPDATE_DEV_MODE' => [ |
||||
548 | 'default' => false, |
||||
549 | 'description' => 'Developer libraries update mode', |
||||
550 | 'validation' => '\App\Validator::bool', |
||||
551 | 'sanitization' => '\App\Purifier::bool', |
||||
552 | ], |
||||
553 | 'updaterDevMode' => [ |
||||
554 | 'default' => false, |
||||
555 | 'description' => 'Developer updater mode', |
||||
556 | 'validation' => '\App\Validator::bool', |
||||
557 | 'sanitization' => '\App\Purifier::bool', |
||||
558 | ], |
||||
559 | ], |
||||
560 | 'layout' => [ |
||||
561 | 'breadcrumbs' => [ |
||||
562 | 'default' => true, |
||||
563 | 'description' => 'Should menu breadcrumbs be visible? true = show, false = hide', |
||||
564 | 'validation' => '\App\Validator::bool', |
||||
565 | 'sanitization' => '\App\Purifier::bool', |
||||
566 | ], |
||||
567 | 'breadcrumbsHref' => [ |
||||
568 | 'default' => true, |
||||
569 | 'description' => 'Should the breadcrumb menu have href enabled? true = enabled, false = off', |
||||
570 | 'validation' => '\App\Validator::bool', |
||||
571 | 'sanitization' => '\App\Purifier::bool', |
||||
572 | ], |
||||
573 | 'tileDefaultSize' => [ |
||||
574 | 'default' => 'very_small', |
||||
575 | 'description' => 'Default tile size. Available sizes: very_small, small, medium, big', |
||||
576 | ], |
||||
577 | ], |
||||
578 | 'performance' => [ |
||||
579 | 'CACHING_DRIVER' => [ |
||||
580 | 'default' => 'Base', |
||||
581 | 'description' => 'Data caching is about storing some PHP variables in cache and retrieving it later from cache. Drivers: Base, Apcu', |
||||
582 | 'validation' => function () { |
||||
583 | $arg = func_get_arg(0); |
||||
584 | return 'Basic' === $arg || 'Apcu' === $arg; |
||||
585 | }, |
||||
586 | ], |
||||
587 | 'ENABLE_CACHING_USERS' => [ |
||||
588 | 'default' => false, |
||||
589 | 'description' => 'Enable caching of user data', |
||||
590 | 'validation' => '\App\Validator::bool', |
||||
591 | 'sanitization' => '\App\Purifier::bool', |
||||
592 | ], |
||||
593 | 'ENABLE_CACHING_DB_CONNECTION' => [ |
||||
594 | 'default' => false, |
||||
595 | 'description' => 'Enable caching database instance, accelerate time database connection', |
||||
596 | 'validation' => '\App\Validator::bool', |
||||
597 | 'sanitization' => '\App\Purifier::bool', |
||||
598 | ], |
||||
599 | 'DB_DEFAULT_CHARSET_UTF8' => [ |
||||
600 | 'default' => true, |
||||
601 | 'description' => 'If database default charset is UTF-8, set this to true. This avoids executing the SET NAMES SQL for each query!', |
||||
602 | 'validation' => '\App\Validator::bool', |
||||
603 | 'sanitization' => '\App\Purifier::bool', |
||||
604 | ], |
||||
605 | 'LISTVIEW_COMPUTE_PAGE_COUNT' => [ |
||||
606 | 'default' => false, |
||||
607 | 'description' => 'Compute list view record count while loading listview each time. Recommended value false', |
||||
608 | 'validation' => '\App\Validator::bool', |
||||
609 | 'sanitization' => '\App\Purifier::bool', |
||||
610 | ], |
||||
611 | 'AUTO_REFRESH_RECORD_LIST_ON_SELECT_CHANGE' => [ |
||||
612 | 'default' => true, |
||||
613 | 'description' => 'Enable automatic records list refreshing while changing the value of the selection list', |
||||
614 | 'validation' => '\App\Validator::bool', |
||||
615 | 'sanitization' => '\App\Purifier::bool', |
||||
616 | ], |
||||
617 | 'SEARCH_SHOW_OWNER_ONLY_IN_LIST' => [ |
||||
618 | 'default' => false, |
||||
619 | 'description' => 'Show in search engine/filters only users and groups available in records list. It might result in a longer search time.', |
||||
620 | 'validation' => '\App\Validator::bool', |
||||
621 | 'sanitization' => '\App\Purifier::bool', |
||||
622 | ], |
||||
623 | 'INTERVAL_FOR_NOTIFICATION_NUMBER_CHECK' => [ |
||||
624 | 'default' => 100, |
||||
625 | 'description' => 'Time to update number of notifications in seconds', |
||||
626 | 'validation' => '\App\Validator::naturalNumber', |
||||
627 | ], |
||||
628 | 'SEARCH_OWNERS_BY_AJAX' => [ |
||||
629 | 'default' => false, |
||||
630 | 'description' => 'Search owners by AJAX. We recommend selecting the "true" value if there are numerous users in the system.', |
||||
631 | 'validation' => '\App\Validator::bool', |
||||
632 | 'sanitization' => '\App\Purifier::bool', |
||||
633 | ], |
||||
634 | 'SEARCH_ROLES_BY_AJAX' => [ |
||||
635 | 'default' => false, |
||||
636 | 'description' => 'Search roles by AJAX', |
||||
637 | 'validation' => '\App\Validator::bool', |
||||
638 | 'sanitization' => '\App\Purifier::bool', |
||||
639 | ], |
||||
640 | 'SEARCH_REFERENCE_BY_AJAX' => [ |
||||
641 | 'default' => false, |
||||
642 | 'description' => 'Search reference by AJAX. We recommend selecting the "true" value if there are numerous users in the system.', |
||||
643 | 'validation' => '\App\Validator::bool', |
||||
644 | 'sanitization' => '\App\Purifier::bool', |
||||
645 | ], |
||||
646 | 'MAX_NUMBER_EXPORT_RECORDS' => [ |
||||
647 | 'default' => 500, |
||||
648 | 'description' => 'Max number of exported records', |
||||
649 | 'validation' => '\App\Validator::naturalNumber', |
||||
650 | ], |
||||
651 | 'maxMassDeleteRecords' => [ |
||||
652 | 'default' => 1000, |
||||
653 | 'description' => 'Max number of mass deleted records', |
||||
654 | ], |
||||
655 | 'maxMassTransferOwnershipRecords' => [ |
||||
656 | 'default' => 1000, |
||||
657 | 'description' => 'Max number of transfer ownership records', |
||||
658 | ], |
||||
659 | 'OWNER_MINIMUM_INPUT_LENGTH' => [ |
||||
660 | 'default' => 2, |
||||
661 | 'description' => 'Minimum number of characters to search for record owner', |
||||
662 | 'validation' => '\App\Validator::naturalNumber', |
||||
663 | ], |
||||
664 | 'ROLE_MINIMUM_INPUT_LENGTH' => [ |
||||
665 | 'default' => 2, |
||||
666 | 'description' => 'Minimum number of characters to search for role', |
||||
667 | 'validation' => '\App\Validator::naturalNumber', |
||||
668 | ], |
||||
669 | 'NUMBERS_EMAILS_DOWNLOADED_DURING_ONE_SCANNING' => [ |
||||
670 | 'default' => 100, |
||||
671 | 'description' => 'The numbers of emails downloaded during one scanning', |
||||
672 | 'validation' => '\App\Validator::naturalNumber', |
||||
673 | ], |
||||
674 | 'CRON_MAX_NUMBERS_RECORD_PRIVILEGES_UPDATER' => [ |
||||
675 | 'default' => 1000000, |
||||
676 | 'description' => 'The maximum number of global search permissions that cron can update during a single execution', |
||||
677 | 'validation' => '\App\Validator::naturalNumber', |
||||
678 | ], |
||||
679 | 'CRON_MAX_NUMBERS_RECORD_ADDRESS_BOOK_UPDATER' => [ |
||||
680 | 'default' => 10000, |
||||
681 | 'description' => 'The maximum number of records in address book to be updated in cron', |
||||
682 | 'validation' => '\App\Validator::naturalNumber', |
||||
683 | ], |
||||
684 | 'CRON_MAX_NUMBERS_RECORD_LABELS_UPDATER' => [ |
||||
685 | 'default' => 10000, |
||||
686 | 'description' => 'The maximum number of record labels that cron can update during a single execution', |
||||
687 | 'validation' => '\App\Validator::naturalNumber', |
||||
688 | ], |
||||
689 | 'CRON_MAX_NUMBERS_SENDING_MAILS' => [ |
||||
690 | 'default' => 1000, |
||||
691 | 'description' => 'The maximum number of emails that cron can send during a single execution. Pay attention to the server limits.', |
||||
692 | 'validation' => '\App\Validator::naturalNumber', |
||||
693 | ], |
||||
694 | 'CRON_MAX_ATACHMENTS_DELETE' => [ |
||||
695 | 'default' => 1000, |
||||
696 | 'description' => 'The maximum number of attachments that cron can delete during a single execution', |
||||
697 | 'validation' => '\App\Validator::naturalNumber', |
||||
698 | ], |
||||
699 | 'LOAD_CUSTOM_FILES' => [ |
||||
700 | 'default' => false, |
||||
701 | '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.", |
||||
702 | 'validation' => '\App\Validator::bool', |
||||
703 | 'sanitization' => '\App\Purifier::bool', |
||||
704 | ], |
||||
705 | 'SHOW_ADMIN_PANEL' => [ |
||||
706 | 'default' => false, |
||||
707 | 'description' => 'Parameter that determines whether admin panel should be available to admin by default', |
||||
708 | 'validation' => '\App\Validator::bool', |
||||
709 | 'sanitization' => '\App\Purifier::bool', |
||||
710 | ], |
||||
711 | 'SHOW_ADMINISTRATORS_IN_USERS_LIST' => [ |
||||
712 | 'default' => true, |
||||
713 | 'description' => 'Display administrators in the list of users (Assigned To)', |
||||
714 | 'validation' => '\App\Validator::bool', |
||||
715 | 'sanitization' => '\App\Purifier::bool', |
||||
716 | ], |
||||
717 | 'GLOBAL_SEARCH' => [ |
||||
718 | 'default' => true, |
||||
719 | 'description' => 'Global search: true/false', |
||||
720 | 'validation' => '\App\Validator::bool', |
||||
721 | 'sanitization' => '\App\Purifier::bool', |
||||
722 | ], |
||||
723 | 'BROWSING_HISTORY_WORKING' => [ |
||||
724 | 'default' => true, |
||||
725 | 'description' => 'Browsing history working if true', |
||||
726 | 'validation' => '\App\Validator::bool', |
||||
727 | 'sanitization' => '\App\Purifier::bool', |
||||
728 | ], |
||||
729 | 'BROWSING_HISTORY_VIEW_LIMIT' => [ |
||||
730 | 'default' => 20, |
||||
731 | 'description' => 'Number of browsing history steps', |
||||
732 | 'validation' => '\App\Validator::naturalNumber', |
||||
733 | ], |
||||
734 | 'BROWSING_HISTORY_DELETE_AFTER' => [ |
||||
735 | 'default' => 7, |
||||
736 | 'description' => 'Number of days after which browsing history will be deleted', |
||||
737 | 'validation' => '\App\Validator::naturalNumber', |
||||
738 | ], |
||||
739 | 'SESSION_DRIVER' => [ |
||||
740 | 'default' => 'File', |
||||
741 | 'description' => 'Session handler name, handler dir: app/Session/', |
||||
742 | 'validation' => '\App\Validator::naturalNumber', |
||||
743 | ], |
||||
744 | 'CHART_MULTI_FILTER_LIMIT' => [ |
||||
745 | 'default' => 5, |
||||
746 | 'description' => 'Charts multi filter limit', |
||||
747 | 'validation' => '\App\Validator::naturalNumber', |
||||
748 | ], |
||||
749 | 'CHART_ADDITIONAL_FILTERS_LIMIT' => [ |
||||
750 | 'default' => 6, |
||||
751 | 'description' => "Additional filters limit for ChartFilter's", |
||||
752 | 'validation' => '\App\Validator::naturalNumber', |
||||
753 | ], |
||||
754 | 'MAX_MERGE_RECORDS' => [ |
||||
755 | 'default' => 4, |
||||
756 | 'description' => 'Maximum number of merged records', |
||||
757 | 'validation' => '\App\Validator::naturalNumber', |
||||
758 | ], |
||||
759 | 'ACCESS_TO_INTERNET' => [ |
||||
760 | 'default' => true, |
||||
761 | 'description' => 'Can CRM have access to the Internet?', |
||||
762 | 'validation' => '\App\Validator::bool', |
||||
763 | 'sanitization' => '\App\Purifier::bool', |
||||
764 | ], |
||||
765 | 'CHANGE_LOCALE' => [ |
||||
766 | 'default' => true, |
||||
767 | 'description' => 'Change the locale for sort the data', |
||||
768 | 'validation' => '\App\Validator::bool', |
||||
769 | 'sanitization' => '\App\Purifier::bool', |
||||
770 | ], |
||||
771 | 'INVENTORY_EDIT_VIEW_LAYOUT' => [ |
||||
772 | 'default' => true, |
||||
773 | 'description' => 'Is divided layout style on edit view in modules with products', |
||||
774 | 'validation' => '\App\Validator::bool', |
||||
775 | 'sanitization' => '\App\Purifier::bool', |
||||
776 | ], |
||||
777 | 'MODULES_SPLITTED_EDIT_VIEW_LAYOUT' => [ |
||||
778 | 'default' => [], |
||||
779 | 'description' => 'List of modules with splitted edit view layout', |
||||
780 | 'validation' => function () { |
||||
781 | $arg = func_get_arg(0); |
||||
782 | return \is_array($arg) && array_diff($arg, App\Module::getAllModuleNames()); |
||||
783 | }, |
||||
784 | ], |
||||
785 | 'RECORD_POPOVER_DELAY' => [ |
||||
786 | 'default' => 500, |
||||
787 | 'description' => "Popover record's trigger delay in ms", |
||||
788 | 'validation' => '\App\Validator::naturalNumber', |
||||
789 | ], |
||||
790 | 'picklistLimit' => [ |
||||
791 | 'default' => 50, |
||||
792 | 'description' => 'Number of items displayed in picklists.', |
||||
793 | 'validation' => '\App\Validator::naturalNumber', |
||||
794 | ], |
||||
795 | 'recursiveTranslate' => [ |
||||
796 | 'default' => false, |
||||
797 | 'description' => 'If there is no translation in the chosen language, then get from the default language.', |
||||
798 | ], |
||||
799 | 'quickEditLayout' => [ |
||||
800 | 'default' => 'blocks', |
||||
801 | 'description' => 'Parameter defining how fields are displayed in quick edit. Available values: standard,blocks,vertical', |
||||
802 | 'validationValues' => ['blocks', 'standard', 'vertical'], |
||||
803 | ], |
||||
804 | 'quickCreateLayout' => [ |
||||
805 | 'default' => 'blocks', |
||||
806 | 'description' => 'Parameter defining how fields are displayed in quick create. Available values: blocks,standard', |
||||
807 | 'validationValues' => ['blocks', 'standard'], |
||||
808 | ], |
||||
809 | 'REPORT_RECORD_NUMBERS' => [ |
||||
810 | 'default' => 10, |
||||
811 | 'description' => 'Number of records that can be shown in report mail', |
||||
812 | 'validation' => '\App\Validator::naturalNumber', |
||||
813 | ], |
||||
814 | 'LOGIN_HISTORY_VIEW_LIMIT' => [ |
||||
815 | 'default' => 30, |
||||
816 | 'description' => 'Number of records that can be shown in history login modal', |
||||
817 | 'validation' => '\App\Validator::naturalNumber', |
||||
818 | ], |
||||
819 | 'recordActivityNotifier' => [ |
||||
820 | 'default' => false, |
||||
821 | 'description' => 'Functionality notifying about activity on the record', |
||||
822 | 'validation' => '\App\Validator::bool', |
||||
823 | 'sanitization' => '\App\Purifier::bool', |
||||
824 | 'docTags' => ['var' => 'bool'], |
||||
825 | ], |
||||
826 | 'recordActivityNotifierInterval' => [ |
||||
827 | 'default' => 5, |
||||
828 | 'description' => 'Interval for Record activity notifier', |
||||
829 | 'validation' => '\App\Validator::naturalNumber', |
||||
830 | 'sanitization' => '\App\Purifier::naturalNumber', |
||||
831 | 'docTags' => ['var' => 'int Number of seconds'], |
||||
832 | ], |
||||
833 | ], |
||||
834 | 'relation' => [ |
||||
835 | 'COMMENT_MAX_LENGTH' => [ |
||||
836 | 'default' => 20, |
||||
837 | 'description' => 'Maximum length of a comment visible in the related module', |
||||
838 | 'validation' => '\App\Validator::naturalNumber', |
||||
839 | 'sanitization' => fn () => (int) func_get_arg(0), |
||||
840 | ], |
||||
841 | 'SHOW_RELATED_MODULE_NAME' => [ |
||||
842 | 'default' => true, |
||||
843 | 'description' => 'Show related modules names', |
||||
844 | 'validation' => '\App\Validator::bool', |
||||
845 | 'sanitization' => '\App\Purifier::bool', |
||||
846 | ], |
||||
847 | 'SHOW_RELATED_ICON' => [ |
||||
848 | 'default' => true, |
||||
849 | 'description' => 'Show related modules icon', |
||||
850 | 'validation' => '\App\Validator::bool', |
||||
851 | 'sanitization' => '\App\Purifier::bool', |
||||
852 | ], |
||||
853 | 'SHOW_RECORDS_COUNT' => [ |
||||
854 | 'default' => false, |
||||
855 | 'description' => 'Show record count in tabs of related modules', |
||||
856 | 'validation' => '\App\Validator::bool', |
||||
857 | 'sanitization' => '\App\Purifier::bool', |
||||
858 | ], |
||||
859 | 'addSearchParamsToCreateView' => [ |
||||
860 | 'default' => true, |
||||
861 | 'description' => 'Fill in the record creation form with the data used in filtering (search_params)', |
||||
862 | 'validation' => '\App\Validator::bool', |
||||
863 | 'sanitization' => '\App\Purifier::bool', |
||||
864 | ], |
||||
865 | 'separateChangeRelationButton' => [ |
||||
866 | 'default' => false, |
||||
867 | 'description' => 'Separate change relation button in related module', |
||||
868 | 'validation' => '\App\Validator::bool', |
||||
869 | 'sanitization' => '\App\Purifier::bool', |
||||
870 | ], |
||||
871 | ], |
||||
872 | 'search' => [ |
||||
873 | 'GLOBAL_SEARCH_SELECT_MODULE' => [ |
||||
874 | 'default' => true, |
||||
875 | 'description' => 'Auto select current module in global search (true/false)', |
||||
876 | 'validation' => '\App\Validator::bool', |
||||
877 | 'sanitization' => '\App\Purifier::bool', |
||||
878 | ], |
||||
879 | 'GLOBAL_SEARCH_MODAL_MAX_NUMBER_RESULT' => [ |
||||
880 | 'default' => 100, |
||||
881 | 'description' => 'Auto select current module in global search (int)', |
||||
882 | 'validation' => '\App\Validator::naturalNumber', |
||||
883 | ], |
||||
884 | 'GLOBAL_SEARCH_SORTING_RESULTS' => [ |
||||
885 | 'default' => 0, |
||||
886 | '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.', |
||||
887 | 'validation' => function () { |
||||
888 | $arg = func_get_arg(0); |
||||
889 | return \is_int($arg) && \in_array($arg, [0, 1, 2]); |
||||
890 | }, |
||||
891 | ], |
||||
892 | 'GLOBAL_SEARCH_CURRENT_MODULE_TO_TOP' => [ |
||||
893 | 'default' => true, |
||||
894 | 'description' => 'Global search - Show current module as first in search results (true/false).', |
||||
895 | 'validation' => '\App\Validator::bool', |
||||
896 | 'sanitization' => '\App\Purifier::bool', |
||||
897 | ], |
||||
898 | 'GLOBAL_SEARCH_AUTOCOMPLETE' => [ |
||||
899 | 'default' => 1, |
||||
900 | 'description' => 'Global search - Search for records while entering text (1/0).', |
||||
901 | 'validation' => function () { |
||||
902 | $arg = func_get_arg(0); |
||||
903 | return \is_int($arg) && \in_array($arg, [0, 1]); |
||||
904 | }, |
||||
905 | ], |
||||
906 | 'GLOBAL_SEARCH_AUTOCOMPLETE_LIMIT' => [ |
||||
907 | 'default' => 15, |
||||
908 | 'description' => 'Global search - Max number of displayed results. The parameter impacts system efficiency.', |
||||
909 | 'validation' => '\App\Validator::naturalNumber', |
||||
910 | ], |
||||
911 | 'GLOBAL_SEARCH_AUTOCOMPLETE_MIN_LENGTH' => [ |
||||
912 | 'default' => 3, |
||||
913 | 'description' => 'Global search - The minimum number of characters a user must type before a search is performed. The parameter impacts system efficiency', |
||||
914 | 'validation' => '\App\Validator::naturalNumber', |
||||
915 | ], |
||||
916 | 'GLOBAL_SEARCH_OPERATOR_SELECT' => [ |
||||
917 | 'default' => true, |
||||
918 | 'description' => 'Global search - Show operator list.', |
||||
919 | 'validation' => '\App\Validator::bool', |
||||
920 | 'sanitization' => '\App\Purifier::bool', |
||||
921 | ], |
||||
922 | 'LIST_ENTITY_STATE_COLOR' => [ |
||||
923 | 'default' => [ |
||||
924 | 'Archived' => '#0032a2', |
||||
925 | 'Trash' => '#ab0505', |
||||
926 | 'Active' => '#009405', |
||||
927 | ], |
||||
928 | 'description' => 'Colors for record state will be displayed in list view, history, and preview.', |
||||
929 | ], |
||||
930 | ], |
||||
931 | 'securityKeys' => [ |
||||
932 | 'encryptionPass' => [ |
||||
933 | 'default' => 'yeti', |
||||
934 | 'description' => 'Key to encrypt passwords, changing the key results in the loss of all encrypted data.', |
||||
935 | 'validation' => fn () => true, |
||||
936 | ], |
||||
937 | 'encryptionMethod' => [ |
||||
938 | 'default' => 'aes-256-cbc', |
||||
939 | 'description' => 'Encryption method.', |
||||
940 | 'validation' => function () { |
||||
941 | $arg = func_get_arg(0); |
||||
942 | return empty($arg) || ($arg && \in_array($arg, \App\Encryption::getMethods())); |
||||
943 | }, |
||||
944 | ], |
||||
945 | ], |
||||
946 | 'security' => [ |
||||
947 | 'USER_ENCRYPT_PASSWORD_COST' => [ |
||||
948 | 'default' => 10, |
||||
949 | '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.", |
||||
950 | ], |
||||
951 | 'RESET_LOGIN_PASSWORD' => [ |
||||
952 | 'default' => false, |
||||
953 | 'description' => 'Possible to reset the password while logging in (true/false)', |
||||
954 | 'validation' => '\App\Validator::bool', |
||||
955 | 'sanitization' => '\App\Purifier::bool', |
||||
956 | ], |
||||
957 | 'SHOW_MY_PREFERENCES' => [ |
||||
958 | 'default' => true, |
||||
959 | 'description' => 'Show my preferences', |
||||
960 | 'validation' => '\App\Validator::bool', |
||||
961 | 'sanitization' => '\App\Purifier::bool', |
||||
962 | ], |
||||
963 | 'CHANGE_LOGIN_PASSWORD' => [ |
||||
964 | 'default' => true, |
||||
965 | 'description' => 'Changing the settings by the user is possible true/false', |
||||
966 | 'validation' => '\App\Validator::bool', |
||||
967 | 'sanitization' => '\App\Purifier::bool', |
||||
968 | ], |
||||
969 | 'PERMITTED_BY_ROLES' => [ |
||||
970 | 'default' => true, |
||||
971 | 'description' => 'Permitted by roles.', |
||||
972 | 'validation' => '\App\Validator::bool', |
||||
973 | 'sanitization' => '\App\Purifier::bool', |
||||
974 | ], |
||||
975 | 'PERMITTED_BY_SHARING' => [ |
||||
976 | 'default' => true, |
||||
977 | 'description' => 'Permitted by sharing.', |
||||
978 | 'validation' => '\App\Validator::bool', |
||||
979 | 'sanitization' => '\App\Purifier::bool', |
||||
980 | ], |
||||
981 | 'PERMITTED_BY_SHARED_OWNERS' => [ |
||||
982 | 'default' => true, |
||||
983 | 'description' => 'Permitted by shared owners.', |
||||
984 | 'validation' => '\App\Validator::bool', |
||||
985 | 'sanitization' => '\App\Purifier::bool', |
||||
986 | ], |
||||
987 | 'PERMITTED_BY_RECORD_HIERARCHY' => [ |
||||
988 | 'default' => true, |
||||
989 | 'description' => 'Permitted by record hierarchy.', |
||||
990 | 'validation' => '\App\Validator::bool', |
||||
991 | 'sanitization' => '\App\Purifier::bool', |
||||
992 | ], |
||||
993 | 'PERMITTED_BY_ADVANCED_PERMISSION' => [ |
||||
994 | 'default' => true, |
||||
995 | 'description' => 'Permitted by advanced permission.', |
||||
996 | 'validation' => '\App\Validator::bool', |
||||
997 | 'sanitization' => '\App\Purifier::bool', |
||||
998 | ], |
||||
999 | 'PERMITTED_BY_PRIVATE_FIELD' => [ |
||||
1000 | 'default' => true, |
||||
1001 | 'description' => 'Permitted by private field.', |
||||
1002 | 'validation' => '\App\Validator::bool', |
||||
1003 | 'sanitization' => '\App\Purifier::bool', |
||||
1004 | ], |
||||
1005 | 'permittedModulesByCreatorField' => [ |
||||
1006 | 'default' => [], |
||||
1007 | 'description' => 'List of modules to which access is based on the record creation.', |
||||
1008 | 'validation' => function () { |
||||
1009 | $arg = func_get_arg(0); |
||||
1010 | return \is_array($arg) && array_diff($arg, App\Module::getAllModuleNames()); |
||||
1011 | }, |
||||
1012 | ], |
||||
1013 | 'permittedWriteAccessByCreatorField' => [ |
||||
1014 | 'default' => false, |
||||
1015 | 'description' => 'Permission level access based on the record creation', |
||||
1016 | 'validation' => '\App\Validator::bool', |
||||
1017 | 'sanitization' => '\App\Purifier::bool', |
||||
1018 | ], |
||||
1019 | 'CACHING_PERMISSION_TO_RECORD' => [ |
||||
1020 | 'default' => false, |
||||
1021 | 'description' => "Configuration of the permission mechanism on records list.\ntrue - Permissions based on the users column in vtiger_crmentity.\n Permissions are not verified in real time. They are updated via cron.\n We do not recommend using this option in production environments.\nfalse - Permissions based on adding tables with permissions to query (old mechanism).", |
||||
1022 | 'validation' => '\App\Validator::bool', |
||||
1023 | 'sanitization' => '\App\Purifier::bool', |
||||
1024 | ], |
||||
1025 | 'EMAIL_FIELD_RESTRICTED_DOMAINS_ACTIVE' => [ |
||||
1026 | 'default' => false, |
||||
1027 | 'description' => "Restricted domains allow you to block saving an email address from a given domain in the system.\nRestricted domains work only for email address type fields.", |
||||
1028 | 'validation' => '\App\Validator::bool', |
||||
1029 | 'sanitization' => '\App\Purifier::bool', |
||||
1030 | ], |
||||
1031 | 'EMAIL_FIELD_RESTRICTED_DOMAINS_VALUES' => [ |
||||
1032 | 'default' => [], |
||||
1033 | 'description' => 'Restricted domains', |
||||
1034 | ], |
||||
1035 | 'EMAIL_FIELD_RESTRICTED_DOMAINS_ALLOWED' => [ |
||||
1036 | 'default' => [], |
||||
1037 | 'description' => 'List of modules where restricted domains are enabled, if empty it will be enabled everywhere.', |
||||
1038 | ], |
||||
1039 | 'EMAIL_FIELD_RESTRICTED_DOMAINS_EXCLUDED' => [ |
||||
1040 | 'default' => ['OSSEmployees', 'Users'], |
||||
1041 | 'description' => 'List of modules excluded from restricted domains validation.', |
||||
1042 | ], |
||||
1043 | 'LOGIN_PAGE_REMEMBER_CREDENTIALS' => [ |
||||
1044 | 'default' => false, |
||||
1045 | 'description' => 'Remember user credentials', |
||||
1046 | 'validation' => '\App\Validator::bool', |
||||
1047 | 'sanitization' => '\App\Purifier::bool', |
||||
1048 | ], |
||||
1049 | 'fieldsReferencesDependent' => [ |
||||
1050 | 'default' => false, |
||||
1051 | 'description' => 'Interdependent reference fields', |
||||
1052 | 'validation' => '\App\Validator::bool', |
||||
1053 | 'sanitization' => '\App\Purifier::bool', |
||||
1054 | ], |
||||
1055 | 'maxLifetimeSession' => [ |
||||
1056 | 'default' => 900, |
||||
1057 | 'description' => 'Lifetime session (in seconds)', |
||||
1058 | 'validation' => '\App\Validator::integer', |
||||
1059 | ], |
||||
1060 | 'maxLifetimeSessionCookie' => [ |
||||
1061 | 'default' => 0, |
||||
1062 | 'description' => "Specifies the lifetime of the cookie in seconds which is sent to the browser. The value 0 means 'until the browser is closed.'\nHow much time can someone be logged in to the browser. Defaults to 0.", |
||||
1063 | 'validation' => '\App\Validator::integer', |
||||
1064 | ], |
||||
1065 | 'loginSessionRegenerate' => [ |
||||
1066 | 'default' => true, |
||||
1067 | 'description' => 'Update the current session id with a newly generated one after login and logout', |
||||
1068 | 'validation' => '\App\Validator::bool', |
||||
1069 | 'sanitization' => '\App\Purifier::bool', |
||||
1070 | ], |
||||
1071 | 'cookieSameSite' => [ |
||||
1072 | 'default' => 'Strict', |
||||
1073 | 'description' => "Same-site cookie attribute allows a web application to advise the browser that cookies should only be sent if the request originates from the website the cookie came from.\nValues: None, Lax, Strict", |
||||
1074 | 'validationValues' => ['None', 'Lax', 'Strict'], |
||||
1075 | ], |
||||
1076 | 'cookieForceHttpOnly' => [ |
||||
1077 | 'default' => true, |
||||
1078 | 'description' => "Force the use of https only for cookie.\nValues: true, false, null", |
||||
1079 | 'validation' => function () { |
||||
1080 | $arg = func_get_arg(0); |
||||
1081 | return null === $arg ? $arg : \is_bool($arg); |
||||
1082 | }, |
||||
1083 | ], |
||||
1084 | 'apiLifetimeSessionCreate' => [ |
||||
1085 | 'default' => 1440, |
||||
1086 | 'description' => 'Maximum session lifetime from the time it was created (in minutes)', |
||||
1087 | 'validation' => '\App\Validator::integer', |
||||
1088 | ], |
||||
1089 | 'apiLifetimeSessionUpdate' => [ |
||||
1090 | 'default' => 240, |
||||
1091 | 'description' => 'Maximum session lifetime since the last modification (in minutes)', |
||||
1092 | 'validation' => '\App\Validator::integer', |
||||
1093 | ], |
||||
1094 | 'USER_AUTHY_MODE' => [ |
||||
1095 | 'default' => 'TOTP_OPTIONAL', |
||||
1096 | 'description' => "User authentication mode.\n\n@see \\Users_Totp_Authmethod::ALLOWED_USER_AUTHY_MODE\nAvailable values:\nTOTP_OFF - 2FA TOTP is checking off\nTOTP_OPTIONAL - It is defined by the user\nTOTP_OBLIGATORY - It is obligatory.", |
||||
1097 | 'validation' => function () { |
||||
1098 | $arg = func_get_arg(0); |
||||
1099 | return \in_array($arg, \Users_Totp_Authmethod::ALLOWED_USER_AUTHY_MODE); |
||||
1100 | }, |
||||
1101 | ], |
||||
1102 | 'whitelistIp2fa' => [ |
||||
1103 | 'default' => [], |
||||
1104 | 'description' => "IP address whitelisting.\nAllow access without 2FA.", |
||||
1105 | 'validation' => '\App\Validator::ip', |
||||
1106 | ], |
||||
1107 | 'CACHE_LIFETIME_SENSIOLABS_SECURITY_CHECKER' => [ |
||||
1108 | 'default' => 3600, |
||||
1109 | 'description' => 'Cache lifetime for SensioLabs security checker.', |
||||
1110 | 'validation' => '\App\Validator::naturalNumber', |
||||
1111 | ], |
||||
1112 | 'forceHttpsRedirection' => [ |
||||
1113 | 'default' => false, |
||||
1114 | 'description' => 'Force site access to always occur under SSL (https) for selected areas. You will not be able to access selected areas under non-ssl. Note, you must have SSL enabled on your server to utilise this option.', |
||||
1115 | ], |
||||
1116 | 'forceUrlRedirection' => [ |
||||
1117 | 'default' => true, |
||||
1118 | 'description' => 'Redirect to proper url when wrong url is entered.', |
||||
1119 | ], |
||||
1120 | 'hpkpKeysHeader' => [ |
||||
1121 | 'default' => [], |
||||
1122 | 'description' => "HTTP Public-Key-Pins (HPKP) pin-sha256 For HPKP to work properly at least 2 keys are needed.\nhttps://scotthelme.co.uk/hpkp-http-public-key-pinning/, https://sekurak.pl/mechanizm-http-public-key-pinning/.", |
||||
1123 | ], |
||||
1124 | 'verifyRefererHeader' => [ |
||||
1125 | 'default' => true, |
||||
1126 | 'description' => 'Verify referer header', |
||||
1127 | ], |
||||
1128 | 'csrfActive' => [ |
||||
1129 | 'default' => true, |
||||
1130 | 'description' => 'Enable CSRF protection', |
||||
1131 | 'validation' => '\App\Validator::bool', |
||||
1132 | 'sanitization' => '\App\Purifier::bool', |
||||
1133 | ], |
||||
1134 | 'csrfLifetimeToken' => [ |
||||
1135 | 'default' => 28800, |
||||
1136 | 'description' => 'Default expire time of CSRF token in seconds', |
||||
1137 | 'validation' => '\App\Validator::naturalNumber', |
||||
1138 | 'sanitization' => '\App\Purifier::naturalNumber', |
||||
1139 | ], |
||||
1140 | 'csrfFrameBreaker' => [ |
||||
1141 | 'default' => true, |
||||
1142 | 'description' => 'Enable verified frame protection, used in CSRF', |
||||
1143 | 'validation' => '\App\Validator::bool', |
||||
1144 | 'sanitization' => '\App\Purifier::bool', |
||||
1145 | ], |
||||
1146 | 'csrfFrameBreakerWindow' => [ |
||||
1147 | 'default' => 'top', |
||||
1148 | 'description' => 'Which window should be verified? It is used to check if the system is loaded in the frame, used in CSRF.', |
||||
1149 | 'validationValues' => ['top', 'parent'], |
||||
1150 | ], |
||||
1151 | 'cspHeaderActive' => [ |
||||
1152 | 'default' => true, |
||||
1153 | 'description' => 'HTTP Content Security Policy response header allows website administrators to control resources the user agent is allowed to load for a given page', |
||||
1154 | 'validation' => '\App\Validator::alnumSpace', |
||||
1155 | ], |
||||
1156 | 'cspHeaderTokenTime' => [ |
||||
1157 | 'default' => '5 minutes', |
||||
1158 | 'description' => 'HTTP Content Security Policy time interval for generating a new nonce token', |
||||
1159 | 'validation' => '\App\Validator::bool', |
||||
1160 | 'sanitization' => '\App\Purifier::bool', |
||||
1161 | ], |
||||
1162 | 'allowedImageDomains' => [ |
||||
1163 | 'default' => [], |
||||
1164 | 'description' => 'Allowed domains for loading images, used in CSP.', |
||||
1165 | 'loopValidate' => true, |
||||
1166 | 'validation' => '\App\Validator::text', |
||||
1167 | ], |
||||
1168 | 'allowedFrameDomains' => [ |
||||
1169 | 'default' => [], |
||||
1170 | 'description' => "Specifies valid parents that may embed a page using <frame>, <iframe>, <object>, <embed> or <applet> and validate referer.\nCSP: frame-ancestors.", |
||||
1171 | 'loopValidate' => true, |
||||
1172 | 'validation' => '\App\Validator::url', |
||||
1173 | ], |
||||
1174 | 'allowedScriptDomains' => [ |
||||
1175 | 'default' => [], |
||||
1176 | 'description' => 'Allowed domains for loading script, used in CSP.', |
||||
1177 | 'loopValidate' => true, |
||||
1178 | 'validation' => '\App\Validator::url', |
||||
1179 | ], |
||||
1180 | 'allowedFormDomains' => [ |
||||
1181 | 'default' => ['https://www.paypal.com'], |
||||
1182 | 'description' => 'Allowed domains which can be used as the target of a form submissions from a given context, used in CSP.', |
||||
1183 | ], |
||||
1184 | 'allowedConnectDomains' => [ |
||||
1185 | 'default' => [], |
||||
1186 | 'description' => "Allowed domains which can be loaded using script interfaces.\nCSP: connect-src.", |
||||
1187 | 'loopValidate' => true, |
||||
1188 | 'validation' => '\App\Validator::url', |
||||
1189 | ], |
||||
1190 | 'generallyAllowedDomains' => [ |
||||
1191 | 'default' => [], |
||||
1192 | 'description' => 'Generally allowed domains, used in CSP.', |
||||
1193 | ], |
||||
1194 | 'allowedDomainsLoadInFrame' => [ |
||||
1195 | 'default' => [], |
||||
1196 | 'description' => "Specifies valid sources for nested browsing contexts loading using elements such as <frame> and <iframe>.\nCSP: frame-src.", |
||||
1197 | 'loopValidate' => true, |
||||
1198 | 'validation' => '\App\Validator::url', |
||||
1199 | ], |
||||
1200 | 'purifierAllowedDomains' => [ |
||||
1201 | 'default' => [], |
||||
1202 | 'description' => 'List of allowed domains for fields with HTML support', |
||||
1203 | ], |
||||
1204 | 'proxyConnection' => [ |
||||
1205 | 'default' => false, |
||||
1206 | 'description' => 'Do you want all connections to be made using a proxy?', |
||||
1207 | 'validation' => '\App\Validator::bool', |
||||
1208 | 'sanitization' => '\App\Purifier::bool', |
||||
1209 | ], |
||||
1210 | 'proxyProtocol' => [ |
||||
1211 | 'default' => '', |
||||
1212 | 'description' => 'Proxy protocol: http, https, tcp', |
||||
1213 | 'validationValues' => ['http', 'https', 'tcp', ''], |
||||
1214 | ], |
||||
1215 | 'proxyHost' => [ |
||||
1216 | 'default' => '', |
||||
1217 | 'description' => 'Proxy host', |
||||
1218 | 'validation' => '\App\Validator::url', |
||||
1219 | ], |
||||
1220 | 'proxyPort' => [ |
||||
1221 | 'default' => 0, |
||||
1222 | 'description' => 'Proxy port', |
||||
1223 | 'validation' => '\App\Validator::port', |
||||
1224 | ], |
||||
1225 | 'proxyLogin' => [ |
||||
1226 | 'default' => '', |
||||
1227 | 'description' => 'Proxy login', |
||||
1228 | 'validation' => '\App\Validator::text', |
||||
1229 | 'sanitization' => '\App\Purifier::purify', |
||||
1230 | ], |
||||
1231 | 'proxyPassword' => [ |
||||
1232 | 'default' => '', |
||||
1233 | 'description' => 'Proxy password', |
||||
1234 | 'validation' => '\App\Validator::text', |
||||
1235 | 'sanitization' => '\App\Purifier::purify', |
||||
1236 | ], |
||||
1237 | 'askAdminAboutVisitPurpose' => [ |
||||
1238 | 'default' => true, |
||||
1239 | 'description' => '@var bool Ask admin about visit purpose', |
||||
1240 | 'validation' => '\App\Validator::bool', |
||||
1241 | 'sanitization' => '\App\Purifier::bool', |
||||
1242 | ], |
||||
1243 | 'askAdminAboutVisitSwitchUsers' => [ |
||||
1244 | 'default' => true, |
||||
1245 | 'description' => '@var bool Ask admin about switch users purpose', |
||||
1246 | 'validation' => '\App\Validator::bool', |
||||
1247 | 'sanitization' => '\App\Purifier::bool', |
||||
1248 | ], |
||||
1249 | 'askSuperUserAboutVisitPurpose' => [ |
||||
1250 | 'default' => true, |
||||
1251 | 'description' => '@var bool Ask super user about visit purpose, only for the settings part', |
||||
1252 | 'validation' => '\App\Validator::bool', |
||||
1253 | 'sanitization' => '\App\Purifier::bool', |
||||
1254 | ], |
||||
1255 | ], |
||||
1256 | 'sounds' => [ |
||||
1257 | 'IS_ENABLED' => [ |
||||
1258 | 'default' => true, |
||||
1259 | 'description' => 'Enable system sounds', |
||||
1260 | 'validation' => '\App\Validator::bool', |
||||
1261 | 'sanitization' => '\App\Purifier::bool', |
||||
1262 | ], |
||||
1263 | 'REMINDERS' => [ |
||||
1264 | 'default' => 'sound_1.mp3', |
||||
1265 | 'description' => 'Sets the type of sound of reminders', |
||||
1266 | ], |
||||
1267 | 'CHAT' => [ |
||||
1268 | 'default' => 'sound_2.mp3', |
||||
1269 | 'description' => 'Sets the type of sound of chat', |
||||
1270 | ], |
||||
1271 | 'MAILS' => [ |
||||
1272 | 'default' => 'sound_1.mp3', |
||||
1273 | 'description' => 'Sets the type of sound of mails', |
||||
1274 | ], |
||||
1275 | ], |
||||
1276 | 'db' => [ |
||||
1277 | 'db_server' => [ |
||||
1278 | 'default' => '>URL<', |
||||
1279 | 'description' => 'Gets the database server', |
||||
1280 | 'validation' => '\App\Validator::domain', |
||||
1281 | 'sanitization' => '\App\Purifier::purify', |
||||
1282 | ], |
||||
1283 | 'db_port' => [ |
||||
1284 | 'default' => '', |
||||
1285 | 'description' => 'Gets the database port', |
||||
1286 | 'validation' => '\App\Validator::port', |
||||
1287 | ], |
||||
1288 | 'db_username' => [ |
||||
1289 | 'default' => '_DBC_USER_', |
||||
1290 | 'description' => 'Gets the database user name', |
||||
1291 | 'validation' => '\App\Validator::dbUserName', |
||||
1292 | 'sanitization' => '\App\Purifier::purify', |
||||
1293 | ], |
||||
1294 | 'db_password' => [ |
||||
1295 | 'default' => '_DBC_PASS_', |
||||
1296 | 'description' => 'Gets the database password', |
||||
1297 | 'validation' => fn () => true, |
||||
1298 | ], |
||||
1299 | 'db_name' => [ |
||||
1300 | 'default' => '_DBC_NAME_', |
||||
1301 | 'description' => 'Gets the database name', |
||||
1302 | 'validation' => '\App\Validator::dbName', |
||||
1303 | 'sanitization' => '\App\Purifier::purify', |
||||
1304 | ], |
||||
1305 | 'db_type' => [ |
||||
1306 | 'default' => 'mysql', |
||||
1307 | 'description' => 'Gets the database type', |
||||
1308 | 'validation' => '\App\Validator::dbType', |
||||
1309 | ], |
||||
1310 | 'db_hostname' => [ |
||||
1311 | 'type' => 'function', |
||||
1312 | 'default' => 'return self::$db_server . \':\' . self::$db_port;', |
||||
1313 | 'description' => 'Gets host name.', |
||||
1314 | ], |
||||
1315 | 'base' => [ |
||||
1316 | 'type' => 'function', |
||||
1317 | 'default' => "return [ |
||||
1318 | 'dsn' => self::\$db_type . ':host=' . self::\$db_server . ';dbname=' . self::\$db_name . ';port=' . self::\$db_port, |
||||
1319 | 'host' => self::\$db_server, |
||||
1320 | 'port' => self::\$db_port, |
||||
1321 | 'username' => self::\$db_username, |
||||
1322 | 'password' => self::\$db_password, |
||||
1323 | 'dbName' => self::\$db_name, |
||||
1324 | 'tablePrefix' => 'yf_', |
||||
1325 | 'charset' => 'utf8', |
||||
1326 | ];", |
||||
1327 | 'description' => 'Basic database configuration.', |
||||
1328 | ], |
||||
1329 | ], |
||||
1330 | ]; |
||||
1331 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.