@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$is_admin=true; |
|
4 | -$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', 'lead_view'=>'Today', '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', 'callduration'=>'60', 'othereventduration'=>'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', 'currency_name'=>'Poland, Zlotych', 'currency_code'=>'PLN', 'currency_symbol'=>'zł', 'conv_rate'=>'1.00000', 'id'=>1]; |
|
3 | +$is_admin = true; |
|
4 | +$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', 'lead_view'=>'Today', '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', 'callduration'=>'60', 'othereventduration'=>'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', 'currency_name'=>'Poland, Zlotych', 'currency_code'=>'PLN', 'currency_symbol'=>'zł', 'conv_rate'=>'1.00000', 'id'=>1]; |
|
5 | 5 | 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', 'lead_view'=>'Today', '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', 'callduration'=>'60', 'othereventduration'=>'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', '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], 'parent_roles'=>['H1'], 'parent_role_seq'=>'H1::H2']; |
@@ -1262,7 +1262,7 @@ |
||
1262 | 1262 | * Truncating HTML. |
1263 | 1263 | * |
1264 | 1264 | * @param $html |
1265 | - * @param int|bool $length |
|
1265 | + * @param integer $length |
|
1266 | 1266 | * @param bool $addDots |
1267 | 1267 | * |
1268 | 1268 | * @throws \HTMLPurifier_Exception |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | if (isset($this->language)) { |
361 | 361 | Language::setTemporaryLanguage($this->language); |
362 | 362 | } |
363 | - $this->content = preg_replace_callback('/\$\((\w+) : ([,"\+\%\.\-\[\]\&\w\s\|]+)\)\$/u', function ($matches) { |
|
363 | + $this->content = preg_replace_callback('/\$\((\w+) : ([,"\+\%\.\-\[\]\&\w\s\|]+)\)\$/u', function($matches) { |
|
364 | 364 | list(, $function, $params) = array_pad($matches, 3, ''); |
365 | 365 | if (in_array($function, static::$baseFunctions)) { |
366 | 366 | return $this->$function($params); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | if (isset($this->language)) { |
382 | 382 | Language::setTemporaryLanguage($this->language); |
383 | 383 | } |
384 | - $this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\-\[\]\&\w\s\|]+)\)\$/u', function ($matches) { |
|
384 | + $this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\-\[\]\&\w\s\|]+)\)\$/u', function($matches) { |
|
385 | 385 | list(, $params) = array_pad($matches, 2, ''); |
386 | 386 | return $this->translate($params); |
387 | 387 | }, $this->content); |
@@ -1162,7 +1162,7 @@ discard block |
||
1162 | 1162 | public function getGeneralVariable() |
1163 | 1163 | { |
1164 | 1164 | $variables = [ |
1165 | - 'LBL_ENTITY_VARIABLES' => array_map(function ($value) { |
|
1165 | + 'LBL_ENTITY_VARIABLES' => array_map(function($value) { |
|
1166 | 1166 | return Language::translate($value, 'Other.TextParser'); |
1167 | 1167 | }, array_flip(static::$variableGeneral)), |
1168 | 1168 | ]; |
@@ -1330,7 +1330,7 @@ discard block |
||
1330 | 1330 | } |
1331 | 1331 | } |
1332 | 1332 | $generator = new \HTMLPurifier_Generator($config, new \HTMLPurifier_Context()); |
1333 | - $html = preg_replace_callback('/<*([A-Za-z_]\w*)\s\/>/', function ($matches) { |
|
1333 | + $html = preg_replace_callback('/<*([A-Za-z_]\w*)\s\/>/', function($matches) { |
|
1334 | 1334 | if (\in_array($matches[1], ['div'])) { |
1335 | 1335 | return "<{$matches[1]}></{$matches[1]}>"; |
1336 | 1336 | } |
@@ -270,6 +270,11 @@ discard block |
||
270 | 270 | } |
271 | 271 | } |
272 | 272 | |
273 | + /** |
|
274 | + * @param integer $crmid |
|
275 | + * @param string $withModule |
|
276 | + * @param integer $withCrmid |
|
277 | + */ |
|
273 | 278 | public function deleteRelatedDependent($crmid, $withModule, $withCrmid) |
274 | 279 | { |
275 | 280 | $dataReader = (new \App\Db\Query())->select(['vtiger_field.fieldname']) |
@@ -290,7 +295,6 @@ discard block |
||
290 | 295 | /** |
291 | 296 | * Function to remove relation M2M - for relation many to many. |
292 | 297 | * |
293 | - * @param string $module |
|
294 | 298 | * @param int $crmid |
295 | 299 | * @param string $withModule |
296 | 300 | * @param int $withCrmid |
@@ -322,6 +326,9 @@ discard block |
||
322 | 326 | ])->execute(); |
323 | 327 | } |
324 | 328 | |
329 | + /** |
|
330 | + * @param boolean $module |
|
331 | + */ |
|
325 | 332 | public function updateMissingSeqNumber($module) |
326 | 333 | { |
327 | 334 | \App\Log::trace('Entered updateMissingSeqNumber function'); |
@@ -593,9 +600,7 @@ discard block |
||
593 | 600 | |
594 | 601 | /** |
595 | 602 | * @param <type> $module |
596 | - * @param <type> $user |
|
597 | 603 | * @param <type> $parentRole |
598 | - * @param <type> $userGroups |
|
599 | 604 | */ |
600 | 605 | public function getNonAdminAccessQuery($module, $parentRole, $userGroups) |
601 | 606 | { |
@@ -612,9 +617,7 @@ discard block |
||
612 | 617 | /** |
613 | 618 | * The function retrieves access to queries for users without administrator rights. |
614 | 619 | * |
615 | - * @param Users $user |
|
616 | 620 | * @param string $parentRole |
617 | - * @param array $userGroups |
|
618 | 621 | * |
619 | 622 | * @return string |
620 | 623 | */ |
@@ -636,7 +639,6 @@ discard block |
||
636 | 639 | * This function takes access to the module for users without administrator privileges. |
637 | 640 | * |
638 | 641 | * @param string $module |
639 | - * @param Users $user |
|
640 | 642 | * |
641 | 643 | * @return string |
642 | 644 | */ |
@@ -95,7 +95,7 @@ |
||
95 | 95 | * |
96 | 96 | * @throws \Exception\NoPermitted |
97 | 97 | * |
98 | - * @return bool |
|
98 | + * @return boolean|null |
|
99 | 99 | */ |
100 | 100 | public static function download($name) |
101 | 101 | { |
@@ -1023,7 +1023,7 @@ |
||
1023 | 1023 | $db->createCommand()->update('vtiger_version', ['current_version' => (string) $this->_modulexml->to_version])->execute(); |
1024 | 1024 | } |
1025 | 1025 | Functions::recurseDelete($dirName); |
1026 | - register_shutdown_function(function () { |
|
1026 | + register_shutdown_function(function() { |
|
1027 | 1027 | $viewer = \Vtiger_Viewer::getInstance(); |
1028 | 1028 | $viewer->clearAllCache(); |
1029 | 1029 | Functions::recurseDelete('cache/templates_c'); |
@@ -373,6 +373,7 @@ discard block |
||
373 | 373 | |
374 | 374 | /** |
375 | 375 | * Cache the field instance for re-use. |
376 | + * @param Field $fieldInstance |
|
376 | 377 | */ |
377 | 378 | public function __AddModuleFieldToCache($moduleInstance, $fieldname, $fieldInstance) |
378 | 379 | { |
@@ -381,6 +382,7 @@ discard block |
||
381 | 382 | |
382 | 383 | /** |
383 | 384 | * Get field instance from cache. |
385 | + * @return FieldBasic |
|
384 | 386 | */ |
385 | 387 | public function __GetModuleFieldFromCache($moduleInstance, $fieldname) |
386 | 388 | { |
@@ -632,6 +634,8 @@ discard block |
||
632 | 634 | |
633 | 635 | /** |
634 | 636 | * Import Blocks of the module. |
637 | + * @param \SimpleXMLElement $modulenode |
|
638 | + * @param Module $moduleInstance |
|
635 | 639 | */ |
636 | 640 | public function importBlocks($modulenode, $moduleInstance) |
637 | 641 | { |
@@ -676,6 +680,7 @@ discard block |
||
676 | 680 | |
677 | 681 | /** |
678 | 682 | * Import Fields of the module. |
683 | + * @param Block $blockInstance |
|
679 | 684 | */ |
680 | 685 | public function importFields($blocknode, $blockInstance, $moduleInstance) |
681 | 686 | { |
@@ -770,6 +775,8 @@ discard block |
||
770 | 775 | |
771 | 776 | /** |
772 | 777 | * Import Custom views of the module. |
778 | + * @param \SimpleXMLElement $modulenode |
|
779 | + * @param Module $moduleInstance |
|
773 | 780 | */ |
774 | 781 | public function importCustomViews($modulenode, $moduleInstance) |
775 | 782 | { |
@@ -813,6 +820,8 @@ discard block |
||
813 | 820 | |
814 | 821 | /** |
815 | 822 | * Import Sharing Access of the module. |
823 | + * @param \SimpleXMLElement $modulenode |
|
824 | + * @param Module $moduleInstance |
|
816 | 825 | */ |
817 | 826 | public function importSharingAccess($modulenode, $moduleInstance) |
818 | 827 | { |
@@ -829,6 +838,8 @@ discard block |
||
829 | 838 | |
830 | 839 | /** |
831 | 840 | * Import Events of the module. |
841 | + * @param \SimpleXMLElement $modulenode |
|
842 | + * @param Module $moduleInstance |
|
832 | 843 | */ |
833 | 844 | public function importEvents($modulenode, $moduleInstance) |
834 | 845 | { |
@@ -843,6 +854,8 @@ discard block |
||
843 | 854 | |
844 | 855 | /** |
845 | 856 | * Import actions of the module. |
857 | + * @param \SimpleXMLElement $modulenode |
|
858 | + * @param Module $moduleInstance |
|
846 | 859 | */ |
847 | 860 | public function importActions($modulenode, $moduleInstance) |
848 | 861 | { |
@@ -869,6 +882,8 @@ discard block |
||
869 | 882 | |
870 | 883 | /** |
871 | 884 | * Import related lists of the module. |
885 | + * @param \SimpleXMLElement $modulenode |
|
886 | + * @param Module $moduleInstance |
|
872 | 887 | */ |
873 | 888 | public function importRelatedLists($modulenode, $moduleInstance) |
874 | 889 | { |
@@ -946,6 +961,7 @@ discard block |
||
946 | 961 | |
947 | 962 | /** |
948 | 963 | * Import cron jobs of the module. |
964 | + * @param \SimpleXMLElement $modulenode |
|
949 | 965 | */ |
950 | 966 | public function importCronTasks($modulenode) |
951 | 967 | { |
@@ -26,6 +26,9 @@ discard block |
||
26 | 26 | return $links; |
27 | 27 | } |
28 | 28 | |
29 | + /** |
|
30 | + * @param integer $recordId |
|
31 | + */ |
|
29 | 32 | public static function savePortalRecord($recordId, $bookmarkName, $bookmarkUrl) |
30 | 33 | { |
31 | 34 | $db = App\Db::getInstance(); |
@@ -64,7 +67,7 @@ discard block |
||
64 | 67 | /** |
65 | 68 | * Delete record. |
66 | 69 | * |
67 | - * @param $recordId |
|
70 | + * @param integer $recordId |
|
68 | 71 | * |
69 | 72 | * @throws \yii\db\Exception |
70 | 73 | */ |
@@ -76,7 +79,7 @@ discard block |
||
76 | 79 | /** |
77 | 80 | * Get website url. |
78 | 81 | * |
79 | - * @param $recordId |
|
82 | + * @param integer $recordId |
|
80 | 83 | * |
81 | 84 | * @return false|null|string |
82 | 85 | */ |
@@ -50,6 +50,9 @@ discard block |
||
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | + /** |
|
54 | + * @param string $propertyName |
|
55 | + */ |
|
53 | 56 | public function set($propertyName, $value) |
54 | 57 | { |
55 | 58 | if (property_exists($this, $propertyName)) { |
@@ -272,6 +275,7 @@ discard block |
||
272 | 275 | * |
273 | 276 | * @param string $blockLabel |
274 | 277 | * @param number ModuleId |
278 | + * @param integer $tabId |
|
275 | 279 | * |
276 | 280 | * @return bool true/false |
277 | 281 | */ |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | /** |
15 | 15 | * Greater operator. |
16 | 16 | * |
17 | - * @return array |
|
17 | + * @return string[] |
|
18 | 18 | */ |
19 | 19 | public function operatorG() |
20 | 20 | { |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * Get value. |
26 | 26 | * |
27 | - * @return mixed |
|
27 | + * @return string |
|
28 | 28 | */ |
29 | 29 | public function getValue() |
30 | 30 | { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * Lower operator. |
36 | 36 | * |
37 | - * @return array |
|
37 | + * @return string[] |
|
38 | 38 | */ |
39 | 39 | public function operatorL() |
40 | 40 | { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | /** |
45 | 45 | * Before operator. |
46 | 46 | * |
47 | - * @return array |
|
47 | + * @return string[] |
|
48 | 48 | */ |
49 | 49 | public function operatorB() |
50 | 50 | { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | /** |
55 | 55 | * After operator. |
56 | 56 | * |
57 | - * @return array |
|
57 | + * @return string[] |
|
58 | 58 | */ |
59 | 59 | public function operatorA() |
60 | 60 | { |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | } |
329 | 329 | } |
330 | 330 | // remove empty values - do not modify existing |
331 | - $fieldData = array_filter($fieldData, function ($fieldValue) { |
|
331 | + $fieldData = array_filter($fieldData, function($fieldValue) { |
|
332 | 332 | return $fieldValue !== ''; |
333 | 333 | }); |
334 | 334 | $fieldData = $this->transformForImport($fieldData); |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | } |
351 | 351 | } |
352 | 352 | // remove empty values - do not modify existing |
353 | - $fieldData = array_filter($fieldData, function ($fieldValue) { |
|
353 | + $fieldData = array_filter($fieldData, function($fieldValue) { |
|
354 | 354 | return $fieldValue !== ''; |
355 | 355 | }); |
356 | 356 | $fieldData = $this->transformForImport($fieldData); |
@@ -471,8 +471,6 @@ |
||
471 | 471 | /** |
472 | 472 | * Function transforms value for reference type field. |
473 | 473 | * |
474 | - * @param \Vtiger_Field_Model $fieldInstance |
|
475 | - * @param string $fieldValue |
|
476 | 474 | * |
477 | 475 | * @return mixed |
478 | 476 | */ |