@@ -649,7 +649,7 @@ |
||
| 649 | 649 | } |
| 650 | 650 | } |
| 651 | 651 | } |
| 652 | - uksort($quickCreateFieldList, function ($a, $b) use ($quickCreateFieldList) { |
|
| 652 | + uksort($quickCreateFieldList, function($a, $b) use ($quickCreateFieldList) { |
|
| 653 | 653 | if ($quickCreateFieldList[$a]->get('quicksequence') === $quickCreateFieldList[$b]->get('quicksequence')) { |
| 654 | 654 | return 0; |
| 655 | 655 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | public function entityAfterLinkForSource(App\EventHandler $eventHandler) |
| 142 | 142 | { |
| 143 | - ['sourceModule' => $sourceModule, 'sourceRecordId' => $sourceRecordId,'destinationModule' => $destinationModule,'destinationRecordId' => $destinationRecordId, 'relationId' => $relationId] = $eventHandler->getParams(); |
|
| 143 | + ['sourceModule' => $sourceModule, 'sourceRecordId' => $sourceRecordId, 'destinationModule' => $destinationModule, 'destinationRecordId' => $destinationRecordId, 'relationId' => $relationId] = $eventHandler->getParams(); |
|
| 144 | 144 | if (!ModTracker::isTrackingEnabledForModule($destinationModule) || Vtiger_Relation_Model::getInstanceById($relationId)->isDirectRelation()) { |
| 145 | 145 | return false; |
| 146 | 146 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | */ |
| 183 | 183 | public function entityAfterUnLinkForSource(App\EventHandler $eventHandler) |
| 184 | 184 | { |
| 185 | - ['sourceModule' => $sourceModule, 'sourceRecordId' => $sourceRecordId,'destinationModule' => $destinationModule,'destinationRecordId' => $destinationRecordId, 'relationId' => $relationId] = $eventHandler->getParams(); |
|
| 185 | + ['sourceModule' => $sourceModule, 'sourceRecordId' => $sourceRecordId, 'destinationModule' => $destinationModule, 'destinationRecordId' => $destinationRecordId, 'relationId' => $relationId] = $eventHandler->getParams(); |
|
| 186 | 186 | if (!ModTracker::isTrackingEnabledForModule($destinationModule) || Vtiger_Relation_Model::getInstanceById($relationId)->isDirectRelation()) { |
| 187 | 187 | return false; |
| 188 | 188 | } |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | { |
| 93 | 93 | $dbCommand = \App\Db::getInstance()->createCommand(); |
| 94 | 94 | if (null !== $name) { |
| 95 | - $data = ['name' => "{$type}_last_{$name}", 'value' => $id]; |
|
| 95 | + $data = ['name' => "{$type}_last_{$name}", 'value' => $id]; |
|
| 96 | 96 | } else { |
| 97 | 97 | $data = ['name' => $type . '_start_date', 'value' => date('Y-m-d H:i:s')]; |
| 98 | 98 | } |
@@ -318,7 +318,7 @@ |
||
| 318 | 318 | */ |
| 319 | 319 | protected static function getWebserviceApps(): array |
| 320 | 320 | { |
| 321 | - $row = (new \App\Db\Query())->from('w_#__servers')->where(['type' => 'WooCommerce', 'status' => 1]) |
|
| 321 | + $row = (new \App\Db\Query())->from('w_#__servers')->where(['type' => 'WooCommerce', 'status' => 1]) |
|
| 322 | 322 | ->one(\App\Db::getInstance('webservice')) ?: []; |
| 323 | 323 | if (!$row) { |
| 324 | 324 | return []; |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | { |
| 22 | 22 | $this->api->app = []; |
| 23 | 23 | $type = $this->api->request->getByType('_container', \App\Purifier::STANDARD); |
| 24 | - $query = (new \App\Db\Query())->from('w_#__servers')->where(['type' => $type, 'status' => 1]); |
|
| 24 | + $query = (new \App\Db\Query())->from('w_#__servers')->where(['type' => $type, 'status' => 1]); |
|
| 25 | 25 | if ($row = $query->one()) { |
| 26 | 26 | $row['id'] = (int) $row['id']; |
| 27 | 27 | $this->api->app = $row; |
@@ -21,53 +21,53 @@ |
||
| 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 | 'description' => [ |
| 63 | 63 | 'validationConditions' => ['name', 'table'], |
| 64 | - 'name' => 'description', 'column' => 'description', 'label' => 'Description', 'table' => 'vtiger_crmentity', |
|
| 65 | - 'uitype' => 300, 'typeofdata' => 'V~O', 'columntype' => 'text', 'maximumlength' => '65535', 'presence' => 2, |
|
| 64 | + 'name' => 'description', 'column' => 'description', 'label' => 'Description', 'table' => 'vtiger_crmentity', |
|
| 65 | + 'uitype' => 300, 'typeofdata' => 'V~O', 'columntype' => 'text', 'maximumlength' => '65535', 'presence' => 2, |
|
| 66 | 66 | ], |
| 67 | 67 | 'attention' => [ |
| 68 | 68 | 'validationConditions' => ['name', 'table'], |
| 69 | - 'name' => 'attention', 'column' => 'attention', 'label' => 'Attention', 'table' => 'vtiger_crmentity', |
|
| 70 | - 'uitype' => 300, 'typeofdata' => 'V~O', 'columntype' => 'text', 'maximumlength' => '65535', 'presence' => 2, |
|
| 69 | + 'name' => 'attention', 'column' => 'attention', 'label' => 'Attention', 'table' => 'vtiger_crmentity', |
|
| 70 | + 'uitype' => 300, 'typeofdata' => 'V~O', 'columntype' => 'text', 'maximumlength' => '65535', 'presence' => 2, |
|
| 71 | 71 | ], |
| 72 | 72 | ]; |
| 73 | 73 | |
@@ -187,7 +187,7 @@ |
||
| 187 | 187 | $multitype = true; |
| 188 | 188 | if (self::IGNORE_MODULE === $tabid) { |
| 189 | 189 | $permittedTabIdList = \App\User::getCurrentUserId() ? \vtlib\Deprecated::getPermittedModuleIdList() : []; |
| 190 | - $permittedTabIdList[] = 0; // Added to support one link for all modules |
|
| 190 | + $permittedTabIdList[] = 0; // Added to support one link for all modules |
|
| 191 | 191 | foreach ($permittedTabIdList as $moduleId) { |
| 192 | 192 | foreach ($type as $typ) { |
| 193 | 193 | if (isset($rows[$moduleId][$typ])) { |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | $twig = new \Twig\Environment(new \Twig\Loader\ArrayLoader(['index' => $content])); |
| 471 | 471 | $sandbox = new \Twig\Extension\SandboxExtension(\App\Extension\Twig\SecurityPolicy::getPolicy(), true); |
| 472 | 472 | $twig->addExtension($sandbox); |
| 473 | - $twig->addFunction(new \Twig\TwigFunction('YFParser', function ($text) { |
|
| 473 | + $twig->addFunction(new \Twig\TwigFunction('YFParser', function($text) { |
|
| 474 | 474 | $value = ''; |
| 475 | 475 | preg_match(static::VARIABLE_REGEX, $text, $matches); |
| 476 | 476 | if ($matches) { |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | })); |
| 482 | 482 | $content = $twig->render('index'); |
| 483 | 483 | } |
| 484 | - return preg_replace_callback(static::VARIABLE_REGEX, function ($matches) { |
|
| 484 | + return preg_replace_callback(static::VARIABLE_REGEX, function($matches) { |
|
| 485 | 485 | [, $function, $params] = array_pad($matches, 3, ''); |
| 486 | 486 | return \in_array($function, static::BASE_FUNCTIONS) ? $this->{$function}($params) : ''; |
| 487 | 487 | }, $content); |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | if (isset($this->language)) { |
| 498 | 498 | Language::setTemporaryLanguage($this->language); |
| 499 | 499 | } |
| 500 | - $this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\=\-\[\]\&\w\s\|]+)\)\$/u', function ($matches) { |
|
| 500 | + $this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\=\-\[\]\&\w\s\|]+)\)\$/u', function($matches) { |
|
| 501 | 501 | [, $params] = array_pad($matches, 2, ''); |
| 502 | 502 | return $this->translate($params); |
| 503 | 503 | }, $this->content); |
@@ -1757,7 +1757,7 @@ discard block |
||
| 1757 | 1757 | $width = isset($config['width']) ? preg_replace('/[^[:alnum:]]/', '', explode(',', $config['width'])) : []; |
| 1758 | 1758 | foreach ($config['columns'] as $key => $name) { |
| 1759 | 1759 | if (false !== strpos($name, '||')) { |
| 1760 | - [$title,$value] = explode('||', $name, 2); |
|
| 1760 | + [$title, $value] = explode('||', $name, 2); |
|
| 1761 | 1761 | if ('(' === $title[0] && ')' === substr($title, -1)) { |
| 1762 | 1762 | $title = $this->parseVariable("\${$title}\$"); |
| 1763 | 1763 | } |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | switch ($this->get('type')) { |
| 216 | 216 | case 1: |
| 217 | 217 | $this->queryGenerator->addNativeCondition([ |
| 218 | - 'and', ['>=', $columnA, $startFormatted], ['<=', $columnA, $endFormatted] |
|
| 218 | + 'and', ['>=', $columnA, $startFormatted], ['<=', $columnA, $endFormatted] |
|
| 219 | 219 | ]); |
| 220 | 220 | break; |
| 221 | 221 | case 3: |
@@ -224,9 +224,9 @@ discard block |
||
| 224 | 224 | $this->queryGenerator->setField($fieldB->getName()); |
| 225 | 225 | $this->queryGenerator->addNativeCondition([ |
| 226 | 226 | 'or', |
| 227 | - ['and', ['>=', $columnA, $startFormatted], ['<=', $columnA, $endFormatted]], |
|
| 228 | - ['and', ['>=', $columnB, $startFormatted], ['<=', $columnB, $endFormatted]], |
|
| 229 | - ['and', ['<', $columnA, $startFormatted], ['>', $columnB, $endFormatted]], |
|
| 227 | + ['and', ['>=', $columnA, $startFormatted], ['<=', $columnA, $endFormatted]], |
|
| 228 | + ['and', ['>=', $columnB, $startFormatted], ['<=', $columnB, $endFormatted]], |
|
| 229 | + ['and', ['<', $columnA, $startFormatted], ['>', $columnB, $endFormatted]], |
|
| 230 | 230 | ]); |
| 231 | 231 | break; |
| 232 | 232 | case 2: |
@@ -237,8 +237,8 @@ discard block |
||
| 237 | 237 | 'or', |
| 238 | 238 | [ |
| 239 | 239 | 'and', |
| 240 | - ['>=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $startDateTime], |
|
| 241 | - ['<=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $endDateTime], |
|
| 240 | + ['>=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $startDateTime], |
|
| 241 | + ['<=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $endDateTime], |
|
| 242 | 242 | ], |
| 243 | 243 | ]); |
| 244 | 244 | break; |
@@ -256,16 +256,16 @@ discard block |
||
| 256 | 256 | 'or', |
| 257 | 257 | [ |
| 258 | 258 | 'and', |
| 259 | - ['>=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $startDateTime], |
|
| 260 | - ['<=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $endDateTime], |
|
| 259 | + ['>=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $startDateTime], |
|
| 260 | + ['<=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $endDateTime], |
|
| 261 | 261 | ], |
| 262 | 262 | [ |
| 263 | 263 | 'and', |
| 264 | - ['>=', new \yii\db\Expression("CONCAT($columnB, ' ', $columnBTime)"), $startDateTime], |
|
| 265 | - ['<=', new \yii\db\Expression("CONCAT($columnB, ' ', $columnBTime)"), $endDateTime], |
|
| 264 | + ['>=', new \yii\db\Expression("CONCAT($columnB, ' ', $columnBTime)"), $startDateTime], |
|
| 265 | + ['<=', new \yii\db\Expression("CONCAT($columnB, ' ', $columnBTime)"), $endDateTime], |
|
| 266 | 266 | ], |
| 267 | 267 | [ |
| 268 | - 'and', ['<', $columnA, $startDate], ['>', $columnB, $endDate], |
|
| 268 | + 'and', ['<', $columnA, $startDate], ['>', $columnB, $endDate], |
|
| 269 | 269 | ], |
| 270 | 270 | ]); |
| 271 | 271 | break; |