Merge branch 'develop' into accounting-num_rows_leftovers
This commit is contained in:
commit
72ef34f698
56 changed files with 596 additions and 412 deletions
50
.github/workflows/pre-commit.yml
vendored
50
.github/workflows/pre-commit.yml
vendored
|
|
@ -59,6 +59,35 @@ jobs:
|
|||
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
|
||||
# Run all the precommit tools (defined in pre-commit-config.yaml).
|
||||
- name: Extract PHP version
|
||||
id: extract-php-version
|
||||
run: |
|
||||
# shellcheck disable=SC2016
|
||||
PHP_VERSION=$(sed -n 's/.*\$arrayphpmaxversionwarning\s*=\s*array\s*(\s*\([0-9]\+\)\s*,\s*\([0-9]\+\).*/\1.\2/p' htdocs/install/check.php)
|
||||
echo "PHP_VERSION=$PHP_VERSION" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup PHPCS
|
||||
uses: shivammathur/setup-php@v2
|
||||
# Install proper php version, and also install phpcs which may be needed
|
||||
if: |
|
||||
! cancelled() &&
|
||||
(
|
||||
steps.changed-php.outputs.any_changed == 'true'
|
||||
||
|
||||
(
|
||||
env.gh_event == 'push'
|
||||
&& (
|
||||
github.event.ref == 'refs/heads/develop'
|
||||
|| endsWith(github.event.ref, '.0')
|
||||
)
|
||||
)
|
||||
)
|
||||
with:
|
||||
php-version: ${{ env.PHP_VERSION }} # Version from check.php
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpcs
|
||||
|
||||
# Run all the precommit tools (defined into pre-commit-config.yaml).
|
||||
# We can force exclusion of some of them here.
|
||||
- name: Run pre-commit hooks
|
||||
env:
|
||||
|
|
@ -78,27 +107,6 @@ jobs:
|
|||
# files: |
|
||||
# **.php
|
||||
|
||||
- name: Setup PHPCS
|
||||
uses: shivammathur/setup-php@v2
|
||||
# Install when we're going to run phpcs
|
||||
if: |
|
||||
! cancelled() &&
|
||||
(
|
||||
steps.changed-php.outputs.any_changed == 'true'
|
||||
||
|
||||
(
|
||||
env.gh_event == 'push'
|
||||
&& (
|
||||
github.event.ref == 'refs/heads/develop'
|
||||
|| endsWith(github.event.ref, '.0')
|
||||
)
|
||||
)
|
||||
)
|
||||
with:
|
||||
php-version: 8.1
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpcs
|
||||
|
||||
- name: Run some pre-commit hooks on selected changed files only
|
||||
if: "! cancelled() && steps.changed-php.outputs.any_changed == 'true'"
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -1,215 +1,246 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<profiles>
|
||||
<profile name="PSR-12 [built-in]">
|
||||
<setting id="indentationChar" value="	"/>
|
||||
<setting id="insert_space_after_opening_paren_in_declare" value="false"/>
|
||||
<setting id="insert_space_before_closing_paren_in_declare" value="false"/>
|
||||
<setting id="insert_space_before_opening_paren_in_declare" value="false"/>
|
||||
<setting id="org.eclipse.php.core.formatter.insert_new_line_in_function_invoke" value="3"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_assignment_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_assignment_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_assignment_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_binary_expression_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_binary_expression_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_binary_expression_line_wrap_policy" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_compact_if_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_compact_if_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_compact_if_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_conditional_expression_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_conditional_expression_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_conditional_expression_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_expressions_in_array_initializer_force_split" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_expressions_in_array_initializer_indent_policy" value="2"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_expressions_in_array_initializer_line_wrap_policy" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_parameters_in_method_declaration_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_parameters_in_method_declaration_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_parameters_in_method_declaration_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superclass_in_type_declaration_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superclass_in_type_declaration_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superclass_in_type_declaration_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superinterfaces_in_type_declaration_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superinterfaces_in_type_declaration_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superinterfaces_in_type_declaration_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_before_field" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_before_member_type" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_before_method" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_between_type_declarations" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_block" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_lambda_function_declaration" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_method_declaration" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_switch" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_type_declaration" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_block_comments" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_header" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_html" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_javadoc_comments" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_line_comments" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_source_code" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.indent_parameter_description" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.indent_root_tags" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.insert_new_line_before_root_tags" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.insert_new_line_for_parameter" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.keep_empty_line_for_empty_description" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.line_length" value="1000"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.never_format_unknown_tags" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.continuation_indentation" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.disabling_tag" value="@formatter:off"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.enabling_tag" value="@formatter:on"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_breaks_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_empty_lines" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_heredocs" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_statements_compare_to_block" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_statements_compare_to_body" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indentation.size" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_catch_in_try_statement" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_else_in_if_statement" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_finally_in_try_statement" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_while_in_do_statement" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_in_empty_block" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_in_empty_method_body" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_in_empty_type_declaration" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_array_creation" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_field_access" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_foreach" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_yield" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_assignment_operator" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_binary_operator" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_closing_brace_in_block" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_closing_paren_in_cast" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_colon_in_conditional" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_coloncolon_in_field_access" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_coloncolon_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_array_creation" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_echo" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_for_inits" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_global" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_list" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_multiple_constant_declarations" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_static" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_superinterfaces" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_array_creation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_cast" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_catch" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_for" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_foreach" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_if" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_list" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_switch" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_while" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_postfix_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_prefix_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_question_in_conditional" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_reference_symbol_in_referenced_expression" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_semicolon_in_for" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_unary_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_array_creation" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_field_access" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_foreach" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_yield" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_assignment_operator" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_binary_operator" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_array_creation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_cast" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_catch" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_for" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_foreach" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_if" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_list" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_switch" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_while" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_colon_in_case" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_colon_in_conditional" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_colon_in_default" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_coloncolon_in_field_access" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_coloncolon_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_array_creation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_echo" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_for_inits" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_global" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_list" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_multiple_constant_declarations" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_static" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_superinterfaces" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_block" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_switch" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_array_creation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_catch" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_for" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_foreach" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_if" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_list" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_switch" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_while" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_postfix_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_prefix_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_question_in_conditional" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_semicolon" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_semicolon_in_for" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_unary_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_between_brackets_in_array_type_reference" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.join_lines_in_comments" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.keep_elseif_statement_on_same_line" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.keep_imple_if_on_one_line" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.keep_trailing_comma_in_list" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.lineSplit" value="200"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_after_namespace" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_after_use_statements" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_at_end_of_class_body" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_before_namespace" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_before_use_statements" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_between_namespaces" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_between_use_statements" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_empty_lines_to_preserve" value="3"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.put_empty_statement_on_new_line" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.tabulation.size" value="4"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.use_on_off_tags" value="false"/>
|
||||
</profile>
|
||||
<profile name="PSR-2 [built-in] dolibarr">
|
||||
<setting id="indentationChar" value="	"/>
|
||||
<setting id="insert_space_after_opening_paren_in_declare" value="false"/>
|
||||
<setting id="insert_space_before_closing_paren_in_declare" value="false"/>
|
||||
<setting id="insert_space_before_opening_paren_in_declare" value="false"/>
|
||||
<setting id="org.eclipse.php.core.formatter.insert_new_line_in_function_invoke" value="3"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_line_wrap_policy" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_attribute_group_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_attribute_group_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_attribute_group_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_match_expression_force_split" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_match_expression_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_match_expression_line_wrap_policy" value="3"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_line_wrap_policy" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_assignment_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_assignment_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_assignment_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_binary_expression_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_binary_expression_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_binary_expression_line_wrap_policy" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_compact_if_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_compact_if_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_compact_if_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_conditional_expression_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_conditional_expression_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_conditional_expression_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_expressions_in_array_initializer_force_split" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_expressions_in_array_initializer_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_expressions_in_array_initializer_line_wrap_policy" value="3"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_parameters_in_method_declaration_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_parameters_in_method_declaration_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_parameters_in_method_declaration_line_wrap_policy" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superclass_in_type_declaration_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superclass_in_type_declaration_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superclass_in_type_declaration_line_wrap_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superinterfaces_in_type_declaration_force_split" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superinterfaces_in_type_declaration_indent_policy" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superinterfaces_in_type_declaration_line_wrap_policy" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_before_enum_case" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_before_field" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_before_member_type" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_before_method" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_between_type_declarations" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_block" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_lambda_function_declaration" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_match" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_method_declaration" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_switch" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_type_declaration" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_block_comments" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_header" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_html" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_javadoc_comments" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_line_comments" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_source_code" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.indent_parameter_description" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.indent_root_tags" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.insert_new_line_before_root_tags" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.insert_new_line_for_parameter" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.keep_empty_line_for_empty_description" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.line_length" value="9999"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.never_format_unknown_tags" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.continuation_indentation" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.continuation_indentation_for_array_initializer" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.disabling_tag" value="@formatter:off"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.enabling_tag" value="@formatter:on"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_breaks_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_empty_lines" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_heredocs" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_match_arms_compare_to_match" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_statements_compare_to_block" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_statements_compare_to_body" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.indentation.size" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_catch_in_try_statement" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_else_in_if_statement" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_finally_in_try_statement" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_while_in_do_statement" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_in_empty_block" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_in_empty_method_body" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_in_empty_type_declaration" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_array_creation" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_field_access" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_foreach" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_match_arm" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_yield" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_assignment_operator" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_attribute_group_start" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_binary_operator" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_closing_brace_in_block" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_closing_paren_in_cast" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_colon_in_conditional" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_colon_in_enum_type" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_colon_in_named_argument" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_coloncolon_in_field_access" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_coloncolon_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_array_creation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_attribute_group" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_echo" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_for_inits" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_global" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_list" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_match_arm_conditions" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_match_expressions" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_multiple_constant_declarations" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_static" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_superinterfaces" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_concatenation_operator" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_equal_in_enum_case" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_array_creation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_cast" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_catch" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_for" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_foreach" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_if" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_list" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_match" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_switch" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_while" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_postfix_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_prefix_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_question_in_conditional" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_reference_symbol_in_referenced_expression" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_semicolon_in_for" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_unary_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_array_creation" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_field_access" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_foreach" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_match_arm" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_yield" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_assignment_operator" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_attribute_group_end" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_binary_operator" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_array_creation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_cast" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_catch" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_for" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_foreach" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_if" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_list" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_match" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_switch" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_while" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_colon_in_case" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_colon_in_conditional" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_colon_in_default" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_colon_in_enum_type" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_colon_in_named_argument" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_coloncolon_in_field_access" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_coloncolon_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_array_creation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_attribute_group" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_echo" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_for_inits" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_global" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_list" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_match_arm_conditions" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_match_expressions" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_multiple_constant_declarations" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_static" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_superinterfaces" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_concatenation_operator" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_equal_in_enum_case" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_block" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_match" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_switch" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_array_creation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_catch" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_for" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_foreach" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_if" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_list" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_match" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_switch" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_while" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_postfix_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_prefix_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_question_in_conditional" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_semicolon" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_semicolon_in_for" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_unary_operator" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_between_brackets_in_array_type_reference" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.join_lines_in_comments" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.keep_elseif_statement_on_same_line" value="true"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.keep_imple_if_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.keep_trailing_comma_in_list" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.lineSplit" value="9999"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_after_namespace" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_after_use_statements" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_at_end_of_class_body" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_before_namespace" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_before_use_statements" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_between_namespaces" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_between_use_statements" value="0"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.put_empty_statement_on_new_line" value="false"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.tabulation.size" value="4"/>
|
||||
<setting id="org.eclipse.php.formatter.core.formatter.use_on_off_tags" value="false"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
|
|
|||
|
|
@ -861,6 +861,27 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($action == 'update_extras' && $user->hasRight('adherent', 'creer')) {
|
||||
$object->oldcopy = dol_clone($object, 2);
|
||||
$attribute_name = GETPOST('attribute', 'restricthtml');
|
||||
|
||||
// Fill array 'array_options' with data from update form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, $attribute_name);
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
if (!$error) {
|
||||
$result = $object->updateExtraField($attribute_name, 'MEMBER_MODIFY');
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
if ($error) {
|
||||
$action = 'edit_extras';
|
||||
}
|
||||
}
|
||||
|
||||
// SPIP Management
|
||||
if (is_object($mailmanspip)) {
|
||||
if ($user->hasRight('adherent', 'supprimer') && $action == 'confirm_del_spip' && $confirm == 'yes') {
|
||||
|
|
|
|||
|
|
@ -325,7 +325,12 @@ if ($action == 'update') {
|
|||
if ($mode == 'css') {
|
||||
//file_put_contents(DOL_DATA_ROOT.'/admin/customcss.css', $data);
|
||||
//dol_chmod(DOL_DATA_ROOT.'/admin/customcss.css');
|
||||
dolibarr_set_const($db, "MAIN_IHM_CUSTOM_CSS", GETPOST('MAIN_IHM_CUSTOM_CSS', 'restricthtml'), 'chaine', 0, '', $conf->entity);
|
||||
$csscontent = GETPOST('MAIN_IHM_CUSTOM_CSS', 'restricthtml');
|
||||
$csscontent = dol_string_nohtmltag($csscontent, 2);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_IHM_CUSTOM_CSS", $csscontent, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
setEventMessages($langs->trans("RecordSaved"), null);
|
||||
}
|
||||
|
||||
$_SESSION["mainmenu"] = ""; // The menu manager may have changed
|
||||
|
|
|
|||
|
|
@ -1187,9 +1187,10 @@ class Categorie extends CommonObject
|
|||
* - string (categories ids separated by comma)
|
||||
* - array (list of categories ids)
|
||||
* @param int<0,1> $include [=0] Removed or 1=Keep only
|
||||
* @param string $forcelangcode Lang code to force ('fr_FR', 'en_US', ...)
|
||||
* @return int<-1,-1>|array<int,array{rowid:int,id:int,fk_parent:int,label:string,description:string,color:string,position:string,visible:int,ref_ext:string,picto:string,fullpath:string,fulllabel:string,level:?int}> Array of categories. this->cats and this->motherof are set, -1 on error
|
||||
*/
|
||||
public function get_full_arbo($type, $fromid = 0, $include = 0)
|
||||
public function get_full_arbo($type, $fromid = 0, $include = 0, $forcelangcode = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
|
@ -1219,7 +1220,12 @@ class Categorie extends CommonObject
|
|||
|
||||
// Init this->motherof that is array(id_son=>id_parent, ...)
|
||||
$this->load_motherof();
|
||||
$current_lang = $langs->getDefaultLang();
|
||||
|
||||
if ($forcelangcode) {
|
||||
$current_lang = $forcelangcode;
|
||||
} else {
|
||||
$current_lang = $langs->getDefaultLang();
|
||||
}
|
||||
|
||||
// Init $this->cats array
|
||||
$sql = "SELECT DISTINCT c.rowid, c.label, c.ref_ext, c.description, c.color, c.position, c.fk_parent, c.visible"; // Distinct reduce pb with old tables with duplicates
|
||||
|
|
@ -1228,7 +1234,7 @@ class Categorie extends CommonObject
|
|||
}
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."categorie as c";
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$this->db->escape($current_lang)."'";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang = '".$this->db->escape($current_lang)."'";
|
||||
}
|
||||
$sql .= " WHERE c.entity IN (".getEntity('category').")";
|
||||
$sql .= " AND c.type = ".(int) $type;
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ class Commande extends CommonOrder
|
|||
'fk_mode_reglement' => array('type' => 'integer', 'label' => 'PaymentMode', 'enabled' => 1, 'visible' => -1, 'position' => 185),
|
||||
'date_livraison' => array('type' => 'date', 'label' => 'DateDeliveryPlanned', 'enabled' => 1, 'visible' => -1, 'position' => 190, 'csslist' => 'nowraponall'),
|
||||
'fk_shipping_method' => array('type' => 'integer', 'label' => 'ShippingMethod', 'enabled' => 1, 'visible' => -1, 'position' => 195),
|
||||
'fk_warehouse' => array('type' => 'integer:Entrepot:product/stock/class/entrepot.class.php', 'label' => 'Fk warehouse', 'enabled' => 'isModEnabled("stock")', 'visible' => -1, 'position' => 200),
|
||||
'fk_warehouse' => array('type' => 'integer:Entrepot:product/stock/class/entrepot.class.php', 'label' => 'DefaultWarehouse', 'enabled' => 'isModEnabled("stock")', 'visible' => -1, 'position' => 200, 'nodepth' => 1),
|
||||
'fk_availability' => array('type' => 'integer', 'label' => 'Availability', 'enabled' => 1, 'visible' => -1, 'position' => 205),
|
||||
'fk_input_reason' => array('type' => 'integer', 'label' => 'InputReason', 'enabled' => 1, 'visible' => -1, 'position' => 210),
|
||||
//'fk_delivery_address' =>array('type'=>'integer', 'label'=>'DeliveryAddress', 'enabled'=>1, 'visible'=>-1, 'position'=>215),
|
||||
|
|
@ -857,7 +857,7 @@ class Commande extends CommonOrder
|
|||
*/
|
||||
public function cancel($idwarehouse = -1)
|
||||
{
|
||||
global $conf, $user, $langs;
|
||||
global $user, $langs;
|
||||
|
||||
$error = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -1415,7 +1415,7 @@ if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER_IN_LIST')) {
|
|||
}
|
||||
// Ref
|
||||
if (!empty($arrayfields['f.ref']['checked'])) {
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat maxwidth50imp" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
}
|
||||
|
|
@ -1439,7 +1439,7 @@ if (!empty($arrayfields['f.type']['checked'])) {
|
|||
}
|
||||
//$listtype[Facture::TYPE_PROFORMA]=$langs->trans("InvoiceProForma"); // A proformat invoice is not an invoice but must be an order.
|
||||
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
|
||||
print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
|
||||
print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth75');
|
||||
print '</td>';
|
||||
}
|
||||
// Invoice Subtype
|
||||
|
|
@ -2505,7 +2505,7 @@ if ($num > 0) {
|
|||
|
||||
// Author
|
||||
if (!empty($arrayfields['u.login']['checked'])) {
|
||||
print '<td class="tdoverflowmax200">';
|
||||
print '<td class="tdoverflowmax125">';
|
||||
if ($userstatic->id) {
|
||||
print $userstatic->getNomUrl(-1);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ if (isModEnabled('don') && $user->hasRight('don', 'lire')) {
|
|||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="2">'.$langs->trans("BoxTitleLastModifiedDonations", $max);
|
||||
print '<a href="'.DOL_URL_ROOT.'/don/list.php?sortfield=f.tms&sortorder=desc"><span class="badge marginleftonly">...</span></a>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/don/list.php?sortfield=d.tms&sortorder=desc"><span class="badge marginleftonly">...</span></a>';
|
||||
print '</th>';
|
||||
print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
|
||||
print '<th class="right">'.$langs->trans("DateModificationShort").'</th>';
|
||||
|
|
|
|||
|
|
@ -120,12 +120,12 @@ class Contact extends CommonObject
|
|||
'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => 1, 'visible' => 3, 'position' => 200, 'searchall' => 1),
|
||||
'default_lang' => array('type' => 'varchar(6)', 'label' => 'Default lang', 'enabled' => 1, 'visible' => 3, 'position' => 205),
|
||||
'canvas' => array('type' => 'varchar(32)', 'label' => 'Canvas', 'enabled' => 1, 'visible' => 3, 'position' => 210),
|
||||
'ip' => array('type' => 'ip', 'label' => 'IPAddress', 'enabled' => '1', 'position' => 700, 'notnull' => 0, 'visible' => '-2', 'comment' => 'ip used to create record (for public submission page)'),
|
||||
'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -1, 'position' => 300),
|
||||
'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 305),
|
||||
'fk_user_creat' => array('type' => 'integer', 'label' => 'UserAuthor', 'enabled' => 1, 'visible' => 3, 'position' => 310),
|
||||
'fk_user_modif' => array('type' => 'integer', 'label' => 'UserModif', 'enabled' => 1, 'visible' => 3, 'position' => 315),
|
||||
'statut' => array('type' => 'tinyint(4)', 'label' => 'Status', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'position' => 500),
|
||||
'ip' => array('type' => 'varchar(250)', 'label' => 'Ip', 'enabled' => '1', 'position' => 700, 'notnull' => 0, 'visible' => '0', 'comment' => 'ip used to create record (for public submission page)'),
|
||||
'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -1, 'position' => 1000),
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -486,7 +486,7 @@ if ($resql) {
|
|||
$sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias as alias,";
|
||||
$sql .= " p.rowid, p.ref_ext, p.lastname as lastname, p.statut, p.firstname, p.address, p.zip, p.town, p.poste, p.email, p.birthday,";
|
||||
$sql .= " p.socialnetworks, p.photo,";
|
||||
$sql .= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.datec as date_creation, p.tms as date_modification,";
|
||||
$sql .= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.ip, p.datec as date_creation, p.tms as date_modification,";
|
||||
$sql .= " p.import_key, p.fk_stcommcontact as stcomm_id, p.fk_prospectlevel,";
|
||||
$sql .= " st.libelle as stcomm, st.picto as stcomm_picto,";
|
||||
$sql .= " co.label as country, co.code as country_code";
|
||||
|
|
@ -1240,6 +1240,11 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
|||
$parameters = array('arrayfields' => $arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// IP
|
||||
if (!empty($arrayfields['p.ip']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
// Date creation
|
||||
if (!empty($arrayfields['p.datec']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
|
|
@ -1385,6 +1390,12 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
|||
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// IP
|
||||
if (!empty($arrayfields['p.ip']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['p.ip']['label'], $_SERVER["PHP_SELF"], "p.ip", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
// Date creation
|
||||
if (!empty($arrayfields['p.datec']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
$totalarray['nbfield']++;
|
||||
|
|
@ -1754,6 +1765,17 @@ while ($i < $imaxinloop) {
|
|||
$parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
// IP creation
|
||||
if (!empty($arrayfields['p.ip']['checked'])) {
|
||||
print '<td class="center nowraponall">';
|
||||
print dol_print_ip($obj->ip);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
// Date creation
|
||||
if (!empty($arrayfields['p.datec']['checked'])) {
|
||||
print '<td class="center nowraponall">';
|
||||
|
|
|
|||
|
|
@ -222,6 +222,7 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||
if (empty($data3)) {
|
||||
$showpointvalue = 0;
|
||||
$nocolor = 1;
|
||||
|
||||
$data3 = array(array(0 => $langs->trans("None"), 1 => 1));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class DolEditor
|
|||
* @param string $toolbarname Name of the toolbar set to use ('dolibarr_details[_encoded]'=the less featured, 'dolibarr_notes[_encoded]' for notes content, 'dolibarr_mailings[_encoded]' for emailing content, 'dolibarr_readonly').
|
||||
* @param string $toolbarlocation Deprecated. Not used
|
||||
* @param bool $toolbarstartexpanded Bar is visible or not at start
|
||||
* @param bool|int $uselocalbrowser Enabled to add links to local object with a local media filemanager. If false, only external images URL can be added into content, or images saved inline with src="data:..." with a cut/paste.
|
||||
* @param bool|int $uselocalbrowser Enabled to add links to local object with a local media filemanager. -1=auto, false=only external images URL can be added into content, or images saved inline with src="data:..." with a cut/paste.
|
||||
* @param bool|int|string $okforextendededitor 1 or True=Allow usage of extended editor tool if qualified (like ckeditor). If 'textarea', force use of simple textarea. If 'ace', force use of Ace.
|
||||
* Warning: If you use 'ace', don't forget to also include ace.js in page header. Also, the button "save" must have class="buttonforacesave".
|
||||
* @param int $rows Size of rows for textarea tool
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
* Copyright (C) 2018 Josep Lluis Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2023 Joachim Kueter <git-jk@bloxera.com>
|
||||
* Copyright (C) 2023 Nick Fragoulis
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -6906,11 +6906,30 @@ class Form
|
|||
public function load_tva($htmlname = 'tauxtva', $selectedrate = '', $societe_vendeuse = null, $societe_acheteuse = null, $idprod = 0, $info_bits = 0, $type = '', $options_only = false, $mode = 0, $type_vat = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs, $mysoc;
|
||||
global $langs, $mysoc, $hookmanager;
|
||||
|
||||
$langs->load('errors');
|
||||
|
||||
$return = '';
|
||||
// Bypass the default method
|
||||
$hookmanager->initHooks(array('commonobject'));
|
||||
$info_bits == 1 ? $is_npr = 1 : $is_npr = 0;
|
||||
$parameters = array(
|
||||
'seller' => $societe_vendeuse,
|
||||
'buyer' => $societe_acheteuse,
|
||||
'idprod' => $idprod,
|
||||
'is_npr' => $is_npr,
|
||||
'type' => $type,
|
||||
'options_only' => $options_only,
|
||||
'mode' => $mode,
|
||||
'type_vat' => $type_vat
|
||||
);
|
||||
$reshook = $hookmanager->executeHooks('load_tva', $parameters);
|
||||
if ($reshook > 0) {
|
||||
return $hookmanager->resPrint;
|
||||
} elseif ($reshook === 0) {
|
||||
$return .= $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
// Define defaultnpr, defaultttx and defaultcode
|
||||
$defaultnpr = ($info_bits & 0x01);
|
||||
|
|
@ -9374,7 +9393,8 @@ class Form
|
|||
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
|
||||
// Specify format function for selected item
|
||||
formatSelection: formatSelection,
|
||||
templateSelection: formatSelection /* For 4.0 */
|
||||
templateSelection: formatSelection, /* For 4.0 */
|
||||
language: select2arrayoflanguage
|
||||
});
|
||||
|
||||
/* Add also morecss to the css .select2 that is after the #htmlname, for component that are show dynamically after load, because select2 set
|
||||
|
|
|
|||
|
|
@ -682,6 +682,8 @@ class Translate
|
|||
}
|
||||
}
|
||||
|
||||
$str = str_replace('%)', '__percent_parenthesis__', $str);
|
||||
|
||||
if (strpos($key, 'Format') !== 0) {
|
||||
try {
|
||||
// @phan-suppress-next-line PhanPluginPrintfVariableFormatString
|
||||
|
|
@ -691,6 +693,8 @@ class Translate
|
|||
}
|
||||
}
|
||||
|
||||
$str = str_replace('__percent_parenthesis__', '%)', $str);
|
||||
|
||||
// We replace some HTML tags by __xx__ to avoid having them encoded by htmlentities because
|
||||
// we want to keep '"' '<b>' '</b>' '<u>' '</u>' '<i>' '</i>' '<center> '</center>' '<strong' '</strong>' '<a ' '</a>' '<br>' '<span' '</span>' '< ' that are reliable HTML tags inside translation strings.
|
||||
$str = str_replace(
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
* include DOL_DOCUMENT_ROOT.'/core/customreports.php';
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
|
|
@ -322,6 +322,7 @@ $HH = substr($langs->trans("Hour"), 0, 1).substr($langs->trans("Hour"), 0, 1);
|
|||
$MI = substr($langs->trans("Minute"), 0, 1).substr($langs->trans("Minute"), 0, 1);
|
||||
$SS = substr($langs->trans("Second"), 0, 1).substr($langs->trans("Second"), 0, 1);
|
||||
|
||||
$arrayoffilterfields = array();
|
||||
$arrayofmesures = array();
|
||||
$arrayofxaxis = array();
|
||||
$arrayofgroupby = array();
|
||||
|
|
@ -375,6 +376,10 @@ foreach ($arrayoftype as $key => $val) {
|
|||
}
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
$arrayoffilterfields = fillArrayOfFilterFields($object, 't', $langs->trans($newarrayoftype[$objecttype]['label']), $arrayoffilterfields, 0, $count);
|
||||
$arrayoffilterfields = dol_sort_array($arrayoffilterfields, 'position', 'asc', 0, 0, 1);
|
||||
|
||||
$count = 0;
|
||||
$arrayofmesures = fillArrayOfMeasures($object, 't', $langs->trans($newarrayoftype[$objecttype]['label']), $arrayofmesures, 0, $count);
|
||||
$arrayofmesures = dol_sort_array($arrayofmesures, 'position', 'asc', 0, 0, 1);
|
||||
|
|
@ -387,10 +392,6 @@ $count = 0;
|
|||
$arrayofgroupby = fillArrayOfGroupBy($object, 't', $langs->trans($newarrayoftype[$objecttype]['label']), $arrayofgroupby, 0, $count);
|
||||
$arrayofgroupby = dol_sort_array($arrayofgroupby, 'position', 'asc', 0, 0, 1);
|
||||
|
||||
$count = 0;
|
||||
$arrayoffilterfields = fillArrayOfFilterFields($object, 't', $langs->trans($newarrayoftype[$objecttype]['label']), $arrayoffilterfields, 0, $count);
|
||||
$arrayoffilterfields = dol_sort_array($arrayoffilterfields, 'position', 'asc', 0, 0, 1);
|
||||
|
||||
|
||||
// Check parameters
|
||||
if ($action == 'viewgraph') {
|
||||
|
|
|
|||
|
|
@ -2366,11 +2366,13 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr
|
|||
$out .= dol_trunc($libelle, 120);
|
||||
}
|
||||
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') {
|
||||
$out .= '<a href="'.DOL_URL_ROOT.'/comm/mailing/card.php?id='.$histo[$key]['id'].'">'.img_object($langs->trans("ShowEMailing"), "email").' ';
|
||||
$transcode = $langs->trans("Action".$histo[$key]['acode']);
|
||||
$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : 'Send mass mailing');
|
||||
$out .= '<a href="'.DOL_URL_ROOT.'/comm/mailing/card.php?id='.$histo[$key]['id'].'"';
|
||||
$out .= ' title="'.dol_escape_htmltag($libelle).'">';
|
||||
$out .= img_object($langs->trans("ShowEMailing"), "email").' ';
|
||||
$out .= dol_trunc($libelle, 120);
|
||||
$out .= '</a>';
|
||||
}
|
||||
$out .= '</td>';
|
||||
|
||||
|
|
|
|||
|
|
@ -523,10 +523,12 @@ function fillArrayOfFilterFields($object, $tablealias, $labelofobject, &$arrayof
|
|||
{
|
||||
global $langs, $extrafields, $db;
|
||||
|
||||
$MAXLEVEL = 2;
|
||||
|
||||
if (empty($object)) { // Protection against bad use of method
|
||||
return array();
|
||||
}
|
||||
if ($level >= 3) { // Limit scan on 2 levels max
|
||||
if ($level > $MAXLEVEL) { // Limit scan on 2 levels max
|
||||
return $arrayoffields;
|
||||
}
|
||||
|
||||
|
|
@ -612,7 +614,11 @@ function fillArrayOfFilterFields($object, $tablealias, $labelofobject, &$arrayof
|
|||
if (class_exists($newobject)) {
|
||||
$tmpobject = new $newobject($db);
|
||||
$count++;
|
||||
$arrayoffields = fillArrayOfFilterFields($tmpobject, $tablealias.'__'.$key, $langs->trans($val['label']), $arrayoffields, $level + 1, $count, $tablepath);
|
||||
if (!empty($val['nodepth'])) {
|
||||
$arrayoffields = fillArrayOfFilterFields($tmpobject, $tablealias.'__'.$key, $langs->trans($val['label']), $arrayoffields, $MAXLEVEL, $count, $tablepath);
|
||||
} else {
|
||||
$arrayoffields = fillArrayOfFilterFields($tmpobject, $tablealias.'__'.$key, $langs->trans($val['label']), $arrayoffields, $level + 1, $count, $tablepath);
|
||||
}
|
||||
} else {
|
||||
print 'For property '.$object->element.'->'.$key.', type="'.$val['type'].'": Failed to find class '.$newobject." in file ".$tmptype[2]."<br>\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3885,7 +3885,7 @@ function archiveOrBackupFile($srcfile, $max_versions = 5, $archivedir = '', $suf
|
|||
if (count($sorted_files) >= $max_versions) {
|
||||
$oldest_files = array_slice($sorted_files, $max_versions - 1);
|
||||
foreach ($oldest_files as $oldest_file) {
|
||||
dol_delete_file($oldest_file);
|
||||
dol_delete_file($oldest_file, 0, 0, 0, null, false, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
|
|
@ -20,8 +21,8 @@
|
|||
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2022 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2023 Joachim Kueter <git-jk@bloxera.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2023-2024 Joachim Kueter <git-jk@bloxera.com>
|
||||
* Copyright (C) 2024 Lenin Rivas <lenin.rivas777@gmail.com>
|
||||
* Copyright (C) 2024 Josep Lluís Amador Teruel <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2024 Benoît PASCAL <contact@p-ben.com>
|
||||
|
|
@ -8585,17 +8586,19 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = '
|
|||
// We replace chars from a/A to z/Z encoded with numeric HTML entities with the real char so we won't loose the chars at the next step (preg_replace).
|
||||
// No need to use a loop here, this step is not to sanitize (this is done at next step, this is to try to save chars, even if they are
|
||||
// using a non conventionnal way to be encoded, to not have them sanitized just after)
|
||||
$out = preg_replace_callback(
|
||||
'/&#(x?[0-9][0-9a-f]+;?)/i',
|
||||
/**
|
||||
* @param string[] $m
|
||||
* @return string
|
||||
*/
|
||||
static function ($m) {
|
||||
return realCharForNumericEntities($m);
|
||||
},
|
||||
$out
|
||||
);
|
||||
if (function_exists('realCharForNumericEntities')) { // May not exist when main.inc.php not loaded, for example in a CLI context
|
||||
$out = preg_replace_callback(
|
||||
'/&#(x?[0-9][0-9a-f]+;?)/i',
|
||||
/**
|
||||
* @param string[] $m
|
||||
* @return string
|
||||
*/
|
||||
static function ($m) {
|
||||
return realCharForNumericEntities($m);
|
||||
},
|
||||
$out
|
||||
);
|
||||
}
|
||||
|
||||
// Now we remove all remaining HTML entities starting with a number. We don't want such entities.
|
||||
$out = preg_replace('/&#x?[0-9]+/i', '', $out); // For example if we have javascript with an entities without the ; to hide the 'a' of 'javascript'.
|
||||
|
|
@ -9171,23 +9174,33 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||
$substitutionarray['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null);
|
||||
$substitutionarray['__NOTE_PUBLIC__'] = (isset($object->note_public) ? $object->note_public : null);
|
||||
$substitutionarray['__NOTE_PRIVATE__'] = (isset($object->note_private) ? $object->note_private : null);
|
||||
|
||||
$substitutionarray['__DATE_CREATION__'] = (isset($object->date_creation) ? dol_print_date($object->date_creation, 'day', false, $outputlangs) : '');
|
||||
$substitutionarray['__DATE_MODIFICATION__'] = (isset($object->date_modification) ? dol_print_date($object->date_modification, 'day', false, $outputlangs) : '');
|
||||
$substitutionarray['__DATE_VALIDATION__'] = (isset($object->date_validation) ? dol_print_date($object->date_validation, 'day', false, $outputlangs) : '');
|
||||
$substitutionarray['__DATE_DELIVERY__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, 'day', false, $outputlangs) : '');
|
||||
$substitutionarray['__DATE_DELIVERY_DAY__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%d") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_DAY_TEXT__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%A") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_MON__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%m") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_MON_TEXT__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%b") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_YEAR__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%Y") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_HH__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%H") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_MM__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%M") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_SS__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%S") : '');
|
||||
|
||||
// handle date_delivery: in customer order/supplier order, the property name is delivery_date, in shipment/reception it is date_delivery
|
||||
$date_delivery = null;
|
||||
if (property_exists($object, 'date_delivery')) {
|
||||
$date_delivery = $object->date_delivery;
|
||||
} elseif (property_exists($object, 'delivery_date')) {
|
||||
$date_delivery = $object->delivery_date;
|
||||
}
|
||||
$substitutionarray['__DATE_DELIVERY__'] = (isset($date_delivery) ? dol_print_date($date_delivery, 'day', 0, $outputlangs) : '');
|
||||
$substitutionarray['__DATE_DELIVERY_DAY__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%d") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_DAY_TEXT__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%A") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_MON__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%m") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_MON_TEXT__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%b") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_YEAR__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%Y") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_HH__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%H") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_MM__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%M") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_SS__'] = (isset($date_delivery) ? dol_print_date($date_delivery, "%S") : '');
|
||||
|
||||
// For backward compatibility (deprecated)
|
||||
$substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null));
|
||||
$substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null);
|
||||
$substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, 'day', false, $outputlangs) : '');
|
||||
|
||||
$substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($date_delivery) ? dol_print_date($date_delivery, 'day', false, $outputlangs) : '');
|
||||
$substitutionarray['__SUPPLIER_ORDER_DELAY_DELIVERY__'] = (isset($object->availability_code) ? ($outputlangs->transnoentities("AvailabilityType".$object->availability_code) != 'AvailabilityType'.$object->availability_code ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset(isset($object->availability) ? $object->availability : '')) : '');
|
||||
$substitutionarray['__EXPIRATION_DATE__'] = (isset($object->fin_validite) ? dol_print_date($object->fin_validite, 'daytext') : '');
|
||||
|
||||
|
|
@ -9686,9 +9699,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||
* $mesg = make_substitutions($mesg, $substitutionarray, $langs);
|
||||
*
|
||||
* @param string $text Source string in which we must do substitution
|
||||
* @param array<string,string> $substitutionarray Array with key->val to substitute. Example: array('__MYKEY__' => 'MyVal', ...)
|
||||
* @param array<string,null|string|float|int> $substitutionarray Array with key->val to substitute. Example: array('__MYKEY__' => 'MyVal', ...)
|
||||
* @param ?Translate $outputlangs Output language
|
||||
* @param int $converttextinhtmlifnecessary 0=Convert only value into HTML if text is already in HTML
|
||||
* @param int<0,1> $converttextinhtmlifnecessary 0=Convert only value into HTML if text is already in HTML
|
||||
* 1=Will also convert initial $text into HTML if we try to insert one value that is HTML
|
||||
* @return string Output string after substitutions
|
||||
* @see complete_substitutions_array(), getCommonSubstitutionArray()
|
||||
|
|
@ -9736,7 +9749,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs = null, $con
|
|||
$msgishtml = 1;
|
||||
}
|
||||
} else {
|
||||
$value = dol_nl2br("$value");
|
||||
$value = dol_nl2br((string) $value);
|
||||
}
|
||||
|
||||
$text = preg_replace('/__\('.preg_quote($reg[1], '/').'\)__/', $value, $text);
|
||||
|
|
@ -9767,7 +9780,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs = null, $con
|
|||
$msgishtml = 1;
|
||||
}
|
||||
} else {
|
||||
$value = dol_nl2br("$value");
|
||||
$value = dol_nl2br((string) $value);
|
||||
}
|
||||
|
||||
$text = preg_replace('/__\['.preg_quote($keyfound, '/').'\]__/', $value, $text);
|
||||
|
|
@ -9785,7 +9798,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs = null, $con
|
|||
}
|
||||
|
||||
if (empty($converttextinhtmlifnecessary)) {
|
||||
$text = str_replace("$key", "$value", $text); // We must keep the " to work when value is 123.5 for example
|
||||
$text = str_replace((string) $key, (string) $value, $text); // Cast to string is needed when value is 123.5 for example
|
||||
} else {
|
||||
if (! $msgishtml) {
|
||||
$valueishtml = dol_textishtml($value, 1);
|
||||
|
|
@ -9795,9 +9808,9 @@ function make_substitutions($text, $substitutionarray, $outputlangs = null, $con
|
|||
$msgishtml = 1;
|
||||
}
|
||||
} else {
|
||||
$value = dol_nl2br("$value");
|
||||
$value = dol_nl2br((string) $value);
|
||||
}
|
||||
$text = str_replace("$key", "$value", $text); // We must keep the " to work when value is 123.5 for example
|
||||
$text = str_replace((string) $key, (string) $value, $text); // Cast to string is needed 123.5 for example
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9820,7 +9833,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs = null, $con
|
|||
if (isset($lazy_load_arr[1]) && !empty($lazy_load_arr[1])) {
|
||||
$key_to_substitute = $lazy_load_arr[1];
|
||||
if (preg_match('/' . preg_quote($key_to_substitute, '/') . '/', $text)) {
|
||||
$param_arr = explode(':', $value);
|
||||
$param_arr = explode(':', (string) $value);
|
||||
// path:class:method:id
|
||||
if (count($param_arr) == 4) {
|
||||
$path = $param_arr[0];
|
||||
|
|
@ -9855,7 +9868,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs = null, $con
|
|||
$valuetouseforsubstitution = $tmpobj->$method($id, $key_to_substitute, true);
|
||||
}
|
||||
|
||||
$text = str_replace("$key_to_substitute", "$valuetouseforsubstitution", $text); // We must keep the " to work when value is 123.5 for example
|
||||
$text = str_replace((string) $key_to_substitute, (string) $valuetouseforsubstitution, $text); // Cast to string in case value is 123.5 for example
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -10665,9 +10678,9 @@ function dol_eval($s, $returnvalue = 1, $hideerrors = 1, $onlysimplestring = '1'
|
|||
// Check if there is dynamic call (first we use black list patterns)
|
||||
if (preg_match('/\$[\w]*\s*\(/', $s)) {
|
||||
if ($returnvalue) {
|
||||
return 'Bad string syntax to evaluate (mode '.$onlysimplestring.', found a call using of "$abc(" or "$abc (" instead of using the direct name of the function): '.$s;
|
||||
return 'Bad string syntax to evaluate (mode '.$onlysimplestring.', found a call using "$abc(" or "$abc (" instead of using the direct name of the function): '.$s;
|
||||
} else {
|
||||
dol_syslog('Bad string syntax to evaluate (mode '.$onlysimplestring.', found a call using of "$abc(" or "$abc (" instead of using the direct name of the function): '.$s, LOG_WARNING);
|
||||
dol_syslog('Bad string syntax to evaluate (mode '.$onlysimplestring.', found a call using "$abc(" or "$abc (" instead of using the direct name of the function): '.$s, LOG_WARNING);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -731,9 +731,9 @@ function print_end_menu_array()
|
|||
* @param int<0,1> $noout Disable output (Initialise &$menu only).
|
||||
* @param string $forcemainmenu 'x'=Force mainmenu to mainmenu='x'
|
||||
* @param string $forceleftmenu 'all'=Force leftmenu to '' (= all). If value come being '', we change it to value in session and 'none' if not defined in session.
|
||||
* @param ?array<string,string> $moredata An array with more data to output
|
||||
* @param ?array{searchform?:string,bookmarks?:string} $moredata An array with more data to output
|
||||
* @param int<0,1> $type_user 0=Menu for backoffice, 1=Menu for front office
|
||||
* @return int Nb of menu entries
|
||||
* @return int<0,max> Nb of menu entries
|
||||
*/
|
||||
function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabMenu, &$menu, $noout = 0, $forcemainmenu = '', $forceleftmenu = '', $moredata = null, $type_user = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -148,9 +148,9 @@ class MenuManager
|
|||
* Show menu.
|
||||
* Menu defined in sql tables were stored into $this->tabMenu BEFORE this is called.
|
||||
*
|
||||
* @param string $mode 'top', 'topnb', 'left', 'leftdropdown', 'jmobile' (used to get full xml ul/li menu)
|
||||
* @param ?array<string,mixed> $moredata An array with more data to output
|
||||
* @return int 0 or nb of top menu entries if $mode = 'topnb'
|
||||
* @param 'top'|'topnb'|'left'|'leftdropdown'|'jmobile' $mode 'top', 'topnb', 'left', 'leftdropdown', 'jmobile' (used to get full xml ul/li menu)
|
||||
* @param ?array<string,string> $moredata An array with more data to output
|
||||
* @return int<0,max> 0 or nb of top menu entries if $mode = 'topnb'
|
||||
*/
|
||||
public function showmenu($mode, $moredata = null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes
|
|||
{
|
||||
global $conf, $mysoc;
|
||||
|
||||
if ((float) $conf->global->MAIN_VERSION_LAST_INSTALL >= 16.0 && $mysoc->country_code != 'FR') {
|
||||
if ((float) getDolGlobalString('MAIN_VERSION_LAST_INSTALL') >= 16.0 && $mysoc->country_code != 'FR') {
|
||||
$this->prefix = 'SO'; // We use correct standard code "SO = Sale Order"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,14 +169,14 @@ class MailingTargets // This can't be abstract as it is used for some method
|
|||
{
|
||||
// phpcs:enable
|
||||
// Mise a jour nombre de destinataire dans table des mailings
|
||||
$sql = "SELECT COUNT(*) nb FROM ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
$sql = "SELECT COUNT(*) nb FROM ".$this->db->prefix()."mailing_cibles";
|
||||
$sql .= " WHERE fk_mailing = ".((int) $mailing_id);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
$nb = $obj->nb;
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing";
|
||||
$sql = "UPDATE ".$this->db->prefix()."mailing";
|
||||
$sql .= " SET nbemail = ".((int) $nb)." WHERE rowid = ".((int) $mailing_id);
|
||||
if (!$this->db->query($sql)) {
|
||||
dol_syslog($this->db->error());
|
||||
|
|
@ -208,7 +208,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
|||
$num = count($cibles);
|
||||
foreach ($cibles as $targetarray) {
|
||||
if (!empty($targetarray['email'])) { // avoid empty email address
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
$sql = "INSERT INTO ".$this->db->prefix()."mailing_cibles";
|
||||
$sql .= " (fk_mailing,";
|
||||
$sql .= " fk_contact,";
|
||||
$sql .= " lastname, firstname, email, other, source_url, source_id,";
|
||||
|
|
@ -244,27 +244,27 @@ class MailingTargets // This can't be abstract as it is used for some method
|
|||
|
||||
/*
|
||||
//Update the status to show thirdparty mail that don't want to be contacted anymore'
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
$sql = "UPDATE ".$this->db->prefix()."mailing_cibles";
|
||||
$sql .= " SET statut=3";
|
||||
$sql .= " WHERE fk_mailing = ".((int) $mailing_id)." AND email in (SELECT email FROM ".MAIN_DB_PREFIX."societe where fk_stcomm=-1)";
|
||||
$sql .= " WHERE fk_mailing = ".((int) $mailing_id)." AND email in (SELECT email FROM ".$this->db->prefix()."societe where fk_stcomm=-1)";
|
||||
$sql .= " AND source_type='thirdparty'";
|
||||
dol_syslog(__METHOD__.": mailing update status to display thirdparty mail that do not want to be contacted");
|
||||
$result=$this->db->query($sql);
|
||||
|
||||
//Update the status to show contact mail that don't want to be contacted anymore'
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
$sql = "UPDATE ".$this->db->prefix()."mailing_cibles";
|
||||
$sql .= " SET statut=3";
|
||||
$sql .= " WHERE fk_mailing = ".((int) $mailing_id)." AND source_type='contact' AND (email in (SELECT sc.email FROM ".MAIN_DB_PREFIX."socpeople AS sc ";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid=sc.fk_soc WHERE s.fk_stcomm=-1 OR no_email=1))";
|
||||
$sql .= " WHERE fk_mailing = ".((int) $mailing_id)." AND source_type='contact' AND (email in (SELECT sc.email FROM ".$this->db->prefix()."socpeople AS sc ";
|
||||
$sql .= " INNER JOIN ".$this->db->prefix()."societe s ON s.rowid=sc.fk_soc WHERE s.fk_stcomm=-1 OR no_email=1))";
|
||||
dol_syslog(__METHOD__.": mailing update status to display contact mail that do not want to be contacted",LOG_DEBUG);
|
||||
$result=$this->db->query($sql);
|
||||
*/
|
||||
|
||||
if (empty($this->evenunsubscribe)) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles as mc";
|
||||
$sql = "UPDATE ".$this->db->prefix()."mailing_cibles as mc";
|
||||
$sql .= " SET mc.statut = 3";
|
||||
$sql .= " WHERE mc.fk_mailing = ".((int) $mailing_id);
|
||||
$sql .= " AND EXISTS (SELECT rowid FROM ".MAIN_DB_PREFIX."mailing_unsubscribe as mu WHERE mu.email = mc.email and mu.entity = ".((int) $conf->entity).")";
|
||||
$sql .= " AND EXISTS (SELECT rowid FROM ".$this->db->prefix()."mailing_unsubscribe as mu WHERE mu.email = mc.email and mu.entity = ".((int) $conf->entity).")";
|
||||
|
||||
dol_syslog(__METHOD__.":mailing update status to display emails that do not want to be contacted anymore", LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
|
|
@ -291,7 +291,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
|||
public function clear_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
$sql = "DELETE FROM ".$this->db->prefix()."mailing_cibles";
|
||||
$sql .= " WHERE fk_mailing = ".((int) $mailing_id);
|
||||
|
||||
if (!$this->db->query($sql)) {
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ class modAdherent extends DolibarrModules
|
|||
'unitfrequency'=> 3600 * 24,
|
||||
'priority'=>50,
|
||||
'status'=>1,
|
||||
'test'=>'$conf->adherent->enabled',
|
||||
'test'=>'isModEnabled("member")',
|
||||
'datestart'=>$datestart
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ class modStock extends DolibarrModules
|
|||
);
|
||||
$this->import_updatekeys_array[$r] = array('ps.fk_product' => 'Product', 'ps.fk_entrepot' => "Warehouse");
|
||||
$this->import_run_sql_after_array[$r] = array( // Because we may change data that are denormalized, we must update dernormalized data after.
|
||||
'UPDATE '.MAIN_DB_PREFIX.'product as p SET p.stock = (SELECT SUM(ps.reel) FROM '.MAIN_DB_PREFIX.'product_stock ps WHERE ps.fk_product = p.rowid);'
|
||||
'UPDATE '.MAIN_DB_PREFIX.'product as p SET stock = (SELECT SUM(ps.reel) FROM '.MAIN_DB_PREFIX.'product_stock ps WHERE ps.fk_product = p.rowid);'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ class modGeneratePassNone extends ModeleGenPassword
|
|||
*/
|
||||
public function validatePassword($password)
|
||||
{
|
||||
dol_syslog("modGeneratePassNone::validatePassword");
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -221,6 +221,8 @@ class modGeneratePassPerso extends ModeleGenPassword
|
|||
|
||||
$this->initAll(); // For the case this method is called alone
|
||||
|
||||
dol_syslog("modGeneratePassPerso::validatePassword");
|
||||
|
||||
$password_a = preg_split('//u', $password, 0, PREG_SPLIT_NO_EMPTY);
|
||||
$maj = preg_split('//u', $this->Maj, 0, PREG_SPLIT_NO_EMPTY);
|
||||
$num = preg_split('//u', $this->Nb, 0, PREG_SPLIT_NO_EMPTY);
|
||||
|
|
|
|||
|
|
@ -125,6 +125,8 @@ class modGeneratePassStandard extends ModeleGenPassword
|
|||
{
|
||||
global $langs;
|
||||
|
||||
dol_syslog("modGeneratePassStandard::validatePassword");
|
||||
|
||||
if (dol_strlen($password) < $this->length2) {
|
||||
$langs->load("other");
|
||||
$this->error = $langs->trans("YourPasswordMustHaveAtLeastXChars", $this->length2);
|
||||
|
|
|
|||
|
|
@ -205,6 +205,9 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att
|
|||
if ($object->element == 'salary') {
|
||||
$permok = $user->hasRight('salaries', 'read');
|
||||
}
|
||||
if ($object->element == 'member') {
|
||||
$permok = $user->hasRight('adherent', 'creer');
|
||||
}
|
||||
|
||||
$isdraft = ((isset($object->statut) && $object->statut == 0) || (isset($object->status) && $object->status == 0));
|
||||
if (($isdraft || !empty($extrafields->attributes[$object->table_element]['alwayseditable'][$tmpkeyextra]))
|
||||
|
|
|
|||
|
|
@ -99,6 +99,9 @@ class InterfaceNotification extends DolibarrTriggers
|
|||
$notify = new Notify($this->db);
|
||||
$resultSend = $notify->send($action, $object);
|
||||
if ($resultSend < 0) {
|
||||
if (!isset($this->errors)) {
|
||||
$this->errors = [];
|
||||
}
|
||||
$this->errors = array_merge($this->errors, $notify->errors);
|
||||
return $resultSend;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -403,3 +403,7 @@ ALTER TABLE llx_societe_rib DROP INDEX uk_societe_rib;
|
|||
ALTER TABLE llx_societe_rib ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid;
|
||||
-- select entity, label, fk_soc, default_rib, MIN(iban_prefix), MAX(iban_prefix), MIN(rowid), MAX(rowid), COUNT(rowid) from llx_societe_rib GROUP BY entity, label, fk_soc, default_rib HAVING COUNT(rowid) > 1;
|
||||
ALTER TABLE llx_societe_rib ADD UNIQUE INDEX uk_societe_rib(entity, label, fk_soc);
|
||||
|
||||
|
||||
ALTER TABLE llx_societe_account DROP INDEX uk_societe_account_login_website_soc;
|
||||
ALTER TABLE llx_societe_account ADD UNIQUE INDEX uk_societe_account_login_website(entity, login, site, fk_website);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@
|
|||
ALTER TABLE llx_societe_rib MODIFY COLUMN label varchar(180);
|
||||
ALTER TABLE llx_societe_rib MODIFY COLUMN iban_prefix varchar(100);
|
||||
|
||||
ALTER TABLE llx_societe_account DROP INDEX uk_societe_account_login_website_soc;
|
||||
ALTER TABLE llx_societe_account ADD UNIQUE INDEX uk_societe_account_login_website(entity, login, site, fk_website);
|
||||
|
||||
|
||||
-- V22 migration
|
||||
|
||||
|
|
|
|||
|
|
@ -22,11 +22,13 @@ ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_fk_website (fk_web
|
|||
ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_fk_soc (fk_soc);
|
||||
-- END MODULEBUILDER INDEXES
|
||||
|
||||
ALTER TABLE llx_societe_account ADD UNIQUE INDEX uk_societe_account_login_website_soc(entity, fk_soc, login, site, fk_website);
|
||||
-- Only one unique login in the same website (note: we can still have the same login in database for 2 different companies if fk_website is null)
|
||||
ALTER TABLE llx_societe_account ADD UNIQUE INDEX uk_societe_account_login_website(entity, login, site, fk_website);
|
||||
-- Only one unique login in the same external account in the same company
|
||||
ALTER TABLE llx_societe_account ADD UNIQUE INDEX uk_societe_account_key_account_soc(entity, fk_soc, key_account, site, fk_website);
|
||||
|
||||
|
||||
-- Table website does not always exists
|
||||
--ALTER TABLE llx_societe_account ADD CONSTRAINT llx_societe_account_fk_website FOREIGN KEY (fk_website) REFERENCES llx_website(rowid);
|
||||
|
||||
ALTER TABLE llx_societe_account ADD CONSTRAINT llx_societe_account_fk_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
|
||||
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ yourCompanyInformation=Your company information
|
|||
emailAlreadyRegistered=This email is already registered.
|
||||
firstnameContainsLettersOnly=<b>Firstname</b> must contain letters and spaces only
|
||||
lastnameContainsLettersOnly=<b>Lastname</b> must contain letters and spaces only
|
||||
passwordCriteria=<b>Password</b> must meet the following criteria:<br>- 12 characters<br>- 1 uppercase letter<br>- 1 digit<br>- No special characters<br>- Avoid repeating characters more than 3 times<br>
|
||||
passwordCriteria=<b>Password</b> must meet the following criteria:<br>- At least 12 characters<br>- At lest 1 uppercase letter<br>- At least 1 digit<br>- At last 1 special characters<br>- Avoid repeating characters more than 3 times<br>
|
||||
errorOccurred=An error has occurred.
|
||||
accountCreation=Create an account
|
||||
errorsOccurred=There are %s error%s
|
||||
|
|
|
|||
|
|
@ -117,8 +117,9 @@ if (empty($reshook)) {
|
|||
if (!$cancel) {
|
||||
$datestart = dol_mktime(12, 0, 0, GETPOSTINT('startmonth'), GETPOSTINT('startday'), GETPOSTINT('startyear'));
|
||||
$dateend = dol_mktime(12, 0, 0, GETPOSTINT('endmonth'), GETPOSTINT('endday'), GETPOSTINT('endyear'));
|
||||
$capital = (float) price2num(GETPOST('capital'));
|
||||
$rate = (float) price2num(GETPOST('rate'));
|
||||
|
||||
$capital = GETPOSTFLOAT('capital');
|
||||
$rate = GETPOSTFLOAT('rate');
|
||||
|
||||
if (!$capital) {
|
||||
$error++;
|
||||
|
|
@ -152,7 +153,7 @@ if (empty($reshook)) {
|
|||
$object->note_private = GETPOST('note_private', 'restricthtml');
|
||||
$object->note_public = GETPOST('note_public', 'restricthtml');
|
||||
$object->fk_project = GETPOSTINT('projectid');
|
||||
$object->insurance_amount = GETPOSTINT('insurance_amount');
|
||||
$object->insurance_amount = GETPOSTFLOAT('insurance_amount');
|
||||
|
||||
$accountancy_account_capital = GETPOST('accountancy_account_capital');
|
||||
$accountancy_account_insurance = GETPOST('accountancy_account_insurance');
|
||||
|
|
@ -192,7 +193,8 @@ if (empty($reshook)) {
|
|||
|
||||
$datestart = dol_mktime(12, 0, 0, GETPOSTINT('startmonth'), GETPOSTINT('startday'), GETPOSTINT('startyear'));
|
||||
$dateend = dol_mktime(12, 0, 0, GETPOSTINT('endmonth'), GETPOSTINT('endday'), GETPOSTINT('endyear'));
|
||||
$capital = (float) price2num(GETPOST('capital'));
|
||||
|
||||
$capital = GETPOSTFLOAT('capital');
|
||||
|
||||
if (!$capital) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("LoanCapital")), null, 'errors');
|
||||
|
|
@ -201,9 +203,10 @@ if (empty($reshook)) {
|
|||
$object->datestart = $datestart;
|
||||
$object->dateend = $dateend;
|
||||
$object->capital = $capital;
|
||||
$object->nbterm = (float) price2num(GETPOSTINT("nbterm"));
|
||||
$object->rate = (float) price2num(GETPOST("rate", 'alpha'));
|
||||
$object->insurance_amount = (float) price2num(GETPOSTINT('insurance_amount'));
|
||||
|
||||
$object->nbterm = GETPOSTINT("nbterm");
|
||||
$object->rate = price2num(GETPOST("rate", 'alpha'));
|
||||
$object->insurance_amount = GETPOSTFLOAT('insurance_amount');
|
||||
|
||||
$accountancy_account_capital = GETPOST('accountancy_account_capital');
|
||||
$accountancy_account_insurance = GETPOST('accountancy_account_insurance');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
/* Copyright (C) 2014-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -134,6 +134,7 @@ class PaymentLoan extends CommonObject
|
|||
* @var int
|
||||
*/
|
||||
public $bank_account;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
@ -159,8 +160,6 @@ class PaymentLoan extends CommonObject
|
|||
*/
|
||||
public function create($user)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$error = 0;
|
||||
|
||||
$now = dol_now();
|
||||
|
|
@ -257,7 +256,6 @@ class PaymentLoan extends CommonObject
|
|||
*/
|
||||
public function fetch($id)
|
||||
{
|
||||
global $langs;
|
||||
$sql = "SELECT";
|
||||
$sql .= " t.rowid,";
|
||||
$sql .= " t.fk_loan,";
|
||||
|
|
@ -330,7 +328,6 @@ class PaymentLoan extends CommonObject
|
|||
*/
|
||||
public function update($user = null, $notrigger = 0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
$error = 0;
|
||||
|
||||
// Clean parameters
|
||||
|
|
@ -421,20 +418,17 @@ class PaymentLoan extends CommonObject
|
|||
*/
|
||||
public function delete($user, $notrigger = 0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
$error = 0;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
if (!$error) {
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url";
|
||||
$sql .= " WHERE type='payment_loan' AND url_id=".((int) $this->id);
|
||||
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
if ($this->bank_line > 0) {
|
||||
$accline = new AccountLine($this->db);
|
||||
$accline->fetch($this->bank_line);
|
||||
$result = $accline->delete($user);
|
||||
if ($result < 0) {
|
||||
$this->errors[] = $accline->error;
|
||||
$error++;
|
||||
$this->errors[] = "Error ".$this->db->lasterror();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -465,22 +459,6 @@ class PaymentLoan extends CommonObject
|
|||
}
|
||||
}
|
||||
|
||||
//if (! $error)
|
||||
//{
|
||||
// if (! $notrigger)
|
||||
// {
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action call a trigger.
|
||||
|
||||
//// Call triggers
|
||||
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
//$interface=new Interfaces($this->db);
|
||||
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
|
||||
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
//// End call triggers
|
||||
// }
|
||||
//}
|
||||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
|
|
@ -535,8 +513,6 @@ class PaymentLoan extends CommonObject
|
|||
*/
|
||||
public function addPaymentToBank($user, $fk_loan, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$error = 0;
|
||||
$this->db->begin();
|
||||
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
// Load array def with activated templates
|
||||
$def = array();
|
||||
$sql = "SELECT nom";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||
$sql .= " FROM ".$db->prefix()."document_model";
|
||||
$sql .= " WHERE type = '".$db->escape($type)."'";
|
||||
$sql .= " AND entity = ".$conf->entity;
|
||||
$resql = $db->query($sql);
|
||||
|
|
|
|||
|
|
@ -136,8 +136,8 @@ class MyModuleApi extends DolibarrApi
|
|||
}
|
||||
|
||||
$sql = "SELECT t.rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$tmpobject->table_element." AS t";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$tmpobject->table_element."_extrafields AS ef ON (ef.fk_object = t.rowid)"; // Modification VMR Global Solutions to include extrafields as search parameters in the API GET call, so we will be able to filter on extrafields
|
||||
$sql .= " FROM ".$this->db->prefix().$tmpobject->table_element." AS t";
|
||||
$sql .= " LEFT JOIN ".$this->db->prefix().$tmpobject->table_element."_extrafields AS ef ON (ef.fk_object = t.rowid)"; // Modification VMR Global Solutions to include extrafields as search parameters in the API GET call, so we will be able to filter on extrafields
|
||||
$sql .= " WHERE 1 = 1";
|
||||
if ($tmpobject->ismultientitymanaged) {
|
||||
$sql .= ' AND t.entity IN ('.getEntity($tmpobject->element).')';
|
||||
|
|
@ -148,9 +148,9 @@ class MyModuleApi extends DolibarrApi
|
|||
// Search on sale representative
|
||||
if ($search_sale && $search_sale != '-1') {
|
||||
if ($search_sale == -2) {
|
||||
$sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc)";
|
||||
$sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM ".$this->db->prefix()."societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc)";
|
||||
} elseif ($search_sale > 0) {
|
||||
$sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = ".((int) $search_sale).")";
|
||||
$sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".$this->db->prefix()."societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = ".((int) $search_sale).")";
|
||||
}
|
||||
}
|
||||
if ($sqlfilters) {
|
||||
|
|
|
|||
|
|
@ -587,7 +587,7 @@ class MyObject extends CommonObject
|
|||
|
||||
if (!empty($num)) {
|
||||
// Validate
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql = "UPDATE ".$this->db->prefix().$this->table_element;
|
||||
$sql .= " SET ";
|
||||
if (!empty($this->fields['ref'])) {
|
||||
$sql .= " ref = '".$this->db->escape($num)."',";
|
||||
|
|
@ -625,14 +625,14 @@ class MyObject extends CommonObject
|
|||
// Rename directory if dir was a temporary ref
|
||||
if (preg_match('/^[\(]?PROV/i', $this->ref)) {
|
||||
// Now we rename also files into index
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'myobject/".$this->db->escape($this->newref)."'";
|
||||
$sql = 'UPDATE '.$this->db->prefix()."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'myobject/".$this->db->escape($this->newref)."'";
|
||||
$sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'myobject/".$this->db->escape($this->ref)."' and entity = ".$conf->entity;
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
$this->error = $this->db->lasterror();
|
||||
}
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filepath = 'myobject/".$this->db->escape($this->newref)."'";
|
||||
$sql = 'UPDATE '.$this->db->prefix()."ecm_files set filepath = 'myobject/".$this->db->escape($this->newref)."'";
|
||||
$sql .= " WHERE filepath = 'myobject/".$this->db->escape($this->ref)."' and entity = ".$conf->entity;
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
|
|
@ -1026,7 +1026,7 @@ class MyObject extends CommonObject
|
|||
if (!empty($this->fields['fk_user_valid'])) {
|
||||
$sql .= ", fk_user_valid";
|
||||
}
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t";
|
||||
$sql .= " FROM ".$this->db->prefix().$this->table_element." as t";
|
||||
$sql .= " WHERE t.rowid = ".((int) $id);
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class mailing_mailing_mymodule_selector1 extends MailingTargets
|
|||
$j = 0;
|
||||
|
||||
$sql = "SELECT rowid as id, firstname, lastname, email";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."myobject";
|
||||
$sql .= " FROM ".$this->db->prefix()."myobject";
|
||||
$sql .= " WHERE email IS NOT NULL AND email <> ''";
|
||||
if (GETPOSTISSET('filter') && GETPOST('filter', 'alphanohtml') != 'none') {
|
||||
$sql .= " AND status = '".$this->db->escape(GETPOST('filter', 'alphanohtml'))."'";
|
||||
|
|
@ -195,7 +195,7 @@ class mailing_mailing_mymodule_selector1 extends MailingTargets
|
|||
public function getNbOfRecipients($sql = '')
|
||||
{
|
||||
$sql = "SELECT COUNT(DISTINCT(email)) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."myobject as p";
|
||||
$sql .= " FROM ".$this->db->prefix()."myobject as p";
|
||||
$sql .= " WHERE email IS NOT NULL AND email <> ''";
|
||||
|
||||
$a = parent::getNbOfRecipients($sql);
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ class modMyModule extends DolibarrModules
|
|||
// Label of tables
|
||||
'tablib' => array("Table1", "Table2", "Table3"),
|
||||
// Request to select fields
|
||||
'tabsql' => array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'),
|
||||
'tabsql' => array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.$this->db->prefix().'table1 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.$this->db->prefix().'table2 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.$this->db->prefix().'table3 as f'),
|
||||
// Sort order
|
||||
'tabsqlsort' => array("label ASC", "label ASC", "label ASC"),
|
||||
// List of fields (result of select to show dictionary)
|
||||
|
|
@ -411,8 +411,8 @@ class modMyModule extends DolibarrModules
|
|||
//$this->export_examplevalues_array[$r] = array('t.field' => 'Example');
|
||||
//$this->export_help_array[$r] = array('t.field' => 'FieldDescHelp');
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'mymodule_myobject as t';
|
||||
//$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'mymodule_myobject_line as tl ON tl.fk_myobject = t.rowid';
|
||||
$this->export_sql_end[$r] =' FROM '.$this->db->prefix().'mymodule_myobject as t';
|
||||
//$this->export_sql_end[$r] .=' LEFT JOIN '.$this->db->prefix().'mymodule_myobject_line as tl ON tl.fk_myobject = t.rowid';
|
||||
$this->export_sql_end[$r] .=' WHERE 1 = 1';
|
||||
$this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('myobject').')';
|
||||
$r++; */
|
||||
|
|
@ -426,7 +426,7 @@ class modMyModule extends DolibarrModules
|
|||
$this->import_code[$r] = $this->rights_class.'_'.$r;
|
||||
$this->import_label[$r] = 'MyObjectLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
$this->import_icon[$r] = $this->picto;
|
||||
$this->import_tables_array[$r] = array('t' => MAIN_DB_PREFIX.'mymodule_myobject', 'extra' => MAIN_DB_PREFIX.'mymodule_myobject_extrafields');
|
||||
$this->import_tables_array[$r] = array('t' => $this->db->prefix().'mymodule_myobject', 'extra' => $this->db->prefix().'mymodule_myobject_extrafields');
|
||||
$this->import_tables_creator_array[$r] = array('t' => 'fk_user_author'); // Fields to store import user id
|
||||
$import_sample = array();
|
||||
$keyforclass = 'MyObject'; $keyforclassfile='/mymodule/class/myobject.class.php'; $keyforelement='myobject@mymodule';
|
||||
|
|
@ -434,7 +434,7 @@ class modMyModule extends DolibarrModules
|
|||
$import_extrafield_sample = array();
|
||||
$keyforselect='myobject'; $keyforaliasextra='extra'; $keyforelement='myobject@mymodule';
|
||||
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinimport.inc.php';
|
||||
$this->import_fieldshidden_array[$r] = array('extra.fk_object' => 'lastrowid-'.MAIN_DB_PREFIX.'mymodule_myobject');
|
||||
$this->import_fieldshidden_array[$r] = array('extra.fk_object' => 'lastrowid-'.$this->db->prefix().'mymodule_myobject');
|
||||
$this->import_regex_array[$r] = array();
|
||||
$this->import_examplevalues_array[$r] = array_merge($import_sample, $import_extrafield_sample);
|
||||
$this->import_updatekeys_array[$r] = array('t.ref' => 'Ref');
|
||||
|
|
@ -512,10 +512,10 @@ class modMyModule extends DolibarrModules
|
|||
}
|
||||
|
||||
$sql = array_merge($sql, array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard_".strtolower($myTmpObjectKey)."' AND type = '".$this->db->escape(strtolower($myTmpObjectKey))."' AND entity = ".((int) $conf->entity),
|
||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard_".strtolower($myTmpObjectKey)."', '".$this->db->escape(strtolower($myTmpObjectKey))."', ".((int) $conf->entity).")",
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'generic_".strtolower($myTmpObjectKey)."_odt' AND type = '".$this->db->escape(strtolower($myTmpObjectKey))."' AND entity = ".((int) $conf->entity),
|
||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('generic_".strtolower($myTmpObjectKey)."_odt', '".$this->db->escape(strtolower($myTmpObjectKey))."', ".((int) $conf->entity).")"
|
||||
"DELETE FROM ".$this->db->prefix()."document_model WHERE nom = 'standard_".strtolower($myTmpObjectKey)."' AND type = '".$this->db->escape(strtolower($myTmpObjectKey))."' AND entity = ".((int) $conf->entity),
|
||||
"INSERT INTO ".$this->db->prefix()."document_model (nom, type, entity) VALUES('standard_".strtolower($myTmpObjectKey)."', '".$this->db->escape(strtolower($myTmpObjectKey))."', ".((int) $conf->entity).")",
|
||||
"DELETE FROM ".$this->db->prefix()."document_model WHERE nom = 'generic_".strtolower($myTmpObjectKey)."_odt' AND type = '".$this->db->escape(strtolower($myTmpObjectKey))."' AND entity = ".((int) $conf->entity),
|
||||
"INSERT INTO ".$this->db->prefix()."document_model (nom, type, entity) VALUES('generic_".strtolower($myTmpObjectKey)."_odt', '".$this->db->escape(strtolower($myTmpObjectKey))."', ".((int) $conf->entity).")"
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class mod_myobject_standard extends ModeleNumRefMyObject
|
|||
|
||||
$posindice = strlen($this->prefix) + 6;
|
||||
$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."mymodule_myobject";
|
||||
$sql .= " FROM ".$db->prefix()."mymodule_myobject";
|
||||
$sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'";
|
||||
if ($object->ismultientitymanaged == 1) {
|
||||
$sql .= " AND entity = ".$conf->entity;
|
||||
|
|
@ -131,7 +131,7 @@ class mod_myobject_standard extends ModeleNumRefMyObject
|
|||
// first we get the max value
|
||||
$posindice = strlen($this->prefix) + 6;
|
||||
$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."mymodule_myobject";
|
||||
$sql .= " FROM ".$db->prefix()."mymodule_myobject";
|
||||
$sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'";
|
||||
if ($object->ismultientitymanaged == 1) {
|
||||
$sql .= " AND entity = ".$conf->entity;
|
||||
|
|
|
|||
|
|
@ -132,8 +132,8 @@ if (isModEnabled('mymodule') && $user->hasRight('mymodule', 'read')) {
|
|||
|
||||
$sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.tva as total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
|
||||
$sql.= ", s.code_client";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " FROM ".$db->prefix()."commande as c";
|
||||
$sql.= ", ".$db->prefix()."societe as s";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||
$sql.= " AND c.fk_statut = 0";
|
||||
$sql.= " AND c.entity IN (".getEntity('commande').")";
|
||||
|
|
@ -204,7 +204,7 @@ print '</div><div class="fichetwothirdright">';
|
|||
// Last modified myobject
|
||||
if (isModEnabled('mymodule') && $user->hasRight('mymodule', 'read')) {
|
||||
$sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mymodule_myobject as s";
|
||||
$sql.= " FROM ".$db->prefix()."mymodule_myobject as s";
|
||||
$sql.= " WHERE s.entity IN (".getEntity($myobjectstatic->element).")";
|
||||
//if ($socid) $sql.= " AND s.rowid = $socid";
|
||||
$sql .= " ORDER BY s.tms DESC";
|
||||
|
|
|
|||
|
|
@ -317,10 +317,10 @@ $sql = preg_replace('/,\s*$/', '', $sql);
|
|||
|
||||
$sqlfields = $sql; // $sql fields to remove for count total
|
||||
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
|
||||
//$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."anothertable as rc ON rc.parent = t.rowid";
|
||||
$sql .= " FROM ".$db->prefix().$object->table_element." as t";
|
||||
//$sql .= " LEFT JOIN ".$db->prefix()."anothertable as rc ON rc.parent = t.rowid";
|
||||
if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||
$sql .= " LEFT JOIN ".$db->prefix().$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||
}
|
||||
// Add table from hooks
|
||||
$parameters = array();
|
||||
|
|
@ -378,9 +378,9 @@ if (!$user->hasRight('societe', 'client', 'voir')) {
|
|||
// Search on sale representative
|
||||
if ($search_sale && $search_sale != '-1') {
|
||||
if ($search_sale == -2) {
|
||||
$sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc)";
|
||||
$sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM ".$db->prefix()."societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc)";
|
||||
} elseif ($search_sale > 0) {
|
||||
$sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = ".((int) $search_sale).")";
|
||||
$sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".$db->prefix()."societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = ".((int) $search_sale).")";
|
||||
}
|
||||
}
|
||||
// Search on socid
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ else print "Object with id ".$myobject->id." deleted\n";
|
|||
// An example of a direct SQL read without using the fetch method
|
||||
/*
|
||||
$sql = "SELECT field1, field2";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."myobject";
|
||||
$sql.= " FROM ".$db->prefix()."myobject";
|
||||
$sql.= " WHERE field3 = 'xxx'";
|
||||
$sql.= " ORDER BY field1 ASC";
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ class Inventory extends CommonObject
|
|||
// Scan existing stock to prefill the inventory
|
||||
$sql = "SELECT ps.rowid, ps.fk_entrepot as fk_warehouse, ps.fk_product, ps.reel,";
|
||||
if (isModEnabled('productbatch')) {
|
||||
$sql .= " pb.batch as batch, pb.qty as qty,";
|
||||
$sql .= " COALESCE(pb.batch, '') as batch, pb.qty as qty,";
|
||||
} else {
|
||||
$sql .= " '' as batch, 0 as qty,";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2140,7 +2140,7 @@ if (!empty($doactionsthenredirect)) {
|
|||
} else {
|
||||
$ext_urlok = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentok&fulltag='.$FULLTAG;
|
||||
}
|
||||
print "<script>window.top.location.href = '".dol_escape_js($ext_urlok) ."';</script>";
|
||||
print "<!DOCTYPE html><html><head></head><script>window.top.location.href = '".dol_escape_js($ext_urlok) ."';</script></html>";
|
||||
} else {
|
||||
// Redirect to an error page
|
||||
// Paymentko page must be created for the specific website
|
||||
|
|
@ -2149,6 +2149,6 @@ if (!empty($doactionsthenredirect)) {
|
|||
} else {
|
||||
$ext_urlko = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG;
|
||||
}
|
||||
print "<script>window.top.location.href = '".dol_escape_js($ext_urlko)."';</script>";
|
||||
print "<!DOCTYPE html><html><head></head><script>window.top.location.href = '".dol_escape_js($ext_urlko)."';</script></html>";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -982,7 +982,7 @@ if ($action == 'create') {
|
|||
include_once DOL_DOCUMENT_ROOT.'/core/modules/reception/modules_reception.php';
|
||||
$list = ModelePdfReception::liste_modeles($db);
|
||||
|
||||
if (is_countable($list) && count($list) > 1) {
|
||||
if (is_array($list) && count($list) > 1) {
|
||||
print "<tr><td>".$langs->trans("DefaultModel")."</td>";
|
||||
print '<td colspan="3">';
|
||||
print $form->selectarray('model', $list, getDolGlobalString('RECEPTION_ADDON_PDF'));
|
||||
|
|
|
|||
|
|
@ -1440,6 +1440,9 @@ class Societe extends CommonObject
|
|||
if (empty($id)) {
|
||||
$id = $this->id;
|
||||
}
|
||||
if (empty($this->country_id) && !empty($this->country_code)) {
|
||||
$this->country_id = dol_getIdFromCode($this->db, $this->country_code, 'c_country', 'code', 'rowid');
|
||||
}
|
||||
|
||||
$error = 0;
|
||||
|
||||
|
|
@ -2910,7 +2913,7 @@ class Societe extends CommonObject
|
|||
$datas['status'] = ' '.$this->getLibStatut(5);
|
||||
}
|
||||
if (isset($this->client) && isset($this->fournisseur)) {
|
||||
$datas['type'] = ' ' . $this->getTypeUrl(1);
|
||||
$datas['type'] = ' ' . $this->getTypeUrl(1, '', 0, 'span');
|
||||
}
|
||||
$datas['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag(dol_string_nohtmltag($this->name));
|
||||
if (!empty($this->name_alias) && empty($noaliasinname)) {
|
||||
|
|
@ -3072,7 +3075,8 @@ class Societe extends CommonObject
|
|||
} else {
|
||||
$label = implode($this->getTooltipContentArray($params));
|
||||
}
|
||||
|
||||
print "\n";
|
||||
//var_dump($label);exit;
|
||||
$linkstart = '';
|
||||
$linkend = '';
|
||||
|
||||
|
|
@ -3180,19 +3184,26 @@ class Societe extends CommonObject
|
|||
$s = '';
|
||||
if (empty($option) || preg_match('/prospect/', $option)) {
|
||||
if (($this->client == 2 || $this->client == 3) && !getDolGlobalString('SOCIETE_DISABLE_PROSPECTS')) {
|
||||
$s .= '<'.$tag.' class="customer-back opacitymedium" title="'.$langs->trans("Prospect").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Prospect"), 0, 1).'</'.$tag.'>';
|
||||
$s .= '<'.$tag.' class="customer-back opacitymedium" title="'.dolPrintHTMLForAttribute($langs->trans("Prospect")).'"';
|
||||
$s .= $tag == 'a' ? ' href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'"' : '';
|
||||
$s .= '>'.dol_substr($langs->trans("Prospect"), 0, 1).'</'.$tag.'>';
|
||||
}
|
||||
}
|
||||
if (empty($option) || preg_match('/customer/', $option)) {
|
||||
if (($this->client == 1 || $this->client == 3) && !getDolGlobalString('SOCIETE_DISABLE_CUSTOMERS')) {
|
||||
$s .= '<'.$tag.' class="customer-back" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Customer"), 0, 1).'</'.$tag.'>';
|
||||
$s .= '<'.$tag.' class="customer-back" title="'.dolPrintHTMLForAttribute($langs->trans("Customer")).'"';
|
||||
$s.= $tag == 'a' ? ' href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'"' : '';
|
||||
$s .= '>'.dol_substr($langs->trans("Customer"), 0, 1).'</'.$tag.'>';
|
||||
}
|
||||
}
|
||||
if (empty($option) || preg_match('/supplier/', $option)) {
|
||||
if ((isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $this->fournisseur) {
|
||||
$s .= '<'.$tag.' class="vendor-back" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Supplier"), 0, 1).'</'.$tag.'>';
|
||||
$s .= '<'.$tag.' class="vendor-back" title="'.dolPrintHTMLForAttribute($langs->trans("Supplier")).'"';
|
||||
$s .= $tag == 'a' ? ' href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$this->id.'"' : '';
|
||||
$s .= '>'.dol_substr($langs->trans("Supplier"), 0, 1).'</'.$tag.'>';
|
||||
}
|
||||
}
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -319,8 +319,9 @@ $arrayfields = array(
|
|||
's.fk_prospectlevel' => array('label' => "ProspectLevel", 'position' => 62, 'checked' => $checkprospectlevel),
|
||||
's.fk_stcomm' => array('label' => "StatusProsp", 'position' => 63, 'checked' => $checkstcomm),
|
||||
's2.nom' => array('label' => 'ParentCompany', 'position' => 64, 'checked' => 0),
|
||||
's.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 500),
|
||||
's.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 500),
|
||||
's.ip' => array('type'=>'ip', 'label' => "IPAddress", 'checked' => -2, 'position' => 500),
|
||||
's.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 501),
|
||||
's.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 505),
|
||||
's.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'position' => 520, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
|
||||
's.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'position' => 521, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
|
||||
's.status' => array('label' => "Status", 'checked' => 1, 'position' => 1000),
|
||||
|
|
@ -569,7 +570,7 @@ $sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.ref_ext, s.barcode, s.add
|
|||
$sql .= " s.entity,";
|
||||
$sql .= " st.libelle as stcomm, st.picto as stcomm_picto, s.fk_stcomm as stcomm_id, s.fk_prospectlevel, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status, s.note_private, s.note_public,";
|
||||
$sql .= " s.email, s.phone, s.phone_mobile, s.fax, s.url, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4 as idprof4, s.idprof5 as idprof5, s.idprof6 as idprof6, s.tva_intra, s.fk_pays,";
|
||||
$sql .= " s.tms as date_modification, s.datec as date_creation, s.import_key,";
|
||||
$sql .= " s.ip, s.tms as date_modification, s.datec as date_creation, s.import_key,";
|
||||
$sql .= " s.code_compta, s.code_compta_fournisseur, s.parent as fk_parent,s.price_level,";
|
||||
$sql .= " s2.nom as name2,";
|
||||
$sql .= " typent.code as typent_code,";
|
||||
|
|
@ -1556,6 +1557,11 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
|||
$parameters = array('arrayfields' => $arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// IP address
|
||||
if (!empty($arrayfields['s.ip']['checked'])) {
|
||||
print '<td class="liste_titre center nowraponall">';
|
||||
print '</td>';
|
||||
}
|
||||
// Creation date
|
||||
if (!empty($arrayfields['s.datec']['checked'])) {
|
||||
print '<td class="liste_titre center nowraponall">';
|
||||
|
|
@ -1773,6 +1779,12 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
|||
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// IP Address
|
||||
if (!empty($arrayfields['s.ip']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['s.ip']['label'], $_SERVER["PHP_SELF"], "s.ip", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
$totalarray['nbfield']++; // For the column action
|
||||
}
|
||||
// Date creation
|
||||
if (!empty($arrayfields['s.datec']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['s.datec']['label'], $_SERVER["PHP_SELF"], "s.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
$totalarray['nbfield']++; // For the column action
|
||||
|
|
@ -1845,6 +1857,8 @@ while ($i < $imaxinloop) {
|
|||
$companystatic->tva_intra = $obj->tva_intra;
|
||||
$companystatic->country_code = $obj->country_code;
|
||||
|
||||
$companystatic->ip = $obj->ip;
|
||||
|
||||
$companystatic->code_compta_client = $obj->code_compta;
|
||||
$companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
|
||||
$companystatic->note_public = $obj->note_public;
|
||||
|
|
@ -1995,6 +2009,7 @@ while ($i < $imaxinloop) {
|
|||
$userstatic->job = $val['job'];
|
||||
$userstatic->gender = $val['gender'];
|
||||
$userstatic->statut = $val['statut'];
|
||||
$userstatic->status = $val['statut'];
|
||||
print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
|
||||
$j++;
|
||||
if ($j < $nbofsalesrepresentative) {
|
||||
|
|
@ -2227,6 +2242,15 @@ while ($i < $imaxinloop) {
|
|||
$parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// IP
|
||||
if (!empty($arrayfields['s.ip']['checked'])) {
|
||||
print '<td class="center nowraponall">';
|
||||
print dol_print_ip($obj->ip);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
// Date creation
|
||||
if (!empty($arrayfields['s.datec']['checked'])) {
|
||||
print '<td class="center nowraponall">';
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 42 KiB |
|
|
@ -431,7 +431,7 @@ if (empty($reshook)) {
|
|||
// Action to add a message (private or not, with email or not).
|
||||
// This may also send an email (concatenated with email_intro and email footer if checkbox was selected)
|
||||
if ($action == 'add_message' && GETPOSTISSET('btn_add_message') && $permissiontoread) {
|
||||
$ret = $object->newMessage($user, $action, (GETPOST('private_message', 'alpha') == "1" ? 1 : 0), 0);
|
||||
$ret = $object->newMessage($user, $action, GETPOSTINT('private_message'), 0);
|
||||
|
||||
if ($ret > 0) {
|
||||
if (!empty($backtopage)) {
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@ $permissiontoreadhr = $user->hasRight('hrm', 'read_personal_information', 'read'
|
|||
$permissiontowritehr = $user->hasRight('hrm', 'write_personal_information', 'write');
|
||||
$permissiontosimpleedit = ($selfpermission || $usercanadd);
|
||||
|
||||
$childids = $user->getAllChildIds(1);
|
||||
|
||||
// Ok if user->hasRight('salaries', 'readall') or user->hasRight('hrm', 'read')
|
||||
//$result = restrictedArea($user, 'salaries|hrm', $object->id, 'user&user', $feature2);
|
||||
$ok = false;
|
||||
|
|
@ -123,7 +125,10 @@ if ($user->hasRight('salaries', 'readall')) {
|
|||
if ($user->hasRight('hrm', 'read')) {
|
||||
$ok = true;
|
||||
}
|
||||
if ($user->hasRight('expensereport', 'lire') && ($user->id == $object->id || $user->hasRight('expensereport', 'readall'))) {
|
||||
if ($user->hasRight('expensereport', 'readall') || ($user->hasRight('expensereport', 'readall') && in_array($object->id, $childids))) {
|
||||
$ok = true;
|
||||
}
|
||||
if ($user->hasRight('holiday', 'readall') || ($user->hasRight('holiday', 'read') && in_array($object->id, $childids))) {
|
||||
$ok = true;
|
||||
}
|
||||
if (!$ok) {
|
||||
|
|
@ -304,8 +309,6 @@ if (getDolGlobalString('MAIN_USE_EXPENSE_IK')) {
|
|||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
$childids = $user->getAllChildIds(1);
|
||||
|
||||
$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname;
|
||||
$title = $person_name." - ".$langs->trans('BankAccounts');
|
||||
$help_url = '';
|
||||
|
|
|
|||
|
|
@ -2905,7 +2905,7 @@ llxHeader($moreheadcss.$moreheadjs, $langs->trans("Website").(empty($website->re
|
|||
|
||||
print "\n";
|
||||
print '<!-- Open form for all page -->'."\n";
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].($action == 'file_manager' ? '?uploadform=1' : '').'" method="POST" enctype="multipart/form-data" class="websiteformtoolbar">';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].($action == 'file_manager' ? '?uploadform=1' : '').'" method="POST" enctype="multipart/form-data" class="websiteformtoolbar">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
print '<input type="hidden" name="dol_openinpopup" value="'.$dol_openinpopup.'">';
|
||||
|
|
@ -2947,7 +2947,7 @@ if ($mode) {
|
|||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
}
|
||||
|
||||
print '<div>';
|
||||
print '<div>'."\n";
|
||||
|
||||
// Add a margin under toolbar ?
|
||||
$style = '';
|
||||
|
|
@ -2991,7 +2991,7 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
|
||||
|
||||
//var_dump($objectpage);exit;
|
||||
print '<div class="centpercent websitebar'.(GETPOST('dol_openinpopup', 'aZ09') ? ' hiddenforpopup' : '').'">';
|
||||
print '<div class="centpercent websitebar'.(GETPOST('dol_openinpopup', 'aZ09') ? ' hiddenforpopup' : '').'">'."\n";
|
||||
|
||||
//
|
||||
// Toolbar for websites
|
||||
|
|
@ -3291,10 +3291,10 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
//
|
||||
|
||||
if ($websitekey && $websitekey != '-1' && (!in_array($action, array('editcss', 'editmenu', 'importsite', 'file_manager', 'replacesite', 'replacesiteconfirm'))) && (!in_array($mode, array('replacesite'))) && !$file_manager) {
|
||||
print '</div>'; // Close current websitebar to open a new one
|
||||
print '</div>'."\n"; // Close current websitebar to open a new one
|
||||
|
||||
print '<!-- Toolbar for websitepage -->';
|
||||
print '<div class="centpercent websitebar"'.($style ? ' style="'.$style.'"' : '').'>';
|
||||
print '<div class="centpercent websitebar"'.($style ? ' style="'.$style.'"' : '').'>'."\n";
|
||||
|
||||
print '<div class="websiteselection hideonsmartphoneimp minwidth75 tdoverflowmax100 inline-block">';
|
||||
print $langs->trans("PageContainer").': ';
|
||||
|
|
@ -3854,7 +3854,7 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
}
|
||||
}
|
||||
|
||||
print '</div>'; // end current websitebar
|
||||
print '</div>'."\n"; // end current websitebar
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -5537,7 +5537,8 @@ if ((empty($action) || $action == 'preview' || $action == 'createfromclone' || $
|
|||
*/
|
||||
|
||||
$out .= "</head>\n";
|
||||
$out .= "\n<body>";
|
||||
$out .= "\n";
|
||||
$out .= "<body>\n";
|
||||
|
||||
|
||||
$out .= '<div id="websitecontentundertopmenu" class="websitecontentundertopmenu boostrap-iso">'."\n";
|
||||
|
|
@ -5618,9 +5619,9 @@ if ((empty($action) || $action == 'preview' || $action == 'createfromclone' || $
|
|||
$out .= dolWebsiteReplacementOfLinks($object, $newcontent, 0, 'html', $objectpage->id)."\n";
|
||||
//$out.=$newcontent;
|
||||
|
||||
$out .= '</div>';
|
||||
$out .= '</div>'."\n";
|
||||
|
||||
$out .= '</div> <!-- End div id=websitecontentundertopmenu -->';
|
||||
$out .= '</div> <!-- End div id=websitecontentundertopmenu -->'."\n";
|
||||
|
||||
/*if ($includepageintoaframeoradiv == 'iframe')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ if ($langs->defaultlang != 'en_US') {
|
|||
print "Error: Default language for company to run tests must be set to en_US or auto. Current is ".$langs->defaultlang."\n";
|
||||
exit(1);
|
||||
}
|
||||
if (!isModEnabled('adherent')) {
|
||||
if (!isModEnabled('member')) {
|
||||
print "Error: Module member must be enabled to have significant results.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,12 @@ class SocieteTest extends CommonClassTest
|
|||
|
||||
$localobject = new Societe($db);
|
||||
$localobject->initAsSpecimen();
|
||||
|
||||
$localobject->country_id = 0;
|
||||
$localobject->country_code = 'ES';
|
||||
|
||||
$result = $localobject->create($user);
|
||||
var_dump($localobject);exit;
|
||||
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertLessThanOrEqual($result, 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue