mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Merge remote-tracking branch 'origin/support/2.7' into develop
# Conflicts: # .idea/codeStyles/codeStyleConfig.xml # .idea/inspectionProfiles/Combodo.xml
This commit is contained in:
@@ -321,7 +321,7 @@ ij_php_call_parameters_right_paren_on_new_line = false
|
||||
ij_php_call_parameters_wrap = normal
|
||||
ij_php_catch_on_new_line = true
|
||||
ij_php_category_weight = 28
|
||||
ij_php_class_brace_style = next_line
|
||||
ij_php_class_brace_style = end_of_line
|
||||
ij_php_comma_after_last_array_element = true
|
||||
ij_php_concat_spaces = false
|
||||
ij_php_copyright_weight = 28
|
||||
@@ -372,7 +372,7 @@ ij_php_link_weight = 28
|
||||
ij_php_lower_case_boolean_const = true
|
||||
ij_php_lower_case_keywords = true
|
||||
ij_php_lower_case_null_const = true
|
||||
ij_php_method_brace_style = next_line
|
||||
ij_php_method_brace_style = end_of_line
|
||||
ij_php_method_call_chain_wrap = off
|
||||
ij_php_method_parameters_new_line_after_left_paren = true
|
||||
ij_php_method_parameters_right_paren_on_new_line = true
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -40,11 +40,6 @@ test/vendor/*
|
||||
|
||||
# Jetbrains
|
||||
/.idea/**
|
||||
!/.idea/encodings.xml
|
||||
!/.idea/codeStyles
|
||||
!/.idea/codeStyles/*
|
||||
!/.idea/inspectionProfiles
|
||||
!/.idea/inspectionProfiles/*
|
||||
|
||||
# doc. generation
|
||||
/.doc/vendor
|
||||
|
||||
74
.idea/codeStyles/Project.xml
generated
74
.idea/codeStyles/Project.xml
generated
@@ -1,74 +0,0 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<option name="LINE_SEPARATOR" value=" " />
|
||||
<option name="RIGHT_MARGIN" value="140" />
|
||||
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
|
||||
<option name="SOFT_MARGINS" value="140" />
|
||||
<HTMLCodeStyleSettings>
|
||||
<option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="html,body,thead,tbody,tfoot,style,script,head" />
|
||||
</HTMLCodeStyleSettings>
|
||||
<JSCodeStyleSettings version="0">
|
||||
<option name="USE_CHAINED_CALLS_GROUP_INDENTS" value="true" />
|
||||
</JSCodeStyleSettings>
|
||||
<PHPCodeStyleSettings>
|
||||
<option name="CONCAT_SPACES" value="false" />
|
||||
<option name="COMMA_AFTER_LAST_ARRAY_ELEMENT" value="true" />
|
||||
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
|
||||
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
|
||||
<option name="PHPDOC_WRAP_LONG_LINES" value="true" />
|
||||
<option name="THROWS_WEIGHT" value="6" />
|
||||
<option name="PARAM_WEIGHT" value="4" />
|
||||
<option name="RETURN_WEIGHT" value="5" />
|
||||
<option name="AUTHOR_WEIGHT" value="7" />
|
||||
<option name="INTERNAL_WEIGHT" value="0" />
|
||||
<option name="API_WEIGHT" value="1" />
|
||||
<option name="EXAMPLE_WEIGHT" value="3" />
|
||||
<option name="SEE_WEIGHT" value="2" />
|
||||
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
|
||||
<option name="LOWER_CASE_NULL_CONST" value="true" />
|
||||
<option name="BLANK_LINES_BEFORE_RETURN_STATEMENT" value="1" />
|
||||
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
|
||||
<option name="PHPDOC_USE_FQCN" value="true" />
|
||||
</PHPCodeStyleSettings>
|
||||
<XML>
|
||||
<option name="XML_TEXT_WRAP" value="0" />
|
||||
<option name="XML_KEEP_LINE_BREAKS" value="false" />
|
||||
<option name="XML_KEEP_WHITE_SPACES_INSIDE_CDATA" value="true" />
|
||||
</XML>
|
||||
<codeStyleSettings language="JavaScript">
|
||||
<option name="BRACE_STYLE" value="2" />
|
||||
<option name="ELSE_ON_NEW_LINE" value="true" />
|
||||
<option name="SPACE_AROUND_ADDITIVE_OPERATORS" value="false" />
|
||||
<option name="IF_BRACE_FORCE" value="3" />
|
||||
<indentOptions>
|
||||
<option name="USE_TAB_CHARACTER" value="true" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="PHP">
|
||||
<option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
|
||||
<option name="BRACE_STYLE" value="2" />
|
||||
<option name="ELSE_ON_NEW_LINE" value="true" />
|
||||
<option name="CATCH_ON_NEW_LINE" value="true" />
|
||||
<option name="FINALLY_ON_NEW_LINE" value="true" />
|
||||
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
||||
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
||||
<option name="METHOD_PARAMETERS_WRAP" value="1" />
|
||||
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
|
||||
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
|
||||
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
|
||||
<option name="IF_BRACE_FORCE" value="3" />
|
||||
<option name="DOWHILE_BRACE_FORCE" value="3" />
|
||||
<option name="WHILE_BRACE_FORCE" value="3" />
|
||||
<option name="FOR_BRACE_FORCE" value="3" />
|
||||
<indentOptions>
|
||||
<option name="USE_TAB_CHARACTER" value="true" />
|
||||
<option name="SMART_TABS" value="true" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="XML">
|
||||
<option name="WRAP_ON_TYPING" value="1" />
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
5
.idea/codeStyles/codeStyleConfig.xml
generated
@@ -1,5 +0,0 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
||||
6
.idea/encodings.xml
generated
6
.idea/encodings.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
209
.idea/inspectionProfiles/Combodo.xml
generated
209
.idea/inspectionProfiles/Combodo.xml
generated
@@ -1,209 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Combodo" />
|
||||
<inspection_tool class="CascadeStringReplacementInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CucumberExamplesColon" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CucumberMissedExamples" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CucumberTableInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CucumberUndefinedStep" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DuplicateKeyInSection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DuplicateSectionInFile" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ForgottenDebugOutputInspection" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="configuration">
|
||||
<list>
|
||||
<option value="\Codeception\Util\Debug::debug" />
|
||||
<option value="\Codeception\Util\Debug::pause" />
|
||||
<option value="\Doctrine\Common\Util\Debug::dump" />
|
||||
<option value="\Doctrine\Common\Util\Debug::export" />
|
||||
<option value="\Illuminate\Support\Debug\Dumper::dump" />
|
||||
<option value="\Symfony\Component\Debug\Debug::enable" />
|
||||
<option value="\Symfony\Component\Debug\DebugClassLoader::enable" />
|
||||
<option value="\Symfony\Component\Debug\ErrorHandler::register" />
|
||||
<option value="\Symfony\Component\Debug\ExceptionHandler::register" />
|
||||
<option value="\TYPO3\CMS\Core\Utility\DebugUtility::debug" />
|
||||
<option value="\Zend\Debug\Debug::dump" />
|
||||
<option value="\Zend\Di\Display\Console::export" />
|
||||
<option value="dd" />
|
||||
<option value="debug_print_backtrace" />
|
||||
<option value="debug_zval_dump" />
|
||||
<option value="dpm" />
|
||||
<option value="dpq" />
|
||||
<option value="dsm" />
|
||||
<option value="dump" />
|
||||
<option value="dvm" />
|
||||
<option value="error_log" />
|
||||
<option value="kpr" />
|
||||
<option value="phpinfo" />
|
||||
<option value="print_r" />
|
||||
<option value="var_dump" />
|
||||
<option value="var_export" />
|
||||
<option value="xdebug_break" />
|
||||
<option value="xdebug_call_class" />
|
||||
<option value="xdebug_call_file" />
|
||||
<option value="xdebug_call_function" />
|
||||
<option value="xdebug_call_line" />
|
||||
<option value="xdebug_code_coverage_started" />
|
||||
<option value="xdebug_debug_zval" />
|
||||
<option value="xdebug_debug_zval_stdout" />
|
||||
<option value="xdebug_dump_superglobals" />
|
||||
<option value="xdebug_enable" />
|
||||
<option value="xdebug_get_code_coverage" />
|
||||
<option value="xdebug_get_collected_errors" />
|
||||
<option value="xdebug_get_declared_vars" />
|
||||
<option value="xdebug_get_function_stack" />
|
||||
<option value="xdebug_get_headers" />
|
||||
<option value="xdebug_get_monitored_functions" />
|
||||
<option value="xdebug_get_profiler_filename" />
|
||||
<option value="xdebug_get_stack_depth" />
|
||||
<option value="xdebug_get_tracefile_name" />
|
||||
<option value="xdebug_is_enabled" />
|
||||
<option value="xdebug_memory_usage" />
|
||||
<option value="xdebug_peak_memory_usage" />
|
||||
<option value="xdebug_print_function_stack" />
|
||||
<option value="xdebug_start_code_coverage" />
|
||||
<option value="xdebug_start_error_collection" />
|
||||
<option value="xdebug_start_function_monitor" />
|
||||
<option value="xdebug_start_trace" />
|
||||
<option value="xdebug_stop_code_coverage" />
|
||||
<option value="xdebug_stop_error_collection" />
|
||||
<option value="xdebug_stop_function_monitor" />
|
||||
<option value="xdebug_stop_trace" />
|
||||
<option value="xdebug_time_index" />
|
||||
<option value="xdebug_var_dump" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="migratedIntoUserSpace" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="GherkinBrokenTableInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="GherkinMisplacedBackground" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="GherkinScenarioToScenarioOutline" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlRequiredAltAttribute" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="HtmlRequiredLangAttribute" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="LessResolvedByNameOnly" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LessUnresolvedMixin" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LessUnresolvedVariable" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MysqlParsingInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NodeModulesDependencies" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PhpComposerExtensionStubsInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PhpIncludeInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpMethodParametersCountMismatchInspection" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpShortOpenTagInspection" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpTooManyParametersInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="limit" value="7" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PhpUndefinedClassInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="DONT_REPORT_MULTI_RESOLVE" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PhpUndefinedMethodInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpUnusedLocalVariableInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="DONT_REPORT_INSIDE_LIST" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PhpUnusedParameterInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="DONT_REPORT_ABSTRACT_CLASS" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="SecurityAdvisoriesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="optionConfiguration">
|
||||
<list>
|
||||
<option value="barryvdh/laravel-debugbar" />
|
||||
<option value="behat/behat" />
|
||||
<option value="brianium/paratest" />
|
||||
<option value="codeception/codeception" />
|
||||
<option value="codedungeon/phpunit-result-printer" />
|
||||
<option value="composer/composer" />
|
||||
<option value="doctrine/coding-standard" />
|
||||
<option value="filp/whoops" />
|
||||
<option value="friendsofphp/php-cs-fixer" />
|
||||
<option value="humbug/humbug" />
|
||||
<option value="infection/infection" />
|
||||
<option value="jakub-onderka/php-parallel-lint" />
|
||||
<option value="johnkary/phpunit-speedtrap" />
|
||||
<option value="kalessil/production-dependencies-guard" />
|
||||
<option value="mikey179/vfsStream" />
|
||||
<option value="mockery/mockery" />
|
||||
<option value="mybuilder/phpunit-accelerator" />
|
||||
<option value="orchestra/testbench" />
|
||||
<option value="pdepend/pdepend" />
|
||||
<option value="phan/phan" />
|
||||
<option value="phing/phing" />
|
||||
<option value="phpcompatibility/php-compatibility" />
|
||||
<option value="phpmd/phpmd" />
|
||||
<option value="phpro/grumphp" />
|
||||
<option value="phpspec/phpspec" />
|
||||
<option value="phpspec/prophecy" />
|
||||
<option value="phpstan/phpstan" />
|
||||
<option value="phpunit/phpunit" />
|
||||
<option value="povils/phpmnd" />
|
||||
<option value="roave/security-advisories" />
|
||||
<option value="satooshi/php-coveralls" />
|
||||
<option value="sebastian/phpcpd" />
|
||||
<option value="slevomat/coding-standard" />
|
||||
<option value="spatie/phpunit-watcher" />
|
||||
<option value="squizlabs/php_codesniffer" />
|
||||
<option value="sstalle/php7cc" />
|
||||
<option value="symfony/debug" />
|
||||
<option value="symfony/maker-bundle" />
|
||||
<option value="symfony/phpunit-bridge" />
|
||||
<option value="symfony/var-dumper" />
|
||||
<option value="vimeo/psalm" />
|
||||
<option value="wimg/php-compatibility" />
|
||||
<option value="wp-coding-standards/wpcs" />
|
||||
<option value="yiisoft/yii2-coding-standards" />
|
||||
<option value="yiisoft/yii2-debug" />
|
||||
<option value="yiisoft/yii2-gii" />
|
||||
<option value="zendframework/zend-coding-standard" />
|
||||
<option value="zendframework/zend-debug" />
|
||||
<option value="zendframework/zend-test" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ShellCheck" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="SlowArrayOperationsInLoopInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SqlAddNotNullColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlAmbiguousColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlAutoIncrementDuplicateInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlCheckUsingColumnsInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlConstantConditionInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlDeprecateTypeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlDerivedTableAliasInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlDialectInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlDropIndexedColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlIdentifierInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlInsertValuesInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlNullComparisonInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlPostgresqlSelectFromProcedureInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlResolveInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlShouldBeInGroupByInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlSideEffectsInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlSignatureInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlStorageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlTypeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlUnusedVariableInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TaskProblemsInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptAbstractClassConstructorCanBeMadeProtected" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptAccessibilityCheck" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptCheckImport" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptConfig" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptDuplicateUnionOrIntersectionType" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptExplicitMemberType" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptFieldCanBeMadeReadonly" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptLibrary" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptMissingAugmentationImport" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptMissingConfigOption" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptRedundantGenericType" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptSmartCast" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptSuspiciousConstructorParameterAssignment" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptUMDGlobal" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptUnresolvedFunction" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptUnresolvedVariable" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptValidateGenericTypes" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptValidateJSTypes" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptValidateTypes" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UnresolvedReference" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltDeclarations" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltTemplateInvocation" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltUnusedDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltVariableShadowing" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
||||
19
.idea/inspectionProfiles/Project_Default.xml
generated
19
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,19 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpIncludeInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpMethodParametersCountMismatchInspection" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpTooManyParametersInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="limit" value="7" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PhpUndefinedClassInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="DONT_REPORT_MULTI_RESOLVE" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PhpUnhandledExceptionInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpUnusedParameterInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="DONT_REPORT_ABSTRACT_CLASS" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
||||
6
.idea/inspectionProfiles/profiles_settings.xml
generated
6
.idea/inspectionProfiles/profiles_settings.xml
generated
@@ -1,6 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="PROJECT_PROFILE" value="Combodo" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
@@ -24,31 +24,34 @@ class ajax_page extends WebPage implements iTabbedPage
|
||||
/**
|
||||
* Jquery style ready script
|
||||
* @var array
|
||||
*/
|
||||
*/
|
||||
protected $m_sReadyScript;
|
||||
protected $m_oTabs;
|
||||
private $m_sMenu; // If set, then the menu will be updated
|
||||
|
||||
/**
|
||||
* constructor for the web page
|
||||
* @param string $s_title Not used
|
||||
*/
|
||||
function __construct($s_title)
|
||||
{
|
||||
|
||||
/**
|
||||
* constructor for the web page
|
||||
*
|
||||
* @param string $s_title Not used
|
||||
*/
|
||||
function __construct($s_title) {
|
||||
$sPrintable = utils::ReadParam('printable', '0');
|
||||
$bPrintable = ($sPrintable == '1');
|
||||
|
||||
parent::__construct($s_title, $bPrintable);
|
||||
$this->m_sReadyScript = "";
|
||||
parent::__construct($s_title, $bPrintable);
|
||||
$this->m_sReadyScript = "";
|
||||
//$this->add_header("Content-type: text/html; charset=utf-8");
|
||||
$this->add_header("Cache-control: no-cache");
|
||||
$this->add_header('Cache-control: no-cache, no-store, must-revalidate');
|
||||
$this->add_header('Pragma: no-cache');
|
||||
$this->add_header('Expires: 0');
|
||||
$this->add_header('X-Frame-Options: deny');
|
||||
$this->m_oTabs = new TabManager();
|
||||
$this->sContentType = 'text/html';
|
||||
$this->sContentDisposition = 'inline';
|
||||
$this->m_sMenu = "";
|
||||
|
||||
utils::InitArchiveMode();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
|
||||
@@ -558,12 +558,6 @@ EOF
|
||||
$oLinkSet = $oOrmLinkSet->ToDBObjectSet(utils::ShowObsoleteData());
|
||||
|
||||
$iCount = $oLinkSet->Count();
|
||||
$sCount = '';
|
||||
if ($iCount != 0)
|
||||
{
|
||||
$sCount = " ($iCount)";
|
||||
}
|
||||
$oPage->SetCurrentTab('Class:'.$sClass.'/Attribute:'.$sAttCode, $oAttDef->GetLabel().$sCount);
|
||||
if ($this->IsNew())
|
||||
{
|
||||
$iFlags = $this->GetInitialStateAttributeFlags($sAttCode);
|
||||
@@ -609,6 +603,9 @@ EOF
|
||||
continue;
|
||||
}
|
||||
|
||||
$sCount = ($iCount != 0) ? " ($iCount)" : "";
|
||||
$oPage->SetCurrentTab('Class:'.$sClass.'/Attribute:'.$sAttCode, $oAttDef->GetLabel().$sCount);
|
||||
|
||||
$aArgs = array('this' => $this);
|
||||
$bReadOnly = ($iFlags & (OPT_ATT_READONLY | OPT_ATT_SLAVE));
|
||||
if ($bEditMode && (!$bReadOnly))
|
||||
|
||||
@@ -29,13 +29,15 @@ require_once(APPROOT."/application/webpage.class.inc.php");
|
||||
|
||||
class CSVPage extends WebPage
|
||||
{
|
||||
function __construct($s_title)
|
||||
{
|
||||
parent::__construct($s_title);
|
||||
$this->add_header("Content-type: text/plain; charset=".self::PAGES_CHARSET);
|
||||
$this->add_header("Cache-control: no-cache");
|
||||
function __construct($s_title) {
|
||||
parent::__construct($s_title);
|
||||
$this->add_header("Content-type: text/plain; charset=".self::PAGES_CHARSET);
|
||||
$this->add_header('Cache-control: no-cache, no-store, must-revalidate');
|
||||
$this->add_header('Pragma: no-cache');
|
||||
$this->add_header('Expires: 0');
|
||||
$this->add_header('X-Frame-Options: deny');
|
||||
//$this->add_header("Content-Transfer-Encoding: binary");
|
||||
}
|
||||
}
|
||||
|
||||
public function output()
|
||||
{
|
||||
|
||||
@@ -71,7 +71,10 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage
|
||||
$this->m_aMessages = array();
|
||||
$this->SetRootUrl(utils::GetAbsoluteUrlAppRoot());
|
||||
$this->add_header("Content-type: text/html; charset=".self::PAGES_CHARSET);
|
||||
$this->add_header("Cache-control: no-cache");
|
||||
$this->add_header('Cache-control: no-cache, no-store, must-revalidate');
|
||||
$this->add_header('Pragma: no-cache');
|
||||
$this->add_header('Expires: 0');
|
||||
$this->add_header('X-Frame-Options: deny');
|
||||
$this->add_linked_stylesheet("../css/jquery.treeview.css");
|
||||
$this->add_linked_stylesheet("../css/jquery-ui-timepicker-addon.css");
|
||||
$this->add_linked_stylesheet("../css/jquery.multiselect.css");
|
||||
|
||||
@@ -78,14 +78,16 @@ class LoginWebPage extends NiceWebPage
|
||||
|
||||
public function __construct($sTitle = null)
|
||||
{
|
||||
if($sTitle === null)
|
||||
{
|
||||
$sTitle = Dict::S('UI:Login:Title');
|
||||
}
|
||||
if ($sTitle === null) {
|
||||
$sTitle = Dict::S('UI:Login:Title');
|
||||
}
|
||||
|
||||
parent::__construct($sTitle);
|
||||
$this->SetStyleSheet();
|
||||
$this->add_header("Cache-control: no-cache");
|
||||
$this->add_header('Cache-control: no-cache, no-store, must-revalidate');
|
||||
$this->add_header('Pragma: no-cache');
|
||||
$this->add_header('Expires: 0');
|
||||
$this->add_header('X-Frame-Options: deny');
|
||||
}
|
||||
|
||||
public function SetStyleSheet()
|
||||
|
||||
@@ -2319,4 +2319,26 @@ class utils
|
||||
{
|
||||
return str_replace(' ', '', ucwords(strtr($sInput, '_-', ' ')));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \cmdbAbstractObject $oCmdbAbstract
|
||||
* @param \Exception $oException
|
||||
*
|
||||
* @throws \Exception
|
||||
* @since 2.7.2/ 2.8.0
|
||||
*/
|
||||
public static function EnrichRaisedException($oCmdbAbstract, $oException)
|
||||
{
|
||||
if (is_null($oCmdbAbstract) ||
|
||||
! is_a($oCmdbAbstract, \cmdbAbstractObject::class))
|
||||
{
|
||||
throw $oException;
|
||||
}
|
||||
|
||||
$sCmdbAbstractInfo = str_replace("\n", '', "" . $oCmdbAbstract);
|
||||
$sMessage = $oException->getMessage() . " (" . $sCmdbAbstractInfo . ")";
|
||||
|
||||
$e = new CoreException($sMessage, null, '', $oException);
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -487,8 +487,10 @@ class WebPage implements Page
|
||||
*/
|
||||
public function no_cache()
|
||||
{
|
||||
$this->add_header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
$this->add_header("Expires: Fri, 17 Jul 1970 05:00:00 GMT"); // Date in the past
|
||||
$this->add_header('Cache-control: no-cache, no-store, must-revalidate');
|
||||
$this->add_header('Pragma: no-cache');
|
||||
$this->add_header('Expires: 0');
|
||||
$this->add_header('X-Frame-Options: deny');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1546,6 +1548,12 @@ class TabManager
|
||||
{
|
||||
unset($aTabs['tabs'][$sTabCode]);
|
||||
}
|
||||
|
||||
// N°3320: Do not display empty tabs
|
||||
if (empty($aTabData['html']) && empty($aTabData['url']))
|
||||
{
|
||||
unset($aTabs['tabs'][$sTabCode]);
|
||||
}
|
||||
}
|
||||
|
||||
// Render tabs
|
||||
|
||||
@@ -43,9 +43,12 @@ class XMLPage extends WebPage
|
||||
$this->m_bPassThrough = $bPassThrough;
|
||||
$this->m_bHeaderSent = false;
|
||||
$this->add_header("Content-type: text/xml; charset=".self::PAGES_CHARSET);
|
||||
$this->add_header("Cache-control: no-cache");
|
||||
$this->add_header('Cache-control: no-cache, no-store, must-revalidate');
|
||||
$this->add_header('Pragma: no-cache');
|
||||
$this->add_header('Expires: 0');
|
||||
$this->add_header('X-Frame-Options: deny');
|
||||
$this->add_header("Content-location: export.xml");
|
||||
}
|
||||
}
|
||||
|
||||
public function output()
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"ext-soap": "*",
|
||||
"combodo/tcpdf": "6.3.5",
|
||||
"nikic/php-parser": "^3.1",
|
||||
"pear/archive_tar": "1.4.9",
|
||||
"pear/archive_tar": "1.4.10",
|
||||
"pelago/emogrifier": "2.1.0",
|
||||
"scssphp/scssphp": "1.0.6",
|
||||
"swiftmailer/swiftmailer": "5.4.12",
|
||||
|
||||
20
composer.lock
generated
20
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "ad359769d05acd25a9fc31d69acbe43a",
|
||||
"content-hash": "27af144ea2acf2c138f587052a4ceddc",
|
||||
"packages": [
|
||||
{
|
||||
"name": "combodo/tcpdf",
|
||||
@@ -12,12 +12,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/combodo-itop-libs/TCPDF.git",
|
||||
"reference": "abbfedb8ca59843dec11c97ca3f308742265c3fc"
|
||||
"reference": "aedd4b7b8cf7fcc24e617c405c9d3304150f4b94"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/abbfedb8ca59843dec11c97ca3f308742265c3fc",
|
||||
"reference": "abbfedb8ca59843dec11c97ca3f308742265c3fc",
|
||||
"url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/aedd4b7b8cf7fcc24e617c405c9d3304150f4b94",
|
||||
"reference": "aedd4b7b8cf7fcc24e617c405c9d3304150f4b94",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -64,7 +64,7 @@
|
||||
],
|
||||
"description": "TCPDF fork adding requirements for iTop: Specific fonts.",
|
||||
"homepage": "https://github.com/combodo-itop-libs/TCPDF",
|
||||
"time": "2020-06-05T13:06:44+00:00"
|
||||
"time": "2020-09-28T12:19:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
@@ -168,16 +168,16 @@
|
||||
},
|
||||
{
|
||||
"name": "pear/archive_tar",
|
||||
"version": "1.4.9",
|
||||
"version": "1.4.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pear/Archive_Tar.git",
|
||||
"reference": "c5b00053770e1d72128252c62c2c1a12c26639f0"
|
||||
"reference": "bbb4f10f71a1da2715ec6d9a683f4f23c507a49b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pear/Archive_Tar/zipball/c5b00053770e1d72128252c62c2c1a12c26639f0",
|
||||
"reference": "c5b00053770e1d72128252c62c2c1a12c26639f0",
|
||||
"url": "https://api.github.com/repos/pear/Archive_Tar/zipball/bbb4f10f71a1da2715ec6d9a683f4f23c507a49b",
|
||||
"reference": "bbb4f10f71a1da2715ec6d9a683f4f23c507a49b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -230,7 +230,7 @@
|
||||
"archive",
|
||||
"tar"
|
||||
],
|
||||
"time": "2019-12-04T10:17:28+00:00"
|
||||
"time": "2020-09-15T14:13:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pear/console_getopt",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
class CoreException extends Exception
|
||||
{
|
||||
public function __construct($sIssue, $aContextData = null, $sImpact = '')
|
||||
public function __construct($sIssue, $aContextData = null, $sImpact = '', $oPrevious = null)
|
||||
{
|
||||
$this->m_sIssue = $sIssue;
|
||||
$this->m_sImpact = $sImpact;
|
||||
@@ -66,7 +66,7 @@ class CoreException extends Exception
|
||||
}
|
||||
$sMessage .= implode(', ', $aContextItems);
|
||||
}
|
||||
parent::__construct($sMessage, 0);
|
||||
parent::__construct($sMessage, 0, $oPrevious);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,6 +81,16 @@ class CoreException extends Exception
|
||||
return $this->getMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* getTraceAsString() cannot be overrided and it is limited as only current exception stack is returned.
|
||||
* we need stack of all previous exceptions
|
||||
* @uses __tostring() already does the work.
|
||||
* @since 2.7.2/ 2.8.0
|
||||
*/
|
||||
public function getFullStackTraceAsString(){
|
||||
return "" . $this;
|
||||
}
|
||||
|
||||
public function getTraceAsHtml()
|
||||
{
|
||||
$aBackTrace = $this->getTrace();
|
||||
|
||||
@@ -2847,7 +2847,14 @@ abstract class DBObject implements iDisplay
|
||||
while ($oTrigger = $oSet->Fetch())
|
||||
{
|
||||
/** @var \Trigger $oTrigger */
|
||||
$oTrigger->DoActivate($this->ToArgs('this'));
|
||||
try
|
||||
{
|
||||
$oTrigger->DoActivate($this->ToArgs('this'));
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
utils::EnrichRaisedException($oTrigger, $e);
|
||||
}
|
||||
}
|
||||
|
||||
$this->RecordObjCreation();
|
||||
@@ -3119,7 +3126,14 @@ abstract class DBObject implements iDisplay
|
||||
while ($oTrigger = $oSet->Fetch())
|
||||
{
|
||||
/** @var \Trigger $oTrigger */
|
||||
$oTrigger->DoActivate($this->ToArgs('this'));
|
||||
try
|
||||
{
|
||||
$oTrigger->DoActivate($this->ToArgs('this'));
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
utils::EnrichRaisedException($oTrigger, $e);
|
||||
}
|
||||
}
|
||||
|
||||
$bHasANewExternalKeyValue = false;
|
||||
@@ -3416,7 +3430,14 @@ abstract class DBObject implements iDisplay
|
||||
while ($oTrigger = $oSet->Fetch())
|
||||
{
|
||||
/** @var \Trigger $oTrigger */
|
||||
$oTrigger->DoActivate($this->ToArgs('this'));
|
||||
try
|
||||
{
|
||||
$oTrigger->DoActivate($this->ToArgs('this'));
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
utils::EnrichRaisedException($oTrigger, $e);
|
||||
}
|
||||
}
|
||||
|
||||
$this->RecordObjDeletion($this->m_iKey); // May cause a reload for storing history information
|
||||
@@ -3795,14 +3816,27 @@ abstract class DBObject implements iDisplay
|
||||
while ($oTrigger = $oSet->Fetch())
|
||||
{
|
||||
/** @var \Trigger $oTrigger */
|
||||
$oTrigger->DoActivate($this->ToArgs('this'));
|
||||
try
|
||||
{
|
||||
$oTrigger->DoActivate($this->ToArgs('this'));
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
utils::EnrichRaisedException($oTrigger, $e);
|
||||
}
|
||||
}
|
||||
|
||||
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT TriggerOnStateEnter AS t WHERE t.target_class IN (:class_list) AND t.state=:new_state"), array(), $aParams);
|
||||
while ($oTrigger = $oSet->Fetch())
|
||||
{
|
||||
/** @var \Trigger $oTrigger */
|
||||
$oTrigger->DoActivate($this->ToArgs('this'));
|
||||
try{
|
||||
$oTrigger->DoActivate($this->ToArgs('this'));
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
utils::EnrichRaisedException($oTrigger, $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -63,9 +63,15 @@ class DBObjectSearch extends DBSearch
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if (is_null($sClassAlias)) $sClassAlias = $sClass;
|
||||
if(!is_string($sClass)) throw new Exception('DBObjectSearch::__construct called with a non-string parameter: $sClass = '.print_r($sClass, true));
|
||||
if(!MetaModel::IsValidClass($sClass)) throw new Exception('DBObjectSearch::__construct called for an invalid class: "'.$sClass.'"');
|
||||
if (is_null($sClassAlias)) {
|
||||
$sClassAlias = $sClass;
|
||||
}
|
||||
if (!is_string($sClass)) {
|
||||
throw new Exception('DBObjectSearch::__construct called with a non-string parameter: $sClass = '.print_r($sClass, true));
|
||||
}
|
||||
if (!MetaModel::IsValidClass($sClass)) {
|
||||
throw new Exception('DBObjectSearch::__construct called for an invalid class: "'.$sClass.'"');
|
||||
}
|
||||
|
||||
$this->m_aSelectedClasses = array($sClassAlias => $sClass);
|
||||
$this->m_aClasses = array($sClassAlias => $sClass);
|
||||
@@ -75,30 +81,43 @@ class DBObjectSearch extends DBSearch
|
||||
$this->m_aReferencedBy = array();
|
||||
}
|
||||
|
||||
public function AllowAllData($bAllowAllData = true) {$this->m_bAllowAllData = $bAllowAllData;}
|
||||
public function IsAllDataAllowed() {return $this->m_bAllowAllData;}
|
||||
protected function IsDataFiltered() {return $this->m_bDataFiltered; }
|
||||
protected function SetDataFiltered() {$this->m_bDataFiltered = true;}
|
||||
public function AllowAllData($bAllowAllData = true) {
|
||||
$this->m_bAllowAllData = $bAllowAllData;
|
||||
|
||||
$this->m_oSearchCondition->Browse(function ($oThisExpression) use ($bAllowAllData) {
|
||||
ExpressionHelper::ExpressionAllowAllDataCallback($oThisExpression, $bAllowAllData);
|
||||
});
|
||||
}
|
||||
|
||||
public function IsAllDataAllowed() {
|
||||
return $this->m_bAllowAllData;
|
||||
}
|
||||
|
||||
protected function IsDataFiltered() {
|
||||
return $this->m_bDataFiltered;
|
||||
}
|
||||
|
||||
protected function SetDataFiltered() {
|
||||
$this->m_bDataFiltered = true;
|
||||
}
|
||||
|
||||
// Create a search definition that leads to 0 result, still a valid search object
|
||||
static public function FromEmptySet($sClass)
|
||||
{
|
||||
public static function FromEmptySet($sClass) {
|
||||
$oResultFilter = new DBObjectSearch($sClass);
|
||||
$oResultFilter->m_oSearchCondition = new FalseExpression;
|
||||
|
||||
return $oResultFilter;
|
||||
}
|
||||
|
||||
|
||||
public function GetJoinedClasses() {return $this->m_aClasses;}
|
||||
public function GetJoinedClasses() {
|
||||
return $this->m_aClasses;
|
||||
}
|
||||
|
||||
public function GetClassName($sAlias)
|
||||
{
|
||||
if (array_key_exists($sAlias, $this->m_aSelectedClasses))
|
||||
{
|
||||
public function GetClassName($sAlias) {
|
||||
if (array_key_exists($sAlias, $this->m_aSelectedClasses)) {
|
||||
return $this->m_aSelectedClasses[$sAlias];
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
throw new CoreException("Invalid class alias '$sAlias'");
|
||||
}
|
||||
}
|
||||
@@ -358,37 +377,35 @@ class DBObjectSearch extends DBSearch
|
||||
}
|
||||
foreach($this->m_aReferencedBy as $sForeignClass => $aReferences)
|
||||
{
|
||||
foreach($aReferences as $sForeignExtKeyAttCode => $aFiltersByOperator)
|
||||
{
|
||||
foreach ($aFiltersByOperator as $iOperatorCode => $aFilters)
|
||||
{
|
||||
foreach ($aFilters as $oForeignFilter)
|
||||
{
|
||||
foreach($aReferences as $sForeignExtKeyAttCode => $aFiltersByOperator) {
|
||||
foreach ($aFiltersByOperator as $iOperatorCode => $aFilters) {
|
||||
foreach ($aFilters as $oForeignFilter) {
|
||||
$oForeignFilter->RenameParam($sOldName, $sNewName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function ResetCondition()
|
||||
{
|
||||
|
||||
public function ResetCondition() {
|
||||
$this->m_oSearchCondition = new TrueExpression();
|
||||
// ? is that usefull/enough, do I need to rebuild the list after the subqueries ?
|
||||
}
|
||||
|
||||
public function MergeConditionExpression($oExpression)
|
||||
{
|
||||
$this->m_oSearchCondition = $this->m_oSearchCondition->LogOr($oExpression);
|
||||
public function MergeConditionExpression($oExpression) {
|
||||
$this->m_oSearchCondition = $this->m_oSearchCondition->LogOr($oExpression);
|
||||
}
|
||||
|
||||
public function AddConditionExpression($oExpression)
|
||||
{
|
||||
$this->m_oSearchCondition = $this->m_oSearchCondition->LogAnd($oExpression);
|
||||
public function AddConditionExpression($oExpression) {
|
||||
$this->m_oSearchCondition = $this->m_oSearchCondition->LogAnd($oExpression);
|
||||
|
||||
$bRootSearchAllowAllData = $this->IsAllDataAllowed();
|
||||
$oExpression->Browse(function ($oThisExpression) use ($bRootSearchAllowAllData) {
|
||||
ExpressionHelper::ExpressionAllowAllDataCallback($oThisExpression, $bRootSearchAllowAllData);
|
||||
});
|
||||
}
|
||||
|
||||
public function AddNameCondition($sName)
|
||||
{
|
||||
public function AddNameCondition($sName) {
|
||||
$oValueExpr = new ScalarExpression($sName);
|
||||
$oNameExpr = new FieldExpression('friendlyname', $this->GetClassAlias());
|
||||
$oNewCondition = new BinaryExpression($oNameExpr, '=', $oValueExpr);
|
||||
|
||||
@@ -97,42 +97,40 @@ abstract class DBSearch
|
||||
/**
|
||||
* Perform a deep clone (as opposed to "clone" which does copy a reference to the underlying objects)
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @return \DBSearch
|
||||
**/
|
||||
**/
|
||||
public function DeepClone()
|
||||
{
|
||||
return unserialize(serialize($this)); // Beware this serializes/unserializes the search and its parameters as well
|
||||
}
|
||||
|
||||
/**
|
||||
* whether or not some information should be hidden to the current user.
|
||||
*
|
||||
* @api
|
||||
* @see IsAllDataAllowed()
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
abstract public function AllowAllData();
|
||||
/**
|
||||
* @api
|
||||
* @see IsAllDataAllowed()
|
||||
*
|
||||
* @param bool $bAllowAllData whether or not some information should be hidden to the current user.
|
||||
*/
|
||||
abstract public function AllowAllData($bAllowAllData = true);
|
||||
|
||||
/**
|
||||
* Current state of AllowAllData
|
||||
*
|
||||
* @internal
|
||||
* @see AllowAllData()
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
/**
|
||||
* Current state of AllowAllData
|
||||
*
|
||||
* @internal
|
||||
* @see AllowAllData()
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
abstract public function IsAllDataAllowed();
|
||||
|
||||
/**
|
||||
* Should the archives be fetched
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param $bEnable
|
||||
*/
|
||||
/**
|
||||
* Should the archives be fetched
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param $bEnable
|
||||
*/
|
||||
public function SetArchiveMode($bEnable)
|
||||
{
|
||||
$this->m_bArchiveMode = $bEnable;
|
||||
|
||||
@@ -65,9 +65,7 @@ class DBUnionSearch extends DBSearch
|
||||
{
|
||||
$this->aSearches[] = $oSubSearch->DeepClone();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->aSearches[] = $oSearch->DeepClone();
|
||||
}
|
||||
}
|
||||
@@ -75,17 +73,16 @@ class DBUnionSearch extends DBSearch
|
||||
$this->ComputeSelectedClasses();
|
||||
}
|
||||
|
||||
public function AllowAllData()
|
||||
public function AllowAllData($bAllowAllData = true)
|
||||
{
|
||||
foreach ($this->aSearches as $oSearch)
|
||||
{
|
||||
foreach ($this->aSearches as $oSearch) {
|
||||
$oSearch->AllowAllData();
|
||||
}
|
||||
}
|
||||
|
||||
public function IsAllDataAllowed()
|
||||
{
|
||||
foreach ($this->aSearches as $oSearch)
|
||||
{
|
||||
foreach ($this->aSearches as $oSearch) {
|
||||
if ($oSearch->IsAllDataAllowed() === false) return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -1,24 +1,45 @@
|
||||
<?php
|
||||
// Copyright (c) 2010-2018 Combodo SARL
|
||||
//
|
||||
// This file is part of iTop.
|
||||
//
|
||||
// iTop is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// iTop is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
//
|
||||
/*
|
||||
* Copyright (C) 2010-2020 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
class MissingQueryArgument extends CoreException
|
||||
{
|
||||
class MissingQueryArgument extends CoreException {
|
||||
}
|
||||
|
||||
|
||||
class ExpressionHelper {
|
||||
/**
|
||||
* Callback to be used with {@link Expression::Browse}, to update the AllowAllData attribute in the NestedQueryExpression that are
|
||||
* present in the Expression tree
|
||||
*
|
||||
* @param \Expression $oExpression
|
||||
* @param boolean $bAllowAllData
|
||||
*
|
||||
* @uses \DBSearch::AllowAllData()
|
||||
*
|
||||
* @since 2.7.2 2.8.0 N°3324
|
||||
*/
|
||||
public static function ExpressionAllowAllDataCallback($oExpression, $bAllowAllData) {
|
||||
if (!($oExpression instanceof NestedQueryExpression)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$oExpression->AllowAllData($bAllowAllData);
|
||||
}
|
||||
}
|
||||
|
||||
class NotYetEvaluatedExpression extends CoreException
|
||||
@@ -28,8 +49,7 @@ class NotYetEvaluatedExpression extends CoreException
|
||||
/**
|
||||
* @method Check($oModelReflection, array $aAliases, $sSourceQuery)
|
||||
*/
|
||||
abstract class Expression
|
||||
{
|
||||
abstract class Expression {
|
||||
const OPERATOR_BINARY = 'binary';
|
||||
const OPERATOR_BOOLEAN = 'boolean_binary';
|
||||
const OPERATOR_FIELD = 'field';
|
||||
@@ -183,9 +203,13 @@ abstract class Expression
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively browse the expression tree
|
||||
* @param Closure $callback
|
||||
* @return mixed
|
||||
* Recursively browse the expression tree.
|
||||
*
|
||||
* To access variables, specify them using the `use` keyword and the `&` to pass by reference if necessary
|
||||
*
|
||||
* @see https://www.php.net/manual/fr/functions.anonymous.php
|
||||
*
|
||||
* @param Closure $callback with current expression as parameter
|
||||
*/
|
||||
abstract public function Browse(Closure $callback);
|
||||
|
||||
@@ -197,6 +221,9 @@ abstract class Expression
|
||||
// recursively list field parents ($aTable = array of sParent => dummy)
|
||||
abstract public function CollectUsedParents(&$aTable);
|
||||
|
||||
/**
|
||||
* @return boolean true if the expression's value is constant and evaluates to true, false otherwise
|
||||
*/
|
||||
abstract public function IsTrue();
|
||||
|
||||
// recursively builds an array of [classAlias][fieldName] => value
|
||||
@@ -205,8 +232,7 @@ abstract class Expression
|
||||
// recursively builds an array of parameters to give to current request
|
||||
abstract public function ListParameters();
|
||||
|
||||
public function RequiresField($sClass, $sFieldName)
|
||||
{
|
||||
public function RequiresField($sClass, $sFieldName) {
|
||||
// #@# todo - optimize : this is called quite often when building a single query !
|
||||
$aRequired = $this->ListRequiredFields();
|
||||
if (!in_array($sClass.'.'.$sFieldName, $aRequired)) return false;
|
||||
@@ -1036,12 +1062,15 @@ class MatchExpression extends BinaryExpression
|
||||
* MatchExpression constructor.
|
||||
*
|
||||
* @param \FieldExpression $oLeftExpr
|
||||
* @param \ScalarExpression $oRightExpr
|
||||
* @param \Expression $oRightExpr
|
||||
*
|
||||
* @throws \CoreException
|
||||
*/
|
||||
public function __construct(FieldExpression $oLeftExpr, ScalarExpression $oRightExpr)
|
||||
public function __construct(FieldExpression $oLeftExpr, Expression $oRightExpr)
|
||||
{
|
||||
if (!$oRightExpr instanceof ScalarExpression && !$oRightExpr instanceof VariableExpression) {
|
||||
throw new CoreException('Only instance of ScalarExpression or VariableExpression are allowed in MATCHES '.get_class( $oRightExpr).' found', $oRightExpr);
|
||||
}
|
||||
parent::__construct($oLeftExpr, 'MATCHES', $oRightExpr);
|
||||
}
|
||||
|
||||
@@ -2427,60 +2456,62 @@ class NestedQueryExpression extends Expression
|
||||
}
|
||||
|
||||
/**/
|
||||
public function ApplyParameters($aArgs)
|
||||
{
|
||||
public function ApplyParameters($aArgs) {
|
||||
$this->m_oNestedQuery->ApplyParameters($aArgs);
|
||||
}
|
||||
|
||||
/**/
|
||||
public function GetUnresolvedFields($sAlias, &$aUnresolved)
|
||||
{
|
||||
public function GetUnresolvedFields($sAlias, &$aUnresolved) {
|
||||
}
|
||||
|
||||
/**/
|
||||
public function Translate($aTranslationData, $bMatchAll = true, $bMarkFieldsAsResolved = true)
|
||||
{
|
||||
public function Translate($aTranslationData, $bMatchAll = true, $bMarkFieldsAsResolved = true) {
|
||||
// Check and prepare the select information
|
||||
$this->m_oNestedQuery->TranslateConditions($aTranslationData, $bMatchAll , $bMarkFieldsAsResolved );
|
||||
$this->m_oNestedQuery->TranslateConditions($aTranslationData, $bMatchAll, $bMarkFieldsAsResolved);
|
||||
|
||||
return clone $this;
|
||||
}
|
||||
|
||||
public function ListRequiredFields()
|
||||
{
|
||||
public function ListRequiredFields() {
|
||||
return array();
|
||||
}
|
||||
|
||||
public function CollectUsedParents(&$aTable)
|
||||
{
|
||||
public function CollectUsedParents(&$aTable) {
|
||||
}
|
||||
|
||||
public function ListConstantFields()
|
||||
{
|
||||
public function ListConstantFields() {
|
||||
return $this->m_oNestedQuery->ListConstantFields();
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
public function ListParameters() {
|
||||
return $this->m_oNestedQuery->ListParameters();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
public function RenameParam($sOldName, $sNewName) {
|
||||
$this->m_oNestedQuery->RenameParam($sOldName, $sNewName);
|
||||
}
|
||||
|
||||
public function RenameAlias($sOldName, $sNewName)
|
||||
{
|
||||
public function RenameAlias($sOldName, $sNewName) {
|
||||
$this->m_oNestedQuery->RenameAlias($sOldName, $sNewName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function ToJSON(&$aArgs = null, $bRetrofitParams = false)
|
||||
{
|
||||
public function ToJSON(&$aArgs = null, $bRetrofitParams = false) {
|
||||
return $this->m_oNestedQuery->ToJSON();
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple indirection to {@link \DBObjectSearch::AllowAllData()}
|
||||
*
|
||||
* @param bool $bAllowAllData
|
||||
*
|
||||
* @uses \DBSearch::AllowAllData()
|
||||
*/
|
||||
public function AllowAllData($bAllowAllData = true) {
|
||||
$this->m_oNestedQuery->AllowAllData($bAllowAllData);
|
||||
}
|
||||
}
|
||||
|
||||
class FunctionExpression extends Expression
|
||||
|
||||
@@ -1600,38 +1600,38 @@ static public $yy_action = array(
|
||||
$this->_retvalue = new ListOqlExpression($this->yystack[$this->yyidx + -1]->minor);
|
||||
}
|
||||
#line 1606 "..\oql-parser.php"
|
||||
#line 132 "..\oql-parser.y"
|
||||
#line 131 "..\oql-parser.y"
|
||||
function yy_r43(){
|
||||
$this->_retvalue = new NestedQueryOqlExpression($this->yystack[$this->yyidx + -1]->minor);
|
||||
}
|
||||
#line 1611 "..\oql-parser.php"
|
||||
#line 147 "..\oql-parser.y"
|
||||
#line 146 "..\oql-parser.y"
|
||||
function yy_r47(){
|
||||
$this->_retvalue = array();
|
||||
}
|
||||
#line 1616 "..\oql-parser.php"
|
||||
#line 158 "..\oql-parser.y"
|
||||
#line 157 "..\oql-parser.y"
|
||||
function yy_r51(){ $this->_retvalue = new IntervalOqlExpression($this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor); }
|
||||
#line 1619 "..\oql-parser.php"
|
||||
#line 171 "..\oql-parser.y"
|
||||
#line 170 "..\oql-parser.y"
|
||||
function yy_r61(){ $this->_retvalue = new ScalarOqlExpression($this->yystack[$this->yyidx + 0]->minor); }
|
||||
#line 1622 "..\oql-parser.php"
|
||||
#line 173 "..\oql-parser.y"
|
||||
#line 172 "..\oql-parser.y"
|
||||
function yy_r63(){ $this->_retvalue = new ScalarOqlExpression(null); }
|
||||
#line 1625 "..\oql-parser.php"
|
||||
#line 175 "..\oql-parser.y"
|
||||
#line 174 "..\oql-parser.y"
|
||||
function yy_r64(){ $this->_retvalue = new FieldOqlExpression($this->yystack[$this->yyidx + 0]->minor); }
|
||||
#line 1628 "..\oql-parser.php"
|
||||
#line 176 "..\oql-parser.y"
|
||||
#line 175 "..\oql-parser.y"
|
||||
function yy_r65(){ $this->_retvalue = new FieldOqlExpression($this->yystack[$this->yyidx + 0]->minor, $this->yystack[$this->yyidx + -2]->minor); }
|
||||
#line 1631 "..\oql-parser.php"
|
||||
#line 177 "..\oql-parser.y"
|
||||
#line 176 "..\oql-parser.y"
|
||||
function yy_r66(){ $this->_retvalue=$this->yystack[$this->yyidx + 0]->minor; }
|
||||
#line 1634 "..\oql-parser.php"
|
||||
#line 180 "..\oql-parser.y"
|
||||
#line 179 "..\oql-parser.y"
|
||||
function yy_r67(){ $this->_retvalue = new VariableOqlExpression(substr($this->yystack[$this->yyidx + 0]->minor, 1)); }
|
||||
#line 1637 "..\oql-parser.php"
|
||||
#line 182 "..\oql-parser.y"
|
||||
#line 181 "..\oql-parser.y"
|
||||
function yy_r68(){
|
||||
if ($this->yystack[$this->yyidx + 0]->minor[0] == '`')
|
||||
{
|
||||
@@ -1644,19 +1644,19 @@ static public $yy_action = array(
|
||||
$this->_retvalue = new OqlName($name, $this->m_iColPrev);
|
||||
}
|
||||
#line 1650 "..\oql-parser.php"
|
||||
#line 193 "..\oql-parser.y"
|
||||
#line 192 "..\oql-parser.y"
|
||||
function yy_r69(){$this->_retvalue=(int)$this->yystack[$this->yyidx + 0]->minor; }
|
||||
#line 1653 "..\oql-parser.php"
|
||||
#line 194 "..\oql-parser.y"
|
||||
#line 193 "..\oql-parser.y"
|
||||
function yy_r70(){$this->_retvalue=(int)-$this->yystack[$this->yyidx + 0]->minor; }
|
||||
#line 1656 "..\oql-parser.php"
|
||||
#line 195 "..\oql-parser.y"
|
||||
#line 194 "..\oql-parser.y"
|
||||
function yy_r71(){$this->_retvalue=new OqlHexValue($this->yystack[$this->yyidx + 0]->minor); }
|
||||
#line 1659 "..\oql-parser.php"
|
||||
#line 196 "..\oql-parser.y"
|
||||
#line 195 "..\oql-parser.y"
|
||||
function yy_r72(){$this->_retvalue=stripslashes(substr($this->yystack[$this->yyidx + 0]->minor, 1, strlen($this->yystack[$this->yyidx + 0]->minor) - 2)); }
|
||||
#line 1662 "..\oql-parser.php"
|
||||
#line 199 "..\oql-parser.y"
|
||||
#line 198 "..\oql-parser.y"
|
||||
function yy_r73(){$this->_retvalue=$this->yystack[$this->yyidx + 0]->minor; }
|
||||
#line 1665 "..\oql-parser.php"
|
||||
|
||||
@@ -1940,7 +1940,7 @@ throw new OQLParserException($this->m_sSourceQuery, $this->m_iLine, $this->m_iCo
|
||||
} while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
|
||||
}
|
||||
}
|
||||
#line 264 "..\oql-parser.y"
|
||||
#line 263 "..\oql-parser.y"
|
||||
|
||||
|
||||
class OQLParserException extends OQLException
|
||||
|
||||
@@ -173,7 +173,7 @@ class MatchOqlExpression extends MatchExpression implements CheckableExpression
|
||||
throw new OqlNormalizeException('Only "field MATCHES string" syntax is allowed', $sSourceQuery, new OqlName($this->m_oLeftExpr->RenderExpression(true), 0));
|
||||
}
|
||||
// Only field MATCHES scalar is allowed
|
||||
if (!$this->m_oRightExpr instanceof ScalarExpression)
|
||||
if (!$this->m_oRightExpr instanceof ScalarExpression && !$this->m_oRightExpr instanceof VariableOqlExpression)
|
||||
{
|
||||
throw new OqlNormalizeException('Only "field MATCHES string" syntax is allowed', $sSourceQuery, new OqlName($this->m_oRightExpr->RenderExpression(true), 0));
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
2019-12-03
|
||||
2020-09-29
|
||||
@@ -607,14 +607,22 @@ class CheckStopWatchThresholds implements iBackgroundProcess
|
||||
// Activate any existing trigger
|
||||
//
|
||||
$sClassList = implode("', '", MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_ALL));
|
||||
|
||||
$oTriggerSet = new DBObjectSet(
|
||||
DBObjectSearch::FromOQL("SELECT TriggerOnThresholdReached AS t WHERE t.target_class IN ('$sClassList') AND stop_watch_code=:stop_watch_code AND threshold_index = :threshold_index"),
|
||||
DBObjectSearch::FromOQL("SELECT TriggerOnThresholdReached AS t WHERE t.target_class IN ('$sClassList') AND stop_watch_code MATCHES :stop_watch_code AND threshold_index = :threshold_index"),
|
||||
array(), // order by
|
||||
array('stop_watch_code' => $sAttCode, 'threshold_index' => $iThreshold)
|
||||
);
|
||||
while ($oTrigger = $oTriggerSet->Fetch())
|
||||
{
|
||||
$oTrigger->DoActivate($oObj->ToArgs('this'));
|
||||
try
|
||||
{
|
||||
$oTrigger->DoActivate($oObj->ToArgs('this'));
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
utils::EnrichRaisedException($oTrigger, $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1344,9 +1344,8 @@ class UserRights
|
||||
// The bug has been fixed in PHP 7.2, but in case session_regenerate_id()
|
||||
// fails we just silently ignore the error and keep the same session id...
|
||||
$old_error_handler = set_error_handler(array(__CLASS__, 'VoidErrorHandler'));
|
||||
session_regenerate_id();
|
||||
if ($old_error_handler !== null)
|
||||
{
|
||||
session_regenerate_id(true);
|
||||
if ($old_error_handler !== null) {
|
||||
set_error_handler($old_error_handler);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,6 +213,9 @@ JS
|
||||
break;
|
||||
|
||||
case 'download':
|
||||
while (ob_get_level() > 0) {
|
||||
ob_end_clean();
|
||||
}
|
||||
$sFile = utils::ReadParam('file', '', false, 'raw_data');
|
||||
$oBackup = new DBBackupScheduled();
|
||||
$sBackupDir = APPROOT.'data/backups/';
|
||||
|
||||
@@ -31,8 +31,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'bkp-status-title' => 'Geplante Backups',
|
||||
'bkp-status-checks' => 'Einstellungen und Prüfungen',
|
||||
'bkp-mysqldump-ok' => 'mysqldump ist vorhanden: %1$s',
|
||||
'bkp-mysqldump-notfound' => 'mysqldump wurde nicht gefunden: %1$s - Stellen sie sicher, das er eingespielt und im Pfad verfügbar ist oder editieren sie die Konfigurationsdatei um das MySQL bindir anzupassen.',
|
||||
'bkp-mysqldump-issue' => 'mysqldump konnte nicht eingespielt werden (retcode=%1$d): Stellen sie sicher, das es installiert und im Pfad verfügbar ist oder editieren sie die Konfigurationsdatei um das MySQL bindir anzupassen.',
|
||||
'bkp-mysqldump-notfound' => 'mysqldump wurde nicht gefunden: %1$s - Stellen Sie sicher, das er eingespielt und im Pfad verfügbar ist oder editieren Sie die Konfigurationsdatei um das MySQL bindir anzupassen.',
|
||||
'bkp-mysqldump-issue' => 'mysqldump konnte nicht eingespielt werden (retcode=%1$d): Stellen Sie sicher, das es installiert und im Pfad verfügbar ist oder editieren Sie die Konfigurationsdatei um das MySQL bindir anzupassen.',
|
||||
'bkp-missing-dir' => 'Zielverzeichniss %1$s nicht gefunden',
|
||||
'bkp-free-disk-space' => '<b>%1$s frei</b> in %2$s',
|
||||
'bkp-dir-not-writeable' => '%1$s ist nicht schreibbar',
|
||||
@@ -53,8 +53,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'bkp-next-backup' => 'Das nächste Backup wird am <b>%1$s</b> (%2$s) um %3$s durchgeführt',
|
||||
'bkp-button-backup-now' => 'Starte Backup',
|
||||
'bkp-button-restore-now' => 'Wiederherstellen!',
|
||||
'bkp-confirm-backup' => 'Bitte bestätigen sie, dass sie jetzt ein Backup erstellen wollen now.',
|
||||
'bkp-confirm-restore' => 'Bitte bestätigen sie, dass sie mit Backup %1$s eine Wiederherstellung durchführen wollen.',
|
||||
'bkp-confirm-backup' => 'Bitte bestätigen Sie, dass Sie jetzt ein Backup erstellen wollen.',
|
||||
'bkp-confirm-restore' => 'Bitte bestätigen Sie, dass Sie mit Backup %1$s eine Wiederherstellung durchführen wollen.',
|
||||
'bkp-wait-backup' => 'Bitte warten, bis das Backup abgeschlossen ist ...',
|
||||
'bkp-wait-restore' => 'Bitte warten, bis die Wiederherstellung abgeschlossen ist ...',
|
||||
'bkp-success-restore' => 'Wiederherstellung erfolgreich.',
|
||||
|
||||
@@ -146,11 +146,11 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Class:Change/Stimulus:ev_assign+' => '',
|
||||
'Class:Change/Stimulus:ev_reopen' => 'Réouvrir',
|
||||
'Class:Change/Stimulus:ev_reopen+' => '',
|
||||
'Class:Change/Stimulus:ev_plan' => 'Plannifier',
|
||||
'Class:Change/Stimulus:ev_plan' => 'Planifier',
|
||||
'Class:Change/Stimulus:ev_plan+' => '',
|
||||
'Class:Change/Stimulus:ev_approve' => 'Approuver',
|
||||
'Class:Change/Stimulus:ev_approve+' => '',
|
||||
'Class:Change/Stimulus:ev_replan' => 'Replannifier',
|
||||
'Class:Change/Stimulus:ev_replan' => 'Replanifier',
|
||||
'Class:Change/Stimulus:ev_replan+' => '',
|
||||
'Class:Change/Stimulus:ev_notapprove' => 'Ne pas approuver',
|
||||
'Class:Change/Stimulus:ev_notapprove+' => '',
|
||||
@@ -177,11 +177,11 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Class:RoutineChange/Stimulus:ev_assign+' => '',
|
||||
'Class:RoutineChange/Stimulus:ev_reopen' => 'Réouvrir',
|
||||
'Class:RoutineChange/Stimulus:ev_reopen+' => '',
|
||||
'Class:RoutineChange/Stimulus:ev_plan' => 'Plannifier',
|
||||
'Class:RoutineChange/Stimulus:ev_plan' => 'Planifier',
|
||||
'Class:RoutineChange/Stimulus:ev_plan+' => '',
|
||||
'Class:RoutineChange/Stimulus:ev_approve' => 'Approver',
|
||||
'Class:RoutineChange/Stimulus:ev_approve+' => '',
|
||||
'Class:RoutineChange/Stimulus:ev_replan' => 'Replannifier',
|
||||
'Class:RoutineChange/Stimulus:ev_replan' => 'Replanifier',
|
||||
'Class:RoutineChange/Stimulus:ev_replan+' => '',
|
||||
'Class:RoutineChange/Stimulus:ev_notapprove' => 'Ne pas approver',
|
||||
'Class:RoutineChange/Stimulus:ev_notapprove+' => '',
|
||||
@@ -212,11 +212,11 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Class:ApprovedChange/Stimulus:ev_assign+' => '',
|
||||
'Class:ApprovedChange/Stimulus:ev_reopen' => 'Réouvrir',
|
||||
'Class:ApprovedChange/Stimulus:ev_reopen+' => '',
|
||||
'Class:ApprovedChange/Stimulus:ev_plan' => 'Plannifier',
|
||||
'Class:ApprovedChange/Stimulus:ev_plan' => 'Planifier',
|
||||
'Class:ApprovedChange/Stimulus:ev_plan+' => '',
|
||||
'Class:ApprovedChange/Stimulus:ev_approve' => 'Approuver',
|
||||
'Class:ApprovedChange/Stimulus:ev_approve+' => '',
|
||||
'Class:ApprovedChange/Stimulus:ev_replan' => 'Replannifier',
|
||||
'Class:ApprovedChange/Stimulus:ev_replan' => 'Replanifier',
|
||||
'Class:ApprovedChange/Stimulus:ev_replan+' => '',
|
||||
'Class:ApprovedChange/Stimulus:ev_notapprove' => 'Ne pas approuver',
|
||||
'Class:ApprovedChange/Stimulus:ev_notapprove+' => '',
|
||||
@@ -247,11 +247,11 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Class:NormalChange/Stimulus:ev_assign+' => '',
|
||||
'Class:NormalChange/Stimulus:ev_reopen' => 'Réouvrir',
|
||||
'Class:NormalChange/Stimulus:ev_reopen+' => '',
|
||||
'Class:NormalChange/Stimulus:ev_plan' => 'Plannifier',
|
||||
'Class:NormalChange/Stimulus:ev_plan' => 'Planifier',
|
||||
'Class:NormalChange/Stimulus:ev_plan+' => '',
|
||||
'Class:NormalChange/Stimulus:ev_approve' => 'Approuver',
|
||||
'Class:NormalChange/Stimulus:ev_approve+' => '',
|
||||
'Class:NormalChange/Stimulus:ev_replan' => 'Replannifier',
|
||||
'Class:NormalChange/Stimulus:ev_replan' => 'Replanifier',
|
||||
'Class:NormalChange/Stimulus:ev_replan+' => '',
|
||||
'Class:NormalChange/Stimulus:ev_notapprove' => 'Ne pas approuver',
|
||||
'Class:NormalChange/Stimulus:ev_notapprove+' => '',
|
||||
@@ -278,11 +278,11 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Class:EmergencyChange/Stimulus:ev_assign+' => '',
|
||||
'Class:EmergencyChange/Stimulus:ev_reopen' => 'Réouvrir',
|
||||
'Class:EmergencyChange/Stimulus:ev_reopen+' => '',
|
||||
'Class:EmergencyChange/Stimulus:ev_plan' => 'Plannifier',
|
||||
'Class:EmergencyChange/Stimulus:ev_plan' => 'Planifier',
|
||||
'Class:EmergencyChange/Stimulus:ev_plan+' => '',
|
||||
'Class:EmergencyChange/Stimulus:ev_approve' => 'Approuver',
|
||||
'Class:EmergencyChange/Stimulus:ev_approve+' => '',
|
||||
'Class:EmergencyChange/Stimulus:ev_replan' => 'Replannifier',
|
||||
'Class:EmergencyChange/Stimulus:ev_replan' => 'Replanifier',
|
||||
'Class:EmergencyChange/Stimulus:ev_replan+' => '',
|
||||
'Class:EmergencyChange/Stimulus:ev_notapprove' => 'Ne pas approuver',
|
||||
'Class:EmergencyChange/Stimulus:ev_notapprove+' => '',
|
||||
|
||||
@@ -5,9 +5,12 @@ class HubConnectorPage extends NiceWebPage
|
||||
public function __construct($sTitle)
|
||||
{
|
||||
parent::__construct($sTitle);
|
||||
|
||||
$this->add_header("Cache-control: no-cache");
|
||||
|
||||
|
||||
$this->add_header('Cache-control: no-cache, no-store, must-revalidate');
|
||||
$this->add_header('Pragma: no-cache');
|
||||
$this->add_header('Expires: 0');
|
||||
$this->add_header('X-Frame-Options: deny');
|
||||
|
||||
$sImagesDir = utils::GetAbsoluteUrlAppRoot().'images';
|
||||
$sModuleImagesDir = utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/images';
|
||||
|
||||
|
||||
@@ -34,23 +34,30 @@ $oModuleDesign = new ModuleDesign($_ENV['PORTAL_ID']);
|
||||
|
||||
// Load portal conf. such as properties, themes, templates, ...
|
||||
// Append into %combodo.portal.instance.conf%
|
||||
$oKPI = new ExecutionKPI();
|
||||
$oBasicCompat = new Basic($oModuleDesign);
|
||||
$oBasicCompat->Process($container);
|
||||
$oKPI->ComputeAndReport('Load portal conf. such as properties, themes, templates, ...');
|
||||
|
||||
// Load portal forms definition
|
||||
// Append into %combodo.portal.instance.conf%
|
||||
$oKPI = new ExecutionKPI();
|
||||
$oFormsCompat = new Forms($oModuleDesign);
|
||||
$oFormsCompat->Process($container);
|
||||
$oKPI->ComputeAndReport('Load portal forms definition');
|
||||
|
||||
// Load portal lists definition
|
||||
// Append into %combodo.portal.instance.conf%
|
||||
$oKPI = new ExecutionKPI();
|
||||
$oListsCompat = new Lists($oModuleDesign);
|
||||
$oListsCompat->Process($container);
|
||||
$oKPI->ComputeAndReport('Load portal lists definition');
|
||||
|
||||
// Generating CSS files
|
||||
// Note: We do this here as it is not user dependent and therefore can be cached for everyone.
|
||||
// A dedicated listener 'CssFromSassCompiler' exists to compile files again when by-passing HTTP cache.
|
||||
// This is to keep developers comfort when tuning the SCSS files.
|
||||
$oKPI = new ExecutionKPI();
|
||||
$aImportPaths = array($_ENV['COMBODO_PORTAL_BASE_ABSOLUTE_PATH'].'css/');
|
||||
$aPortalConf = $container->getParameter('combodo.portal.instance.conf');
|
||||
foreach ($aPortalConf['properties']['themes'] as $sKey => $value)
|
||||
@@ -71,4 +78,6 @@ foreach ($aPortalConf['properties']['themes'] as $sKey => $value)
|
||||
$aPortalConf['properties']['themes'][$sKey] = $aValues;
|
||||
}
|
||||
}
|
||||
$oKPI->ComputeAndReport('Generating CSS files');
|
||||
|
||||
$container->setParameter('combodo.portal.instance.conf', $aPortalConf);
|
||||
@@ -24,23 +24,38 @@ require_once MODULESROOT.'itop-portal-base/portal/config/bootstrap.php';
|
||||
|
||||
// Stacking context tag so it knows we are in the portal
|
||||
$oContext = new ContextTag(ContextTag::TAG_PORTAL);
|
||||
$oContext2 = new ContextTag('Portal:' . $_ENV['PORTAL_ID']);
|
||||
$oContext2 = new ContextTag('Portal:'.$_ENV['PORTAL_ID']);
|
||||
|
||||
|
||||
$oKPI = new ExecutionKPI();
|
||||
|
||||
// Note: Manually refactored ternary condition to be PHP 5.x compatible
|
||||
if ($trustedProxies = isset($_SERVER['TRUSTED_PROXIES']) ? $_SERVER['TRUSTED_PROXIES'] : (isset($_ENV['TRUSTED_PROXIES']) ? $_ENV['TRUSTED_PROXIES'] : false))
|
||||
{
|
||||
if ($trustedProxies = isset($_SERVER['TRUSTED_PROXIES']) ? $_SERVER['TRUSTED_PROXIES'] : (isset($_ENV['TRUSTED_PROXIES']) ? $_ENV['TRUSTED_PROXIES'] : false)) {
|
||||
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
|
||||
}
|
||||
|
||||
// Note: Manually refactored ternary condition to be PHP 5.x compatible
|
||||
if ($trustedHosts = isset($_SERVER['TRUSTED_HOSTS']) ? $_SERVER['TRUSTED_HOSTS'] : (isset($_ENV['TRUSTED_HOSTS']) ? $_ENV['TRUSTED_HOSTS'] : false))
|
||||
{
|
||||
if ($trustedHosts = isset($_SERVER['TRUSTED_HOSTS']) ? $_SERVER['TRUSTED_HOSTS'] : (isset($_ENV['TRUSTED_HOSTS']) ? $_ENV['TRUSTED_HOSTS'] : false)) {
|
||||
Request::setTrustedHosts([$trustedHosts]);
|
||||
}
|
||||
|
||||
$oKernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']);
|
||||
$oKPI->ComputeAndReport('Symfony kernel init');
|
||||
|
||||
$oKPI = new ExecutionKPI();
|
||||
$oRequest = Request::createFromGlobals();
|
||||
$oKPI->ComputeAndReport('Symfony request parsing/creation');
|
||||
|
||||
$oKPI = new ExecutionKPI();
|
||||
/** @noinspection PhpUnhandledExceptionInspection */
|
||||
$oResponse = $oKernel->handle($oRequest);
|
||||
$oResponse->send();
|
||||
$oKPI->ComputeAndReport('Page execution and rendering');
|
||||
|
||||
|
||||
$oKPI = new ExecutionKPI();
|
||||
$oKernel->terminate($oRequest, $oResponse);
|
||||
$oKPI->ComputeAndReport('Symfony kernel termination');
|
||||
|
||||
|
||||
ExecutionKPI::ReportStats();
|
||||
@@ -93,7 +93,7 @@ class ExceptionListener implements ContainerAwareInterface
|
||||
'exception' => $oFlattenException,
|
||||
'code' => $iStatusCode,
|
||||
'error_title' => $sErrorTitle,
|
||||
'error_message' => $sErrorMessage,
|
||||
'error_message' => '',
|
||||
);
|
||||
|
||||
// Generate the response
|
||||
|
||||
@@ -1139,7 +1139,14 @@ class ObjectFormManager extends FormManager
|
||||
/** @var \Trigger $oTrigger */
|
||||
while ($oTrigger = $oTriggerSet->Fetch())
|
||||
{
|
||||
$oTrigger->DoActivate($this->oObject->ToArgs('this'));
|
||||
try
|
||||
{
|
||||
$oTrigger->DoActivate($this->oObject->ToArgs('this'));
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
utils::EnrichRaisedException($oTrigger, $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,9 +55,16 @@ class TicketsInstaller extends ModuleInstallerAPI
|
||||
$oSet = new DBObjectSet($oSearch);
|
||||
while($oTrigger = $oSet->Fetch())
|
||||
{
|
||||
if (!MetaModel::IsValidClass($oTrigger->Get('target_class')))
|
||||
try
|
||||
{
|
||||
$oTrigger->DBDelete();
|
||||
if (!MetaModel::IsValidClass($oTrigger->Get('target_class')))
|
||||
{
|
||||
$oTrigger->DBDelete();
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
utils::EnrichRaisedException($oTrigger, $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
|
||||
'UI:WelcomeMenu:LeftBlock' => '<p>iTop est un portail opérationnel complet et libre pour gérer votre SI.</p>
|
||||
<ul>il contient:
|
||||
<li>Une base de gestion des configuration (CMDB - Configuration management database) pour documenter et gérer votre parc informatique.</li>
|
||||
<li>Une base de gestion des configurations (CMDB - Configuration management database) pour documenter et gérer votre parc informatique.</li>
|
||||
<li>Un module de gestion des incidents pour suivre les incidents d\'exploitation et gérer la communication à propos de ces incidents.</li>
|
||||
<li>Un module de gestion des changements pour planifier et suivre les modifications de votre SI.</li>
|
||||
<li>Une base des erreurs connues, pour accélérer la résolution des incidents.</li>
|
||||
@@ -355,7 +355,7 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
<li>Améliorer la satisfaction client et fournir aux responsables des vues sur la performance interne du SI.</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>iTop est complètement ouvert pour s\'intéger avec votre environnement informatique.</p>
|
||||
<p>iTop est complètement ouvert pour s\'intégrer avec votre environnement informatique.</p>
|
||||
<p>
|
||||
<ul>Grâce à ce portail opérationnel de nouvelle génération:
|
||||
<li>Gérez un environnement informatique de plus en plus complexe.</li>
|
||||
|
||||
@@ -59,24 +59,25 @@ $(function()
|
||||
var oEntry = aBreadCrumb[iEntry];
|
||||
if (oEntry['label'].length > 0)
|
||||
{
|
||||
var sIconSpec = '';
|
||||
if (oEntry['icon'].length > 0)
|
||||
{
|
||||
sIconSpec = '<span class="icon"><img src="'+oEntry['icon']+'"/></span>';
|
||||
}
|
||||
var sTitle = oEntry['description'];
|
||||
var sIconSpec = '';
|
||||
if (oEntry['icon'].length > 0) {
|
||||
sIconSpec = '<span class="icon"><img src="'+oEntry['icon']+'"/></span>';
|
||||
}
|
||||
|
||||
var sTitle = oEntry['description'],
|
||||
sLabel = oEntry['label'];
|
||||
if (sTitle.length == 0) {
|
||||
sTitle = oEntry['label'];
|
||||
}
|
||||
if ((this.options.new_entry !== null) && (iEntry == aBreadCrumb.length - 1))
|
||||
{
|
||||
sTitle = SanitizeHtml(sTitle);
|
||||
sLabel = SanitizeHtml(sLabel);
|
||||
|
||||
if ((this.options.new_entry !== null) && (iEntry == aBreadCrumb.length-1)) {
|
||||
// Last entry is the current page
|
||||
sBreadCrumbHtml += '<div class="breadcrumb-item breadcrumb-current" breadcrumb-entry="'+iEntry+'" title="'+sTitle+'">'+sIconSpec+'<span class="truncate">'+oEntry['label']+'</span></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
sBreadCrumbHtml += '<div class="breadcrumb-item breadcrumb-current" breadcrumb-entry="'+iEntry+'" title="'+sTitle+'">'+sIconSpec+'<span class="truncate">'+sLabel+'</span></div>';
|
||||
} else {
|
||||
var sSanitizedUrl = StripArchiveArgument(oEntry['url']);
|
||||
sBreadCrumbHtml += '<div class="breadcrumb-item"><a class="breadcrumb-link" breadcrumb-entry="'+iEntry+'" href="'+sSanitizedUrl+'" title="'+sTitle+'">'+sIconSpec+'<span class="truncate">'+oEntry['label']+'</span></a></div>';
|
||||
sBreadCrumbHtml += '<div class="breadcrumb-item"><a class="breadcrumb-link" breadcrumb-entry="'+iEntry+'" href="'+sSanitizedUrl+'" title="'+sTitle+'">'+sIconSpec+'<span class="truncate">'+sLabel+'</span></a></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
20
js/utils.js
20
js/utils.js
@@ -679,6 +679,23 @@ function DisplayHistory(sSelector, sFilter, iCount, iStart) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sValue value to escape
|
||||
* @returns {string} sanitized value, ready to insert in the DOM without XSS risk
|
||||
*
|
||||
* @since 2.6.5, 2.7.2, 2.8.0 N°3332
|
||||
* @see https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html#rule-1-html-encode-before-inserting-untrusted-data-into-html-element-content
|
||||
*/
|
||||
function SanitizeHtml(sValue) {
|
||||
return (sValue+'')
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/\//g, '/');
|
||||
}
|
||||
|
||||
// Very simple equivalent to format: placeholders are %1$s %2$d ...
|
||||
function Format() {
|
||||
var args = [];
|
||||
@@ -686,8 +703,7 @@ function Format() {
|
||||
if (arguments[0] instanceof Array) {
|
||||
str = arguments[0][0].toString();
|
||||
args = arguments[0];
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
str = arguments[0].toString();
|
||||
if (arguments.length > 1) {
|
||||
var t = typeof arguments[1];
|
||||
|
||||
@@ -6,8 +6,13 @@
|
||||
"homepage": "https://github.com/combodo-itop-libs/TCPDF",
|
||||
"type": "library",
|
||||
"description": "TCPDF fork adding requirements for iTop: Specific fonts.",
|
||||
"license": "LGPL-3.0",
|
||||
"license": "LGPL-3.0-only",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicola Asuni",
|
||||
"email": "info@tecnick.com",
|
||||
"role": "lead"
|
||||
},
|
||||
{
|
||||
"name": "Combodo",
|
||||
"email": "contact@combodo.com"
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/combodo-itop-libs/TCPDF.git",
|
||||
"reference": "abbfedb8ca59843dec11c97ca3f308742265c3fc"
|
||||
"reference": "aedd4b7b8cf7fcc24e617c405c9d3304150f4b94"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/abbfedb8ca59843dec11c97ca3f308742265c3fc",
|
||||
"reference": "abbfedb8ca59843dec11c97ca3f308742265c3fc",
|
||||
"url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/aedd4b7b8cf7fcc24e617c405c9d3304150f4b94",
|
||||
"reference": "aedd4b7b8cf7fcc24e617c405c9d3304150f4b94",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -20,7 +20,7 @@
|
||||
"replace": {
|
||||
"tecnickcom/tcpdf": "self.version"
|
||||
},
|
||||
"time": "2020-06-05T13:06:44+00:00",
|
||||
"time": "2020-09-28T12:19:09+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@@ -45,22 +45,21 @@
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0"
|
||||
"LGPL-3.0-only"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicola Asuni",
|
||||
"email": "info@tecnick.com",
|
||||
"role": "lead"
|
||||
},
|
||||
{
|
||||
"name": "Combodo",
|
||||
"email": "contact@combodo.com"
|
||||
}
|
||||
],
|
||||
"description": "TCPDF fork adding requirements for iTop: Specific fonts.",
|
||||
"homepage": "https://github.com/combodo-itop-libs/TCPDF",
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project",
|
||||
"type": "custom"
|
||||
}
|
||||
]
|
||||
"homepage": "https://github.com/combodo-itop-libs/TCPDF"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
@@ -168,17 +167,17 @@
|
||||
},
|
||||
{
|
||||
"name": "pear/archive_tar",
|
||||
"version": "1.4.9",
|
||||
"version_normalized": "1.4.9.0",
|
||||
"version": "1.4.10",
|
||||
"version_normalized": "1.4.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pear/Archive_Tar.git",
|
||||
"reference": "c5b00053770e1d72128252c62c2c1a12c26639f0"
|
||||
"reference": "bbb4f10f71a1da2715ec6d9a683f4f23c507a49b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pear/Archive_Tar/zipball/c5b00053770e1d72128252c62c2c1a12c26639f0",
|
||||
"reference": "c5b00053770e1d72128252c62c2c1a12c26639f0",
|
||||
"url": "https://api.github.com/repos/pear/Archive_Tar/zipball/bbb4f10f71a1da2715ec6d9a683f4f23c507a49b",
|
||||
"reference": "bbb4f10f71a1da2715ec6d9a683f4f23c507a49b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -193,7 +192,7 @@
|
||||
"ext-xz": "Lzma2 compression support.",
|
||||
"ext-zlib": "Gzip compression support."
|
||||
},
|
||||
"time": "2019-12-04T10:17:28+00:00",
|
||||
"time": "2020-09-15T14:13:23+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
||||
5
lib/pear/archive_tar/.gitignore
vendored
5
lib/pear/archive_tar/.gitignore
vendored
@@ -8,3 +8,8 @@ vendor
|
||||
.buildpath
|
||||
.project
|
||||
.settings
|
||||
# pear
|
||||
.tarballs
|
||||
*.tgz
|
||||
# phpunit
|
||||
build
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
sudo: false
|
||||
language: php
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
include:
|
||||
- php: 5.2
|
||||
dist: precise
|
||||
@@ -11,23 +14,12 @@ matrix:
|
||||
- php: 5.5
|
||||
dist: trusty
|
||||
- php: 5.6
|
||||
dist: trusty
|
||||
- php: 7.0
|
||||
dist: trusty
|
||||
- php: 7.1
|
||||
dist: trusty
|
||||
- php: 7.2
|
||||
dist: trusty
|
||||
- php: 7.3
|
||||
dist: trusty
|
||||
- php: 7.4snapshot
|
||||
- php: master
|
||||
|
||||
jobs:
|
||||
allow_failures:
|
||||
- php: 7.4snapshot
|
||||
- php: master
|
||||
|
||||
- php: 7.4
|
||||
- php: nightly
|
||||
install:
|
||||
# - pear upgrade --force --alldeps pear/pear
|
||||
- pear install -f package.xml
|
||||
|
||||
@@ -731,7 +731,7 @@ class Archive_Tar extends PEAR
|
||||
*/
|
||||
public function setIgnoreList($list)
|
||||
{
|
||||
$regexp = str_replace(array('#', '.', '^', '$'), array('\#', '\.', '\^', '\$'), $list);
|
||||
$list = str_replace(array('#', '.', '^', '$'), array('\#', '\.', '\^', '\$'), $list);
|
||||
$regexp = '#/' . join('$|/', $list) . '#';
|
||||
$this->setIgnoreRegexp($regexp);
|
||||
}
|
||||
@@ -1273,7 +1273,7 @@ class Archive_Tar extends PEAR
|
||||
while (($v_buffer = fread($v_file, $this->buffer_length)) != '') {
|
||||
$buffer_length = strlen("$v_buffer");
|
||||
if ($buffer_length != $this->buffer_length) {
|
||||
$pack_size = ((int)($buffer_length / 512) + 1) * 512;
|
||||
$pack_size = ((int)($buffer_length / 512) + ($buffer_length % 512 !== 0 ? 1 : 0)) * 512;
|
||||
$pack_format = sprintf('a%d', $pack_size);
|
||||
} else {
|
||||
$pack_format = sprintf('a%d', $this->buffer_length);
|
||||
@@ -1515,8 +1515,13 @@ class Archive_Tar extends PEAR
|
||||
$userinfo = posix_getpwuid($p_uid);
|
||||
$groupinfo = posix_getgrgid($p_gid);
|
||||
|
||||
$v_uname = $userinfo['name'];
|
||||
$v_gname = $groupinfo['name'];
|
||||
if ($userinfo === false || $groupinfo === false) {
|
||||
$v_uname = '';
|
||||
$v_gname = '';
|
||||
} else {
|
||||
$v_uname = $userinfo['name'];
|
||||
$v_gname = $groupinfo['name'];
|
||||
}
|
||||
} else {
|
||||
$v_uname = '';
|
||||
$v_gname = '';
|
||||
|
||||
@@ -32,10 +32,10 @@ Also Lzma2 compressed archives are supported with xz extension.</description>
|
||||
<email>stig@php.net</email>
|
||||
<active>no</active>
|
||||
</helper>
|
||||
<date>2019-12-04</date>
|
||||
<time>09:25:16</time>
|
||||
<date>2020-09-15</date>
|
||||
<time>14:03:45</time>
|
||||
<version>
|
||||
<release>1.4.9</release>
|
||||
<release>1.4.10</release>
|
||||
<api>1.4.0</api>
|
||||
</version>
|
||||
<stability>
|
||||
@@ -44,7 +44,8 @@ Also Lzma2 compressed archives are supported with xz extension.</description>
|
||||
</stability>
|
||||
<license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
|
||||
<notes>
|
||||
* Implement Feature #23861: Add option to disallow symlinks [mrook]
|
||||
* Fix block padding when the file buffer length is a multiple of 512 and smaller than Archive_Tar buffer length
|
||||
* Don't try to copy username/groupname in chroot jail
|
||||
</notes>
|
||||
<contents>
|
||||
<dir name="/">
|
||||
@@ -74,6 +75,21 @@ Also Lzma2 compressed archives are supported with xz extension.</description>
|
||||
</dependencies>
|
||||
<phprelease />
|
||||
<changelog>
|
||||
<release>
|
||||
<version>
|
||||
<release>1.4.9</release>
|
||||
<api>1.4.0</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<date>2019-12-04</date>
|
||||
<license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
|
||||
<notes>
|
||||
* Implement Feature #23861: Add option to disallow symlinks [mrook]
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<version>
|
||||
<release>1.4.8</release>
|
||||
|
||||
@@ -2004,7 +2004,7 @@ catch(CoreException $e)
|
||||
$oLog->Set('userinfo', '');
|
||||
$oLog->Set('issue', $e->GetIssue());
|
||||
$oLog->Set('impact', 'Page could not be displayed');
|
||||
$oLog->Set('callstack', $e->getTrace());
|
||||
$oLog->Set('callstack', $e->getFullStackTraceAsString());
|
||||
$oLog->Set('data', $e->getContextData());
|
||||
$oLog->DBInsertNoReload();
|
||||
}
|
||||
@@ -2014,7 +2014,7 @@ catch(CoreException $e)
|
||||
}
|
||||
}
|
||||
|
||||
IssueLog::Error('UI.php operation='.$operation.', error='.$e->getMessage()."\n".$e->getTraceAsString());
|
||||
IssueLog::Error('UI.php operation='.$operation.', error='.$e->getMessage()."\n".$e->getFullStackTraceAsString());
|
||||
}
|
||||
|
||||
// For debugging only
|
||||
|
||||
@@ -557,6 +557,7 @@ abstract class Controller
|
||||
{
|
||||
case 'html':
|
||||
$this->m_oPage = new iTopWebPage($this->GetOperationTitle());
|
||||
$this->m_oPage->add_header('X-Frame-Options: deny');
|
||||
break;
|
||||
|
||||
case 'ajax':
|
||||
|
||||
@@ -675,17 +675,49 @@ class DBSearchTest extends ItopDataTestCase
|
||||
$TwoOrgIdsOnly = array($allOrgIds[0], $allOrgIds[1]);
|
||||
$oSearch = DBSearch::FromOQL("SELECT UserRequest WHERE org_id IN (:org_ids)");
|
||||
self::assertNotNull($oSearch);
|
||||
$oSet = new \CMDBObjectSet($oSearch, array(), array('org_ids'=> $TwoOrgIdsOnly));
|
||||
$oSet = new \CMDBObjectSet($oSearch, array(), array('org_ids' => $TwoOrgIdsOnly));
|
||||
static::assertEquals(4, $oSet->Count());
|
||||
|
||||
$_SERVER['REQUEST_URI']='FAKE_REQUEST_URI' ;
|
||||
$_SERVER['REQUEST_METHOD']='FAKE_REQUEST_METHOD';
|
||||
$_SERVER['REQUEST_URI'] = 'FAKE_REQUEST_URI';
|
||||
$_SERVER['REQUEST_METHOD'] = 'FAKE_REQUEST_METHOD';
|
||||
$oP = new \iTopWebPage("test");
|
||||
$oBlock = new \DisplayBlock($oSet->GetFilter(), 'list', false);
|
||||
$sHtml = $oBlock->GetDisplay($oP, 'package_table', array ('menu'=>true, 'display_limit'=>false));
|
||||
$sHtml = $oBlock->GetDisplay($oP, 'package_table', array('menu' => true, 'display_limit' => false));
|
||||
|
||||
$iHtmlUserRequestLineCount = substr_count($sHtml, '<tr><td data-object-class="UserRequest"');
|
||||
static::assertEquals(4, $iHtmlUserRequestLineCount, "Failed Generated html :" . $sHtml);
|
||||
static::assertEquals(4, $iHtmlUserRequestLineCount, "Failed Generated html :".$sHtml);
|
||||
$oP->output();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.7.2 2.8.0 N°3324
|
||||
*/
|
||||
public function testAllowAllData() {
|
||||
$oSimpleSearch = \DBObjectSearch::FromOQL('SELECT FunctionalCI');
|
||||
$oSimpleSearch->AllowAllData(false);
|
||||
self::assertFalse($oSimpleSearch->IsAllDataAllowed(), 'DBSearch AllowData value');
|
||||
$oSimpleSearch->AllowAllData(true);
|
||||
self::assertTrue($oSimpleSearch->IsAllDataAllowed(), 'DBSearch AllowData value');
|
||||
|
||||
$sNestedQuery = 'SELECT FunctionalCI WHERE id IN (SELECT Server)';
|
||||
$this->CheckNestedSearch($sNestedQuery, true);
|
||||
$this->CheckNestedSearch($sNestedQuery, false);
|
||||
}
|
||||
|
||||
private function CheckNestedSearch($sQuery, $bAllowAllData) {
|
||||
$oNestedQuerySearch = \DBObjectSearch::FromOQL($sQuery);
|
||||
$oNestedQuerySearch->AllowAllData($bAllowAllData);
|
||||
self::assertEquals($bAllowAllData, $oNestedQuerySearch->IsAllDataAllowed(), 'root DBSearch AllowData value');
|
||||
$oNestedSearchInExpression = null;
|
||||
$oNestedQuerySearch->GetCriteria()->Browse(function ($oExpression) use (&$oNestedSearchInExpression) {
|
||||
if ($oExpression instanceof \NestedQueryExpression) {
|
||||
$oNestedSearchInExpression = $oExpression->GetNestedQuery();
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
self::assertNotNull($oNestedSearchInExpression, 'We must have a DBSearch inside a NestedQueryExpression inside the root DBSearch');
|
||||
/** @var \DBObjectSearch $oNestedSearchInExpression */
|
||||
self::assertEquals($bAllowAllData, $oNestedSearchInExpression->IsAllDataAllowed(), 'Nested DBSearch AllowData value');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ class OQLTest extends ItopDataTestCase
|
||||
*
|
||||
* @param $sQuery
|
||||
*
|
||||
* @expectedException \TypeError
|
||||
* @expectedException \CoreException
|
||||
*
|
||||
* @throws \OQLException
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
namespace Combodo\iTop\Test\UnitTest\Core;
|
||||
|
||||
use Combodo\iTop\Portal\Controller\ObjectController;
|
||||
use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
|
||||
use ContextTag;
|
||||
use MetaModel;
|
||||
use PHPUnit\Exception;
|
||||
use TriggerOnObjectCreate;
|
||||
|
||||
/**
|
||||
@@ -14,10 +16,17 @@ use TriggerOnObjectCreate;
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
|
||||
class TriggerTest extends ItopDataTestCase
|
||||
{
|
||||
const USE_TRANSACTION = false;
|
||||
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
public function testIsContextValid()
|
||||
{
|
||||
/** @var TriggerOnObjectCreate $oTrigger */
|
||||
@@ -29,4 +38,65 @@ class TriggerTest extends ItopDataTestCase
|
||||
ContextTag::AddContext(ContextTag::TAG_CRON);
|
||||
$this->assertTrue($oTrigger->IsContextValid());
|
||||
}
|
||||
|
||||
public function testEnrichRaisedException_Trigger()
|
||||
{
|
||||
$oTrigger = MetaModel::NewObject('TriggerOnObjectCreate');
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
MetaModel::NewObject('Toto');
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
\utils::EnrichRaisedException($oTrigger, $e);
|
||||
}
|
||||
$this->assertTrue(false, "An exception should have been thrown");
|
||||
}
|
||||
catch(\CoreException $e1)
|
||||
{
|
||||
$this->assertEquals('CoreException', get_class($e1));
|
||||
$this->assertEquals('Unknown class \'Toto\' (<b title="Trigger">TriggerOnObjectCreate</b>::-1 ()<br/>)', $e1->getMessage());
|
||||
|
||||
$fullStackTraceAsString = $e1->getFullStackTraceAsString();
|
||||
$this->assertContains("MetaModel::NewObject", $fullStackTraceAsString,"new enriched exception should contain root cause method: " . $fullStackTraceAsString);
|
||||
}
|
||||
}
|
||||
|
||||
public function NoEnrichmentProvider()
|
||||
{
|
||||
return [
|
||||
[ null ],
|
||||
[ new NonCmdbAbstractObject() ],
|
||||
] ;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $oCmdbAbstract
|
||||
* @dataProvider NoEnrichmentProvider
|
||||
*/
|
||||
public function testEnrichRaisedException_NoEnrichment($oCmdbAbstract)
|
||||
{
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
MetaModel::NewObject('CoreException');
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
\utils::EnrichRaisedException($oCmdbAbstract, $e);
|
||||
}
|
||||
$this->assertTrue(false, "An exception should have been thrown");
|
||||
}
|
||||
catch(\Exception $e1)
|
||||
{
|
||||
$this->assertEquals($e, $e1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class NonCmdbAbstractObject{
|
||||
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ function ReportErrorAndExit($sErrorMessage)
|
||||
else
|
||||
{
|
||||
$oP = new WebPage("iTop - Export");
|
||||
$oP->add_header('X-Frame-Options: deny');
|
||||
$oP->p('ERROR: '.$sErrorMessage);
|
||||
$oP->output();
|
||||
exit(EXIT_CODE_ERROR);
|
||||
@@ -69,6 +70,7 @@ function ReportErrorAndUsage($sErrorMessage)
|
||||
else
|
||||
{
|
||||
$oP = new WebPage("iTop - Export");
|
||||
$oP->add_header('X-Frame-Options: deny');
|
||||
$oP->p('ERROR: '.$sErrorMessage);
|
||||
Usage($oP);
|
||||
$oP->output();
|
||||
@@ -737,6 +739,7 @@ try
|
||||
if($oExporter instanceof HTMLBulkExport)
|
||||
{
|
||||
$oP = new NiceWebPage('iTop export');
|
||||
$oP->add_header('X-Frame-Options: deny');
|
||||
$oP->add_ready_script("$('table.listResults').tablesorter({widgets: ['MyZebra']});");
|
||||
$oP->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/font-awesome/css/all.min.css');
|
||||
$oP->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/font-awesome/css/v4-shims.min.css');
|
||||
@@ -744,6 +747,7 @@ try
|
||||
else
|
||||
{
|
||||
$oP = new WebPage('iTop export');
|
||||
$oP->add_header('X-Frame-Options: deny');
|
||||
$oP->add_style("table br { mso-data-placement:same-cell; }"); // Trick for Excel: keep line breaks inside the same cell !
|
||||
}
|
||||
$oP->add_style("body { overflow: auto; }");
|
||||
@@ -767,6 +771,7 @@ catch (BulkExportMissingParameterException $e)
|
||||
catch (Exception $e)
|
||||
{
|
||||
$oP = new WebPage('iTop Export');
|
||||
$oP->add_header('X-Frame-Options: deny');
|
||||
$oP->add('Error: '.$e->getMessage());
|
||||
IssueLog::Error($e->getMessage()."\n".$e->getTraceAsString());
|
||||
$oP->output();
|
||||
|
||||
Reference in New Issue
Block a user