@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | 'enabledServices' => [ |
11 | 11 | 'default' => [], |
12 | 12 | 'description' => 'List of active services. Available: dav, webservice', |
13 | - 'validation' => function () { |
|
13 | + 'validation' => function() { |
|
14 | 14 | $arg = func_get_arg(0); |
15 | 15 | return \is_array($arg) && empty(array_diff($arg, ['dav', 'webservice'])); |
16 | 16 | }, |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'AUTH_METHOD' => [ |
55 | 55 | 'default' => 'Basic', |
56 | 56 | 'description' => 'Webservice config.', |
57 | - 'validation' => function () { |
|
57 | + 'validation' => function() { |
|
58 | 58 | return 'Basic' === func_get_arg(0); |
59 | 59 | }, |
60 | 60 | ], |
@@ -102,18 +102,18 @@ discard block |
||
102 | 102 | 'upload_maxsize' => [ |
103 | 103 | 'default' => 52428800, |
104 | 104 | 'description' => 'Maximum file size for uploaded files in bytes also used when uploading import files: upload_maxsize default value = 52428800 (50MB)', |
105 | - 'validation' => function () { |
|
105 | + 'validation' => function() { |
|
106 | 106 | $arg = func_get_arg(0); |
107 | 107 | return $arg && \App\Validator::naturalNumber($arg) && ($arg * 1048576) <= \vtlib\Functions::getMaxUploadSize(); |
108 | 108 | }, |
109 | - 'sanitization' => function () { |
|
109 | + 'sanitization' => function() { |
|
110 | 110 | return (int) func_get_arg(0) * 1048576; |
111 | 111 | }, |
112 | 112 | ], |
113 | 113 | 'allow_exports' => [ |
114 | 114 | 'default' => 'all', |
115 | 115 | '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', |
116 | - 'validation' => function () { |
|
116 | + 'validation' => function() { |
|
117 | 117 | $arg = func_get_arg(0); |
118 | 118 | return \in_array($arg, ['all', 'admin', 'none']); |
119 | 119 | }, |
@@ -125,18 +125,18 @@ discard block |
||
125 | 125 | 'list_max_entries_per_page' => [ |
126 | 126 | 'default' => 20, |
127 | 127 | 'description' => 'List max entries per page: default value = 20', |
128 | - 'validation' => function () { |
|
128 | + 'validation' => function() { |
|
129 | 129 | $arg = func_get_arg(0); |
130 | 130 | return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg); |
131 | 131 | }, |
132 | - 'sanitization' => function () { |
|
132 | + 'sanitization' => function() { |
|
133 | 133 | return (int) func_get_arg(0); |
134 | 134 | }, |
135 | 135 | ], |
136 | 136 | 'default_module' => [ |
137 | 137 | 'default' => 'Home', |
138 | 138 | 'description' => 'Default module: default value = Home', |
139 | - 'validation' => function () { |
|
139 | + 'validation' => function() { |
|
140 | 140 | $arg = func_get_arg(0); |
141 | 141 | return true === \App\Module::isModuleActive($arg); |
142 | 142 | }, |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | 'default_charset' => [ |
145 | 145 | 'default' => 'UTF-8', |
146 | 146 | 'description' => 'Default charset: default value = "UTF-8"', |
147 | - 'validation' => function () { |
|
147 | + 'validation' => function() { |
|
148 | 148 | return 'UTF-8' === func_get_arg(0); |
149 | 149 | }, |
150 | 150 | ], |
@@ -156,21 +156,21 @@ discard block |
||
156 | 156 | 'application_unique_key' => [ |
157 | 157 | 'default' => sha1(time() + random_int(1, 9999999)), |
158 | 158 | 'description' => 'Unique Application Key', |
159 | - 'validation' => function () { |
|
159 | + 'validation' => function() { |
|
160 | 160 | return !class_exists('\\Config\\Main'); |
161 | 161 | }, |
162 | - 'sanitization' => function () { |
|
162 | + 'sanitization' => function() { |
|
163 | 163 | return sha1(time() + random_int(1, 9999999)); |
164 | 164 | }, |
165 | 165 | ], |
166 | 166 | 'listview_max_textlength' => [ |
167 | 167 | 'default' => 40, |
168 | 168 | 'description' => 'Trim descriptions, titles in listviews to this value', |
169 | - 'validation' => function () { |
|
169 | + 'validation' => function() { |
|
170 | 170 | $arg = func_get_arg(0); |
171 | 171 | return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg); |
172 | 172 | }, |
173 | - 'sanitization' => function () { |
|
173 | + 'sanitization' => function() { |
|
174 | 174 | return (int) func_get_arg(0); |
175 | 175 | }, |
176 | 176 | ], |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | 'default_timezone' => [ |
182 | 182 | 'default' => '_TIMEZONE_', |
183 | 183 | 'description' => 'Set the default timezone as per your preference', |
184 | - 'validation' => function () { |
|
184 | + 'validation' => function() { |
|
185 | 185 | $arg = func_get_arg(0); |
186 | 186 | return \in_array($arg, timezone_identifiers_list()); |
187 | 187 | }, |
@@ -189,33 +189,33 @@ discard block |
||
189 | 189 | 'title_max_length' => [ |
190 | 190 | 'default' => 60, |
191 | 191 | 'description' => 'Maximum length of characters for title', |
192 | - 'validation' => function () { |
|
192 | + 'validation' => function() { |
|
193 | 193 | $arg = func_get_arg(0); |
194 | 194 | return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg); |
195 | 195 | }, |
196 | - 'sanitization' => function () { |
|
196 | + 'sanitization' => function() { |
|
197 | 197 | return (int) func_get_arg(0); |
198 | 198 | }, |
199 | 199 | ], |
200 | 200 | 'href_max_length' => [ |
201 | 201 | 'default' => 35, |
202 | 202 | 'description' => 'Maximum length for href tag', |
203 | - 'validation' => function () { |
|
203 | + 'validation' => function() { |
|
204 | 204 | $arg = func_get_arg(0); |
205 | 205 | return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg); |
206 | 206 | }, |
207 | - 'sanitization' => function () { |
|
207 | + 'sanitization' => function() { |
|
208 | 208 | return (int) func_get_arg(0); |
209 | 209 | }, |
210 | 210 | ], |
211 | 211 | 'MINIMUM_CRON_FREQUENCY' => [ |
212 | 212 | 'default' => 1, |
213 | 213 | 'description' => 'Minimum cron frequency [min]', |
214 | - 'validation' => function () { |
|
214 | + 'validation' => function() { |
|
215 | 215 | $arg = func_get_arg(0); |
216 | 216 | return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg); |
217 | 217 | }, |
218 | - 'sanitization' => function () { |
|
218 | + 'sanitization' => function() { |
|
219 | 219 | return (int) func_get_arg(0); |
220 | 220 | }, |
221 | 221 | ], |
@@ -231,11 +231,11 @@ discard block |
||
231 | 231 | 'listMaxEntriesMassEdit' => [ |
232 | 232 | 'default' => 500, |
233 | 233 | 'description' => 'Maximum number of records in a mass edition', |
234 | - 'validation' => function () { |
|
234 | + 'validation' => function() { |
|
235 | 235 | $arg = func_get_arg(0); |
236 | 236 | return $arg && \App\Validator::naturalNumber($arg) && (5000 >= $arg); |
237 | 237 | }, |
238 | - 'sanitization' => function () { |
|
238 | + 'sanitization' => function() { |
|
239 | 239 | return (int) func_get_arg(0); |
240 | 240 | }, |
241 | 241 | ], |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | 'defaultLayout' => [ |
279 | 279 | 'default' => 'basic', |
280 | 280 | 'description' => 'Set the default layout', |
281 | - 'validation' => function () { |
|
281 | + 'validation' => function() { |
|
282 | 282 | return isset(\App\Layout::getAllLayouts()[func_get_arg(0)]); |
283 | 283 | }, |
284 | 284 | ], |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | 'phoneFieldAdvancedHrefFormat' => [ |
290 | 290 | 'default' => new \Nette\PhpGenerator\PhpLiteral('\libphonenumber\PhoneNumberFormat::RFC3966'), |
291 | 291 | '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", |
292 | - 'validation' => function () { |
|
292 | + 'validation' => function() { |
|
293 | 293 | return \in_array(func_get_arg(0), [ |
294 | 294 | false, |
295 | 295 | \libphonenumber\PhoneNumberFormat::RFC3966, |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | 'LOG_LEVELS' => [ |
349 | 349 | 'default' => false, |
350 | 350 | 'description' => 'Level of saved/displayed logs. Values: false = All / 3 = error and warning / ["error", "warning", "info", "trace", "profile"]', |
351 | - 'validation' => function () { |
|
351 | + 'validation' => function() { |
|
352 | 352 | $arg = func_get_arg(0); |
353 | 353 | return false === $arg || (\is_array($arg) && array_diff(['error', 'warning', 'info', 'trace', 'profile'], $arg)); |
354 | 354 | }, |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | 'SMARTY_ERROR_REPORTING' => [ |
430 | 430 | 'default' => new \Nette\PhpGenerator\PhpLiteral('E_ALL & ~E_NOTICE'), |
431 | 431 | 'description' => 'Do not show Smarty Notice in phpError.log', |
432 | - 'validation' => function () { |
|
432 | + 'validation' => function() { |
|
433 | 433 | $arg = (string) func_get_arg(0); |
434 | 434 | return \in_array($arg, ['E_ALL', 'E_ALL & ~E_NOTICE']); |
435 | 435 | }, |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | 'EXCEPTION_ERROR_LEVEL' => [ |
438 | 438 | 'default' => new \Nette\PhpGenerator\PhpLiteral('E_ALL & ~E_NOTICE'), |
439 | 439 | '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", |
440 | - 'validation' => function () { |
|
440 | + 'validation' => function() { |
|
441 | 441 | $arg = (string) func_get_arg(0); |
442 | 442 | return \in_array($arg, ['E_ALL', 'E_ALL & ~E_NOTICE']); |
443 | 443 | }, |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | 'CACHING_DRIVER' => [ |
606 | 606 | 'default' => 'Base', |
607 | 607 | 'description' => 'Data caching is about storing some PHP variables in cache and retrieving it later from cache. Drivers: Base, Apcu', |
608 | - 'validation' => function () { |
|
608 | + 'validation' => function() { |
|
609 | 609 | $arg = func_get_arg(0); |
610 | 610 | return 'Basic' === $arg || 'Apcu' === $arg; |
611 | 611 | }, |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | 'MODULES_SPLITTED_EDIT_VIEW_LAYOUT' => [ |
809 | 809 | 'default' => [], |
810 | 810 | 'description' => 'List of modules with splitted edit view layout', |
811 | - 'validation' => function () { |
|
811 | + 'validation' => function() { |
|
812 | 812 | $arg = func_get_arg(0); |
813 | 813 | return \is_array($arg) && array_diff($arg, App\Module::getAllModuleNames()); |
814 | 814 | }, |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | 'default' => 20, |
872 | 872 | 'description' => 'Maximum length of a comment visible in the related module', |
873 | 873 | 'validation' => '\App\Validator::naturalNumber', |
874 | - 'sanitization' => function () { |
|
874 | + 'sanitization' => function() { |
|
875 | 875 | return (int) func_get_arg(0); |
876 | 876 | }, |
877 | 877 | ], |
@@ -921,7 +921,7 @@ discard block |
||
921 | 921 | 'GLOBAL_SEARCH_SORTING_RESULTS' => [ |
922 | 922 | 'default' => 0, |
923 | 923 | '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.', |
924 | - 'validation' => function () { |
|
924 | + 'validation' => function() { |
|
925 | 925 | $arg = func_get_arg(0); |
926 | 926 | return \is_int($arg) && \in_array($arg, [0, 1, 2]); |
927 | 927 | }, |
@@ -935,7 +935,7 @@ discard block |
||
935 | 935 | 'GLOBAL_SEARCH_AUTOCOMPLETE' => [ |
936 | 936 | 'default' => 1, |
937 | 937 | 'description' => 'Global search - Search for records while entering text (1/0).', |
938 | - 'validation' => function () { |
|
938 | + 'validation' => function() { |
|
939 | 939 | $arg = func_get_arg(0); |
940 | 940 | return \is_int($arg) && \in_array($arg, [0, 1]); |
941 | 941 | }, |
@@ -969,14 +969,14 @@ discard block |
||
969 | 969 | 'encryptionPass' => [ |
970 | 970 | 'default' => 'yeti', |
971 | 971 | 'description' => 'Key to encrypt passwords, changing the key results in the loss of all encrypted data.', |
972 | - 'validation' => function () { |
|
972 | + 'validation' => function() { |
|
973 | 973 | return true; |
974 | 974 | }, |
975 | 975 | ], |
976 | 976 | 'encryptionMethod' => [ |
977 | 977 | 'default' => 'aes-256-cbc', |
978 | 978 | 'description' => 'Encryption method.', |
979 | - 'validation' => function () { |
|
979 | + 'validation' => function() { |
|
980 | 980 | $arg = func_get_arg(0); |
981 | 981 | return empty($arg) || ($arg && \in_array($arg, \App\Encryption::getMethods())); |
982 | 982 | }, |
@@ -1044,7 +1044,7 @@ discard block |
||
1044 | 1044 | 'permittedModulesByCreatorField' => [ |
1045 | 1045 | 'default' => [], |
1046 | 1046 | 'description' => 'List of modules to which access is based on the record creation.', |
1047 | - 'validation' => function () { |
|
1047 | + 'validation' => function() { |
|
1048 | 1048 | $arg = func_get_arg(0); |
1049 | 1049 | return \is_array($arg) && array_diff($arg, App\Module::getAllModuleNames()); |
1050 | 1050 | }, |
@@ -1115,7 +1115,7 @@ discard block |
||
1115 | 1115 | 'cookieForceHttpOnly' => [ |
1116 | 1116 | 'default' => true, |
1117 | 1117 | 'description' => "Force the use of https only for cookie.\nValues: true, false, null", |
1118 | - 'validation' => function () { |
|
1118 | + 'validation' => function() { |
|
1119 | 1119 | $arg = func_get_arg(0); |
1120 | 1120 | return null === $arg ? $arg : \is_bool($arg); |
1121 | 1121 | }, |
@@ -1133,7 +1133,7 @@ discard block |
||
1133 | 1133 | 'USER_AUTHY_MODE' => [ |
1134 | 1134 | 'default' => 'TOTP_OPTIONAL', |
1135 | 1135 | '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.", |
1136 | - 'validation' => function () { |
|
1136 | + 'validation' => function() { |
|
1137 | 1137 | $arg = func_get_arg(0); |
1138 | 1138 | return \in_array($arg, \Users_Totp_Authmethod::ALLOWED_USER_AUTHY_MODE); |
1139 | 1139 | }, |
@@ -1321,7 +1321,7 @@ discard block |
||
1321 | 1321 | 'db_password' => [ |
1322 | 1322 | 'default' => '_DBC_PASS_', |
1323 | 1323 | 'description' => 'Gets the database password', |
1324 | - 'validation' => function () { |
|
1324 | + 'validation' => function() { |
|
1325 | 1325 | return true; |
1326 | 1326 | }, |
1327 | 1327 | ], |
@@ -339,13 +339,13 @@ discard block |
||
339 | 339 | 'lastCronStart' => ['container' => 'env', 'testCli' => false, 'label' => 'LAST_CRON_START', 'isHtml' => true], |
340 | 340 | 'crmProvider' => ['container' => 'env', 'testCli' => true, 'label' => 'CRM_PROVIDER'], |
341 | 341 | 'appId' => ['container' => 'env', 'testCli' => true, 'label' => 'APP_ID'], |
342 | - 'open_basedir' => ['container' => 'php', 'type' => 'OpenBasedir', 'testCli' => true, 'mode' => 'showWarnings'], |
|
342 | + 'open_basedir' => ['container' => 'php', 'type' => 'OpenBasedir', 'testCli' => true, 'mode' => 'showWarnings'], |
|
343 | 343 | 'caCertBundle' => ['recommended' => 'On', 'container' => 'env', 'type' => 'OnOff', 'testCli' => true, 'label' => 'CACERTBUNDLE'], |
344 | 344 | 'caCertBundlePath' => ['recommended' => 'On', 'container' => 'env', 'testCli' => true, 'label' => 'CACERTBUNDLE_PATH'], |
345 | 345 | 'SSL_CERT_FILE' => ['container' => 'env', 'testCli' => true, 'label' => 'SSL_CERT_FILE'], |
346 | 346 | 'SSL_CERT_DIR' => ['container' => 'env', 'testCli' => true, 'label' => 'SSL_CERT_DIR'], |
347 | - 'openssl.cafile' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
348 | - 'openssl.capath' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
347 | + 'openssl.cafile' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
348 | + 'openssl.capath' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
349 | 349 | ]; |
350 | 350 | |
351 | 351 | /** |
@@ -429,11 +429,11 @@ discard block |
||
429 | 429 | * @var array |
430 | 430 | */ |
431 | 431 | public static $functionalVerification = [ |
432 | - 'branding' => ['type' => 'Branding', 'testCli' => false, 'label' => 'FOOTER', 'mode' => 'onlyText'], |
|
433 | - 'shop' => ['type' => 'ShopProducts', 'testCli' => false, 'label' => 'PREMIUM_MODULES', 'mode' => 'onlyText'], |
|
434 | - 'watchdog' => ['type' => 'Watchdog', 'testCli' => true, 'label' => 'WATCHDOG', 'mode' => 'onlyText'], |
|
435 | - 'register' => ['type' => 'Register', 'testCli' => true, 'label' => 'REGISTER', 'mode' => 'onlyText'], |
|
436 | - 'shopCache' => ['type' => 'ShopCache', 'testCli' => true, 'label' => 'SHOP_CACHE', 'mode' => 'onlyText'], |
|
432 | + 'branding' => ['type' => 'Branding', 'testCli' => false, 'label' => 'FOOTER', 'mode' => 'onlyText'], |
|
433 | + 'shop' => ['type' => 'ShopProducts', 'testCli' => false, 'label' => 'PREMIUM_MODULES', 'mode' => 'onlyText'], |
|
434 | + 'watchdog' => ['type' => 'Watchdog', 'testCli' => true, 'label' => 'WATCHDOG', 'mode' => 'onlyText'], |
|
435 | + 'register' => ['type' => 'Register', 'testCli' => true, 'label' => 'REGISTER', 'mode' => 'onlyText'], |
|
436 | + 'shopCache' => ['type' => 'ShopCache', 'testCli' => true, 'label' => 'SHOP_CACHE', 'mode' => 'onlyText'], |
|
437 | 437 | ]; |
438 | 438 | /** |
439 | 439 | * Php variables. |
@@ -33,18 +33,18 @@ |
||
33 | 33 | $inventoryData = $this->textParser->recordModel->getInventoryData(); |
34 | 34 | $rows = reset($inventoryData); |
35 | 35 | $currency = \App\Fields\Currency::getById($rows['currency']); |
36 | - $differenceOfAmounts = \App\Fields\Double::formatToDisplay($this->textParser->recordModel->get('sum_gross') -$relatedRecordModel->get('sum_gross') ) . ' ' . $currency['currency_symbol']; |
|
36 | + $differenceOfAmounts = \App\Fields\Double::formatToDisplay($this->textParser->recordModel->get('sum_gross') - $relatedRecordModel->get('sum_gross')) . ' ' . $currency['currency_symbol']; |
|
37 | 37 | $differenceOfAmountsDesciption = $differenceOfAmounts > 0 ? \App\Language::translate('LBL_SURCHARGE_AMOUNT', 'Other.PDF') : \App\Language::translate('LBL_SURCHARGE_AMOUNT', 'Other.PDF'); |
38 | 38 | |
39 | 39 | return '<table cellspacing="0" style="border-collapse:collapse;width:100%;"> |
40 | 40 | <thead> |
41 | 41 | <tr> |
42 | - <th style="font-size:10px;">'.$differenceOfAmountsDesciption.'</th> |
|
42 | + <th style="font-size:10px;">'.$differenceOfAmountsDesciption . '</th> |
|
43 | 43 | </tr> |
44 | 44 | </thead> |
45 | 45 | <tbody> |
46 | 46 | <tr> |
47 | - <td style="border-color:#dddddd;border-style:solid;border-width:1px;font-size:12px;font-weight:bold;text-align:center;">'.$differenceOfAmounts .'</td> |
|
47 | + <td style="border-color:#dddddd;border-style:solid;border-width:1px;font-size:12px;font-weight:bold;text-align:center;">'.$differenceOfAmounts . '</td> |
|
48 | 48 | </tr> |
49 | 49 | </tbody> |
50 | 50 | </table>'; |
@@ -115,11 +115,11 @@ |
||
115 | 115 | self::$users['assignUserYes2'] = self::createUserRecord('assignUserYes2', ['available' => '1', 'auto_assign' => '1']); |
116 | 116 | self::$defaultUser = self::createUserRecord('assignUserDefault'); |
117 | 117 | |
118 | - self::$autoAssignUsers = array_filter(array_map(function ($userModel) { |
|
118 | + self::$autoAssignUsers = array_filter(array_map(function($userModel) { |
|
119 | 119 | return $userModel->get('auto_assign') ? $userModel->getId() : null; |
120 | 120 | }, self::$users)); |
121 | 121 | |
122 | - $members = array_map(function ($userModel) { |
|
122 | + $members = array_map(function($userModel) { |
|
123 | 123 | return \App\PrivilegeUtil::MEMBER_TYPE_USERS . ':' . $userModel->getId(); |
124 | 124 | }, self::$users); |
125 | 125 |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | public static function url(string $url): bool |
332 | 332 | { |
333 | 333 | if (mb_strlen($url) != \strlen($url) && \function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) { |
334 | - $url = preg_replace_callback('/:\/\/([^\/]+)/', function ($matches) { |
|
334 | + $url = preg_replace_callback('/:\/\/([^\/]+)/', function($matches) { |
|
335 | 335 | return '://' . idn_to_ascii($matches[1], IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46); |
336 | 336 | }, $url); |
337 | 337 | } |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | public static function path(string $input): bool |
480 | 480 | { |
481 | 481 | $parts = explode('/', trim(str_replace(\DIRECTORY_SEPARATOR, '/', $input), '/')); |
482 | - return !array_filter($parts, function ($dir) { |
|
482 | + return !array_filter($parts, function($dir) { |
|
483 | 483 | return !self::dirName($dir); |
484 | 484 | }); |
485 | 485 | } |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | -$is_admin=true; |
|
3 | -$user_info=['user_name'=>'admin','is_admin'=>'on','user_password'=>'$2y$10$mvy47VqQjd853TpAUr5aE.pd2fSTjBv.Z3G0g8AqyPwPNcV/YtB02','confirm_password'=>'','first_name'=>'','last_name'=>'Administrator','roleid'=>'H2','email1'=>'[email protected]','status'=>'Active','activity_view'=>'This Month','hour_format'=>'24','start_hour'=>'08:00','reports_to_id'=>0,'date_format'=>'yyyy-mm-dd','description'=>'','accesskey'=>'aOFXop10GCJ1uw0P','time_zone'=>'Europe/Sarajevo','currency_id'=>1,'currency_grouping_pattern'=>'123456789','currency_decimal_separator'=>'.','currency_grouping_separator'=>' ','currency_symbol_placement'=>'1.0$','imagename'=>'','internal_mailer'=>1,'theme'=>'twilight','language'=>'pl-PL','reminder_interval'=>'15 Minutes','phone_crm_extension'=>'','no_of_currency_decimals'=>'2','truncate_trailing_zeros'=>1,'dayoftheweek'=>'Monday','othereventduration'=>'[{"activitytype":"Call","duration":"60"},{"activitytype":"Meeting","duration":"60"},{"activitytype":"Task","duration":"60"}]','default_record_view'=>'Summary','leftpanelhide'=>0,'rowheight'=>'medium','defaulteventstatus'=>'PLL_PLANNED','defaultactivitytype'=>'Meeting','is_owner'=>'1','end_hour'=>'23:00','emailoptout'=>1,'available'=>1,'auto_assign'=>0,'view_date_format'=>'PLL_ELAPSED','login_method'=>'PLL_PASSWORD','sync_carddav'=>'PLL_OWNER','sync_caldav'=>'PLL_OWNER','secondary_email'=>'','default_search_operator'=>'PLL_CONTAINS','super_user'=>1,'currency_name'=>'Poland, Zlotych','currency_code'=>'PLN','currency_symbol'=>'zł','conv_rate'=>'1.00000','id'=>1]; |
|
4 | -return ['details'=>['user_name'=>'admin','is_admin'=>'1','user_password'=>'$2y$10$mvy47VqQjd853TpAUr5aE.pd2fSTjBv.Z3G0g8AqyPwPNcV/YtB02','confirm_password'=>'','first_name'=>'','last_name'=>'Administrator','roleid'=>'H2','email1'=>'[email protected]','status'=>'Active','activity_view'=>'This Month','hour_format'=>'24','start_hour'=>'08:00','reports_to_id'=>0,'date_format'=>'yyyy-mm-dd','description'=>'','accesskey'=>'aOFXop10GCJ1uw0P','time_zone'=>'Europe/Sarajevo','currency_id'=>1,'currency_grouping_pattern'=>'123456789','currency_decimal_separator'=>'.','currency_grouping_separator'=>' ','currency_symbol_placement'=>'1.0$','imagename'=>'','internal_mailer'=>1,'theme'=>'twilight','language'=>'pl-PL','reminder_interval'=>'15 Minutes','phone_crm_extension'=>'','no_of_currency_decimals'=>'2','truncate_trailing_zeros'=>1,'dayoftheweek'=>'Monday','othereventduration'=>'[{"activitytype":"Call","duration":"60"},{"activitytype":"Meeting","duration":"60"},{"activitytype":"Task","duration":"60"}]','default_record_view'=>'Summary','leftpanelhide'=>0,'rowheight'=>'medium','defaulteventstatus'=>'PLL_PLANNED','defaultactivitytype'=>'Meeting','is_owner'=>'1','end_hour'=>'23:00','emailoptout'=>1,'available'=>1,'auto_assign'=>0,'records_limit'=>'','phone_crm_extension_extra'=>'','date_password_change'=>'','force_password_change'=>'','view_date_format'=>'PLL_ELAPSED','authy_methods'=>'','authy_secret_totp'=>'','login_method'=>'PLL_PASSWORD','sync_carddav'=>'PLL_OWNER','sync_caldav'=>'PLL_OWNER','sync_carddav_default_country'=>'','default_search_module'=>'','default_search_override'=>'','primary_phone_extra'=>'','primary_phone'=>'','mail_scanner_actions'=>'','mail_scanner_fields'=>'','secondary_email'=>'','default_search_operator'=>'PLL_CONTAINS','super_user'=>1,'calendar_all_users_by_default'=>'','currency_name'=>'Poland, Zlotych','currency_code'=>'PLN','currency_symbol'=>'zł','conv_rate'=>'1.00000','record_id'=>1,'record_module'=>'Users'],'displayName'=>'Administrator','profiles'=>[1],'groups'=>[3],'leadersByGroup'=>[],'leader'=>[],'parent_roles'=>['H1'],'parent_role_seq'=>'H1::H2','roleName'=>'Board of Management','multiCompanyId'=>1,'multiCompanyLogo'=>['name'=>'logo_yetiforce.png','size'=>'3 KB','path'=>'public_html/layouts/resources/Logo/logo_login_page.png','key'=>'11111111111111111111111111111111111111111111111111'],'multiCompanyLogoUrl'=>'file.php?module=MultiCompany&action=Logo&record=1&key=11111111111111111111111111111111111111111111111111']; |
|
2 | +$is_admin = true; |
|
3 | +$user_info = ['user_name'=>'admin', 'is_admin'=>'on', 'user_password'=>'$2y$10$mvy47VqQjd853TpAUr5aE.pd2fSTjBv.Z3G0g8AqyPwPNcV/YtB02', 'confirm_password'=>'', 'first_name'=>'', 'last_name'=>'Administrator', 'roleid'=>'H2', 'email1'=>'[email protected]', 'status'=>'Active', 'activity_view'=>'This Month', 'hour_format'=>'24', 'start_hour'=>'08:00', 'reports_to_id'=>0, 'date_format'=>'yyyy-mm-dd', 'description'=>'', 'accesskey'=>'aOFXop10GCJ1uw0P', 'time_zone'=>'Europe/Sarajevo', 'currency_id'=>1, 'currency_grouping_pattern'=>'123456789', 'currency_decimal_separator'=>'.', 'currency_grouping_separator'=>' ', 'currency_symbol_placement'=>'1.0$', 'imagename'=>'', 'internal_mailer'=>1, 'theme'=>'twilight', 'language'=>'pl-PL', 'reminder_interval'=>'15 Minutes', 'phone_crm_extension'=>'', 'no_of_currency_decimals'=>'2', 'truncate_trailing_zeros'=>1, 'dayoftheweek'=>'Monday', 'othereventduration'=>'[{"activitytype":"Call","duration":"60"},{"activitytype":"Meeting","duration":"60"},{"activitytype":"Task","duration":"60"}]', 'default_record_view'=>'Summary', 'leftpanelhide'=>0, 'rowheight'=>'medium', 'defaulteventstatus'=>'PLL_PLANNED', 'defaultactivitytype'=>'Meeting', 'is_owner'=>'1', 'end_hour'=>'23:00', 'emailoptout'=>1, 'available'=>1, 'auto_assign'=>0, 'view_date_format'=>'PLL_ELAPSED', 'login_method'=>'PLL_PASSWORD', 'sync_carddav'=>'PLL_OWNER', 'sync_caldav'=>'PLL_OWNER', 'secondary_email'=>'', 'default_search_operator'=>'PLL_CONTAINS', 'super_user'=>1, 'currency_name'=>'Poland, Zlotych', 'currency_code'=>'PLN', 'currency_symbol'=>'zł', 'conv_rate'=>'1.00000', 'id'=>1]; |
|
4 | +return ['details'=>['user_name'=>'admin', 'is_admin'=>'1', 'user_password'=>'$2y$10$mvy47VqQjd853TpAUr5aE.pd2fSTjBv.Z3G0g8AqyPwPNcV/YtB02', 'confirm_password'=>'', 'first_name'=>'', 'last_name'=>'Administrator', 'roleid'=>'H2', 'email1'=>'[email protected]', 'status'=>'Active', 'activity_view'=>'This Month', 'hour_format'=>'24', 'start_hour'=>'08:00', 'reports_to_id'=>0, 'date_format'=>'yyyy-mm-dd', 'description'=>'', 'accesskey'=>'aOFXop10GCJ1uw0P', 'time_zone'=>'Europe/Sarajevo', 'currency_id'=>1, 'currency_grouping_pattern'=>'123456789', 'currency_decimal_separator'=>'.', 'currency_grouping_separator'=>' ', 'currency_symbol_placement'=>'1.0$', 'imagename'=>'', 'internal_mailer'=>1, 'theme'=>'twilight', 'language'=>'pl-PL', 'reminder_interval'=>'15 Minutes', 'phone_crm_extension'=>'', 'no_of_currency_decimals'=>'2', 'truncate_trailing_zeros'=>1, 'dayoftheweek'=>'Monday', 'othereventduration'=>'[{"activitytype":"Call","duration":"60"},{"activitytype":"Meeting","duration":"60"},{"activitytype":"Task","duration":"60"}]', 'default_record_view'=>'Summary', 'leftpanelhide'=>0, 'rowheight'=>'medium', 'defaulteventstatus'=>'PLL_PLANNED', 'defaultactivitytype'=>'Meeting', 'is_owner'=>'1', 'end_hour'=>'23:00', 'emailoptout'=>1, 'available'=>1, 'auto_assign'=>0, 'records_limit'=>'', 'phone_crm_extension_extra'=>'', 'date_password_change'=>'', 'force_password_change'=>'', 'view_date_format'=>'PLL_ELAPSED', 'authy_methods'=>'', 'authy_secret_totp'=>'', 'login_method'=>'PLL_PASSWORD', 'sync_carddav'=>'PLL_OWNER', 'sync_caldav'=>'PLL_OWNER', 'sync_carddav_default_country'=>'', 'default_search_module'=>'', 'default_search_override'=>'', 'primary_phone_extra'=>'', 'primary_phone'=>'', 'mail_scanner_actions'=>'', 'mail_scanner_fields'=>'', 'secondary_email'=>'', 'default_search_operator'=>'PLL_CONTAINS', 'super_user'=>1, 'calendar_all_users_by_default'=>'', 'currency_name'=>'Poland, Zlotych', 'currency_code'=>'PLN', 'currency_symbol'=>'zł', 'conv_rate'=>'1.00000', 'record_id'=>1, 'record_module'=>'Users'], 'displayName'=>'Administrator', 'profiles'=>[1], 'groups'=>[3], 'leadersByGroup'=>[], 'leader'=>[], 'parent_roles'=>['H1'], 'parent_role_seq'=>'H1::H2', 'roleName'=>'Board of Management', 'multiCompanyId'=>1, 'multiCompanyLogo'=>['name'=>'logo_yetiforce.png', 'size'=>'3 KB', 'path'=>'public_html/layouts/resources/Logo/logo_login_page.png', 'key'=>'11111111111111111111111111111111111111111111111111'], 'multiCompanyLogoUrl'=>'file.php?module=MultiCompany&action=Logo&record=1&key=11111111111111111111111111111111111111111111111111']; |
@@ -188,7 +188,7 @@ |
||
188 | 188 | } |
189 | 189 | $teaser = $css = $btn = ''; |
190 | 190 | $loadData = true; |
191 | - $btnTemplate = function (string $popoverText = '', ?string $btnClass = ''): string { |
|
191 | + $btnTemplate = function(string $popoverText = '', ?string $btnClass = ''): string { |
|
192 | 192 | $popoverText = \App\Language::translate($popoverText); |
193 | 193 | return "<a href=\"#\" class=\"js-more noLinkBtn font-weight-lighter js-popover-tooltip {$btnClass}\" data-iframe=\"true\" data-content=\"{$popoverText}\"><span class=\"mdi mdi-overscan\"></span></a>"; |
194 | 194 | }; |
@@ -183,7 +183,7 @@ |
||
183 | 183 | public function positions(App\Request $request): void |
184 | 184 | { |
185 | 185 | $currentUserId = App\User::getCurrentUserId(); |
186 | - if ($positionsMap = $request->getMultiDimensionArray('position', [['row' => 'Integer', 'col' => 'Integer']])) { |
|
186 | + if ($positionsMap = $request->getMultiDimensionArray('position', [['row' => 'Integer', 'col' => 'Integer']])) { |
|
187 | 187 | foreach ($positionsMap as $id => $position) { |
188 | 188 | [$linkId, $widgetId] = array_pad(explode('-', $id), 2, false); |
189 | 189 | if ($widgetId) { |
@@ -182,7 +182,7 @@ |
||
182 | 182 | } |
183 | 183 | return \nl2br(static::$languageContainer[$language][$moduleName]['php'][$key]); |
184 | 184 | } |
185 | - if($secondModuleName){ |
|
185 | + if ($secondModuleName) { |
|
186 | 186 | static::loadLanguageFile($language, $secondModuleName); |
187 | 187 | if (isset(static::$languageContainer[$language][$secondModuleName]['php'][$key])) { |
188 | 188 | if ($encode) { |