@@ -103,12 +103,12 @@ |
||
| 103 | 103 | public function htmlToText(array &$item): void |
| 104 | 104 | { |
| 105 | 105 | if (false !== strpos($item['val'], '<b class="text-danger">')) { |
| 106 | - $item['val'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", function ($match) { |
|
| 106 | + $item['val'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", function($match) { |
|
| 107 | 107 | return "<light_red>{$match['1']}</light_red>"; |
| 108 | 108 | }, $item['val']); |
| 109 | 109 | } |
| 110 | 110 | if (false !== strpos($item['recommended'], '<b class="text-danger">')) { |
| 111 | - $item['recommended'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", function ($match) { |
|
| 111 | + $item['recommended'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", function($match) { |
|
| 112 | 112 | return "<light_red>{$match['1']}</light_red>"; |
| 113 | 113 | }, $item['recommended']); |
| 114 | 114 | } |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | $viewer->assign('WIDGET', $widget); |
| 141 | 141 | $viewer->assign('MODULE_NAME', $moduleName); |
| 142 | 142 | $viewer->assign('DATA', $data); |
| 143 | - $viewer->assign('DTIME', implode(',', \App\Fields\Date::formatRangeToDisplay($time))); |
|
| 143 | + $viewer->assign('DTIME', implode(',', \App\Fields\Date::formatRangeToDisplay($time))); |
|
| 144 | 144 | $viewer->assign('COMPARE', $compare); |
| 145 | 145 | $viewer->assign('ACCESSIBLE_USERS', \App\Fields\Owner::getInstance('Accounts', $currentUserId)->getAccessibleUsersForModule()); |
| 146 | 146 | $viewer->assign('ACCESSIBLE_GROUPS', \App\Fields\Owner::getInstance('Accounts', $currentUserId)->getAccessibleGroupForModule()); |
@@ -16,9 +16,9 @@ |
||
| 16 | 16 | public function process(App\Request $request) |
| 17 | 17 | { |
| 18 | 18 | $recordModel = Settings_SlaPolicy_Record_Model::getInstanceById($request->getInteger('record')); |
| 19 | - $result = ['success' => true]; |
|
| 19 | + $result = ['success' => true]; |
|
| 20 | 20 | if ($recordModel) { |
| 21 | - $result = ['success' => (bool) $recordModel->delete()]; |
|
| 21 | + $result = ['success' => (bool) $recordModel->delete()]; |
|
| 22 | 22 | } |
| 23 | 23 | $response = new Vtiger_Response(); |
| 24 | 24 | $response->setResult($result); |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | 'default_host' => [ |
| 10 | 10 | 'default' => ['ssl://imap.gmail.com' => 'ssl://imap.gmail.com'], |
| 11 | 11 | 'description' => 'Default host.', |
| 12 | - 'validation' => function () { |
|
| 12 | + 'validation' => function() { |
|
| 13 | 13 | $arg = func_get_arg(0); |
| 14 | 14 | if (!$arg) { |
| 15 | 15 | return false; |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | } |
| 23 | 23 | return true; |
| 24 | 24 | }, |
| 25 | - 'sanitization' => function () { |
|
| 25 | + 'sanitization' => function() { |
|
| 26 | 26 | $values = func_get_arg(0); |
| 27 | 27 | if (!\is_array($values)) { |
| 28 | 28 | $values = [$values]; |
@@ -39,14 +39,14 @@ discard block |
||
| 39 | 39 | 'default' => 993, |
| 40 | 40 | 'description' => 'Port used to connect to IMAP.', |
| 41 | 41 | 'validation' => '\App\Validator::port', |
| 42 | - 'sanitization' => function () { |
|
| 42 | + 'sanitization' => function() { |
|
| 43 | 43 | return (int) func_get_arg(0); |
| 44 | 44 | } |
| 45 | 45 | ], |
| 46 | 46 | 'smtp_server' => [ |
| 47 | 47 | 'default' => 'ssl://smtp.gmail.com', |
| 48 | 48 | 'description' => 'Name of SMTP server', |
| 49 | - 'validation' => function () { |
|
| 49 | + 'validation' => function() { |
|
| 50 | 50 | $arg = func_get_arg(0); |
| 51 | 51 | return $arg && \App\Purifier::purify($arg); |
| 52 | 52 | }, |
@@ -56,14 +56,14 @@ discard block |
||
| 56 | 56 | 'default' => 465, |
| 57 | 57 | 'description' => 'Default smtp port', |
| 58 | 58 | 'validation' => '\App\Validator::port', |
| 59 | - 'sanitization' => function () { |
|
| 59 | + 'sanitization' => function() { |
|
| 60 | 60 | return (int) func_get_arg(0); |
| 61 | 61 | } |
| 62 | 62 | ], |
| 63 | 63 | 'username_domain' => [ |
| 64 | 64 | 'default' => 'gmail.com', |
| 65 | 65 | 'description' => 'User name domain', |
| 66 | - 'validation' => function () { |
|
| 66 | + 'validation' => function() { |
|
| 67 | 67 | $arg = func_get_arg(0); |
| 68 | 68 | return '' === $arg || \App\Validator::domain($arg); |
| 69 | 69 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | 'smtp_user' => [ |
| 88 | 88 | 'default' => '%u', |
| 89 | 89 | 'description' => 'Login to SMTP server', |
| 90 | - 'validation' => function () { |
|
| 90 | + 'validation' => function() { |
|
| 91 | 91 | $arg = func_get_arg(0); |
| 92 | 92 | return $arg && !is_numeric($arg) && \is_string($arg) && $arg === strip_tags($arg) && 256 > \App\TextParser::getTextLength($arg); |
| 93 | 93 | }, |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | 'smtp_pass' => [ |
| 97 | 97 | 'default' => '%p', |
| 98 | 98 | 'description' => "SMTP password (if required) if you use %p as the password Roundcube will use the current user's password for login", |
| 99 | - 'validation' => function () { |
|
| 99 | + 'validation' => function() { |
|
| 100 | 100 | $arg = func_get_arg(0); |
| 101 | 101 | return !empty($arg) && 256 > \App\TextParser::getTextLength($arg); |
| 102 | 102 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | 'language' => [ |
| 105 | 105 | 'default' => 'en_US', |
| 106 | 106 | 'description' => 'Set default language', |
| 107 | - 'validation' => function () { |
|
| 107 | + 'validation' => function() { |
|
| 108 | 108 | $arg = func_get_arg(0); |
| 109 | 109 | return $arg && \in_array($arg, \Settings_OSSMail_Config_Model::LANGUAGES); |
| 110 | 110 | } |
@@ -112,11 +112,11 @@ discard block |
||
| 112 | 112 | 'skin_logo' => [ |
| 113 | 113 | 'default' => '/images/null.png', |
| 114 | 114 | 'description' => 'Skin logo', |
| 115 | - 'validation' => function () { |
|
| 115 | + 'validation' => function() { |
|
| 116 | 116 | $arg = func_get_arg(0); |
| 117 | 117 | return !empty($arg) && \App\Purifier::purify($arg); |
| 118 | 118 | }, |
| 119 | - 'sanitization' => function () { |
|
| 119 | + 'sanitization' => function() { |
|
| 120 | 120 | $arg = func_get_arg(0); |
| 121 | 121 | return ['*' => \App\Purifier::encodeHtml($arg)]; |
| 122 | 122 | } |
@@ -136,11 +136,11 @@ discard block |
||
| 136 | 136 | 'identities_level' => [ |
| 137 | 137 | 'default' => 0, |
| 138 | 138 | 'description' => 'Identities level.', |
| 139 | - 'validation' => function () { |
|
| 139 | + 'validation' => function() { |
|
| 140 | 140 | $arg = func_get_arg(0); |
| 141 | 141 | return is_numeric($arg) && \in_array($arg, [0, 1, 2, 3, 4]); |
| 142 | 142 | }, |
| 143 | - 'sanitization' => function () { |
|
| 143 | + 'sanitization' => function() { |
|
| 144 | 144 | return (int) func_get_arg(0); |
| 145 | 145 | } |
| 146 | 146 | ], |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | 'default' => 30, |
| 149 | 149 | 'description' => 'Session lifetime in minutes', |
| 150 | 150 | 'validation' => '\App\Validator::naturalNumber', |
| 151 | - 'sanitization' => function () { |
|
| 151 | + 'sanitization' => function() { |
|
| 152 | 152 | return (int) func_get_arg(0); |
| 153 | 153 | } |
| 154 | 154 | ], |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | 'useragent' => [ |
| 354 | 354 | 'default' => 'YetiForce Webmail', |
| 355 | 355 | 'description' => 'Add this user-agent to message headers when sending', |
| 356 | - 'validation' => function () { |
|
| 356 | + 'validation' => function() { |
|
| 357 | 357 | $arg = func_get_arg(0); |
| 358 | 358 | return $arg && \App\Purifier::purify($arg); |
| 359 | 359 | }, |
@@ -185,7 +185,7 @@ |
||
| 185 | 185 | if (static::$clearOpcache) { |
| 186 | 186 | return false; |
| 187 | 187 | } |
| 188 | - register_shutdown_function(function () { |
|
| 188 | + register_shutdown_function(function() { |
|
| 189 | 189 | static::resetOpcache(); |
| 190 | 190 | }); |
| 191 | 191 | return static::$clearOpcache = true; |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | $dbCommand->insert('vtiger_senotesrel', ['crmid' => $id, 'notesid' => $documentId])->execute(); |
| 76 | 76 | } |
| 77 | 77 | $dataReader->close(); |
| 78 | - unset($dataReader,$query, $dbCommand, $recordModel); |
|
| 78 | + unset($dataReader, $query, $dbCommand, $recordModel); |
|
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | |
@@ -186,7 +186,7 @@ |
||
| 186 | 186 | return ''; |
| 187 | 187 | } |
| 188 | 188 | $teaser = $css = $btn = ''; |
| 189 | - $btnTemplate = function (string $popoverText = '', ?string $btnClass = ''): string { |
|
| 189 | + $btnTemplate = function(string $popoverText = '', ?string $btnClass = ''): string { |
|
| 190 | 190 | $popoverText = \App\Language::translate($popoverText); |
| 191 | 191 | 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>"; |
| 192 | 192 | }; |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | $viewer->assign('WID', ''); |
| 61 | 61 | $viewer->assign('WIDGETINFO', [ |
| 62 | 62 | 'data' => [ |
| 63 | - 'limit' => 5, 'relatedmodule' => '', 'columns' => '', |
|
| 63 | + 'limit' => 5, 'relatedmodule' => '', 'columns' => '', |
|
| 64 | 64 | 'action' => '', 'switchHeader' => '', 'filter' => '', |
| 65 | 65 | 'checkbox' => '', 'customView' => '[]', |
| 66 | 66 | ], |
@@ -336,13 +336,13 @@ discard block |
||
| 336 | 336 | 'spaceBackup' => ['container' => 'env', 'type' => 'Space', 'testCli' => false, 'label' => 'SPACE_BACKUP'], |
| 337 | 337 | 'lastCronStart' => ['container' => 'env', 'testCli' => false, 'label' => 'LAST_CRON_START', 'isHtml' => true], |
| 338 | 338 | 'crmProvider' => ['container' => 'env', 'testCli' => true, 'label' => 'CRM_PROVIDER'], |
| 339 | - 'open_basedir' => ['container' => 'php', 'type' => 'OpenBasedir', 'testCli' => true, 'mode' => 'showWarnings'], |
|
| 339 | + 'open_basedir' => ['container' => 'php', 'type' => 'OpenBasedir', 'testCli' => true, 'mode' => 'showWarnings'], |
|
| 340 | 340 | 'caCertBundle' => ['recommended' => 'On', 'container' => 'env', 'type' => 'OnOff', 'testCli' => true, 'label' => 'CACERTBUNDLE'], |
| 341 | 341 | 'caCertBundlePath' => ['recommended' => 'On', 'container' => 'env', 'testCli' => true, 'label' => 'CACERTBUNDLE_PATH'], |
| 342 | 342 | 'SSL_CERT_FILE' => ['container' => 'env', 'testCli' => true, 'label' => 'SSL_CERT_FILE'], |
| 343 | 343 | 'SSL_CERT_DIR' => ['container' => 'env', 'testCli' => true, 'label' => 'SSL_CERT_DIR'], |
| 344 | - 'openssl.cafile' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
| 345 | - 'openssl.capath' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
| 344 | + 'openssl.cafile' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
| 345 | + 'openssl.capath' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
| 346 | 346 | ]; |
| 347 | 347 | |
| 348 | 348 | /** |
@@ -426,8 +426,8 @@ discard block |
||
| 426 | 426 | * @var array |
| 427 | 427 | */ |
| 428 | 428 | public static $functionalVerification = [ |
| 429 | - 'branding' => ['type' => 'Branding', 'testCli' => false, 'label' => 'FOOTER', 'mode' => 'onlyText'], |
|
| 430 | - 'shop' => ['type' => 'ShopProducts', 'testCli' => false, 'label' => 'PREMIUM_MODULES', 'mode' => 'onlyText'], |
|
| 429 | + 'branding' => ['type' => 'Branding', 'testCli' => false, 'label' => 'FOOTER', 'mode' => 'onlyText'], |
|
| 430 | + 'shop' => ['type' => 'ShopProducts', 'testCli' => false, 'label' => 'PREMIUM_MODULES', 'mode' => 'onlyText'], |
|
| 431 | 431 | ]; |
| 432 | 432 | /** |
| 433 | 433 | * Php variables. |