Skip to content

Commit 703a1c8

Browse files
committed
Merge branch 'develop' into feat/interface/naming
# Conflicts: # datamodels/2.x/itop-virtualization-mgmt/dictionaries/en.dict.itop-virtualization-mgmt.php
2 parents 91c6f0d + 3dd1c11 commit 703a1c8

File tree

1,438 files changed

+131500
-5069
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,438 files changed

+131500
-5069
lines changed

.doc/developers.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Developers
2+
3+
## PHP Code Styles
4+
We use `PHP CS Fixer` to ensure code formating consistency across PHP codebase.
5+
You can find the configuration and instructions to run it [here](../tests/php-code-style/README.md).
6+
7+
## PHP Static Analysis
8+
We use `PHPStan` to ensure code quality and to detect potential bugs in our PHP codebase.
9+
You can find the configuration and instructions to run it [here](../tests/php-static-analysis/README.md).

.github/workflows/action.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,28 @@ jobs:
2626
2727
fi
2828
29-
- name: Add internal tag if member
29+
- name: Add internal tag if member of the organization
3030
if: env.is_member == 'true'
3131
run: |
3232
curl -X POST -H "Authorization: token ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}" \
3333
-H "Accept: application/vnd.github.v3+json" \
3434
https://api.github.com/repos/Combodo/iTop/issues/${{ github.event.pull_request.number }}/labels \
3535
-d '{"labels":["internal"]}'
36+
37+
- name: Set PR author as assignee if member of the organization
38+
if: env.is_member == 'true'
39+
run: |
40+
curl -L \
41+
-X POST \
42+
-H "Accept: application/vnd.github+json" \
43+
-H "Authorization: Bearer ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}" \
44+
https://api.github.com/repos/Combodo/iTop/issues/${{ github.event.pull_request.number }}/assignees \
45+
-d '{"assignees":["${{ github.event.pull_request.user.login }}"]}'
3646
env:
3747
is_member: ${{ env.is_member }}
3848

3949
- name: Add PR to the appropriate project
4050
uses: actions/add-to-project@v1.0.2
4151
with:
4252
project-url: ${{ env.project_url }}
43-
github-token: ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}
53+
github-token: ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ tests/*/vendor/*
5858
/tests/php-unit-tests/phpunit.xml
5959
/tests/php-unit-tests/postbuild_integration.xml
6060

61+
# PHP CS Fixer: Cache file
62+
/.php-cs-fixer.cache
63+
6164

6265
# Jetbrains
6366
/.idea/**

.phpstorm.meta.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
/*
4+
* @copyright Copyright (C) 2010-2025 Combodo SAS
5+
* @license http://opensource.org/licenses/AGPL-3.0
6+
*/
7+
8+
namespace PHPSTORM_META
9+
{
10+
override(\MetaModel::NewObject(0), map([
11+
'' => '@',
12+
]));
13+
override(\MetaModel::GetObject(0), map([
14+
'' => '@',
15+
]));
16+
}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ iTop development is sponsored, led, and supported by [Combodo][0].
7373

7474
[0]: https://www.combodo.com
7575

76+
## Developers
77+
78+
You can find information and instructions about our quality tools and how to run them [here](.doc/developers.md).
7679

7780
## Contributors
7881

