@@ -21,43 +21,43 @@ |
||
21 | 21 | const SYSTEM_FIELDS = [ |
22 | 22 | 'assigned_user_id' => [ |
23 | 23 | 'validationConditions' => ['name'], |
24 | - 'name' => 'assigned_user_id', 'column' => 'smownerid', 'label' => 'Assigned To', 'table' => 'vtiger_crmentity', |
|
25 | - 'uitype' => 53, 'typeofdata' => 'V~M', 'maximumlength' => 65535, |
|
24 | + 'name' => 'assigned_user_id', 'column' => 'smownerid', 'label' => 'Assigned To', 'table' => 'vtiger_crmentity', |
|
25 | + 'uitype' => 53, 'typeofdata' => 'V~M', 'maximumlength' => 65535, |
|
26 | 26 | ], |
27 | 27 | 'createdtime' => [ |
28 | 28 | 'validationConditions' => ['name'], |
29 | - 'name' => 'createdtime', 'column' => 'createdtime', 'label' => 'Created Time', 'table' => 'vtiger_crmentity', |
|
30 | - 'uitype' => 70, 'typeofdata' => 'DT~O', 'displaytype' => 2, 'maximumlength' => 65535, |
|
29 | + 'name' => 'createdtime', 'column' => 'createdtime', 'label' => 'Created Time', 'table' => 'vtiger_crmentity', |
|
30 | + 'uitype' => 70, 'typeofdata' => 'DT~O', 'displaytype' => 2, 'maximumlength' => 65535, |
|
31 | 31 | ], |
32 | 32 | 'modifiedtime' => [ |
33 | 33 | 'validationConditions' => ['name'], |
34 | - 'name' => 'modifiedtime', 'column' => 'modifiedtime', 'label' => 'Modified Time', 'table' => 'vtiger_crmentity', |
|
35 | - 'uitype' => 70, 'typeofdata' => 'DT~O', 'displaytype' => 2, 'maximumlength' => 65535, |
|
34 | + 'name' => 'modifiedtime', 'column' => 'modifiedtime', 'label' => 'Modified Time', 'table' => 'vtiger_crmentity', |
|
35 | + 'uitype' => 70, 'typeofdata' => 'DT~O', 'displaytype' => 2, 'maximumlength' => 65535, |
|
36 | 36 | ], |
37 | 37 | 'created_user_id' => [ |
38 | 38 | 'validationConditions' => ['column'], |
39 | - 'name' => 'created_user_id', 'column' => 'smcreatorid', 'label' => 'Created By', 'table' => 'vtiger_crmentity', |
|
40 | - 'uitype' => 52, 'typeofdata' => 'V~O', 'displaytype' => 2, 'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535, |
|
39 | + 'name' => 'created_user_id', 'column' => 'smcreatorid', 'label' => 'Created By', 'table' => 'vtiger_crmentity', |
|
40 | + 'uitype' => 52, 'typeofdata' => 'V~O', 'displaytype' => 2, 'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535, |
|
41 | 41 | ], |
42 | 42 | 'modifiedby' => [ |
43 | 43 | 'validationConditions' => ['name'], |
44 | - 'name' => 'modifiedby', 'column' => 'modifiedby', 'label' => 'Last Modified By', 'table' => 'vtiger_crmentity', |
|
45 | - 'uitype' => 52, 'typeofdata' => 'V~O', 'displaytype' => 2, 'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535, |
|
44 | + 'name' => 'modifiedby', 'column' => 'modifiedby', 'label' => 'Last Modified By', 'table' => 'vtiger_crmentity', |
|
45 | + 'uitype' => 52, 'typeofdata' => 'V~O', 'displaytype' => 2, 'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535, |
|
46 | 46 | ], |
47 | 47 | 'shownerid' => [ |
48 | 48 | 'validationConditions' => ['name'], |
49 | - 'name' => 'shownerid', 'column' => 'shownerid', 'label' => 'Share with users', 'table' => 'vtiger_crmentity', |
|
50 | - 'uitype' => 120, 'typeofdata' => 'V~O', 'columntype' => 'int(11)', 'maximumlength' => 65535, |
|
49 | + 'name' => 'shownerid', 'column' => 'shownerid', 'label' => 'Share with users', 'table' => 'vtiger_crmentity', |
|
50 | + 'uitype' => 120, 'typeofdata' => 'V~O', 'columntype' => 'int(11)', 'maximumlength' => 65535, |
|
51 | 51 | ], |
52 | 52 | 'private' => [ |
53 | 53 | 'validationConditions' => ['name'], |
54 | - 'name' => 'private', 'column' => 'private', 'label' => 'FL_IS_PRIVATE', 'table' => 'vtiger_crmentity', |
|
55 | - 'uitype' => 56, 'typeofdata' => 'C~O', 'columntype' => 'int(11)', 'maximumlength' => '-128,127', 'presence' => 2, 'generatedtype' => 2, |
|
54 | + 'name' => 'private', 'column' => 'private', 'label' => 'FL_IS_PRIVATE', 'table' => 'vtiger_crmentity', |
|
55 | + 'uitype' => 56, 'typeofdata' => 'C~O', 'columntype' => 'int(11)', 'maximumlength' => '-128,127', 'presence' => 2, 'generatedtype' => 2, |
|
56 | 56 | ], |
57 | 57 | 'share_externally' => [ |
58 | 58 | 'validationConditions' => ['uitype', 'fieldparams'], |
59 | - 'name' => 'share_externally', 'column' => 'share_externally', 'label' => 'FL_SHARE_EXTERNALLY', 'defaultvalue' => 0, 'fieldparams' => 1, |
|
60 | - 'uitype' => 318, 'typeofdata' => 'C~O', 'columntype' => 'tinyint(1)', 'maximumlength' => '-128,127', |
|
59 | + 'name' => 'share_externally', 'column' => 'share_externally', 'label' => 'FL_SHARE_EXTERNALLY', 'defaultvalue' => 0, 'fieldparams' => 1, |
|
60 | + 'uitype' => 318, 'typeofdata' => 'C~O', 'columntype' => 'tinyint(1)', 'maximumlength' => '-128,127', |
|
61 | 61 | ], |
62 | 62 | ]; |
63 | 63 |
@@ -695,7 +695,7 @@ |
||
695 | 695 | } |
696 | 696 | } |
697 | 697 | |
698 | - $lastMessage = 1 === \count($lastMessagesData) ? current($lastMessagesData) : array_reduce($lastMessagesData, function ($a, $b) { |
|
698 | + $lastMessage = 1 === \count($lastMessagesData) ? current($lastMessagesData) : array_reduce($lastMessagesData, function($a, $b) { |
|
699 | 699 | return $a['created'] > $b['created'] ? $a : $b; |
700 | 700 | }); |
701 | 701 | if (!empty($lastMessage)) { |
@@ -61,7 +61,7 @@ |
||
61 | 61 | 'linkicon' => ($isActive ? 'yfi-public-webservice' : 'yfi-unshare-in-webservice'), |
62 | 62 | 'linkclass' => 'js-action-confirm btn-sm ' . self::BTN_CLASS[$source][$isActive], |
63 | 63 | 'dataUrl' => "index.php?module={$recordModel->getModuleName()}&action=SaveAjax&record={$recordModel->getId()}&field={$fieldName}&value=" . ($isActive ? 0 : 1), |
64 | - 'linkdata' => ['add-btn-icon' => 1, 'source-view' => $source], |
|
64 | + 'linkdata' => ['add-btn-icon' => 1, 'source-view' => $source], |
|
65 | 65 | ]); |
66 | 66 | } else { |
67 | 67 | $return = \Vtiger_Link_Model::getInstanceFromValues([ |
@@ -16,7 +16,7 @@ |
||
16 | 16 | class OSSMail_Mail_Model extends \App\Base |
17 | 17 | { |
18 | 18 | /** @var string[] Ignored mail addresses */ |
19 | - public const IGNORED_MAILS = ['@', 'undisclosed-recipients', 'Undisclosed-recipients', 'undisclosed-recipients@', 'Undisclosed-recipients@', 'Undisclosed recipients@,@', 'undisclosed recipients@,@']; |
|
19 | + public const IGNORED_MAILS = ['@', 'undisclosed-recipients', 'Undisclosed-recipients', 'undisclosed-recipients@', 'Undisclosed-recipients@', 'Undisclosed recipients@,@', 'undisclosed recipients@,@']; |
|
20 | 20 | |
21 | 21 | /** @var array Mail account. */ |
22 | 22 | protected $mailAccount = []; |
@@ -18,7 +18,7 @@ |
||
18 | 18 | public $customFieldTable = ['s_#__auto_assign_users' => 'id', 's_#__auto_assign_groups' => 'id', 's_#__auto_assign_roles' => 'id']; |
19 | 19 | |
20 | 20 | /** {@inheritdoc} */ |
21 | - public $listFields = ['subject' => 'FL_SUBJECT', 'tabid' => 'FL_MODULE', 'state' => 'FL_STATE']; |
|
21 | + public $listFields = ['subject' => 'FL_SUBJECT', 'tabid' => 'FL_MODULE', 'state' => 'FL_STATE']; |
|
22 | 22 | |
23 | 23 | /** {@inheritdoc} */ |
24 | 24 | public $name = 'AutomaticAssignment'; |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | $this->importCustomLinks($this->_modulexml, $moduleInstance); |
657 | 657 | $this->importCronTasks($this->_modulexml); |
658 | 658 | Module::fireEvent($moduleInstance->name, Module::EVENT_MODULE_POSTINSTALL); |
659 | - register_shutdown_function(function () { |
|
659 | + register_shutdown_function(function() { |
|
660 | 660 | try { |
661 | 661 | chdir(ROOT_DIRECTORY); |
662 | 662 | (new \App\BatchMethod(['method' => '\App\UserPrivilegesFile::recalculateAll', 'params' => []]))->save(); |
@@ -1154,7 +1154,7 @@ discard block |
||
1154 | 1154 | $db->createCommand()->update('vtiger_version', ['current_version' => (string) $this->_modulexml->to_version])->execute(); |
1155 | 1155 | } |
1156 | 1156 | Functions::recurseDelete($dirName); |
1157 | - register_shutdown_function(function () { |
|
1157 | + register_shutdown_function(function() { |
|
1158 | 1158 | try { |
1159 | 1159 | Functions::recurseDelete('cache/templates_c'); |
1160 | 1160 | } catch (\Exception $e) { |
@@ -62,7 +62,7 @@ |
||
62 | 62 | ->setOrder('registration_date', \App\Db::DESC) |
63 | 63 | ->createQuery()->createCommand()->queryAllByGroup(2); |
64 | 64 | |
65 | - $approves = array_keys(array_filter($approvalAll, function ($item) { |
|
65 | + $approves = array_keys(array_filter($approvalAll, function($item) { |
|
66 | 66 | return 'PLL_ACCEPTANCE' === $item[0]; |
67 | 67 | })); |
68 | 68 |
@@ -285,9 +285,9 @@ discard block |
||
285 | 285 | $separator = '-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-'; |
286 | 286 | $value = (string) $this->vcomponent->{$davName}; |
287 | 287 | if (false !== strpos($value, $separator)) { |
288 | - [$html,$text] = explode($separator, $value, 2); |
|
288 | + [$html, $text] = explode($separator, $value, 2); |
|
289 | 289 | $value = trim(strip_tags($html)) . "\n" . \trim(\str_replace($separator, '', $text)); |
290 | - }else{ |
|
290 | + } else { |
|
291 | 291 | $value = trim(\str_replace('\n', PHP_EOL, $value)); |
292 | 292 | } |
293 | 293 | $value = \App\Purifier::decodeHtml(\App\Purifier::purify($value)); |
@@ -448,14 +448,14 @@ discard block |
||
448 | 448 | $currentUser = \App\User::getCurrentUserModel(); |
449 | 449 | $userTimeZone = new \DateTimeZone($currentUser->getDetail('time_zone')); |
450 | 450 | $sysTimeZone = new \DateTimeZone(\App\Fields\DateTime::getTimeZone()); |
451 | - [$hour , $minute] = explode(':', $currentUser->getDetail('start_hour')); |
|
451 | + [$hour, $minute] = explode(':', $currentUser->getDetail('start_hour')); |
|
452 | 452 | $date = new \DateTime('now', $userTimeZone); |
453 | 453 | $date->setTime($hour, $minute); |
454 | 454 | $date->setTimezone($sysTimeZone); |
455 | 455 | $timeStart = $date->format('H:i:s'); |
456 | 456 | |
457 | 457 | $date->setTimezone($userTimeZone); |
458 | - [$hour , $minute] = explode(':', $currentUser->getDetail('end_hour')); |
|
458 | + [$hour, $minute] = explode(':', $currentUser->getDetail('end_hour')); |
|
459 | 459 | $date->setTime($hour, $minute); |
460 | 460 | $date->setTimezone($sysTimeZone); |
461 | 461 | $timeEnd = $date->format('H:i:s'); |
@@ -287,7 +287,7 @@ |
||
287 | 287 | if (false !== strpos($value, $separator)) { |
288 | 288 | [$html,$text] = explode($separator, $value, 2); |
289 | 289 | $value = trim(strip_tags($html)) . "\n" . \trim(\str_replace($separator, '', $text)); |
290 | - }else{ |
|
290 | + } else{ |
|
291 | 291 | $value = trim(\str_replace('\n', PHP_EOL, $value)); |
292 | 292 | } |
293 | 293 | $value = \App\Purifier::decodeHtml(\App\Purifier::purify($value)); |
@@ -461,13 +461,13 @@ discard block |
||
461 | 461 | public function parseData(string $content) |
462 | 462 | { |
463 | 463 | if ($this->useExtension) { |
464 | - $content = preg_replace_callback('/<!--[\s]+({% [\s\S]+? %})[\s]+-->/u', function ($matches) { |
|
464 | + $content = preg_replace_callback('/<!--[\s]+({% [\s\S]+? %})[\s]+-->/u', function($matches) { |
|
465 | 465 | return $matches[1] ?? ''; |
466 | 466 | }, $content); |
467 | 467 | $twig = new \Twig\Environment(new \Twig\Loader\ArrayLoader(['index' => $content])); |
468 | 468 | $sandbox = new \Twig\Extension\SandboxExtension(\App\Extension\Twig\SecurityPolicy::getPolicy(), true); |
469 | 469 | $twig->addExtension($sandbox); |
470 | - $twig->addFunction(new \Twig\TwigFunction('YFParser', function ($text) { |
|
470 | + $twig->addFunction(new \Twig\TwigFunction('YFParser', function($text) { |
|
471 | 471 | $value = ''; |
472 | 472 | preg_match(static::VARIABLE_REGEX, $text, $matches); |
473 | 473 | if ($matches) { |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | })); |
479 | 479 | $content = $twig->render('index'); |
480 | 480 | } |
481 | - return preg_replace_callback(static::VARIABLE_REGEX, function ($matches) { |
|
481 | + return preg_replace_callback(static::VARIABLE_REGEX, function($matches) { |
|
482 | 482 | [, $function, $params] = array_pad($matches, 3, ''); |
483 | 483 | return \in_array($function, static::$baseFunctions) ? $this->{$function}($params) : ''; |
484 | 484 | }, $content); |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | if (isset($this->language)) { |
495 | 495 | Language::setTemporaryLanguage($this->language); |
496 | 496 | } |
497 | - $this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\=\-\[\]\&\w\s\|]+)\)\$/u', function ($matches) { |
|
497 | + $this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\=\-\[\]\&\w\s\|]+)\)\$/u', function($matches) { |
|
498 | 498 | [, $params] = array_pad($matches, 2, ''); |
499 | 499 | return $this->translate($params); |
500 | 500 | }, $this->content); |
@@ -1463,7 +1463,7 @@ discard block |
||
1463 | 1463 | public function getGeneralVariable() |
1464 | 1464 | { |
1465 | 1465 | $variables = [ |
1466 | - 'LBL_ENTITY_VARIABLES' => array_map(function ($value) { |
|
1466 | + 'LBL_ENTITY_VARIABLES' => array_map(function($value) { |
|
1467 | 1467 | return Language::translate($value, 'Other.TextParser'); |
1468 | 1468 | }, array_flip(static::$variableGeneral)), |
1469 | 1469 | ]; |
@@ -1623,7 +1623,7 @@ discard block |
||
1623 | 1623 | } |
1624 | 1624 | } |
1625 | 1625 | $generator = new \HTMLPurifier_Generator($config, new \HTMLPurifier_Context()); |
1626 | - $html = preg_replace_callback('/<*([A-Za-z_]\w*)\s\/>/', function ($matches) { |
|
1626 | + $html = preg_replace_callback('/<*([A-Za-z_]\w*)\s\/>/', function($matches) { |
|
1627 | 1627 | if (\in_array($matches[1], ['div'])) { |
1628 | 1628 | return "<{$matches[1]}></{$matches[1]}>"; |
1629 | 1629 | } |
@@ -1825,7 +1825,7 @@ discard block |
||
1825 | 1825 | $width = isset($config['width']) ? preg_replace('/[^[:alnum:]]/', '', explode(',', $config['width'])) : []; |
1826 | 1826 | foreach ($config['columns'] as $key => $name) { |
1827 | 1827 | if (false !== strpos($name, '||')) { |
1828 | - [$title,$value] = explode('||', $name, 2); |
|
1828 | + [$title, $value] = explode('||', $name, 2); |
|
1829 | 1829 | if ('(' === $title[0] && ')' === substr($title, -1)) { |
1830 | 1830 | $title = $this->parseVariable("\${$title}\$"); |
1831 | 1831 | } |