@@ -24,12 +24,12 @@ |
||
| 24 | 24 | public static $allFields = [ |
| 25 | 25 | 'module_name', 'status', 'generator', 'primary_name', 'secondary_name', 'meta_author', 'meta_keywords', 'metatags_status', 'meta_subject', 'meta_title', |
| 26 | 26 | 'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation', |
| 27 | - 'language', 'filename', 'visibility', 'default', 'header_content', 'body_content', 'footer_content', 'conditions', |
|
| 28 | - 'watermark_type', 'watermark_text', 'watermark_angle', 'template_members', 'watermark_image', 'one_pdf', 'type', 'styles', |
|
| 27 | + 'language', 'filename', 'visibility', 'default', 'header_content', 'body_content', 'footer_content', 'conditions', |
|
| 28 | + 'watermark_type', 'watermark_text', 'watermark_angle', 'template_members', 'watermark_image', 'one_pdf', 'type', 'styles', |
|
| 29 | 29 | ]; |
| 30 | 30 | |
| 31 | 31 | public static $step1Fields = ['status', 'generator', 'primary_name', 'secondary_name', 'module_name', 'metatags_status', 'meta_subject', 'meta_title', 'meta_author', 'meta_keywords', 'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation', 'language', 'filename', 'visibility', 'default', 'one_pdf', 'template_members', 'watermark_type', 'watermark_text', 'watermark_image', 'watermark_angle']; |
| 32 | - public static $step2Fields = ['module_name', 'header_content', 'module_name', 'body_content', 'footer_content', 'styles']; |
|
| 32 | + public static $step2Fields = ['module_name', 'header_content', 'module_name', 'body_content', 'footer_content', 'styles']; |
|
| 33 | 33 | public static $step3Fields = ['conditions']; |
| 34 | 34 | public static $module = 'PDF'; |
| 35 | 35 | public static $parent = 'Settings'; |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | $operator = $condition['operator']; |
| 236 | 236 | $value = $condition['value'] ?? ''; |
| 237 | 237 | if (!\in_array($operator, array_merge(self::OPERATORS_WITHOUT_VALUES, self::FIELD_COMPARISON_OPERATORS, array_keys(self::DATE_OPERATORS)))) { |
| 238 | - [$fieldName, $fieldModuleName,] = array_pad(explode(':', $condition['fieldname']), 3, false); |
|
| 238 | + [$fieldName, $fieldModuleName, ] = array_pad(explode(':', $condition['fieldname']), 3, false); |
|
| 239 | 239 | $value = \Vtiger_Module_Model::getInstance($fieldModuleName)->getFieldByName($fieldName) |
| 240 | 240 | ->getUITypeModel() |
| 241 | 241 | ->getDbConditionBuilderValue($value, $operator); |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | $advancedConditions['relationConditions'] = self::getConditionsFromRequest($advancedConditions['relationConditions']); |
| 406 | 406 | } |
| 407 | 407 | if (!empty($advancedConditions['relationColumns'])) { |
| 408 | - array_map(function ($v) { |
|
| 408 | + array_map(function($v) { |
|
| 409 | 409 | if (!\App\Validator::integer($v)) { |
| 410 | 410 | throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $v, 406); |
| 411 | 411 | } |
@@ -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) { |