application/cmdbabstract.class.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5632,7 +5632,7 @@ final protected function FireEventUnArchive(): void
56325632
* @return void
56335633
* @since 3.1.0
56345634
*/
5635-
final public function AddAttributeFlags(string $sAttCode, int $iFlags, string $sTargetState = '', string $sReason = null): void
5635+
final public function AddAttributeFlags(string $sAttCode, int $iFlags, string $sTargetState = '', ?string $sReason = null): void
56365636
{
56375637
if (!isset($this->aAttributesFlags[$sTargetState])) {
56385638
$this->aAttributesFlags[$sTargetState] = [];
@@ -5655,7 +5655,7 @@ final public function AddAttributeFlags(string $sAttCode, int $iFlags, string $s
56555655
* @return void
56565656
* @since 3.1.0
56575657
*/
5658-
final public function ForceAttributeFlags(string $sAttCode, int $iFlags, string $sTargetState = '', string $sReason = null): void
5658+
final public function ForceAttributeFlags(string $sAttCode, int $iFlags, string $sTargetState = '', ?string $sReason = null): void
56595659
{
56605660
if (!isset($this->aAttributesFlags[$sTargetState])) {
56615661
$this->aAttributesFlags[$sTargetState] = [];
@@ -5696,7 +5696,7 @@ final protected function GetExtensionsAttributeFlags(string $sAttCode, array &$a
56965696
* @return void
56975697
* @since 3.1.0
56985698
*/
5699-
final public function AddInitialAttributeFlags(string $sAttCode, int $iFlags, string $sReason = null)
5699+
final public function AddInitialAttributeFlags(string $sAttCode, int $iFlags, ?string $sReason = null)
57005700
{
57015701
if (!isset($this->aInitialAttributesFlags)) {
57025702
$this->aInitialAttributesFlags = [];
@@ -5718,7 +5718,7 @@ final public function AddInitialAttributeFlags(string $sAttCode, int $iFlags, st
57185718
* @return void
57195719
* @since 3.1.0
57205720
*/
5721-
final public function ForceInitialAttributeFlags(string $sAttCode, int $iFlags, string $sReason = null)
5721+
final public function ForceInitialAttributeFlags(string $sAttCode, int $iFlags, ?string $sReason = null)
57225722
{
57235723
if (!isset($this->aInitialAttributesFlags)) {
57245724
$this->aInitialAttributesFlags = [];

application/dashboard.class.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ function ToggleDashboardSelector$sDivId()
10291029
var dashboard = $('.ibo-dashboard#$sDivId')
10301030
dashboard.block();
10311031
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php',
1032-
{ operation: 'toggle_dashboard', dashboard_id: '$sId', file: '$sFile', extra_params: $sExtraParams, reload_url: '$sReloadURL' },
1032+
{ operation: 'toggle_dashboard', dashboard_id: '$sId', file: '$sFile', extra_params: $sExtraParams, reload_url: $sReloadURL },
10331033
function(data) {
10341034
dashboard.html(data);
10351035
dashboard.unblock();

application/datamodel.application.xml

Lines changed: 168 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
2+
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://www.combodo.com/itop-schema/3.3"
4+
version="3.3">
35
<classes>
46
<class id="AbstractResource" _delta="define">
57
<parent>cmdbAbstractObject</parent>
68
<properties>
7-
<comment>/* Resource access control abstraction. Can be herited by abstract resource access control classes. Generaly controlled using UR_ACTION_MODIFY access right. */</comment>
9+
<comment>/* Resource access control abstraction. Can be herited by abstract resource access control classes. Generally controlled using UR_ACTION_MODIFY access right. */</comment>
810
<abstract>true</abstract>
911
</properties>
1012
<presentation/>
@@ -552,7 +554,7 @@ Call $this->AddInitialAttributeFlags($sAttCode, $iFlags) for all the initial att
552554
<description><![CDATA[Inform the listeners about the connection states]]></description>
553555
<event_data>
554556
<event_datum id="code">
555-
<description>The login step result code (LoginWebPage::EXIT_CODE_...) </description>
557+
<description>The login step result code (LoginWebPage::EXIT_CODE_...)</description>
556558
<type>integer</type>
557559
</event_datum>
558560
<event_datum id="state">
@@ -849,5 +851,168 @@ Call $this->AddInitialAttributeFlags($sAttCode, $iFlags) for all the initial att
849851
</methods>
850852
</class>
851853
</classes>
854+
<property_types _delta="define">
855+
<property_type id="Dashlet" xsi:type="Combodo-AbstractPropertyType"/>
856+
<property_type id="DashletGroupBy" xsi:type="Combodo-PropertyType">
857+
<extends>Dashlet</extends>
858+
<definition xsi:type="Combodo-ValueType-PropertyTree">
859+
<label>UI:DashletGroupBy:Title</label>
860+
<nodes>
861+
<node id="title" xsi:type="Combodo-ValueType-Label">
862+
<label>UI:DashletGroupBy:Prop-Title</label>
863+
</node>
864+
<node id="query" xsi:type="Combodo-ValueType-OQL">
865+
<label>UI:DashletGroupBy:Prop-Query</label>
866+
</node>
867+
<node id="group_by" xsi:type="Combodo-ValueType-ClassAttributeGroupBy">
868+
<label>UI:DashletGroupBy:Prop-GroupBy</label>
869+
<class>{{query.selected_class}}</class>
870+
</node>
871+
<node id="style" xsi:type="Combodo-ValueType-Choice"> <!-- Possible de le cacher, etc celui-ci nous met dedans -->
872+
<label>UI:DashletGroupBy:Prop-Style</label>
873+
<values>
874+
<value id="bars">
875+
<label>UI:DashletGroupByBars:Label</label>
876+
</value>
877+
<value id="pie">
878+
<label>UI:DashletGroupByPie:Label</label>
879+
</value>
880+
<value id="table">
881+
<label>UI:DashletGroupByTable:Label</label>
882+
</value>
883+
</values>
884+
</node>
885+
<node id="aggregation_function" xsi:type="Combodo-ValueType-AggregateFunction">
886+
<label>UI:DashletGroupBy:Prop-Function</label>
887+
<class>{{query.selected_class}}</class> <!-- pour savoir si il y a des attributs additionnables -->
888+
</node>
889+
<node id="aggregation_attribute" xsi:type="Combodo-ValueType-ClassAttribute">
890+
<label>UI:DashletGroupBy:Prop-FunctionAttribute</label>
891+
<relevance-condition>{{aggregation_function.value != 'count'}}</relevance-condition>
892+
<class>{{query.selected_class}}</class>
893+
<category>numeric</category>
894+
</node>
895+
<node id="order_by" xsi:type="Combodo-ValueType-ChoiceFromInput">
896+
<label>UI:DashletGroupBy:Prop-OrderField</label>
897+
<values>
898+
<value id="attribute">
899+
<label>{{aggregation_attribute.label}}</label>
900+
</value>
901+
<value id="function">
902+
<label>{{aggregation_function.label}}</label>
903+
</value>
904+
</values>
905+
</node>
906+
<node id="limit" xsi:type="Combodo-ValueType-Integer">
907+
<label>UI:DashletGroupBy:Prop-Limit</label>
908+
<relevance-condition>{{order_by.value = 'function'}}</relevance-condition>
909+
</node>
910+
<node id="order_direction" xsi:type="Combodo-ValueType-Choice">
911+
<label>UI:DashletGroupBy:Prop-OrderDirection</label>
912+
<values>
913+
<value id="asc">
914+
<label>UI:DashletGroupBy:Order:asc</label>
915+
</value>
916+
<value id="desc">
917+
<label>UI:DashletGroupBy:Order:desc</label>
918+
</value>
919+
</values>
920+
</node>
921+
</nodes>
922+
</definition>
923+
</property_type>
924+
<property_type id="DashletBadge" xsi:type="Combodo-PropertyType">
925+
<extends>Dashlet</extends>
926+
<definition xsi:type="Combodo-ValueType-PropertyTree">
927+
<nodes>
928+
<node id="class" xsi:type="Combodo-ValueType-Class">
929+
<label>UI:DashletBadge:Prop-Class</label>
930+
<categories-csv>bizmodel</categories-csv>
931+
</node>
932+
</nodes>
933+
</definition>
934+
</property_type>
935+
<property_type id="DashletHeaderDynamic" xsi:type="Combodo-PropertyType">
936+
<extends>Dashlet</extends>
937+
<definition xsi:type="Combodo-ValueType-PropertyTree">
938+
<label>UI:DashletHeaderDynamic:Title</label>
939+
<nodes>
940+
<node id="title" xsi:type="Combodo-ValueType-Label">
941+
<label>UI:DashletHeaderDynamic:Prop-Title</label>
942+
</node>
943+
<node id="icon" xsi:type="Combodo-ValueType-Icon">
944+
<label>UI:DashletHeaderDynamic:Prop-Icon</label>
945+
</node>
946+
<node id="subtitle" xsi:type="Combodo-ValueType-Label">
947+
<label>UI:DashletHeaderDynamic:Prop-Subtitle</label>
948+
</node>
949+
<node id="query" xsi:type="Combodo-ValueType-OQL">
950+
<label>UI:DashletHeaderDynamic:Prop-Query</label>
951+
</node>
952+
<node id="group_by" xsi:type="Combodo-ValueType-ClassAttribute">
953+
<label>UI:DashletHeaderDynamic:Prop-GroupBy</label>
954+
<class>{{query.selected_class}}</class>
955+
<category>enum</category>
956+
</node>
957+
<node id="values" xsi:type="Combodo-ValueType-CollectionOfValues">
958+
<label>UI:DashletHeaderDynamic:Prop-Values</label>
959+
<xml-format xsi:type="Combodo-XMLFormat-CSV"/>
960+
<value-type xsi:type="Combodo-ValueType-ClassAttributeValue">
961+
<class>{{query.selected_class}}</class>
962+
<attribute>{{group_by.attribute}}</attribute>
963+
</value-type>
964+
</node>
965+
</nodes>
966+
</definition>
967+
</property_type>
968+
<property_type id="DashletHeaderStatic" xsi:type="Combodo-PropertyType">
969+
<extends>Dashlet</extends>
970+
<definition xsi:type="Combodo-ValueType-PropertyTree">
971+
<nodes>
972+
<node id="title" xsi:type="Combodo-ValueType-Label">
973+
<label>UI:DashletHeaderStatic:Prop-Title</label>
974+
</node>
975+
<node id="icon" xsi:type="Combodo-ValueType-Icon">
976+
<label>UI:DashletHeaderStatic:Prop-Icon</label>
977+
</node>
978+
</nodes>
979+
</definition>
980+
</property_type>
981+
<property_type id="DashletObjectList" xsi:type="Combodo-PropertyType">
982+
<extends>Dashlet</extends>
983+
<definition xsi:type="Combodo-ValueType-PropertyTree">
984+
<nodes>
985+
<node id="title" xsi:type="Combodo-ValueType-Label">
986+
<label>UI:DashletObjectList:Prop-Title</label>
987+
</node>
988+
<node id="query" xsi:type="Combodo-ValueType-OQL">
989+
<label>UI:DashletObjectList:Prop-Query</label>
990+
</node>
991+
<node id="menu" xsi:type="Combodo-ValueType-Boolean">
992+
<label>UI:DashletObjectList:Prop-Menu</label>
993+
<on>
994+
<!-- not so cute, but matches exactly 3.2 implementation of boolean fields -->
995+
<label>UI:UserManagement:ActionAllowed:Yes</label>
996+
<value>true</value>
997+
</on>
998+
<off>
999+
<label>UI:UserManagement:ActionAllowed:No</label>
1000+
<value>false</value>
1001+
</off>
1002+
</node>
1003+
</nodes>
1004+
</definition>
1005+
</property_type>
1006+
<property_type id="DashletPlainText" xsi:type="Combodo-PropertyType">
1007+
<extends>Dashlet</extends>
1008+
<definition xsi:type="Combodo-ValueType-PropertyTree">
1009+
<nodes>
1010+
<node id="text" xsi:type="Combodo-ValueType-Text">
1011+
<label>UI:DashletPlainText:Prop-Text</label>
1012+
</node>
1013+
</nodes>
1014+
</definition>
1015+
</property_type>
1016+
</property_types>
8521017
</meta>
8531018
</itop_design>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) 2010-2026 Combodo SAS
5+
* @license http://opensource.org/licenses/AGPL-3.0
6+
*/
7+
8+
class ForgotPasswordApplicationException extends Exception
9+
{
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) 2010-2026 Combodo SAS
5+
* @license http://opensource.org/licenses/AGPL-3.0
6+
*/
7+
8+
class ForgotPasswordUserInputException extends Exception
9+
{
10+
}

0 commit comments

Comments
 (0)