diff --git a/.editorconfig b/.editorconfig index 317d36083..40f166a06 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,3 +1,5 @@ +root = true + [*] charset = utf-8 end_of_line = lf @@ -11,7 +13,7 @@ ij_formatter_off_tag = @formatter:off ij_formatter_on_tag = @formatter:on ij_formatter_tags_enabled = false ij_smart_tabs = false -ij_visual_guides = 80, 120, 140 +ij_visual_guides = 140 ij_wrap_on_typing = true [*.css] @@ -33,53 +35,9 @@ ij_css_space_after_colon = true ij_css_space_before_opening_brace = true ij_css_value_alignment = 0 -[*.csv] -max_line_length = 2147483647 -ij_wrap_on_typing = false -ij_csv_wrap_long_lines = false - -[*.feature] -indent_size = 2 -ij_gherkin_keep_indents_on_empty_lines = false - -[*.less] -indent_size = 2 -ij_less_align_closing_brace_with_properties = false -ij_less_blank_lines_around_nested_selector = 1 -ij_less_blank_lines_between_blocks = 1 -ij_less_brace_placement = 0 -ij_less_hex_color_long_format = false -ij_less_hex_color_lower_case = false -ij_less_hex_color_short_format = false -ij_less_hex_color_upper_case = false -ij_less_keep_blank_lines_in_code = 2 -ij_less_keep_indents_on_empty_lines = false -ij_less_keep_single_line_blocks = false -ij_less_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow -ij_less_space_after_colon = true -ij_less_space_before_opening_brace = true -ij_less_value_alignment = 0 - -[*.sass] -indent_size = 2 -ij_sass_align_closing_brace_with_properties = false -ij_sass_blank_lines_around_nested_selector = 1 -ij_sass_blank_lines_between_blocks = 1 -ij_sass_brace_placement = 0 -ij_sass_hex_color_long_format = false -ij_sass_hex_color_lower_case = false -ij_sass_hex_color_short_format = false -ij_sass_hex_color_upper_case = false -ij_sass_keep_blank_lines_in_code = 2 -ij_sass_keep_indents_on_empty_lines = false -ij_sass_keep_single_line_blocks = false -ij_sass_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow -ij_sass_space_after_colon = true -ij_sass_space_before_opening_brace = true -ij_sass_value_alignment = 0 - [*.scss] indent_style = tab +ij_smart_tabs = true ij_scss_align_closing_brace_with_properties = false ij_scss_blank_lines_around_nested_selector = 1 ij_scss_blank_lines_between_blocks = 1 @@ -99,7 +57,6 @@ ij_scss_value_alignment = 0 [*.twig] indent_style = tab ij_smart_tabs = true -ij_wrap_on_typing = false ij_twig_keep_indents_on_empty_lines = false ij_twig_spaces_inside_delimiters = true ij_twig_spaces_inside_variable_delimiters = true @@ -112,7 +69,212 @@ ij_editorconfig_space_before_colon = false ij_editorconfig_space_before_comma = false ij_editorconfig_spaces_around_assignment_operators = true -[{*.cjs,*.js}] +[{*.ctp,*.phtml,*.module,*.php,*.php5,*.php4,*.hphp,*.inc}] +indent_style = tab +ij_continuation_indent_size = 4 +ij_smart_tabs = true +ij_wrap_on_typing = false +ij_php_align_assignments = false +ij_php_align_class_constants = false +ij_php_align_group_field_declarations = false +ij_php_align_inline_comments = false +ij_php_align_key_value_pairs = false +ij_php_align_multiline_array_initializer_expression = false +ij_php_align_multiline_binary_operation = false +ij_php_align_multiline_chained_methods = false +ij_php_align_multiline_extends_list = false +ij_php_align_multiline_for = true +ij_php_align_multiline_parameters = false +ij_php_align_multiline_parameters_in_calls = false +ij_php_align_multiline_ternary_operation = false +ij_php_align_phpdoc_comments = false +ij_php_align_phpdoc_param_names = false +ij_php_api_weight = 1 +ij_php_array_initializer_new_line_after_left_brace = true +ij_php_array_initializer_right_brace_on_new_line = true +ij_php_array_initializer_wrap = on_every_item +ij_php_assignment_wrap = off +ij_php_author_weight = 7 +ij_php_binary_operation_sign_on_next_line = false +ij_php_binary_operation_wrap = off +ij_php_blank_lines_after_class_header = 0 +ij_php_blank_lines_after_function = 1 +ij_php_blank_lines_after_imports = 1 +ij_php_blank_lines_after_opening_tag = 0 +ij_php_blank_lines_after_package = 1 +ij_php_blank_lines_around_class = 1 +ij_php_blank_lines_around_constants = 0 +ij_php_blank_lines_around_field = 0 +ij_php_blank_lines_around_method = 1 +ij_php_blank_lines_before_class_end = 0 +ij_php_blank_lines_before_imports = 1 +ij_php_blank_lines_before_method_body = 0 +ij_php_blank_lines_before_package = 1 +ij_php_blank_lines_before_return_statement = 1 +ij_php_block_brace_style = end_of_line +ij_php_call_parameters_new_line_after_left_paren = false +ij_php_call_parameters_right_paren_on_new_line = false +ij_php_call_parameters_wrap = normal +ij_php_catch_on_new_line = false +ij_php_category_weight = 28 +ij_php_class_brace_style = end_of_line +ij_php_comma_after_last_array_element = true +ij_php_concat_spaces = false +ij_php_copyright_weight = 28 +ij_php_deprecated_weight = 28 +ij_php_do_while_brace_force = always +ij_php_else_if_style = as_is +ij_php_else_on_new_line = true +ij_php_example_weight = 3 +ij_php_extends_keyword_wrap = off +ij_php_extends_list_wrap = off +ij_php_fields_default_visibility = private +ij_php_filesource_weight = 28 +ij_php_finally_on_new_line = false +ij_php_for_brace_force = always +ij_php_for_statement_new_line_after_left_paren = false +ij_php_for_statement_right_paren_on_new_line = false +ij_php_for_statement_wrap = off +ij_php_force_short_declaration_array_style = false +ij_php_global_weight = 28 +ij_php_group_use_wrap = on_every_item +ij_php_if_brace_force = always +ij_php_if_lparen_on_next_line = false +ij_php_if_rparen_on_next_line = false +ij_php_ignore_weight = 28 +ij_php_import_sorting = alphabetic +ij_php_indent_break_from_case = true +ij_php_indent_case_from_switch = true +ij_php_indent_code_in_php_tags = false +ij_php_internal_weight = 0 +ij_php_keep_blank_lines_after_lbrace = 2 +ij_php_keep_blank_lines_before_right_brace = 2 +ij_php_keep_blank_lines_in_code = 2 +ij_php_keep_blank_lines_in_declarations = 2 +ij_php_keep_control_statement_in_one_line = true +ij_php_keep_first_column_comment = true +ij_php_keep_indents_on_empty_lines = false +ij_php_keep_line_breaks = true +ij_php_keep_rparen_and_lbrace_on_one_line = true +ij_php_keep_simple_methods_in_one_line = false +ij_php_lambda_brace_style = end_of_line +ij_php_license_weight = 28 +ij_php_line_comment_add_space = false +ij_php_line_comment_at_first_column = true +ij_php_link_weight = 28 +ij_php_lower_case_boolean_const = true +ij_php_lower_case_null_const = true +ij_php_method_brace_style = end_of_line +ij_php_method_call_chain_wrap = off +ij_php_method_parameters_new_line_after_left_paren = true +ij_php_method_parameters_right_paren_on_new_line = true +ij_php_method_parameters_wrap = normal +ij_php_method_weight = 28 +ij_php_modifier_list_wrap = false +ij_php_multiline_chained_calls_semicolon_on_new_line = false +ij_php_namespace_brace_style = 1 +ij_php_null_type_position = in_the_end +ij_php_package_weight = 28 +ij_php_param_weight = 4 +ij_php_parentheses_expression_new_line_after_left_paren = false +ij_php_parentheses_expression_right_paren_on_new_line = false +ij_php_phpdoc_blank_line_before_tags = true +ij_php_phpdoc_blank_lines_around_parameters = true +ij_php_phpdoc_keep_blank_lines = true +ij_php_phpdoc_param_spaces_between_name_and_description = 1 +ij_php_phpdoc_param_spaces_between_tag_and_type = 1 +ij_php_phpdoc_param_spaces_between_type_and_name = 1 +ij_php_phpdoc_use_fqcn = true +ij_php_phpdoc_wrap_long_lines = true +ij_php_place_assignment_sign_on_next_line = false +ij_php_place_parens_for_constructor = 0 +ij_php_property_read_weight = 28 +ij_php_property_weight = 28 +ij_php_property_write_weight = 28 +ij_php_return_type_on_new_line = false +ij_php_return_weight = 5 +ij_php_see_weight = 2 +ij_php_since_weight = 28 +ij_php_sort_phpdoc_elements = true +ij_php_space_after_colon = true +ij_php_space_after_colon_in_return_type = true +ij_php_space_after_comma = true +ij_php_space_after_for_semicolon = true +ij_php_space_after_quest = true +ij_php_space_after_type_cast = false +ij_php_space_after_unary_not = false +ij_php_space_before_array_initializer_left_brace = false +ij_php_space_before_catch_keyword = true +ij_php_space_before_catch_left_brace = true +ij_php_space_before_catch_parentheses = true +ij_php_space_before_class_left_brace = true +ij_php_space_before_closure_left_parenthesis = true +ij_php_space_before_colon = true +ij_php_space_before_colon_in_return_type = false +ij_php_space_before_comma = false +ij_php_space_before_do_left_brace = true +ij_php_space_before_else_keyword = true +ij_php_space_before_else_left_brace = true +ij_php_space_before_finally_keyword = true +ij_php_space_before_finally_left_brace = true +ij_php_space_before_for_left_brace = true +ij_php_space_before_for_parentheses = true +ij_php_space_before_for_semicolon = false +ij_php_space_before_if_left_brace = true +ij_php_space_before_if_parentheses = true +ij_php_space_before_method_call_parentheses = false +ij_php_space_before_method_left_brace = true +ij_php_space_before_method_parentheses = false +ij_php_space_before_quest = true +ij_php_space_before_switch_left_brace = true +ij_php_space_before_switch_parentheses = true +ij_php_space_before_try_left_brace = true +ij_php_space_before_unary_not = false +ij_php_space_before_while_keyword = true +ij_php_space_before_while_left_brace = true +ij_php_space_before_while_parentheses = true +ij_php_space_between_ternary_quest_and_colon = false +ij_php_spaces_around_additive_operators = true +ij_php_spaces_around_arrow = false +ij_php_spaces_around_assignment_in_declare = false +ij_php_spaces_around_assignment_operators = true +ij_php_spaces_around_bitwise_operators = true +ij_php_spaces_around_equality_operators = true +ij_php_spaces_around_logical_operators = true +ij_php_spaces_around_multiplicative_operators = true +ij_php_spaces_around_null_coalesce_operator = true +ij_php_spaces_around_relational_operators = true +ij_php_spaces_around_shift_operators = true +ij_php_spaces_around_unary_operator = false +ij_php_spaces_around_var_within_brackets = false +ij_php_spaces_within_array_initializer_braces = false +ij_php_spaces_within_brackets = false +ij_php_spaces_within_catch_parentheses = false +ij_php_spaces_within_for_parentheses = false +ij_php_spaces_within_if_parentheses = false +ij_php_spaces_within_method_call_parentheses = false +ij_php_spaces_within_method_parentheses = false +ij_php_spaces_within_parentheses = false +ij_php_spaces_within_short_echo_tags = true +ij_php_spaces_within_switch_parentheses = false +ij_php_spaces_within_while_parentheses = false +ij_php_special_else_if_treatment = false +ij_php_subpackage_weight = 28 +ij_php_ternary_operation_signs_on_next_line = false +ij_php_ternary_operation_wrap = off +ij_php_throws_weight = 6 +ij_php_todo_weight = 28 +ij_php_unknown_tag_weight = 28 +ij_php_upper_case_boolean_const = false +ij_php_upper_case_null_const = false +ij_php_uses_weight = 28 +ij_php_var_weight = 28 +ij_php_variable_naming_style = mixed +ij_php_version_weight = 28 +ij_php_while_brace_force = always +ij_php_while_on_new_line = false + +[{*.js,*.cjs}] indent_style = tab ij_continuation_indent_size = 4 ij_smart_tabs = true @@ -134,13 +296,13 @@ ij_javascript_array_initializer_wrap = off ij_javascript_assignment_wrap = off ij_javascript_binary_operation_sign_on_next_line = false ij_javascript_binary_operation_wrap = off -ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**/* +ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**/*,@angular/material,@angular/material/typings/** ij_javascript_blank_lines_after_imports = 1 ij_javascript_blank_lines_around_class = 1 ij_javascript_blank_lines_around_field = 0 ij_javascript_blank_lines_around_function = 1 ij_javascript_blank_lines_around_method = 1 -ij_javascript_block_brace_style = next_line +ij_javascript_block_brace_style = end_of_line ij_javascript_call_parameters_new_line_after_left_paren = false ij_javascript_call_parameters_right_paren_on_new_line = false ij_javascript_call_parameters_wrap = off @@ -148,7 +310,7 @@ ij_javascript_catch_on_new_line = false ij_javascript_chained_call_dot_on_new_line = true ij_javascript_class_brace_style = end_of_line ij_javascript_comma_on_new_line = false -ij_javascript_do_while_brace_force = never +ij_javascript_do_while_brace_force = always ij_javascript_else_on_new_line = true ij_javascript_enforce_trailing_comma = keep ij_javascript_extends_keyword_wrap = off @@ -156,7 +318,7 @@ ij_javascript_extends_list_wrap = off ij_javascript_field_prefix = _ ij_javascript_file_name_style = relaxed ij_javascript_finally_on_new_line = false -ij_javascript_for_brace_force = never +ij_javascript_for_brace_force = always ij_javascript_for_statement_new_line_after_left_paren = false ij_javascript_for_statement_right_paren_on_new_line = false ij_javascript_for_statement_wrap = off @@ -272,216 +434,11 @@ ij_javascript_use_path_mapping = always ij_javascript_use_public_modifier = false ij_javascript_use_semicolon_after_statement = true ij_javascript_var_declaration_wrap = normal -ij_javascript_while_brace_force = never +ij_javascript_while_brace_force = always ij_javascript_while_on_new_line = false ij_javascript_wrap_comments = false -[{*.module,*.hphp,*.phtml,*.php5,*.php4,*.php,*.ctp,*.inc}] -indent_style = tab -ij_continuation_indent_size = 4 -ij_smart_tabs = true -ij_wrap_on_typing = false -ij_php_align_assignments = false -ij_php_align_class_constants = false -ij_php_align_group_field_declarations = false -ij_php_align_inline_comments = false -ij_php_align_key_value_pairs = false -ij_php_align_multiline_array_initializer_expression = false -ij_php_align_multiline_binary_operation = false -ij_php_align_multiline_chained_methods = false -ij_php_align_multiline_extends_list = false -ij_php_align_multiline_for = true -ij_php_align_multiline_parameters = false -ij_php_align_multiline_parameters_in_calls = false -ij_php_align_multiline_ternary_operation = false -ij_php_align_phpdoc_comments = false -ij_php_align_phpdoc_param_names = false -ij_php_api_weight = 1 -ij_php_array_initializer_new_line_after_left_brace = true -ij_php_array_initializer_right_brace_on_new_line = true -ij_php_array_initializer_wrap = on_every_item -ij_php_assignment_wrap = off -ij_php_author_weight = 7 -ij_php_binary_operation_sign_on_next_line = false -ij_php_binary_operation_wrap = off -ij_php_blank_lines_after_class_header = 0 -ij_php_blank_lines_after_function = 1 -ij_php_blank_lines_after_imports = 1 -ij_php_blank_lines_after_opening_tag = 0 -ij_php_blank_lines_after_package = 1 -ij_php_blank_lines_around_class = 1 -ij_php_blank_lines_around_constants = 0 -ij_php_blank_lines_around_field = 0 -ij_php_blank_lines_around_method = 1 -ij_php_blank_lines_before_class_end = 0 -ij_php_blank_lines_before_imports = 1 -ij_php_blank_lines_before_method_body = 0 -ij_php_blank_lines_before_package = 1 -ij_php_blank_lines_before_return_statement = 1 -ij_php_block_brace_style = next_line -ij_php_call_parameters_new_line_after_left_paren = false -ij_php_call_parameters_right_paren_on_new_line = false -ij_php_call_parameters_wrap = normal -ij_php_catch_on_new_line = true -ij_php_category_weight = 28 -ij_php_class_brace_style = next_line -ij_php_comma_after_last_array_element = true -ij_php_concat_spaces = false -ij_php_copyright_weight = 28 -ij_php_deprecated_weight = 28 -ij_php_do_while_brace_force = always -ij_php_else_if_style = as_is -ij_php_else_on_new_line = true -ij_php_example_weight = 3 -ij_php_extends_keyword_wrap = off -ij_php_extends_list_wrap = off -ij_php_fields_default_visibility = private -ij_php_filesource_weight = 28 -ij_php_finally_on_new_line = true -ij_php_for_brace_force = always -ij_php_for_statement_new_line_after_left_paren = false -ij_php_for_statement_right_paren_on_new_line = false -ij_php_for_statement_wrap = off -ij_php_force_short_declaration_array_style = false -ij_php_global_weight = 28 -ij_php_group_use_wrap = on_every_item -ij_php_if_brace_force = always -ij_php_if_lparen_on_next_line = false -ij_php_if_rparen_on_next_line = false -ij_php_ignore_weight = 28 -ij_php_import_sorting = alphabetic -ij_php_indent_break_from_case = true -ij_php_indent_case_from_switch = true -ij_php_indent_code_in_php_tags = false -ij_php_internal_weight = 0 -ij_php_keep_blank_lines_after_lbrace = 2 -ij_php_keep_blank_lines_before_right_brace = 2 -ij_php_keep_blank_lines_in_code = 2 -ij_php_keep_blank_lines_in_declarations = 2 -ij_php_keep_control_statement_in_one_line = true -ij_php_keep_first_column_comment = true -ij_php_keep_indents_on_empty_lines = false -ij_php_keep_line_breaks = true -ij_php_keep_rparen_and_lbrace_on_one_line = true -ij_php_keep_simple_methods_in_one_line = false -ij_php_lambda_brace_style = end_of_line -ij_php_license_weight = 28 -ij_php_line_comment_add_space = false -ij_php_line_comment_at_first_column = true -ij_php_link_weight = 28 -ij_php_lower_case_boolean_const = true -ij_php_lower_case_null_const = true -ij_php_method_brace_style = next_line -ij_php_method_call_chain_wrap = off -ij_php_method_parameters_new_line_after_left_paren = true -ij_php_method_parameters_right_paren_on_new_line = true -ij_php_method_parameters_wrap = normal -ij_php_method_weight = 28 -ij_php_modifier_list_wrap = false -ij_php_multiline_chained_calls_semicolon_on_new_line = false -ij_php_namespace_brace_style = 1 -ij_php_null_type_position = in_the_end -ij_php_package_weight = 28 -ij_php_param_weight = 4 -ij_php_parentheses_expression_new_line_after_left_paren = false -ij_php_parentheses_expression_right_paren_on_new_line = false -ij_php_phpdoc_blank_line_before_tags = true -ij_php_phpdoc_blank_lines_around_parameters = true -ij_php_phpdoc_keep_blank_lines = true -ij_php_phpdoc_param_spaces_between_name_and_description = 1 -ij_php_phpdoc_param_spaces_between_tag_and_type = 1 -ij_php_phpdoc_param_spaces_between_type_and_name = 1 -ij_php_phpdoc_use_fqcn = true -ij_php_phpdoc_wrap_long_lines = true -ij_php_place_assignment_sign_on_next_line = false -ij_php_place_parens_for_constructor = 0 -ij_php_property_read_weight = 28 -ij_php_property_weight = 28 -ij_php_property_write_weight = 28 -ij_php_return_type_on_new_line = false -ij_php_return_weight = 5 -ij_php_see_weight = 2 -ij_php_since_weight = 28 -ij_php_sort_phpdoc_elements = true -ij_php_space_after_colon = true -ij_php_space_after_colon_in_return_type = true -ij_php_space_after_comma = true -ij_php_space_after_for_semicolon = true -ij_php_space_after_quest = true -ij_php_space_after_type_cast = false -ij_php_space_after_unary_not = false -ij_php_space_before_array_initializer_left_brace = false -ij_php_space_before_catch_keyword = true -ij_php_space_before_catch_left_brace = true -ij_php_space_before_catch_parentheses = true -ij_php_space_before_class_left_brace = true -ij_php_space_before_closure_left_parenthesis = true -ij_php_space_before_colon = true -ij_php_space_before_colon_in_return_type = false -ij_php_space_before_comma = false -ij_php_space_before_do_left_brace = true -ij_php_space_before_else_keyword = true -ij_php_space_before_else_left_brace = true -ij_php_space_before_finally_keyword = true -ij_php_space_before_finally_left_brace = true -ij_php_space_before_for_left_brace = true -ij_php_space_before_for_parentheses = true -ij_php_space_before_for_semicolon = false -ij_php_space_before_if_left_brace = true -ij_php_space_before_if_parentheses = true -ij_php_space_before_method_call_parentheses = false -ij_php_space_before_method_left_brace = true -ij_php_space_before_method_parentheses = false -ij_php_space_before_quest = true -ij_php_space_before_switch_left_brace = true -ij_php_space_before_switch_parentheses = true -ij_php_space_before_try_left_brace = true -ij_php_space_before_unary_not = false -ij_php_space_before_while_keyword = true -ij_php_space_before_while_left_brace = true -ij_php_space_before_while_parentheses = true -ij_php_space_between_ternary_quest_and_colon = false -ij_php_spaces_around_additive_operators = true -ij_php_spaces_around_arrow = false -ij_php_spaces_around_assignment_in_declare = false -ij_php_spaces_around_assignment_operators = true -ij_php_spaces_around_bitwise_operators = true -ij_php_spaces_around_equality_operators = true -ij_php_spaces_around_logical_operators = true -ij_php_spaces_around_multiplicative_operators = true -ij_php_spaces_around_null_coalesce_operator = true -ij_php_spaces_around_relational_operators = true -ij_php_spaces_around_shift_operators = true -ij_php_spaces_around_unary_operator = false -ij_php_spaces_around_var_within_brackets = false -ij_php_spaces_within_array_initializer_braces = false -ij_php_spaces_within_brackets = false -ij_php_spaces_within_catch_parentheses = false -ij_php_spaces_within_for_parentheses = false -ij_php_spaces_within_if_parentheses = false -ij_php_spaces_within_method_call_parentheses = false -ij_php_spaces_within_method_parentheses = false -ij_php_spaces_within_parentheses = false -ij_php_spaces_within_short_echo_tags = true -ij_php_spaces_within_switch_parentheses = false -ij_php_spaces_within_while_parentheses = false -ij_php_special_else_if_treatment = false -ij_php_subpackage_weight = 28 -ij_php_ternary_operation_signs_on_next_line = false -ij_php_ternary_operation_wrap = off -ij_php_throws_weight = 6 -ij_php_todo_weight = 28 -ij_php_unknown_tag_weight = 28 -ij_php_upper_case_boolean_const = false -ij_php_upper_case_null_const = false -ij_php_uses_weight = 28 -ij_php_var_weight = 28 -ij_php_variable_naming_style = mixed -ij_php_version_weight = 28 -ij_php_while_brace_force = always -ij_php_while_on_new_line = false - -[{*.sht,*.htm,*.html,*.shtm,*.shtml}] +[{*.sht,*.html,*.shtm,*.shtml,*.htm,*.ng}] indent_style = tab ij_smart_tabs = true ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3 @@ -510,185 +467,20 @@ ij_html_space_around_equality_in_attribute = false ij_html_space_inside_empty_tag = false ij_html_text_wrap = normal -[{*.ts,*.ats}] -ij_continuation_indent_size = 4 -ij_typescript_align_imports = false -ij_typescript_align_multiline_array_initializer_expression = false -ij_typescript_align_multiline_binary_operation = false -ij_typescript_align_multiline_chained_methods = false -ij_typescript_align_multiline_extends_list = false -ij_typescript_align_multiline_for = true -ij_typescript_align_multiline_parameters = true -ij_typescript_align_multiline_parameters_in_calls = false -ij_typescript_align_multiline_ternary_operation = false -ij_typescript_align_object_properties = 0 -ij_typescript_align_union_types = false -ij_typescript_align_var_statements = 0 -ij_typescript_array_initializer_new_line_after_left_brace = false -ij_typescript_array_initializer_right_brace_on_new_line = false -ij_typescript_array_initializer_wrap = off -ij_typescript_assignment_wrap = off -ij_typescript_binary_operation_sign_on_next_line = false -ij_typescript_binary_operation_wrap = off -ij_typescript_blacklist_imports = rxjs/Rx,node_modules/**/* -ij_typescript_blank_lines_after_imports = 1 -ij_typescript_blank_lines_around_class = 1 -ij_typescript_blank_lines_around_field = 0 -ij_typescript_blank_lines_around_field_in_interface = 0 -ij_typescript_blank_lines_around_function = 1 -ij_typescript_blank_lines_around_method = 1 -ij_typescript_blank_lines_around_method_in_interface = 1 -ij_typescript_block_brace_style = end_of_line -ij_typescript_call_parameters_new_line_after_left_paren = false -ij_typescript_call_parameters_right_paren_on_new_line = false -ij_typescript_call_parameters_wrap = off -ij_typescript_catch_on_new_line = false -ij_typescript_chained_call_dot_on_new_line = true -ij_typescript_class_brace_style = end_of_line -ij_typescript_comma_on_new_line = false -ij_typescript_do_while_brace_force = never -ij_typescript_else_on_new_line = false -ij_typescript_enforce_trailing_comma = keep -ij_typescript_extends_keyword_wrap = off -ij_typescript_extends_list_wrap = off -ij_typescript_field_prefix = _ -ij_typescript_file_name_style = relaxed -ij_typescript_finally_on_new_line = false -ij_typescript_for_brace_force = never -ij_typescript_for_statement_new_line_after_left_paren = false -ij_typescript_for_statement_right_paren_on_new_line = false -ij_typescript_for_statement_wrap = off -ij_typescript_force_quote_style = false -ij_typescript_force_semicolon_style = false -ij_typescript_function_expression_brace_style = end_of_line -ij_typescript_if_brace_force = never -ij_typescript_import_merge_members = global -ij_typescript_import_prefer_absolute_path = global -ij_typescript_import_sort_members = true -ij_typescript_import_sort_module_name = false -ij_typescript_import_use_node_resolution = true -ij_typescript_imports_wrap = on_every_item -ij_typescript_indent_case_from_switch = true -ij_typescript_indent_chained_calls = true -ij_typescript_indent_package_children = 0 -ij_typescript_jsdoc_include_types = false -ij_typescript_jsx_attribute_value = braces -ij_typescript_keep_blank_lines_in_code = 2 -ij_typescript_keep_first_column_comment = true -ij_typescript_keep_indents_on_empty_lines = false -ij_typescript_keep_line_breaks = true -ij_typescript_keep_simple_blocks_in_one_line = false -ij_typescript_keep_simple_methods_in_one_line = false -ij_typescript_line_comment_add_space = true -ij_typescript_line_comment_at_first_column = false -ij_typescript_method_brace_style = end_of_line -ij_typescript_method_call_chain_wrap = off -ij_typescript_method_parameters_new_line_after_left_paren = false -ij_typescript_method_parameters_right_paren_on_new_line = false -ij_typescript_method_parameters_wrap = off -ij_typescript_object_literal_wrap = on_every_item -ij_typescript_parentheses_expression_new_line_after_left_paren = false -ij_typescript_parentheses_expression_right_paren_on_new_line = false -ij_typescript_place_assignment_sign_on_next_line = false -ij_typescript_prefer_as_type_cast = false -ij_typescript_prefer_parameters_wrap = false -ij_typescript_reformat_c_style_comments = false -ij_typescript_space_after_colon = true -ij_typescript_space_after_comma = true -ij_typescript_space_after_dots_in_rest_parameter = false -ij_typescript_space_after_generator_mult = true -ij_typescript_space_after_property_colon = true -ij_typescript_space_after_quest = true -ij_typescript_space_after_type_colon = true -ij_typescript_space_after_unary_not = false -ij_typescript_space_before_async_arrow_lparen = true -ij_typescript_space_before_catch_keyword = true -ij_typescript_space_before_catch_left_brace = true -ij_typescript_space_before_catch_parentheses = true -ij_typescript_space_before_class_lbrace = true -ij_typescript_space_before_class_left_brace = true -ij_typescript_space_before_colon = true -ij_typescript_space_before_comma = false -ij_typescript_space_before_do_left_brace = true -ij_typescript_space_before_else_keyword = true -ij_typescript_space_before_else_left_brace = true -ij_typescript_space_before_finally_keyword = true -ij_typescript_space_before_finally_left_brace = true -ij_typescript_space_before_for_left_brace = true -ij_typescript_space_before_for_parentheses = true -ij_typescript_space_before_for_semicolon = false -ij_typescript_space_before_function_left_parenth = true -ij_typescript_space_before_generator_mult = false -ij_typescript_space_before_if_left_brace = true -ij_typescript_space_before_if_parentheses = true -ij_typescript_space_before_method_call_parentheses = false -ij_typescript_space_before_method_left_brace = true -ij_typescript_space_before_method_parentheses = false -ij_typescript_space_before_property_colon = false -ij_typescript_space_before_quest = true -ij_typescript_space_before_switch_left_brace = true -ij_typescript_space_before_switch_parentheses = true -ij_typescript_space_before_try_left_brace = true -ij_typescript_space_before_type_colon = false -ij_typescript_space_before_unary_not = false -ij_typescript_space_before_while_keyword = true -ij_typescript_space_before_while_left_brace = true -ij_typescript_space_before_while_parentheses = true -ij_typescript_spaces_around_additive_operators = true -ij_typescript_spaces_around_arrow_function_operator = true -ij_typescript_spaces_around_assignment_operators = true -ij_typescript_spaces_around_bitwise_operators = true -ij_typescript_spaces_around_equality_operators = true -ij_typescript_spaces_around_logical_operators = true -ij_typescript_spaces_around_multiplicative_operators = true -ij_typescript_spaces_around_relational_operators = true -ij_typescript_spaces_around_shift_operators = true -ij_typescript_spaces_around_unary_operator = false -ij_typescript_spaces_within_array_initializer_brackets = false -ij_typescript_spaces_within_brackets = false -ij_typescript_spaces_within_catch_parentheses = false -ij_typescript_spaces_within_for_parentheses = false -ij_typescript_spaces_within_if_parentheses = false -ij_typescript_spaces_within_imports = false -ij_typescript_spaces_within_interpolation_expressions = false -ij_typescript_spaces_within_method_call_parentheses = false -ij_typescript_spaces_within_method_parentheses = false -ij_typescript_spaces_within_object_literal_braces = false -ij_typescript_spaces_within_object_type_braces = true -ij_typescript_spaces_within_parentheses = false -ij_typescript_spaces_within_switch_parentheses = false -ij_typescript_spaces_within_type_assertion = false -ij_typescript_spaces_within_union_types = true -ij_typescript_spaces_within_while_parentheses = false -ij_typescript_special_else_if_treatment = true -ij_typescript_ternary_operation_signs_on_next_line = false -ij_typescript_ternary_operation_wrap = off -ij_typescript_union_types_wrap = on_every_item -ij_typescript_use_chained_calls_group_indents = false -ij_typescript_use_double_quotes = true -ij_typescript_use_explicit_js_extension = global -ij_typescript_use_path_mapping = always -ij_typescript_use_public_modifier = false -ij_typescript_use_semicolon_after_statement = true -ij_typescript_var_declaration_wrap = normal -ij_typescript_while_brace_force = never -ij_typescript_while_on_new_line = false -ij_typescript_wrap_comments = false - [{*.yml,*.yaml}] indent_size = 2 ij_continuation_indent_size = 2 ij_yaml_keep_indents_on_empty_lines = false ij_yaml_keep_line_breaks = true -[{*.zsh,*.bash,*.sh}] +[{*.zsh,*.sh,*.bash}] ij_shell_binary_ops_start_line = false ij_shell_keep_column_alignment_padding = false ij_shell_minify_program = false ij_shell_redirect_followed_by_space = false ij_shell_switch_cases_indented = false -[{.stylelintrc,.eslintrc,.babelrc,jest.config,*.bowerrc,*.jsb3,*.jsb2,*.json}] +[{.babelrc,.stylelintrc,.eslintrc,jest.config,*.json,*.jsb3,*.jsb2,*.bowerrc}] indent_size = 2 ij_json_keep_blank_lines_in_code = 0 ij_json_keep_indents_on_empty_lines = false @@ -701,7 +493,7 @@ ij_json_spaces_within_braces = false ij_json_spaces_within_brackets = false ij_json_wrap_long_lines = false -[{phpunit.xml.dist,*.jhm,*.rng,*.wsdl,*.fxml,*.xslt,*.jrxml,*.ant,*.xul,*.xsl,*.xsd,*.tld,*.jnlp,*.xml}] +[{phpunit.xml.dist,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.jhm,*.tld,*.fxml,*.wsdl,*.jrxml,*.xml,*.jnlp}] indent_size = 2 indent_style = tab tab_width = 2 diff --git a/.gitignore b/.gitignore index bc4aef17f..6c2d20941 100644 --- a/.gitignore +++ b/.gitignore @@ -140,3 +140,4 @@ local.properties .scala_dependencies .worksheet +/css/setup.css diff --git a/.idea/inspectionProfiles/Combodo.xml b/.idea/inspectionProfiles/Combodo.xml index 763f7a53d..f28cfada7 100644 --- a/.idea/inspectionProfiles/Combodo.xml +++ b/.idea/inspectionProfiles/Combodo.xml @@ -2,6 +2,12 @@ + + @@ -167,5 +180,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.jenkins/bin/archive/gather_external_files.sh b/.jenkins/bin/archive/gather_external_files.sh deleted file mode 100755 index e69de29bb..000000000 diff --git a/.jenkins/bin/init/append_files.sh b/.jenkins/bin/init/append_files.sh deleted file mode 100755 index 56226a792..000000000 --- a/.jenkins/bin/init/append_files.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -set -x - -# create target dirs -mkdir -p var -mkdir -p toolkit - -# cleanup target dirs -rm -rf toolkit/* - -# fill target dirs -curl https://www.combodo.com/documentation/iTopDataModelToolkit-2.3.zip > toolkit.zip -unzip toolkit.zip -rm toolkit.zip -cp -r .jenkins/configuration/default-environment/unattended_install/* toolkit diff --git a/.jenkins/bin/init/composer_install.sh b/.jenkins/bin/init/composer_install.sh deleted file mode 100755 index 8d74fe861..000000000 --- a/.jenkins/bin/init/composer_install.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -set -x - -# on the root dir -# composer install -a # => Not needed anymore (libs were added to git with N°2435) - - -# under the test dir -cd test -composer install diff --git a/.jenkins/bin/init/debug.sh b/.jenkins/bin/init/debug.sh deleted file mode 100755 index 583a0aed6..000000000 --- a/.jenkins/bin/init/debug.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -x - - - -whoami -pwd -ls - -echo "$BRANCH_NAME:${BRANCH_NAME}" - -echo "printenv :" -printenv - diff --git a/.jenkins/bin/tests/phpunit.sh b/.jenkins/bin/tests/phpunit.sh deleted file mode 100755 index 17fa52827..000000000 --- a/.jenkins/bin/tests/phpunit.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -set -x - -cd test - -export DEBUG_UNIT_TEST=0 -RUN_NONREG_TESTS=0 - -#USAGE ${debugMode} ${runNonRegOQLTests} "${coverture}" "${testFile}" - -if [ $# -ge 1 -a "x$1" == "xtrue" ] -then - export DEBUG_UNIT_TEST=1 -else - export DEBUG_UNIT_TEST=0 -fi - -set -x -OPTION="" -if [ $# -ge 3 -a "x$3" == "xtrue" ] -then - ##coverture - OPTION="-dxdebug.coverage_enable=1 --coverage-clover ../var/test/coverage.xml" -fi - -TESTFILE="$4" -if [ "x$TESTFILE" != "x" ] -then - # shellcheck disable=SC2001 - TESTFILE=$(echo "$TESTFILE" | sed 's|test/||1') - php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml $OPTION $TESTFILE --teamcity - exit 0 -fi - -if [ $# -ge 2 -a "x$2" == "xtrue" ] -then - php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml $OPTION --teamcity -else - #echo php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml --teamcity - php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml $OPTION --exclude-group OQL --teamcity -fi diff --git a/.jenkins/bin/unattended_install/default_env.sh b/.jenkins/bin/unattended_install/default_env.sh deleted file mode 100755 index e02b87fd6..000000000 --- a/.jenkins/bin/unattended_install/default_env.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -x - -chmod 666 conf/production/config-itop.php - -cd toolkit -php unattended_install.php --response_file=default-params.xml --clean=true diff --git a/.jenkins/configuration/default-environment/unattended_install/default-config-itop.php b/.jenkins/configuration/default-environment/unattended_install/default-config-itop.php deleted file mode 100644 index 7ff9d1494..000000000 --- a/.jenkins/configuration/default-environment/unattended_install/default-config-itop.php +++ /dev/null @@ -1,284 +0,0 @@ - 'iTop is temporarily frozen, please wait... (the admin team)', - - // access_mode: Access mode: ACCESS_READONLY = 0, ACCESS_ADMIN_WRITE = 2, ACCESS_FULL = 3 - // default: 3 - 'access_mode' => 3, - - 'allowed_login_types' => 'form|basic|external', - - // apc_cache.enabled: If set, the APC cache is allowed (the PHP extension must also be active) - // default: true - 'apc_cache.enabled' => true, - - // apc_cache.query_ttl: Time to live set in APC for the prepared queries (seconds - 0 means no timeout) - // default: 3600 - 'apc_cache.query_ttl' => 3600, - - // app_root_url: Root URL used for navigating within the application, or from an email to the application (you can put $SERVER_NAME$ as a placeholder for the server's name) - // default: '' - 'app_root_url' => 'http://127.0.0.1/itop/svn/trunk/', - - // buttons_position: Position of the forms buttons: bottom | top | both - // default: 'both' - 'buttons_position' => 'both', - - // cas_include_path: The path where to find the phpCAS library - // default: '/usr/share/php' - 'cas_include_path' => '/usr/share/php', - - // cron_max_execution_time: Duration (seconds) of the page cron.php, must be shorter than php setting max_execution_time and shorter than the web server response timeout - // default: 600 - 'cron_max_execution_time' => 600, - - // csv_file_default_charset: Character set used by default for downloading and uploading data as a CSV file. Warning: it is case sensitive (uppercase is preferable). - // default: 'ISO-8859-1' - 'csv_file_default_charset' => 'ISO-8859-1', - - 'csv_import_charsets' => array ( - ), - - // csv_import_history_display: Display the history tab in the import wizard - // default: false - 'csv_import_history_display' => false, - - // date_and_time_format: Format for date and time display (per language) - // default: array ( - // 'default' => - // array ( - // 'date' => 'Y-m-d', - // 'time' => 'H:i:s', - // 'date_time' => '$date $time', - // ), - // ) - 'date_and_time_format' => array ( - 'default' => - array ( - 'date' => 'Y-m-d', - 'time' => 'H:i:s', - 'date_time' => '$date $time', - ), - 'FR FR' => - array ( - 'date' => 'd/m/Y', - 'time' => 'H:i:s', - 'date_time' => '$date $time', - ), - ), - - 'db_host' => '', - - 'db_name' => 'itop_ci', - - 'db_pwd' => 'IKnowYouSeeMeInJenkinsConf', - - 'db_subname' => '', - - 'db_user' => 'jenkins_itop', - - // deadline_format: The format used for displaying "deadline" attributes: any string with the following placeholders: $date$, $difference$ - // default: '$difference$' - 'deadline_format' => '$difference$', - - 'default_language' => 'EN US', - - // draft_attachments_lifetime: Lifetime (in seconds) of drafts' attachments and inline images: after this duration, the garbage collector will delete them. - // default: 3600 - 'draft_attachments_lifetime' => 3600, - - // email_asynchronous: If set, the emails are sent off line, which requires cron.php to be activated. Exception: some features like the email test utility will force the serialized mode - // default: false - 'email_asynchronous' => false, - - // email_default_sender_address: Default address provided in the email from header field. - // default: '' - 'email_default_sender_address' => '', - - // email_default_sender_label: Default label provided in the email from header field. - // default: '' - 'email_default_sender_label' => '', - - // email_transport: Mean to send emails: PHPMail (uses the function mail()) or SMTP (implements the client protocole) - // default: 'PHPMail' - 'email_transport' => 'SMTP', - - // email_transport_smtp.host: host name or IP address (optional) - // default: 'localhost' - 'email_transport_smtp.host' => 'smtp.combodo.com', - - // email_transport_smtp.password: Authentication password (optional) - // default: '' - 'email_transport_smtp.password' => 'IDoNotWork', - - // email_transport_smtp.port: port number (optional) - // default: 25 - 'email_transport_smtp.port' => 25, - - // email_transport_smtp.username: Authentication user (optional) - // default: '' - 'email_transport_smtp.username' => 'test2@combodo.com', - - // email_validation_pattern: Regular expression to validate/detect the format of an eMail address - // default: '[a-zA-Z0-9._&\'-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,}' - 'email_validation_pattern' => '[a-zA-Z0-9._&\'-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,}', - - 'encryption_key' => '@iT0pEncr1pti0n!', - - 'ext_auth_variable' => '$_SERVER[\'REMOTE_USER\']', - - 'fast_reload_interval' => '60', - - // graphviz_path: Path to the Graphviz "dot" executable for graphing objects lifecycle - // default: '/usr/bin/dot' - 'graphviz_path' => '/usr/bin/dot', - - // inline_image_max_display_width: The maximum width (in pixels) when displaying images inside an HTML formatted attribute. Images will be displayed using this this maximum width. - // default: '250' - 'inline_image_max_display_width' => 250, - - // inline_image_max_storage_width: The maximum width (in pixels) when uploading images to be used inside an HTML formatted attribute. Images larger than the given size will be downsampled before storing them in the database. - // default: '1600' - 'inline_image_max_storage_width' => 1600, - - // link_set_attribute_qualifier: Link set from string: attribute qualifier (encloses both the attcode and the value) - // default: '\'' - 'link_set_attribute_qualifier' => '\'', - - // link_set_attribute_separator: Link set from string: attribute separator - // default: ';' - 'link_set_attribute_separator' => ';', - - // link_set_item_separator: Link set from string: line separator - // default: '|' - 'link_set_item_separator' => '|', - - // link_set_value_separator: Link set from string: value separator (between the attcode and the value itself - // default: ':' - 'link_set_value_separator' => ':', - - 'log_global' => true, - - 'log_issue' => true, - - 'log_notification' => true, - - 'log_web_service' => true, - - // max_combo_length: The maximum number of elements in a drop-down list. If more then an autocomplete will be used - // default: 50 - 'max_combo_length' => 50, - - 'max_display_limit' => '15', - - // max_linkset_output: Maximum number of items shown when getting a list of related items in an email, using the form $this->some_list$. 0 means no limit. - // default: 100 - 'max_linkset_output' => 100, - - 'min_display_limit' => '10', - - // online_help: Hyperlink to the online-help web page - // default: 'http://www.combodo.com/itop-help' - 'online_help' => 'http://www.combodo.com/itop-help', - - // php_path: Path to the php executable in CLI mode - // default: 'php' - 'php_path' => 'php', - - // portal_tickets: CSV list of classes supported in the portal - // default: 'UserRequest' - 'portal_tickets' => 'UserRequest', - - 'query_cache_enabled' => true, - - // search_manual_submit: Force manual submit of search requests (class => true) - // default: false - 'search_manual_submit' => array ( - 'Person' => true, - ), - - 'secure_connection_required' => false, - - // session_name: The name of the cookie used to store the PHP session id - // default: 'iTop' - 'session_name' => 'iTop', - - // shortcut_actions: Actions that are available as direct buttons next to the "Actions" menu - // default: 'UI:Menu:Modify,UI:Menu:New' - 'shortcut_actions' => 'UI:Menu:Modify,UI:Menu:New', - - // source_dir: Source directory for the datamodel files. (which gets compiled to env-production). - // default: '' - 'source_dir' => 'datamodels/2.x/', - - 'standard_reload_interval' => '300', - - // synchro_trace: Synchronization details: none, display, save (includes 'display') - // default: 'none' - 'synchro_trace' => 'none', - - // timezone: Timezone (reference: http://php.net/manual/en/timezones.php). If empty, it will be left unchanged and MUST be explicitely configured in PHP - // default: 'Europe/Paris' - 'timezone' => 'Europe/Paris', - - // tracking_level_linked_set_default: Default tracking level if not explicitely set at the attribute level, for AttributeLinkedSet (defaults to NONE in case of a fresh install, LIST otherwise - this to preserve backward compatibility while upgrading from a version older than 2.0.3 - see TRAC #936) - // default: 1 - 'tracking_level_linked_set_default' => 0, - - // url_validation_pattern: Regular expression to validate/detect the format of an URL (URL attributes and Wiki formatting for Text attributes) - // default: '(https?|ftp)\\://([a-zA-Z0-9+!*(),;?&=\\$_.-]+(\\:[a-zA-Z0-9+!*(),;?&=\\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\\:[0-9]{2,5})?(/([a-zA-Z0-9%+\\$_-]\\.?)+)*/?(\\?[a-zA-Z+&\\$_.-][a-zA-Z0-9;:[\\]@&%=+/\\$_.-]*)?(#[a-zA-Z_.-][a-zA-Z0-9+\\$_.-]*)?' - 'url_validation_pattern' => '(https?|ftp)\\://([a-zA-Z0-9+!*(),;?&=\\$_.-]+(\\:[a-zA-Z0-9+!*(),;?&=\\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\\:[0-9]{2,5})?(/([a-zA-Z0-9%+\\$_-]\\.?)+)*/?(\\?[a-zA-Z+&\\$_.-][a-zA-Z0-9;:[\\]@&%=+/\\$_.-]*)?(#[a-zA-Z_.-][a-zA-Z0-9+\\$_.-]*)?', -); - -/** - * - * Modules specific settings - * - */ -$MyModuleSettings = array( - 'authent-local' => array ( - 'password_validation.pattern' => '', - ), - 'itop-attachments' => array ( - 'allowed_classes' => array ( - 0 => 'Ticket', - ), - 'position' => 'relations', - 'preview_max_width' => 290, - ), - 'itop-backup' => array ( - 'mysql_bindir' => '', - 'week_days' => 'monday, tuesday, wednesday, thursday, friday', - 'time' => '23:30', - 'retention_count' => 5, - 'enabled' => true, - 'debug' => false, - ), - 'molkobain-console-tooltips' => array ( - 'decoration_class' => 'fas fa-question', - 'enabled' => true, - ), -); - -/** - * - * Data model modules to be loaded. Names are specified as relative paths - * - */ -$MyModules = array( - 'addons' => array ( - 'user rights' => 'addons/userrights/userrightsprofile.class.inc.php', - ), -); -?> diff --git a/.jenkins/configuration/default-environment/unattended_install/unattended_install.php b/.jenkins/configuration/default-environment/unattended_install/unattended_install.php deleted file mode 100644 index 804d206db..000000000 --- a/.jenkins/configuration/default-environment/unattended_install/unattended_install.php +++ /dev/null @@ -1,208 +0,0 @@ -Get('mode'); - -if ($sMode == 'install') -{ - echo "Installation mode detected.\n"; - $bClean = utils::ReadParam('clean', false, true /* CLI allowed */); - if ($bClean) - { - echo "Cleanup mode detected.\n"; - $sTargetEnvironment = $oParams->Get('target_env', ''); - if ($sTargetEnvironment == '') - { - $sTargetEnvironment = 'production'; - } - $sTargetDir = APPROOT.'env-'.$sTargetEnvironment; - - // Configuration file - $sConfigFile = APPCONF.$sTargetEnvironment.'/'.ITOP_CONFIG_FILE; - if (file_exists($sConfigFile)) - { - echo "Trying to delete the configuration file: '$sConfigFile'.\n"; - @chmod($sConfigFile, 0770); // RWX for owner and group, nothing for others - unlink($sConfigFile); - } - else - { - echo "No config file to delete ($sConfigFile does not exist).\n"; - } - - // env-xxx directory - if (file_exists($sTargetDir)) - { - if (is_dir($sTargetDir)) - { - echo "Emptying the target directory '$sTargetDir'.\n"; - SetupUtils::tidydir($sTargetDir); - } - else - { - die("ERROR the target dir '$sTargetDir' exists, but is NOT a directory !!!\nExiting.\n"); - } - } - else - { - echo "No target directory to delete ($sTargetDir does not exist).\n"; - } - - // Database - $aDBSettings = $oParams->Get('database', array()); - $sDBServer = $aDBSettings['server']; - $sDBUser = $aDBSettings['user']; - $sDBPwd = $aDBSettings['pwd']; - $sDBName = $aDBSettings['name']; - $sDBPrefix = $aDBSettings['prefix']; - - if ($sDBPrefix != '') - { - die("Cleanup not implemented for a partial database (prefix= '$sDBPrefix')\nExiting."); - } - - $oMysqli = new mysqli($sDBServer, $sDBUser, $sDBPwd); - if ($oMysqli->connect_errno) - { - die("Cannot connect to the MySQL server (".$oMysqli->connect_errno . ") ".$oMysqli->connect_error."\nExiting"); - } - else - { - if ($oMysqli->select_db($sDBName)) - { - echo "Deleting database '$sDBName'\n"; - $oMysqli->query("DROP DATABASE `$sDBName`"); - } - else - { - echo "The database '$sDBName' does not seem to exist. Nothing to cleanup.\n"; - } - } - } -} - -$bHasErrors = false; -$aChecks = SetupUtils::CheckBackupPrerequisites(APPROOT.'data'); // mmm should be the backup destination dir - -$aSelectedModules = $oParams->Get('selected_modules'); -$sSourceDir = $oParams->Get('source_dir', 'datamodels/latest'); -$sExtensionDir = $oParams->Get('extensions_dir', 'extensions'); -$aChecks = array_merge($aChecks, SetupUtils::CheckSelectedModules($sSourceDir, $sExtensionDir, $aSelectedModules)); - - -foreach($aChecks as $oCheckResult) -{ - switch($oCheckResult->iSeverity) - { - case CheckResult::ERROR: - $bHasErrors = true; - $sHeader = "Error"; - break; - - case CheckResult::WARNING: - $sHeader = "Warning"; - break; - - case CheckResult::INFO: - default: - $sHeader = "Info"; - break; - } - echo $sHeader.": ".$oCheckResult->sLabel; - if (strlen($oCheckResult->sDescription)) - { - echo ' - '.$oCheckResult->sDescription; - } - echo "\n"; -} - -if ($bHasErrors) -{ - echo "Encountered stopper issues. Aborting...\n"; - die; -} - -$bFoundIssues = false; - -$bInstall = utils::ReadParam('install', true, true /* CLI allowed */); -if ($bInstall) -{ - echo "Starting the unattended installation...\n"; - $oWizard = new ApplicationInstaller($oParams); - $bRes = $oWizard->ExecuteAllSteps(); - if (!$bRes) - { - echo "\nencountered installation issues!"; - $bFoundIssues = true; - } -} -else -{ - echo "No installation requested.\n"; -} -if (!$bFoundIssues && $bCheckConsistency) -{ - echo "Checking data model consistency.\n"; - ob_start(); - $sCheckRes = ''; - try - { - MetaModel::CheckDefinitions(false); - $sCheckRes = ob_get_clean(); - } - catch(Exception $e) - { - $sCheckRes = ob_get_clean()."\nException: ".$e->getMessage(); - } - if (strlen($sCheckRes) > 0) - { - echo $sCheckRes; - echo "\nfound consistency issues!"; - $bFoundIssues = true; - } -} - -if (!$bFoundIssues) -{ - // last line: used to check the install - // the only way to track issues in case of Fatal error or even parsing error! - echo "\ninstalled!"; - exit; -} diff --git a/.make/build/afterBuild.php b/.make/build/afterBuild.php new file mode 100644 index 000000000..cecdaf9e9 --- /dev/null +++ b/.make/build/afterBuild.php @@ -0,0 +1,90 @@ + array("pipe", "r"), // stdin + 1 => array("pipe", "w"), // stdout + 2 => array("pipe", "w"), // stderr + ); + $process = proc_open($cmd, $descriptorspec, $pipes, __DIR__ . '/..', null); + + $stdout = stream_get_contents($pipes[1]); + fclose($pipes[1]); + + $stderr = stream_get_contents($pipes[2]); + fclose($pipes[2]); + + $iCode = proc_close($process); + $bSuccess = (0 === $iCode); + + $iElapsed = time() - $iBeginTime; + if (!$bSuccess) { + fwrite(STDERR, sprintf( + "\nCOMMAND FAILED! (%s) \n - status:%s \n - stderr:%s \n - stdout: %s\n - elapsed:%ss\n\n", + $cmd, + $iCode, + rtrim($stderr), + rtrim($stdout), + $iElapsed + )); + } + else + { + echo "| elapsed:${iElapsed}s \n"; + } + + if (!empty($stderr)) + { + fwrite(STDERR, "$stderr\n"); + } + if (!empty($stdout)) + { + echo "stdout :$stdout\n\n"; + } + + return $bSuccess; +} diff --git a/.make/build/commands/setupCssCompiler.php b/.make/build/commands/setupCssCompiler.php new file mode 100644 index 000000000..b8178c95e --- /dev/null +++ b/.make/build/commands/setupCssCompiler.php @@ -0,0 +1,51 @@ + + * + */ + +use Combodo\iTop\Composer\iTopComposer; + +$iTopFolder = __DIR__."/../../../"; + +require_once("$iTopFolder/approot.inc.php"); +require_once(APPROOT."/application/utils.inc.php"); + +if (php_sapi_name() !== 'cli') +{ + throw new \Exception('This script can only run from CLI'); +} + +$sCssFile = APPROOT.'/css/setup.css'; +if (file_exists($sCssFile)) +{ + fwrite(STDERR, "$sCssFile already exists (it should not), removing it."); + if (!unlink($sCssFile)) + { + fwrite(STDERR, "Failed to remove $sCssFile, exiting."); + exit(1); + } +} +$sCssRelPath = utils::GetCSSFromSASS('css/setup.scss'); + +if (!file_exists($sCssFile)) +{ + fwrite(STDERR, "Failed to compile $sCssFile, exiting."); + exit(1); +} \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 32c49f9b7..56f298717 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,73 +1,11 @@ -pipeline { - agent any - parameters { - booleanParam(name: 'debugMode', defaultValue: 'false', description: 'Debug mode?') - string(name: 'testFile', defaultValue: '', description: 'Provide test file to execute. Example: test/core/LogAPITest.php') - booleanParam(name: 'coverture', defaultValue: 'false', description: 'Test coverture?') - booleanParam(name: 'runNonRegOQLTests', defaultValue: 'false', description: 'Do You want to run legacy OQL regression tests?') - } - stages { +def infra - stage('init') { - parallel { - stage('debug') { - steps { - sh './.jenkins/bin/init/debug.sh' - } - } - stage('append files to project') { - steps { - sh './.jenkins/bin/init/append_files.sh' - } - } - stage('composer install') { - steps { - sh './.jenkins/bin/init/composer_install.sh' - } - } - } - } +node(){ + checkout scm - stage('unattended_install') { - parallel { - stage('unattended_install default env') { - steps { - sh './.jenkins/bin/unattended_install/default_env.sh' - } - } - } - } - - stage('test') { - parallel { - stage('phpunit') { - steps { - sh './.jenkins/bin/tests/phpunit.sh ${debugMode} ${runNonRegOQLTests} "${coverture}" "${testFile}"' - } - } - } - } - - } - - post { - always { - archiveArtifacts allowEmptyArchive:true, excludes: '.gitkeep', artifacts: 'var/test/*.xml' - junit 'var/test/phpunit-log.junit.xml' - } - failure { - slackSend(channel: "#jenkins-itop", color: '#FF0000', message: "Ho no! Build failed! (${currentBuild.result}), Job '${env.JOB_NAME_UNESCAPED} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") - } - fixed { - slackSend(channel: "#jenkins-itop", color: '#FFa500', message: "Yes! Build repaired! (${currentBuild.result}), Job '${env.JOB_NAME_UNESCAPED} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") - } - } - - environment { - DEBUG_UNIT_TEST = '0' - JOB_NAME_UNESCAPED = env.JOB_NAME.replaceAll("%2F", "/") - } - options { - timeout(time: 20, unit: 'MINUTES') - } + infra = load '/var/lib/jenkins/workspace/itop-test-infra_master/src/Infra.groovy' } + + +infra.call() + diff --git a/README.md b/README.md index cfb243b02..0d6078315 100644 --- a/README.md +++ b/README.md @@ -78,10 +78,10 @@ We would like to give a special thank you to the people from the community who c - Alves, David - Beck, Pedro - Bilger, Jean-François - - Bostoen, Jeffrey + - Bostoen, Jeffrey (a.k.a @jbostoen) - Cardoso, Anderson - Cassaro, Bruno - - Casteleyn, Thomas + - Casteleyn, Thomas (a.k.a @Hipska) - Castro, Randall Badilla - Colantoni, Maria Laura - Couronné, Guy @@ -97,6 +97,7 @@ We would like to give a special thank you to the people from the community who c - Lazcano, Federico - Lucas, Jonathan - Malik, Remie + - Mindêllo de Andrade, Lucas (a.k.a @rokam) - Rosenke, Stephan - Seki, Shoji - Shilov, Vladimir diff --git a/SECURITY.md b/SECURITY.md index 360d282f7..0c0cd411f 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -9,7 +9,7 @@ responsible disclosure and will make every effort to acknowledge your contributi ### iTop vulnerabilities Please send a procedure to reproduce iTop vulnerabilities to [itop-security@combodo.com](mailto:itop-security@combodo.com). -You can send us a standard "given / then / when" report, including iTop version, impacts, and maybe installed modules or data if they are +You can send us a standard "given / when / then" report, including iTop version, impacts, and maybe installed modules or data if they are needed to reproduce. ### Dependencies vulnerabilities diff --git a/addons/userrights/userrightsprofile.class.inc.php b/addons/userrights/userrightsprofile.class.inc.php index 294164d20..15155db7e 100644 --- a/addons/userrights/userrightsprofile.class.inc.php +++ b/addons/userrights/userrightsprofile.class.inc.php @@ -434,7 +434,7 @@ class UserRightsProfile extends UserRightsAddOnAPI // Support drastic data model changes: no organization class (or not writable)! if (MetaModel::IsValidClass('Organization') && !MetaModel::IsAbstract('Organization')) { - $oOrg = new Organization(); + $oOrg = MetaModel::NewObject('Organization'); $oOrg->Set('name', 'My Company/Department'); $oOrg->Set('code', 'SOMECODE'); $iOrgId = $oOrg->DBInsertNoReload(); @@ -442,17 +442,13 @@ class UserRightsProfile extends UserRightsAddOnAPI // Support drastic data model changes: no Person class (or not writable)! if (MetaModel::IsValidClass('Person') && !MetaModel::IsAbstract('Person')) { - $oContact = new Person(); + $oContact = MetaModel::NewObject('Person'); $oContact->Set('name', 'My last name'); $oContact->Set('first_name', 'My first name'); if (MetaModel::IsValidAttCode('Person', 'org_id')) { $oContact->Set('org_id', $iOrgId); } - if (MetaModel::IsValidAttCode('Person', 'phone')) - { - $oContact->Set('phone', '+00 000 000 000'); - } $oContact->Set('email', 'my.email@foo.org'); $iContactId = $oContact->DBInsertNoReload(); } @@ -561,7 +557,7 @@ class UserRightsProfile extends UserRightsAddOnAPI /** * @param $oUser User - * @return array + * @return bool */ public function IsAdministrator($oUser) { @@ -571,16 +567,22 @@ class UserRightsProfile extends UserRightsAddOnAPI /** * @param $oUser User - * @return array + * @return bool */ public function IsPortalUser($oUser) { // UserRights caches the list for us return UserRights::HasProfile(PORTAL_PROFILE_NAME, $oUser); } + /** * @param $oUser User - * @return bool + * + * @return array + * @throws \ArchivedObjectException + * @throws \CoreException + * @throws \CoreUnexpectedValue + * @throws \MySQLException */ public function ListProfiles($oUser) { diff --git a/addons/userrights/userrightsprofile.db.class.inc.php b/addons/userrights/userrightsprofile.db.class.inc.php index 2115f1b8d..f35fa6af7 100644 --- a/addons/userrights/userrightsprofile.db.class.inc.php +++ b/addons/userrights/userrightsprofile.db.class.inc.php @@ -535,7 +535,7 @@ class UserRightsProfile extends UserRightsAddOnAPI // Support drastic data model changes: no organization class (or not writable)! if (MetaModel::IsValidClass('Organization') && !MetaModel::IsAbstract('Organization')) { - $oOrg = new Organization(); + $oOrg = MetaModel::NewObject('Organization'); $oOrg->Set('name', 'My Company/Department'); $oOrg->Set('code', 'SOMECODE'); $oOrg::SetCurrentChange($oChange); @@ -544,17 +544,13 @@ class UserRightsProfile extends UserRightsAddOnAPI // Support drastic data model changes: no Person class (or not writable)! if (MetaModel::IsValidClass('Person') && !MetaModel::IsAbstract('Person')) { - $oContact = new Person(); + $oContact = MetaModel::NewObject('Person'); $oContact->Set('name', 'My last name'); $oContact->Set('first_name', 'My first name'); if (MetaModel::IsValidAttCode('Person', 'org_id')) { $oContact->Set('org_id', $iOrgId); } - if (MetaModel::IsValidAttCode('Person', 'phone')) - { - $oContact->Set('phone', '+00 000 000 000'); - } $oContact->Set('email', 'my.email@foo.org'); $oContact::SetCurrentChange($oChange); $iContactId = $oContact->DBInsertNoReload(); @@ -711,7 +707,7 @@ class UserRightsProfile extends UserRightsAddOnAPI public function LoadCache() { - if (!is_null($this->m_aProfiles)) return; + if (!is_null($this->m_aProfiles)) return false; // Could be loaded in a shared memory (?) $oKPI = new ExecutionKPI(); diff --git a/application/Html2Text.php b/application/Html2Text.php index 9cbe27ce1..51aa166bf 100644 --- a/application/Html2Text.php +++ b/application/Html2Text.php @@ -30,8 +30,11 @@ function mb_str_replace($search, $replace, $subject, &$count = 0) { $replacements = array_pad($replacements, count($searches), ''); foreach ($searches as $key => $search) { $parts = mb_split(preg_quote($search), $subject); - $count += count($parts) - 1; - $subject = implode($replacements[$key], $parts); + if (is_countable($parts)) + { + $count += count($parts) - 1; + $subject = implode($replacements[$key], $parts); + } } } else { // Call mb_str_replace for each subject in array, recursively diff --git a/application/applicationcontext.class.inc.php b/application/applicationcontext.class.inc.php index 9ae18666b..b24fafd3a 100644 --- a/application/applicationcontext.class.inc.php +++ b/application/applicationcontext.class.inc.php @@ -200,7 +200,15 @@ class ApplicationContext } return implode("&", $aParams); } - + /** + * @since 2.8.0 N°2534 - dashboard: bug with autorefresh that deactivates filtering on organisation + * Returns the params as c[menu]:..., c[org_id]:.... + * @return string The params + */ + public function GetForPostParams() + { + return json_encode( $this->aValues); + } /** * Returns the context as sequence of input tags to be inserted inside a
tag * @return string The context as a sequence of tags diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index d0298dc2c..949cfc09e 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -663,7 +663,30 @@ EOF { // n:n links $oLinkingAttDef = MetaModel::GetAttributeDef($sLinkedClass, $oAttDef->GetExtKeyToRemote()); + $sLinkingAttCode = $oLinkingAttDef->GetCode(); $sTargetClass = $oLinkingAttDef->GetTargetClass(); + + // N°2334 fields to display for n:n relations + $aLnkAttDefsToDisplay = MetaModel::GetZListAttDefsFilteredForIndirectLinkClass($sClass, $sAttCode); + $aRemoteAttDefsToDisplay = MetaModel::GetZListAttDefsFilteredForIndirectRemoteClass($sTargetClass); + $aLnkAttCodesToDisplay = array_map(function ($oLnkAttDef) { + return ormLinkSet::LINK_ALIAS.'.'.$oLnkAttDef->GetCode(); + }, + $aLnkAttDefsToDisplay + ); + if (!in_array(ormLinkSet::LINK_ALIAS.'.'.$sLinkingAttCode, $aLnkAttCodesToDisplay)) + { + // we need to display a link to the remote class instance ! + $aLnkAttCodesToDisplay[] = ormLinkSet::LINK_ALIAS.'.'.$sLinkingAttCode; + } + $aRemoteAttCodesToDisplay = array_map(function ($oRemoteAttDef) { + return ormLinkSet::REMOTE_ALIAS.'.'.$oRemoteAttDef->GetCode(); + }, + $aRemoteAttDefsToDisplay + ); + $aAttCodesToDisplay = array_merge($aLnkAttCodesToDisplay, $aRemoteAttCodesToDisplay); + $sAttCodesToDisplay = implode(',', $aAttCodesToDisplay); + $aParams = array( 'link_attr' => $oAttDef->GetExtKeyToMe(), 'object_id' => $this->GetKey(), @@ -671,8 +694,12 @@ EOF 'view_link' => false, 'menu' => false, //'menu_actions_target' => '_blank', - 'display_limit' => true, // By default limit the list to speed up the initial load & display + // By default limit the list to speed up the initial load & display + 'display_limit' => true, 'table_id' => $sClass.'_'.$sAttCode, + // N°2334 specify fields to display for n:n relations + 'zlist' => false, + 'extra_fields' => $sAttCodesToDisplay, ); } $oPage->p(MetaModel::GetClassIcon($sTargetClass)." ".$oAttDef->GetDescription()); @@ -1286,7 +1313,14 @@ HTML /** * @param \WebPage $oPage * @param \CMDBObjectSet $oSet - * @param array $aExtraParams + * @param array $aExtraParams key used : + * * * @return string * @throws \CoreException @@ -1365,7 +1399,7 @@ HTML } // Filter the list to removed linked set since we are not able to display them here - foreach($aList[$sAlias] as $index => $sAttCode) + foreach ($aList[$sAlias] as $index => $sAttCode) { $oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode); if ($oAttDef instanceof AttributeLinkedSet) @@ -1374,6 +1408,11 @@ HTML unset($aList[$sAlias][$index]); } } + + if (empty($aList[$sAlias])) + { + unset($aList[$sAlias], $aAuthorizedClasses[$sAlias]); + } } $sSelectMode = 'none'; @@ -1932,6 +1971,11 @@ HTML $sNullValue = $oAttDef->GetNullValue(); // used for the ValidateField() call in js/forms-json-utils.js $sFieldToValidateId = $iId; // can be different than the displayed field (for example in TagSet) + // List of attributes that depend on the current one + // Might be modified depending on the current field + $sWizardHelperJsVarName = "oWizardHelper{$sFormPrefix}"; + $aDependencies = MetaModel::GetDependentAttributes($sClass, $sAttCode); + switch ($oAttDef->GetEditClass()) { case 'Date': @@ -2222,6 +2266,7 @@ EOF break; case 'ExtKey': + /** @var \AttributeExternalKey $oAttDef */ $aEventsList[] = 'validate'; $aEventsList[] = 'change'; @@ -2240,6 +2285,19 @@ EOF $sHTMLValue = UIExtKeyWidget::DisplayFromAttCode($oPage, $sAttCode, $sClass, $oAttDef->GetLabel(), $oAllowedValues, $value, $iId, $bMandatory, $sFieldName, $sFormPrefix, $aExtKeyParams); $sHTMLValue .= "\n"; + + $bHasExtKeyUpdatingRemoteClassFields = ( + array_key_exists('replaceDependenciesByRemoteClassFields', $aArgs) + && ($aArgs['replaceDependenciesByRemoteClassFields']) + ); + if ($bHasExtKeyUpdatingRemoteClassFields) + { + // On this field update we need to update all the corresponding remote class fields + // Used when extkey widget is in a linkedset indirect + $sWizardHelperJsVarName = $aArgs['wizHelperRemote']; + $aDependencies = $aArgs['remoteCodes']; + } + break; case 'RedundancySetting': @@ -2293,23 +2351,23 @@ EOF $oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/form_field.js'); $oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/subform_field.js'); $oPage->add_ready_script( -<<