mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-06 17:44:12 +01:00
Compare commits
502 Commits
3.2.0-alph
...
feature/79
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ff97be963 | ||
|
|
add7743b6f | ||
|
|
2415d3d5d3 | ||
|
|
77989b6bd8 | ||
|
|
f26ed0ea71 | ||
|
|
309b6bd900 | ||
|
|
83f1476de4 | ||
|
|
c2d0c310a9 | ||
|
|
e7488b2c89 | ||
|
|
8ac4086e71 | ||
|
|
6b5273fa1c | ||
|
|
9b1e854bf7 | ||
|
|
926700856d | ||
|
|
ab93d59a77 | ||
|
|
c70d62a51e | ||
|
|
82bc2f33f2 | ||
|
|
0d5ff261fe | ||
|
|
374b35f78a | ||
|
|
f5c29edee4 | ||
|
|
8fb450a6d4 | ||
|
|
311c5d0d51 | ||
|
|
f90bd81e15 | ||
|
|
a10e547420 | ||
|
|
2519456c98 | ||
|
|
9371bc6d7b | ||
|
|
58e964fb8c | ||
|
|
57760528c9 | ||
|
|
561baf5771 | ||
|
|
f281fa7b14 | ||
|
|
6ae8a72a35 | ||
|
|
694711b3f4 | ||
|
|
01d3f707e4 | ||
|
|
4e28856015 | ||
|
|
8bb456df53 | ||
|
|
4886e2a7dc | ||
|
|
674dfebb0d | ||
|
|
e8ecc85828 | ||
|
|
04bd8cc5ce | ||
|
|
764eddd9f8 | ||
|
|
015ff8f179 | ||
|
|
9b651c2451 | ||
|
|
bb16f4ad57 | ||
|
|
7b3023ccce | ||
|
|
e6a3a95ff9 | ||
|
|
80e413c370 | ||
|
|
69fd9048fd | ||
|
|
7254bb7a2f | ||
|
|
7a4d29d561 | ||
|
|
c54909f2a3 | ||
|
|
23af649d7f | ||
|
|
88756a443a | ||
|
|
4a78f8fb43 | ||
|
|
6c8388ea5e | ||
|
|
75520bfaf9 | ||
|
|
3a4d9e64f8 | ||
|
|
209e30f7ef | ||
|
|
052e2a1a42 | ||
|
|
3aadccc2e8 | ||
|
|
5ae2fdee94 | ||
|
|
380512dcbe | ||
|
|
8e2a68887c | ||
|
|
eb1ecff7d8 | ||
|
|
8141723869 | ||
|
|
8cb701bda3 | ||
|
|
a8f3c3054b | ||
|
|
c5fb4227bf | ||
|
|
1b29746806 | ||
|
|
f98ad6ccab | ||
|
|
fb9c317256 | ||
|
|
0f1f2875ff | ||
|
|
a88b4ad06b | ||
|
|
172fda2157 | ||
|
|
4f0c45004a | ||
|
|
60de41e6fd | ||
|
|
cbbb4cdb8c | ||
|
|
8c5b919e72 | ||
|
|
47c05b75d0 | ||
|
|
2147ae9105 | ||
|
|
4a99afae3b | ||
|
|
119dcf9c97 | ||
|
|
b7d14ca48e | ||
|
|
37cd12fb21 | ||
|
|
ffb61503dc | ||
|
|
fbda0e38e1 | ||
|
|
bfd8fb1c23 | ||
|
|
c6760371ba | ||
|
|
8c704951e1 | ||
|
|
018f7808db | ||
|
|
24c23628d6 | ||
|
|
1d3c71fd10 | ||
|
|
e8d059fa77 | ||
|
|
3b4a9dc368 | ||
|
|
244ae33ad6 | ||
|
|
c1eb605195 | ||
|
|
0ee1818f12 | ||
|
|
31758cbe2b | ||
|
|
a4a1fa4ec9 | ||
|
|
c32e186133 | ||
|
|
3d325caa06 | ||
|
|
22141aba7b | ||
|
|
9b066b3b88 | ||
|
|
7ea7f5a967 | ||
|
|
38041b25fb | ||
|
|
3adeea8172 | ||
|
|
10c3641307 | ||
|
|
af9b03cfa5 | ||
|
|
806a2f0597 | ||
|
|
0cb9f7ab4f | ||
|
|
dc6c894cb8 | ||
|
|
3fa9b68882 | ||
|
|
0514f889d3 | ||
|
|
890841a818 | ||
|
|
aed71a6335 | ||
|
|
c910d35e25 | ||
|
|
0586a77043 | ||
|
|
b4b032693a | ||
|
|
054fd8798b | ||
|
|
35a7d907cd | ||
|
|
4c66cfe6e3 | ||
|
|
4360ad6502 | ||
|
|
841a2474af | ||
|
|
33b6f2cbc4 | ||
|
|
4680b6a497 | ||
|
|
c5727d366f | ||
|
|
a749a4654e | ||
|
|
3c8a71f39f | ||
|
|
ed7411294e | ||
|
|
aaecce7574 | ||
|
|
480e2a0fb5 | ||
|
|
a3a0f33ad4 | ||
|
|
089da40941 | ||
|
|
ce0d17e042 | ||
|
|
aba737ab48 | ||
|
|
a7c5d9e92a | ||
|
|
b2a377d7f1 | ||
|
|
1d65234073 | ||
|
|
38065791da | ||
|
|
086d2f0ba4 | ||
|
|
377e06d99a | ||
|
|
37cf1b2901 | ||
|
|
d9f280dc56 | ||
|
|
b207f9ea02 | ||
|
|
2690f8171e | ||
|
|
7136ac38d6 | ||
|
|
d4b5e98514 | ||
|
|
0ede0719c5 | ||
|
|
06124a0d94 | ||
|
|
d19d88e5dc | ||
|
|
b2d8b0bfe4 | ||
|
|
095ac3dfa5 | ||
|
|
a86edc69ac | ||
|
|
21bc4cdc9b | ||
|
|
b682ed7ad9 | ||
|
|
5e823d1f16 | ||
|
|
d32949d1d3 | ||
|
|
06c26c99bb | ||
|
|
22e599598a | ||
|
|
d666050e0c | ||
|
|
8018c586cd | ||
|
|
e73911c458 | ||
|
|
7e79b27823 | ||
|
|
5fa9ef05a6 | ||
|
|
f239b658e6 | ||
|
|
141c22ff67 | ||
|
|
23651ae510 | ||
|
|
45a1efe2ae | ||
|
|
06c135aab1 | ||
|
|
2203694b3f | ||
|
|
f7ab9646d0 | ||
|
|
a4959cad15 | ||
|
|
1c0a7e9bd9 | ||
|
|
cc46761e34 | ||
|
|
e1c3e7a3a6 | ||
|
|
baf85e7a80 | ||
|
|
147aad9221 | ||
|
|
41e0d39a5a | ||
|
|
91496b08bd | ||
|
|
b3d20effd6 | ||
|
|
2e0b9bd6b4 | ||
|
|
e497304b9d | ||
|
|
4b3e9432df | ||
|
|
1d67d50a20 | ||
|
|
f0c37bd69e | ||
|
|
21513f8df0 | ||
|
|
eb73b6b2f5 | ||
|
|
504378261b | ||
|
|
a5ceddc40a | ||
|
|
0fb23c4e5b | ||
|
|
40c7559905 | ||
|
|
edda622060 | ||
|
|
f1694707ee | ||
|
|
97ec9666ed | ||
|
|
7b91e9e164 | ||
|
|
ff0f1d8ce9 | ||
|
|
1e3c425e81 | ||
|
|
b2b5aeb08b | ||
|
|
01ab3be8d3 | ||
|
|
0d7ca88cc2 | ||
|
|
4fee774fe5 | ||
|
|
0d9f348e93 | ||
|
|
1ea0018a50 | ||
|
|
3bec8fe7d2 | ||
|
|
b2e3fb6354 | ||
|
|
7cedc501f7 | ||
|
|
296c5bd3d2 | ||
|
|
a2bddea1e2 | ||
|
|
53cd9f8b5f | ||
|
|
b344826c44 | ||
|
|
a0dc68ab9a | ||
|
|
22f2b5d0e5 | ||
|
|
c411900efd | ||
|
|
592aa93c40 | ||
|
|
6c02dd75fa | ||
|
|
39853d4949 | ||
|
|
2404f5d00f | ||
|
|
f84746274f | ||
|
|
45ce68e16e | ||
|
|
1aef576403 | ||
|
|
c3582f0aff | ||
|
|
8c4c0ff5e1 | ||
|
|
7b6334d447 | ||
|
|
bfd9be8280 | ||
|
|
96e1388dde | ||
|
|
fd64be1dcd | ||
|
|
64974a2c54 | ||
|
|
e363692822 | ||
|
|
d5d93ed147 | ||
|
|
c3547f29d0 | ||
|
|
989ba7bbe7 | ||
|
|
ac90d8036f | ||
|
|
644da707d2 | ||
|
|
86b48b8980 | ||
|
|
69c8791fc5 | ||
|
|
8b35679fcf | ||
|
|
cb8af0a02b | ||
|
|
0b442a2e1a | ||
|
|
f98e92b255 | ||
|
|
eca1836bd8 | ||
|
|
17e8cad005 | ||
|
|
48e89dd27e | ||
|
|
e9ef48b79c | ||
|
|
ab9df22e76 | ||
|
|
84f2ecd80f | ||
|
|
98f946c871 | ||
|
|
452d97f2d0 | ||
|
|
3f0e46230f | ||
|
|
fad3259290 | ||
|
|
5fd8678a3a | ||
|
|
86df9ac035 | ||
|
|
d4b342a35d | ||
|
|
8c87f5a384 | ||
|
|
984f676d6e | ||
|
|
0f213b08a6 | ||
|
|
3f997b416f | ||
|
|
f88e231780 | ||
|
|
fff95fcebd | ||
|
|
de17664c49 | ||
|
|
2b1826d2e6 | ||
|
|
b8d8ec640d | ||
|
|
e2c01e9e5d | ||
|
|
a55efdff18 | ||
|
|
3c1af200f8 | ||
|
|
dc8f676f75 | ||
|
|
a160f2e212 | ||
|
|
c1ce4f9a9f | ||
|
|
cceb6809e7 | ||
|
|
48b559472e | ||
|
|
cddc452693 | ||
|
|
0904a21e3f | ||
|
|
e800946898 | ||
|
|
e189034436 | ||
|
|
4590013adc | ||
|
|
66230199f8 | ||
|
|
1f1a2b660f | ||
|
|
b8b35194c9 | ||
|
|
4f36369ea1 | ||
|
|
33a906f11a | ||
|
|
82d11eeb47 | ||
|
|
fdef394070 | ||
|
|
a3a5630e88 | ||
|
|
9f7fd6a3a1 | ||
|
|
112a6f9942 | ||
|
|
60110a4302 | ||
|
|
4426e2adfe | ||
|
|
0028b3cf17 | ||
|
|
4867810ebe | ||
|
|
6b2476d220 | ||
|
|
b8bf66031b | ||
|
|
2596a150bf | ||
|
|
142d6c8993 | ||
|
|
a3309365fc | ||
|
|
9dcdb1bc8c | ||
|
|
2275daf3b0 | ||
|
|
d145cb508a | ||
|
|
7028fd21bc | ||
|
|
51adfd0254 | ||
|
|
6e2ed188eb | ||
|
|
2a3516d593 | ||
|
|
c2d984d470 | ||
|
|
1de2502fe9 | ||
|
|
6647575965 | ||
|
|
e5a60beba0 | ||
|
|
2804076bf6 | ||
|
|
f63abd9b6f | ||
|
|
4ebdc9d6ed | ||
|
|
6e364a0ab9 | ||
|
|
3233b9776f | ||
|
|
905bbf9118 | ||
|
|
d70e5dff45 | ||
|
|
c4fc0ed982 | ||
|
|
320922a13d | ||
|
|
9514977ce2 | ||
|
|
62d08dce56 | ||
|
|
71e36d264e | ||
|
|
7dc1672b24 | ||
|
|
50e40879de | ||
|
|
1c00461f4d | ||
|
|
6cc24e475a | ||
|
|
6c0dfd13eb | ||
|
|
4232284dae | ||
|
|
b8c4be7a3d | ||
|
|
6958fd0965 | ||
|
|
1f8726669b | ||
|
|
47d65931e6 | ||
|
|
b8a9ea452f | ||
|
|
c8a1f7f534 | ||
|
|
cbb78056c3 | ||
|
|
bfbb046b10 | ||
|
|
c34dc34e3e | ||
|
|
a1e48cc438 | ||
|
|
8b256caa6c | ||
|
|
f96d28a0a8 | ||
|
|
d3b9965283 | ||
|
|
f03d731b1d | ||
|
|
d4b41d892c | ||
|
|
09a5d7a35f | ||
|
|
ae83a11a8c | ||
|
|
291c513d3b | ||
|
|
8935de0809 | ||
|
|
4c0a55dbbb | ||
|
|
6080e456c5 | ||
|
|
cd065cc0db | ||
|
|
46929ce43f | ||
|
|
bda7f58ddd | ||
|
|
c940295663 | ||
|
|
8d2adfbbd2 | ||
|
|
d3b39048d8 | ||
|
|
02a5630f62 | ||
|
|
9d1c66296b | ||
|
|
be3e55acee | ||
|
|
3fd6f47f8b | ||
|
|
bbebca7951 | ||
|
|
07702379c3 | ||
|
|
7c8fa10be9 | ||
|
|
ffcc8ff32a | ||
|
|
6f42b4aafc | ||
|
|
ecd8890c0b | ||
|
|
f568aaf732 | ||
|
|
fbf98aa4d9 | ||
|
|
0f5ee780bc | ||
|
|
12ccbd48b9 | ||
|
|
67762458e4 | ||
|
|
3e3ac0d83f | ||
|
|
fa43aaba49 | ||
|
|
12fc7fbfd9 | ||
|
|
6969013439 | ||
|
|
32835f70b9 | ||
|
|
63cf78f64d | ||
|
|
8be7628668 | ||
|
|
37f0a7e6d9 | ||
|
|
e750ad8755 | ||
|
|
22882e35b4 | ||
|
|
afc40d9cca | ||
|
|
7cf607c34e | ||
|
|
e6c3744aaa | ||
|
|
7769e5e116 | ||
|
|
11502d2e92 | ||
|
|
fc428eeb2b | ||
|
|
a956627187 | ||
|
|
c178fa4677 | ||
|
|
25af60d8df | ||
|
|
9bf0addc9c | ||
|
|
094a9ed82f | ||
|
|
5e64be8580 | ||
|
|
a0b76a25be | ||
|
|
4764553e08 | ||
|
|
f87b4f6154 | ||
|
|
4ccec53e8d | ||
|
|
e7728ee7dd | ||
|
|
c06aa66854 | ||
|
|
7dd913b0dd | ||
|
|
6fb1afaa2f | ||
|
|
8cb92e3bd3 | ||
|
|
d9fcde8dbb | ||
|
|
2389a5d720 | ||
|
|
e2f2afad54 | ||
|
|
f632cf3155 | ||
|
|
bc77c6589d | ||
|
|
13dfdc3d9d | ||
|
|
62caf16153 | ||
|
|
1de179f683 | ||
|
|
8823068608 | ||
|
|
48857631a4 | ||
|
|
fd6796aae3 | ||
|
|
020a37ead9 | ||
|
|
b9b28e31f4 | ||
|
|
0489235c67 | ||
|
|
365d948a59 | ||
|
|
5bc8717d2b | ||
|
|
912b6b4a0d | ||
|
|
163a3afc0f | ||
|
|
fb96184401 | ||
|
|
35265718c1 | ||
|
|
d98e35d918 | ||
|
|
f8b54be896 | ||
|
|
a88ce075cc | ||
|
|
c6f3e36451 | ||
|
|
53dc452d61 | ||
|
|
ccaf2dc5b7 | ||
|
|
d2c7b13454 | ||
|
|
1366acd001 | ||
|
|
bdd2e9ab4d | ||
|
|
08b8be1ab2 | ||
|
|
5c46cb7c9b | ||
|
|
d9581a083d | ||
|
|
46738d4ba4 | ||
|
|
5d5df5ad1a | ||
|
|
ad36066126 | ||
|
|
a642ad6db9 | ||
|
|
e680259728 | ||
|
|
7b8887a9c8 | ||
|
|
1ce81fe466 | ||
|
|
3cf3159469 | ||
|
|
188a3fe3cc | ||
|
|
848c4bb979 | ||
|
|
b6ea73747d | ||
|
|
635c1bda6e | ||
|
|
0d1c3aa464 | ||
|
|
e1246ad375 | ||
|
|
8305cfed24 | ||
|
|
8c46c99ecc | ||
|
|
f7bbbbbe87 | ||
|
|
7b35692ce6 | ||
|
|
22fbb0ca13 | ||
|
|
3dccf9ee3f | ||
|
|
02be397e8f | ||
|
|
61469a28b9 | ||
|
|
24cf28f09a | ||
|
|
9ff54cead8 | ||
|
|
dbcbb187b2 | ||
|
|
71b4d672d4 | ||
|
|
93bba66323 | ||
|
|
0a95aa385a | ||
|
|
cab6394cba | ||
|
|
32140b360f | ||
|
|
b1290072b5 | ||
|
|
c82f169248 | ||
|
|
06a8481511 | ||
|
|
a481992c8e | ||
|
|
0434579ef5 | ||
|
|
59a955f491 | ||
|
|
d1ff87c0e6 | ||
|
|
47248bf0b7 | ||
|
|
0f49154b5d | ||
|
|
0507f95971 | ||
|
|
82220c801b | ||
|
|
2ffcfd2f57 | ||
|
|
e657052d17 | ||
|
|
d85767a838 | ||
|
|
e409ee8337 | ||
|
|
973a716481 | ||
|
|
cfbc75b564 | ||
|
|
78215439ee | ||
|
|
028c7f0604 | ||
|
|
e56d5ed3aa | ||
|
|
e5a8bd61b0 | ||
|
|
eeec57536b | ||
|
|
e3173810fd | ||
|
|
3b7f26d794 | ||
|
|
7fba61ff35 | ||
|
|
1bf156bdda | ||
|
|
6ff60080a1 | ||
|
|
1164e757de | ||
|
|
514e0b80a5 | ||
|
|
9d195d6fa0 | ||
|
|
1235452a1b | ||
|
|
35f4ab4941 | ||
|
|
16ff6341d0 | ||
|
|
e669f0e6b9 | ||
|
|
12ad3c2732 | ||
|
|
ac826cb9f1 | ||
|
|
9dab8679d6 | ||
|
|
d9c0c3cdbe | ||
|
|
4f3b25aa46 | ||
|
|
f737bcb9a0 | ||
|
|
4c78488644 | ||
|
|
3a8ad59e6c | ||
|
|
62f5f2c942 | ||
|
|
c56aeb08f5 | ||
|
|
ddc004a147 | ||
|
|
e4a3a7d0ca | ||
|
|
6ae813221e |
@@ -79,6 +79,20 @@ gitGraph
|
|||||||
commit id: "2023-08-10" tag: "2.7.9"
|
commit id: "2023-08-10" tag: "2.7.9"
|
||||||
checkout support/3.1
|
checkout support/3.1
|
||||||
commit id: "2023-12-20" tag: "3.1.1"
|
commit id: "2023-12-20" tag: "3.1.1"
|
||||||
|
checkout develop
|
||||||
|
commit id: "2024-01-15" tag: "Start 3.2" type: HIGHLIGHT
|
||||||
|
branch support/3.2 order: 830
|
||||||
|
checkout support/2.7
|
||||||
|
commit id: "2024-01-17a" tag: "2.7.10"
|
||||||
|
checkout support/3.0
|
||||||
|
commit id: "2024-01-17b" tag: "3.0.4"
|
||||||
|
checkout support/2.7
|
||||||
|
commit id: "2024-09-28" tag: "2.7.11"
|
||||||
|
checkout support/3.1
|
||||||
|
commit id: "2024-09-27" tag: "3.1.2"
|
||||||
|
checkout support/3.2
|
||||||
|
commit id: "2024-06-25" tag: "3.2.0-beta1" type: REVERSE
|
||||||
|
commit id: "2024-08-07" tag: "3.2.0"
|
||||||
```
|
```
|
||||||
|
|
||||||
To learn more, check the [iTop community versions history on the official wiki](https://www.itophub.io/wiki/page?id=latest:release:start).
|
To learn more, check the [iTop community versions history on the official wiki](https://www.itophub.io/wiki/page?id=latest:release:start).
|
||||||
|
|||||||
43
.github/workflows/action.yml
vendored
Normal file
43
.github/workflows/action.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
name: Add PRs to Combodo PRs Dashboard
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
add-to-project:
|
||||||
|
name: Add PR to Combodo Project
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check if author is a member of the organization
|
||||||
|
id: check-membership
|
||||||
|
run: |
|
||||||
|
ORG="Combodo"
|
||||||
|
AUTHOR=$(jq -r .pull_request.user.login "$GITHUB_EVENT_PATH")
|
||||||
|
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}" \
|
||||||
|
"https://api.github.com/orgs/$ORG/members/$AUTHOR")
|
||||||
|
if [ "$RESPONSE" == "404" ]; then
|
||||||
|
echo "project_url=https://github.com/orgs/Combodo/projects/5" >> $GITHUB_ENV
|
||||||
|
echo "is_member=false" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "project_url=https://github.com/orgs/Combodo/projects/4" >> $GITHUB_ENV
|
||||||
|
echo "is_member=true" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Add internal tag if member
|
||||||
|
if: env.is_member == 'true'
|
||||||
|
run: |
|
||||||
|
curl -X POST -H "Authorization: token ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
https://api.github.com/repos/Combodo/iTop/issues/${{ github.event.pull_request.number }}/labels \
|
||||||
|
-d '{"labels":["internal"]}'
|
||||||
|
env:
|
||||||
|
is_member: ${{ env.is_member }}
|
||||||
|
|
||||||
|
- name: Add PR to the appropriate project
|
||||||
|
uses: actions/add-to-project@v1.0.2
|
||||||
|
with:
|
||||||
|
project-url: ${{ env.project_url }}
|
||||||
|
github-token: ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -50,6 +50,9 @@ tests/*/vendor/*
|
|||||||
# NPM: `jquery-ui` package is just there for vulnerability scans, so we don't want to version its files (only `jquery-ui-dist` is used within the code base)
|
# NPM: `jquery-ui` package is just there for vulnerability scans, so we don't want to version its files (only `jquery-ui-dist` is used within the code base)
|
||||||
/node_modules/jquery-ui/**
|
/node_modules/jquery-ui/**
|
||||||
|
|
||||||
|
# Symfony: Local env file
|
||||||
|
/resources/symfony/.env.local
|
||||||
|
|
||||||
# PHPUnit: Cache file, local XML working copies
|
# PHPUnit: Cache file, local XML working copies
|
||||||
/tests/php-unit-tests/.phpunit.result.cache
|
/tests/php-unit-tests/.phpunit.result.cache
|
||||||
/tests/php-unit-tests/phpunit.xml
|
/tests/php-unit-tests/phpunit.xml
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2010-2023 Combodo SARL
|
* Copyright (C) 2010-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
@@ -27,7 +27,7 @@ $iTopFolder = __DIR__."/../../../";
|
|||||||
require_once("$iTopFolder/approot.inc.php");
|
require_once("$iTopFolder/approot.inc.php");
|
||||||
require_once(APPROOT."/application/utils.inc.php");
|
require_once(APPROOT."/application/utils.inc.php");
|
||||||
|
|
||||||
if (php_sapi_name() !== 'cli')
|
if (PHP_SAPI !== 'cli')
|
||||||
{
|
{
|
||||||
throw new \Exception('This script can only run from CLI');
|
throw new \Exception('This script can only run from CLI');
|
||||||
}
|
}
|
||||||
@@ -48,4 +48,4 @@ if (!file_exists($sCssFile))
|
|||||||
{
|
{
|
||||||
fwrite(STDERR, "Failed to compile $sCssFile, exiting.");
|
fwrite(STDERR, "Failed to compile $sCssFile, exiting.");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2010-2023 Combodo SARL
|
* Copyright (C) 2010-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2010-2023 Combodo SARL
|
* Copyright (C) 2010-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2010-2023 Combodo SARL
|
* Copyright (C) 2010-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
@@ -53,12 +53,12 @@ switch ($sDependenciesHandlerCode) {
|
|||||||
|
|
||||||
// Start handler
|
// Start handler
|
||||||
$oDependenciesHandler = new $sDependenciesHandlerFQCN();
|
$oDependenciesHandler = new $sDependenciesHandlerFQCN();
|
||||||
$aDeniedButStillPresent = $oDependenciesHandler->ListDeniedButStillPresentFoldersAbsPaths();
|
$aDeniedButStillPresent = $oDependenciesHandler->ListDeniedButStillPresentFilesAbsPaths();
|
||||||
|
|
||||||
echo "\n";
|
echo "\n";
|
||||||
foreach ($aDeniedButStillPresent as $sDir)
|
foreach ($aDeniedButStillPresent as $sDir)
|
||||||
{
|
{
|
||||||
if (false === $oDependenciesHandler::IsQuestionnableFolder($sDir))
|
if (false === $oDependenciesHandler::IsQuestionnableFile($sDir))
|
||||||
{
|
{
|
||||||
echo "ERROR found INVALID denied test dir: '$sDir'\n";
|
echo "ERROR found INVALID denied test dir: '$sDir'\n";
|
||||||
throw new \RuntimeException("$sDir is in the denied list but doesn't comply with the rule (see IsQuestionnableFolder method)");
|
throw new \RuntimeException("$sDir is in the denied list but doesn't comply with the rule (see IsQuestionnableFolder method)");
|
||||||
@@ -70,7 +70,12 @@ foreach ($aDeniedButStillPresent as $sDir)
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SetupUtils::rrmdir($sDir);
|
if(is_dir($sDir)){
|
||||||
|
SetupUtils::rrmdir($sDir);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
unlink($sDir);
|
||||||
|
}
|
||||||
echo "✔️ Remove denied test dir: '$sDir'\n";
|
echo "✔️ Remove denied test dir: '$sDir'\n";
|
||||||
}
|
}
|
||||||
catch (\Exception $e) {
|
catch (\Exception $e) {
|
||||||
@@ -80,10 +85,10 @@ foreach ($aDeniedButStillPresent as $sDir)
|
|||||||
|
|
||||||
|
|
||||||
$aAllowedAndDeniedDirs = array_merge(
|
$aAllowedAndDeniedDirs = array_merge(
|
||||||
$oDependenciesHandler->ListAllowedFoldersAbsPaths(),
|
$oDependenciesHandler->ListAllowedFilesAbsPaths(),
|
||||||
$oDependenciesHandler->ListDeniedFoldersAbsPaths()
|
$oDependenciesHandler->ListDeniedFilesAbsPaths()
|
||||||
);
|
);
|
||||||
$aExistingDirs = $oDependenciesHandler->ListAllFoldersAbsPaths();
|
$aExistingDirs = $oDependenciesHandler->ListAllFilesAbsPaths();
|
||||||
$aMissing = array_diff($aExistingDirs, $aAllowedAndDeniedDirs);
|
$aMissing = array_diff($aExistingDirs, $aAllowedAndDeniedDirs);
|
||||||
if (false === empty($aMissing)) {
|
if (false === empty($aMissing)) {
|
||||||
echo "Some new tests dirs exists !\n"
|
echo "Some new tests dirs exists !\n"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
/**
|
/**
|
||||||
* UserRightsMatrix (User management Module)
|
* UserRightsMatrix (User management Module)
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
* UserRightsNull
|
* UserRightsNull
|
||||||
* User management Module - say Yeah! to everything
|
* User management Module - say Yeah! to everything
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -648,7 +648,7 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
$aConditions = array();
|
$aConditions = array();
|
||||||
|
|
||||||
// Determine if this class is part of a silo and build the filter for it
|
// Determine if this class is part of a silo and build the filter for it
|
||||||
$sAttCode = self::GetOwnerOrganizationAttCode($sClass);
|
$sAttCode = UserRights::GetOwnerOrganizationAttCode($sClass);
|
||||||
if (!is_null($sAttCode))
|
if (!is_null($sAttCode))
|
||||||
{
|
{
|
||||||
$aUserOrgs = $this->GetUserOrgs($oUser, $sClass);
|
$aUserOrgs = $this->GetUserOrgs($oUser, $sClass);
|
||||||
@@ -834,7 +834,7 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
// But currently we are checking wether the objects might be written...
|
// But currently we are checking wether the objects might be written...
|
||||||
// Let's exclude the objects based on the relevant criteria
|
// Let's exclude the objects based on the relevant criteria
|
||||||
|
|
||||||
$sOrgAttCode = self::GetOwnerOrganizationAttCode($sClass);
|
$sOrgAttCode = UserRights::GetOwnerOrganizationAttCode($sClass);
|
||||||
if (!is_null($sOrgAttCode))
|
if (!is_null($sOrgAttCode))
|
||||||
{
|
{
|
||||||
$aUserOrgs = $this->GetUserOrgs($oUser, $sClass);
|
$aUserOrgs = $this->GetUserOrgs($oUser, $sClass);
|
||||||
@@ -938,31 +938,11 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
* @param string $sClass
|
* @param string $sClass
|
||||||
* @return string|null Find out which attribute is corresponding the dimension 'owner org'
|
* @return string|null Find out which attribute is corresponding the dimension 'owner org'
|
||||||
* returns null if no such attribute has been found (no filtering should occur)
|
* returns null if no such attribute has been found (no filtering should occur)
|
||||||
|
* @deprecated 3.3.0 use @UserRights::GetOwnerOrganizationAttCode instead
|
||||||
*/
|
*/
|
||||||
public static function GetOwnerOrganizationAttCode($sClass)
|
public static function GetOwnerOrganizationAttCode($sClass)
|
||||||
{
|
{
|
||||||
$sAttCode = null;
|
return UserRights::GetOwnerOrganizationAttCode($sClass);
|
||||||
|
|
||||||
$aCallSpec = array($sClass, 'MapContextParam');
|
|
||||||
if (($sClass == 'Organization') || is_subclass_of($sClass, 'Organization'))
|
|
||||||
{
|
|
||||||
$sAttCode = 'id';
|
|
||||||
}
|
|
||||||
elseif (is_callable($aCallSpec))
|
|
||||||
{
|
|
||||||
$sAttCode = call_user_func($aCallSpec, 'org_id'); // Returns null when there is no mapping for this parameter
|
|
||||||
if (!MetaModel::IsValidAttCode($sClass, $sAttCode))
|
|
||||||
{
|
|
||||||
// Skip silently. The data model checker will tell you something about this...
|
|
||||||
$sAttCode = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif(MetaModel::IsValidAttCode($sClass, 'org_id'))
|
|
||||||
{
|
|
||||||
$sAttCode = 'org_id';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $sAttCode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
@@ -778,7 +778,7 @@ exit;
|
|||||||
|
|
||||||
// Determine how to position the objects of this class
|
// Determine how to position the objects of this class
|
||||||
//
|
//
|
||||||
$sAttCode = self::GetOwnerOrganizationAttCode($sClass);
|
$sAttCode = UserRights::GetOwnerOrganizationAttCode($sClass);
|
||||||
if (is_null($sAttCode))
|
if (is_null($sAttCode))
|
||||||
{
|
{
|
||||||
// No filtering for this object
|
// No filtering for this object
|
||||||
@@ -909,7 +909,7 @@ exit;
|
|||||||
// But currently we are checking wether the objects might be written...
|
// But currently we are checking wether the objects might be written...
|
||||||
// Let's exclude the objects based on the relevant criteria
|
// Let's exclude the objects based on the relevant criteria
|
||||||
|
|
||||||
$sOrgAttCode = self::GetOwnerOrganizationAttCode($sClass);
|
$sOrgAttCode = UserRights::GetOwnerOrganizationAttCode($sClass);
|
||||||
if (!is_null($sOrgAttCode))
|
if (!is_null($sOrgAttCode))
|
||||||
{
|
{
|
||||||
$aUserOrgs = $this->GetUserOrgs($oUser, $sClass);
|
$aUserOrgs = $this->GetUserOrgs($oUser, $sClass);
|
||||||
@@ -1015,28 +1015,7 @@ exit;
|
|||||||
*/
|
*/
|
||||||
public static function GetOwnerOrganizationAttCode($sClass)
|
public static function GetOwnerOrganizationAttCode($sClass)
|
||||||
{
|
{
|
||||||
$sAttCode = null;
|
return UserRights::GetOwnerOrganizationAttCode($sClass);;
|
||||||
|
|
||||||
$aCallSpec = array($sClass, 'MapContextParam');
|
|
||||||
if (($sClass == 'Organization') || is_subclass_of($sClass, 'Organization'))
|
|
||||||
{
|
|
||||||
$sAttCode = 'id';
|
|
||||||
}
|
|
||||||
elseif (is_callable($aCallSpec))
|
|
||||||
{
|
|
||||||
$sAttCode = call_user_func($aCallSpec, 'org_id'); // Returns null when there is no mapping for this parameter
|
|
||||||
if (!MetaModel::IsValidAttCode($sClass, $sAttCode))
|
|
||||||
{
|
|
||||||
// Skip silently. The data model checker will tell you something about this...
|
|
||||||
$sAttCode = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif(MetaModel::IsValidAttCode($sClass, 'org_id'))
|
|
||||||
{
|
|
||||||
$sAttCode = 'org_id';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $sAttCode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
2
app.php
2
app.php
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,331 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace Html2Text;
|
|
||||||
|
|
||||||
if (!function_exists('mb_split'))
|
|
||||||
{
|
|
||||||
function mb_split($pattern, $subject, $limit = -1)
|
|
||||||
{
|
|
||||||
return preg_split('/'.$pattern.'/', $subject, $limit);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Replace all occurrences of the search string with the replacement string.
|
|
||||||
*
|
|
||||||
* @author Sean Murphy <sean@iamseanmurphy.com>
|
|
||||||
* @copyright Copyright 2012 Sean Murphy. All rights reserved.
|
|
||||||
* @license http://creativecommons.org/publicdomain/zero/1.0/
|
|
||||||
* @link http://php.net/manual/function.str-replace.php
|
|
||||||
*
|
|
||||||
* @param mixed $search
|
|
||||||
* @param mixed $replace
|
|
||||||
* @param mixed $subject
|
|
||||||
* @param int $count
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
function mb_str_replace($search, $replace, $subject, &$count = 0) {
|
|
||||||
if (!is_array($subject)) {
|
|
||||||
// Normalize $search and $replace so they are both arrays of the same length
|
|
||||||
$searches = is_array($search) ? array_values($search) : array($search);
|
|
||||||
$replacements = is_array($replace) ? array_values($replace) : array($replace);
|
|
||||||
$replacements = array_pad($replacements, count($searches), '');
|
|
||||||
foreach ($searches as $key => $search) {
|
|
||||||
$parts = mb_split(preg_quote($search), $subject);
|
|
||||||
if (is_array($parts))
|
|
||||||
{
|
|
||||||
$count += count($parts) - 1;
|
|
||||||
$subject = implode($replacements[$key], $parts);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Call mb_str_replace for each subject in array, recursively
|
|
||||||
foreach ($subject as $key => $value) {
|
|
||||||
$subject[$key] = mb_str_replace($search, $replace, $value, $count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $subject;
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* Copyright (c) 2010 Jevon Wright and others.
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
*
|
|
||||||
* or
|
|
||||||
*
|
|
||||||
* LGPL which is available at http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jevon Wright - initial API and implementation
|
|
||||||
* Denis Flaven - some fixes for properly handling UTF-8 characters
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
class Html2Text {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tries to convert the given HTML into a plain text format - best suited for
|
|
||||||
* e-mail display, etc.
|
|
||||||
*
|
|
||||||
* <p>In particular, it tries to maintain the following features:
|
|
||||||
* <ul>
|
|
||||||
* <li>Links are maintained, with the 'href' copied over
|
|
||||||
* <li>Information in the <head> is lost
|
|
||||||
* </ul>
|
|
||||||
*
|
|
||||||
* @param string html the input HTML
|
|
||||||
* @return string the HTML converted, as best as possible, to text
|
|
||||||
* @throws Html2TextException if the HTML could not be loaded as a {@link DOMDocument}
|
|
||||||
*/
|
|
||||||
static function convert($html) {
|
|
||||||
// replace with spaces
|
|
||||||
|
|
||||||
$html = str_replace(" ", " ", $html);
|
|
||||||
$html = mb_str_replace("\xc2\xa0", " ", $html); // DO NOT USE str_replace since it breaks the "à" character which is \xc3 \xa0 in UTF-8
|
|
||||||
|
|
||||||
$html = static::fixNewlines($html);
|
|
||||||
|
|
||||||
$doc = new \DOMDocument();
|
|
||||||
if (!@$doc->loadHTML('<?xml encoding="UTF-8">'.$html)) // Forces the UTF-8 character set for HTML fragments
|
|
||||||
{
|
|
||||||
throw new Html2TextException("Could not load HTML - badly formed?", $html);
|
|
||||||
}
|
|
||||||
|
|
||||||
$output = static::iterateOverNode($doc);
|
|
||||||
|
|
||||||
// remove leading and trailing spaces on each line
|
|
||||||
$output = preg_replace("/[ \t]*\n[ \t]*/im", "\n", $output);
|
|
||||||
$output = preg_replace("/ *\t */im", "\t", $output);
|
|
||||||
|
|
||||||
// remove unnecessary empty lines
|
|
||||||
$output = preg_replace("/\n\n\n*/im", "\n\n", $output);
|
|
||||||
|
|
||||||
// remove leading and trailing whitespace
|
|
||||||
$output = trim($output);
|
|
||||||
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unify newlines; in particular, \r\n becomes \n, and
|
|
||||||
* then \r becomes \n. This means that all newlines (Unix, Windows, Mac)
|
|
||||||
* all become \ns.
|
|
||||||
*
|
|
||||||
* @param string text text with any number of \r, \r\n and \n combinations
|
|
||||||
* @return string the fixed text
|
|
||||||
*/
|
|
||||||
static function fixNewlines($text) {
|
|
||||||
// replace \r\n to \n
|
|
||||||
$text = str_replace("\r\n", "\n", $text);
|
|
||||||
// remove \rs
|
|
||||||
$text = str_replace("\r", "\n", $text);
|
|
||||||
|
|
||||||
return $text;
|
|
||||||
}
|
|
||||||
|
|
||||||
static function nextChildName($node) {
|
|
||||||
// get the next child
|
|
||||||
$nextNode = $node->nextSibling;
|
|
||||||
while ($nextNode != null) {
|
|
||||||
if ($nextNode instanceof \DOMElement) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$nextNode = $nextNode->nextSibling;
|
|
||||||
}
|
|
||||||
$nextName = null;
|
|
||||||
if ($nextNode instanceof \DOMElement && $nextNode != null) {
|
|
||||||
$nextName = strtolower($nextNode->nodeName);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $nextName;
|
|
||||||
}
|
|
||||||
|
|
||||||
static function prevChildName($node) {
|
|
||||||
// get the previous child
|
|
||||||
$nextNode = $node->previousSibling;
|
|
||||||
while ($nextNode != null) {
|
|
||||||
if ($nextNode instanceof \DOMElement) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$nextNode = $nextNode->previousSibling;
|
|
||||||
}
|
|
||||||
$nextName = null;
|
|
||||||
if ($nextNode instanceof \DOMElement && $nextNode != null) {
|
|
||||||
$nextName = strtolower($nextNode->nodeName);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $nextName;
|
|
||||||
}
|
|
||||||
|
|
||||||
static function iterateOverNode($node) {
|
|
||||||
if ($node instanceof \DOMText) {
|
|
||||||
// Replace whitespace characters with a space (equivilant to \s)
|
|
||||||
return preg_replace("/[\\t\\n\\f\\r ]+/im", " ", $node->wholeText);
|
|
||||||
}
|
|
||||||
if ($node instanceof \DOMDocumentType) {
|
|
||||||
// ignore
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
$nextName = static::nextChildName($node);
|
|
||||||
$prevName = static::prevChildName($node);
|
|
||||||
|
|
||||||
$name = strtolower($node->nodeName);
|
|
||||||
|
|
||||||
// start whitespace
|
|
||||||
switch ($name) {
|
|
||||||
case "hr":
|
|
||||||
return "---------------------------------------------------------------\n";
|
|
||||||
|
|
||||||
case "style":
|
|
||||||
case "head":
|
|
||||||
case "title":
|
|
||||||
case "meta":
|
|
||||||
case "script":
|
|
||||||
// ignore these tags
|
|
||||||
return "";
|
|
||||||
|
|
||||||
case "h1":
|
|
||||||
case "h2":
|
|
||||||
case "h3":
|
|
||||||
case "h4":
|
|
||||||
case "h5":
|
|
||||||
case "h6":
|
|
||||||
case "ol":
|
|
||||||
case "ul":
|
|
||||||
// add two newlines, second line is added below
|
|
||||||
$output = "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "td":
|
|
||||||
case "th":
|
|
||||||
// add tab char to separate table fields
|
|
||||||
$output = "\t";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "tr":
|
|
||||||
case "p":
|
|
||||||
case "div":
|
|
||||||
// add one line
|
|
||||||
$output = "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "li":
|
|
||||||
$output = "- ";
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// print out contents of unknown tags
|
|
||||||
$output = "";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// debug
|
|
||||||
//$output .= "[$name,$nextName]";
|
|
||||||
|
|
||||||
if (isset($node->childNodes)) {
|
|
||||||
for ($i = 0; $i < $node->childNodes->length; $i++) {
|
|
||||||
$n = $node->childNodes->item($i);
|
|
||||||
|
|
||||||
$text = static::iterateOverNode($n);
|
|
||||||
|
|
||||||
$output .= $text;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// end whitespace
|
|
||||||
switch ($name) {
|
|
||||||
case "h1":
|
|
||||||
case "h2":
|
|
||||||
case "h3":
|
|
||||||
case "h4":
|
|
||||||
case "h5":
|
|
||||||
case "h6":
|
|
||||||
$output .= "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "p":
|
|
||||||
case "br":
|
|
||||||
// add one line
|
|
||||||
if ($nextName != "div")
|
|
||||||
$output .= "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "div":
|
|
||||||
// add one line only if the next child isn't a div
|
|
||||||
if ($nextName != "div" && $nextName != null)
|
|
||||||
$output .= "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "a":
|
|
||||||
// links are returned in [text](link) format
|
|
||||||
$href = $node->getAttribute("href");
|
|
||||||
|
|
||||||
$output = trim($output);
|
|
||||||
|
|
||||||
// remove double [[ ]] s from linking images
|
|
||||||
if (substr($output, 0, 1) == "[" && substr($output, -1) == "]") {
|
|
||||||
$output = substr($output, 1, strlen($output) - 2);
|
|
||||||
|
|
||||||
// for linking images, the title of the <a> overrides the title of the <img>
|
|
||||||
if ($node->getAttribute("title")) {
|
|
||||||
$output = $node->getAttribute("title");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if there is no link text, but a title attr
|
|
||||||
if (!$output && $node->getAttribute("title")) {
|
|
||||||
$output = $node->getAttribute("title");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($href == null) {
|
|
||||||
// it doesn't link anywhere
|
|
||||||
if ($node->getAttribute("name") != null) {
|
|
||||||
$output = "[$output]";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ($href == $output || $href == "mailto:$output" || $href == "http://$output" || $href == "https://$output") {
|
|
||||||
// link to the same address: just use link
|
|
||||||
$output;
|
|
||||||
} else {
|
|
||||||
// replace it
|
|
||||||
if ($output) {
|
|
||||||
$output = "[$output]($href)";
|
|
||||||
} else {
|
|
||||||
// empty string
|
|
||||||
$output = $href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// does the next node require additional whitespace?
|
|
||||||
switch ($nextName) {
|
|
||||||
case "h1": case "h2": case "h3": case "h4": case "h5": case "h6":
|
|
||||||
$output .= "\n";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "img":
|
|
||||||
if ($node->getAttribute("title")) {
|
|
||||||
$output = "[" . $node->getAttribute("title") . "]";
|
|
||||||
} elseif ($node->getAttribute("alt")) {
|
|
||||||
$output = "[" . $node->getAttribute("alt") . "]";
|
|
||||||
} else {
|
|
||||||
$output = "";
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "li":
|
|
||||||
$output .= "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* Copyright (c) 2010 Jevon Wright and others.
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
*
|
|
||||||
* or
|
|
||||||
*
|
|
||||||
* LGPL which is available at http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jevon Wright - initial API and implementation
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
namespace Html2Text;
|
|
||||||
|
|
||||||
class Html2TextException extends \Exception {
|
|
||||||
var $more_info;
|
|
||||||
|
|
||||||
public function __construct($message = "", $more_info = "") {
|
|
||||||
parent::__construct($message);
|
|
||||||
$this->more_info = $more_info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/AjaxPage.php, now loadable using autoloader
|
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/AjaxPage.php, now loadable using autoloader
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// cannot notify depreciation for now as this is still load in autoloader
|
// cannot notify depreciation for now as this is still load in autoloader
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Class ApplicationContext
|
* Class ApplicationContext
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
@@ -31,7 +31,7 @@ require_once(APPROOT.'application/newsroomprovider.class.inc.php');
|
|||||||
* Definition of interfaces that can be implemented to customize iTop.
|
* Definition of interfaces that can be implemented to customize iTop.
|
||||||
* You may implement such interfaces in a module file (e.g. main.mymodule.php)
|
* You may implement such interfaces in a module file (e.g. main.mymodule.php)
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*/
|
*/
|
||||||
@@ -64,13 +64,13 @@ interface iLoginFSMExtension extends iLoginExtension
|
|||||||
* If a page is displayed, the action must exit at this point
|
* If a page is displayed, the action must exit at this point
|
||||||
* if LoginWebPage::LOGIN_FSM_RETURN_ERROR is returned $iErrorCode must be set
|
* if LoginWebPage::LOGIN_FSM_RETURN_ERROR is returned $iErrorCode must be set
|
||||||
* if LoginWebPage::LOGIN_FSM_RETURN_OK is returned then the login is OK and terminated
|
* if LoginWebPage::LOGIN_FSM_RETURN_OK is returned then the login is OK and terminated
|
||||||
* if LoginWebPage::LOGIN_FSM_RETURN_IGNORE is returned then the FSM will proceed to next plugin or state
|
* if LoginWebPage::LOGIN_FSM_CONTINUE is returned then the FSM will proceed to next plugin or state
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
* @param string $sLoginState (see LoginWebPage::LOGIN_STATE_...)
|
* @param string $sLoginState (see LoginWebPage::LOGIN_STATE_...)
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
public function LoginAction($sLoginState, &$iErrorCode);
|
public function LoginAction($sLoginState, &$iErrorCode);
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,7 @@ interface iLoginFSMExtension extends iLoginExtension
|
|||||||
* * If a page is displayed, the action must exit at this point
|
* * If a page is displayed, the action must exit at this point
|
||||||
* * if LoginWebPage::LOGIN_FSM_RETURN_ERROR is returned $iErrorCode must be set
|
* * if LoginWebPage::LOGIN_FSM_RETURN_ERROR is returned $iErrorCode must be set
|
||||||
* * if LoginWebPage::LOGIN_FSM_RETURN_OK is returned then the login is OK and terminated
|
* * if LoginWebPage::LOGIN_FSM_RETURN_OK is returned then the login is OK and terminated
|
||||||
* * if LoginWebPage::LOGIN_FSM_RETURN_IGNORE is returned then the FSM will proceed to next plugin or to next state
|
* * if LoginWebPage::LOGIN_FSM_CONTINUE is returned then the FSM will proceed to next plugin or to next state
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
* @package LoginExtensibilityAPI
|
* @package LoginExtensibilityAPI
|
||||||
@@ -136,7 +136,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnStart(&$iErrorCode)
|
protected function OnStart(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -150,7 +150,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnModeDetection(&$iErrorCode)
|
protected function OnModeDetection(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -167,7 +167,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnReadCredentials(&$iErrorCode)
|
protected function OnReadCredentials(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -181,7 +181,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnCheckCredentials(&$iErrorCode)
|
protected function OnCheckCredentials(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -192,7 +192,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnCredentialsOK(&$iErrorCode)
|
protected function OnCredentialsOK(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -203,7 +203,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnUsersOK(&$iErrorCode)
|
protected function OnUsersOK(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -214,7 +214,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnConnected(&$iErrorCode)
|
protected function OnConnected(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -225,7 +225,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnError(&$iErrorCode)
|
protected function OnError(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -2297,3 +2297,75 @@ interface iBackupExtraFilesExtension
|
|||||||
*/
|
*/
|
||||||
public function GetExtraFilesRelPaths(): array;
|
public function GetExtraFilesRelPaths(): array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface to provide messages to be displayed in the "Welcome Popup"
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
interface iWelcomePopupExtension
|
||||||
|
{
|
||||||
|
// Importance for ordering messages
|
||||||
|
// Just two levels since less important messages have nothing to do in the welcome popup
|
||||||
|
public const ENUM_IMPORTANCE_CRITICAL = 0;
|
||||||
|
public const ENUM_IMPORTANCE_HIGH = 1;
|
||||||
|
public const DEFAULT_IMPORTANCE = self::ENUM_IMPORTANCE_HIGH;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overload this method if you need to display an icon representing the provider (eg. your own company logo, module icon, ...)
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
* @return string Relative path (from app. root) of the icon representing the provider
|
||||||
|
*/
|
||||||
|
public function GetIconRelPath(): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api
|
||||||
|
* @return \Combodo\iTop\Application\WelcomePopup\Message[]
|
||||||
|
*/
|
||||||
|
public function GetMessages(): array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overload this method if the provider needs to do some additional processing after the message ($sMessageId) has been acknowledged by the current user
|
||||||
|
*
|
||||||
|
* @param string $sMessageId
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
public function AcknowledgeMessage(string $sMessageId): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inherit from this class to provide messages to be displayed in the "Welcome Popup"
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
abstract class AbstractWelcomePopupExtension implements iWelcomePopupExtension
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function GetIconRelPath(): string
|
||||||
|
{
|
||||||
|
return \Combodo\iTop\Application\Branding::$aLogoPaths[\Combodo\iTop\Application\Branding::ENUM_LOGO_TYPE_MAIN_LOGO_COMPACT]['default'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function GetMessages(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function AcknowledgeMessage(string $sMessageId): void
|
||||||
|
{
|
||||||
|
// No need to process the acknowledgment notice by default
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
* to check and is linked to a set of rules that determine the valid or invalid objects
|
* to check and is linked to a set of rules that determine the valid or invalid objects
|
||||||
* inside the set
|
* inside the set
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
* to check and is linked to a set of rules that determine the valid or invalid objects
|
* to check and is linked to a set of rules that determine the valid or invalid objects
|
||||||
* inside the set
|
* inside the set
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
* or the "bad" ones. The core audit engines computes the complement to the definition
|
* or the "bad" ones. The core audit engines computes the complement to the definition
|
||||||
* set when needed to obtain either the valid objects, or the ones with an error
|
* set when needed to obtain either the valid objects, or the ones with an error
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CaptureWebPage.php, now loadable using autoloader
|
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CaptureWebPage.php, now loadable using autoloader
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CaptureWebPage.php, now loadable using autoloader');
|
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CaptureWebPage.php, now loadable using autoloader');
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CLIPage.php, now loadable using autoloader
|
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CLIPage.php, now loadable using autoloader
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CLIPage.php, now loadable using autoloader');
|
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CLIPage.php, now loadable using autoloader');
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -1061,11 +1061,6 @@ HTML
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fields with CKEditor need to have the highlight.js lib loaded even if they are in read-only, as it is needed to format code snippets
|
|
||||||
if ($bHasFieldsWithRichTextEditor) {
|
|
||||||
WebResourcesHelper::EnableCKEditorToWebPage($oPage);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $aFieldsMap;
|
return $aFieldsMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2308,7 +2303,7 @@ JS
|
|||||||
$sHidden = "<input type=\"hidden\" id=\"{$iId}_count\" value=\"$iEntriesCount\"/>"; // To know how many entries the case log already contains
|
$sHidden = "<input type=\"hidden\" id=\"{$iId}_count\" value=\"$iEntriesCount\"/>"; // To know how many entries the case log already contains
|
||||||
|
|
||||||
$sHTMLValue = "$sHeader<div class=\"ibo-caselog-entry-form--text-input\" $sStyle data-role=\"ibo-caselog-entry-form--text-input\">";
|
$sHTMLValue = "$sHeader<div class=\"ibo-caselog-entry-form--text-input\" $sStyle data-role=\"ibo-caselog-entry-form--text-input\">";
|
||||||
$sHTMLValue .= "<textarea class=\"htmlEditor ibo-input-richtext-placeholder\" style=\"border:0;width:100%\" title=\"$sHelpText\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" rows=\"8\" cols=\"40\" id=\"$iId\">".utils::EscapeHtml($sEditValue)."</textarea>";
|
$sHTMLValue .= "<textarea class=\"htmlEditor ibo-input-richtext-placeholder\" style=\"border:0;width:100%\" title=\"$sHelpText\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" rows=\"8\" cols=\"40\" id=\"$iId\">".CKEditorHelper::PrepareCKEditorValueTextEncodingForTextarea($sEditValue)."</textarea>";
|
||||||
$sHTMLValue .= "$sPreviousLog</div>{$sValidationSpan}{$sReloadSpan}$sHidden";
|
$sHTMLValue .= "$sPreviousLog</div>{$sValidationSpan}{$sReloadSpan}$sHidden";
|
||||||
|
|
||||||
// Note: This should be refactored for all types of attribute (see at the end of this function) but as we are doing this for a maintenance release, we are scheduling it for the next main release in to order to avoid regressions as much as possible.
|
// Note: This should be refactored for all types of attribute (see at the end of this function) but as we are doing this for a maintenance release, we are scheduling it for the next main release in to order to avoid regressions as much as possible.
|
||||||
@@ -2320,39 +2315,10 @@ JS
|
|||||||
|
|
||||||
$oPage->add_ready_script("$('#$iId').on('keyup change validate', function(evt, sFormId) { return ValidateCaseLogField('$iId', $bMandatory, sFormId, $sNullValue, $sOriginalValue) } );"); // Custom validation function
|
$oPage->add_ready_script("$('#$iId').on('keyup change validate', function(evt, sFormId) { return ValidateCaseLogField('$iId', $bMandatory, sFormId, $sNullValue, $sOriginalValue) } );"); // Custom validation function
|
||||||
|
|
||||||
// Replace the text area with CKEditor
|
// configure CKEditor
|
||||||
// To change the default settings of the editor,
|
CKEditorHelper::ConfigureCKEditorElementForWebPage($oPage, $iId, $sOriginalValue, true, [
|
||||||
// a) edit the file /js/ckeditor/config.js
|
'placeholder' => Dict::S('UI:CaseLogTypeYourTextHere'),
|
||||||
// b) or override some of the configuration settings, using the second parameter of ckeditor()
|
]);
|
||||||
$aConfig = CKEditorHelper::GetCkeditorPref();
|
|
||||||
$aConfig['placeholder'] = Dict::S('UI:CaseLogTypeYourTextHere');
|
|
||||||
|
|
||||||
// - Final config
|
|
||||||
$sConfigJS = json_encode($aConfig);
|
|
||||||
|
|
||||||
WebResourcesHelper::EnableCKEditorToWebPage($oPage);
|
|
||||||
$oPage->add_ready_script("CombodoCKEditorHandler.CreateInstance('#$iId')");
|
|
||||||
|
|
||||||
$oPage->add_ready_script(
|
|
||||||
<<<EOF
|
|
||||||
$('#$iId').on('update', function(evt){
|
|
||||||
BlockField('cke_$iId', $('#$iId').attr('disabled'));
|
|
||||||
//Delayed execution - ckeditor must be properly initialized before setting readonly
|
|
||||||
var retryCount = 0;
|
|
||||||
var oMe = $('#$iId');
|
|
||||||
var delayedSetReadOnly = function () {
|
|
||||||
if (oMe.data('ckeditorInstance').editable() == undefined && retryCount++ < 10) {
|
|
||||||
setTimeout(delayedSetReadOnly, retryCount * 100); //Wait a while longer each iteration
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
oMe.data('ckeditorInstance').setReadOnly(oMe.prop('disabled'));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
setTimeout(delayedSetReadOnly, 50);
|
|
||||||
});
|
|
||||||
EOF
|
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'HTML':
|
case 'HTML':
|
||||||
@@ -2609,6 +2575,13 @@ JS
|
|||||||
$iFieldSize = $oAttDef->GetMaxSize();
|
$iFieldSize = $oAttDef->GetMaxSize();
|
||||||
if ($aAllowedValues !== null)
|
if ($aAllowedValues !== null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// convert AttributeBoolean value due to issue with radio style when value is false
|
||||||
|
// @see N°2443 - Boolean don't accept yes/no value
|
||||||
|
if($oAttDef instanceof AttributeBoolean){
|
||||||
|
$value = $value === false ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Discrete list of values, use a SELECT or RADIO buttons depending on the config
|
// Discrete list of values, use a SELECT or RADIO buttons depending on the config
|
||||||
$sDisplayStyle = $oAttDef->GetDisplayStyle();
|
$sDisplayStyle = $oAttDef->GetDisplayStyle();
|
||||||
switch ($sDisplayStyle)
|
switch ($sDisplayStyle)
|
||||||
@@ -4597,6 +4570,8 @@ HTML;
|
|||||||
/** @var \iApplicationObjectExtension $oExtensionInstance */
|
/** @var \iApplicationObjectExtension $oExtensionInstance */
|
||||||
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
||||||
{
|
{
|
||||||
|
$sExtensionClass = get_class($oExtensionInstance);
|
||||||
|
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnDBInsert()");
|
||||||
$oKPI = new ExecutionKPI();
|
$oKPI = new ExecutionKPI();
|
||||||
$oExtensionInstance->OnDBInsert($oNewObj, self::GetCurrentChange());
|
$oExtensionInstance->OnDBInsert($oNewObj, self::GetCurrentChange());
|
||||||
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnDBInsert');
|
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnDBInsert');
|
||||||
@@ -4678,7 +4653,22 @@ HTML;
|
|||||||
return $oDeletionPlan;
|
return $oDeletionPlan;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function PostDeleteActions(): void
|
final protected function PreDeleteActions(): void
|
||||||
|
{
|
||||||
|
/** @var \iApplicationObjectExtension $oExtensionInstance */
|
||||||
|
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
||||||
|
{
|
||||||
|
$sExtensionClass = get_class($oExtensionInstance);
|
||||||
|
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnDBDelete()");
|
||||||
|
$oKPI = new ExecutionKPI();
|
||||||
|
$oExtensionInstance->OnDBDelete($this, self::GetCurrentChange());
|
||||||
|
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnDBDelete');
|
||||||
|
}
|
||||||
|
|
||||||
|
parent::PreDeleteActions();
|
||||||
|
}
|
||||||
|
|
||||||
|
final protected function PostDeleteActions(): void
|
||||||
{
|
{
|
||||||
parent::PostDeleteActions();
|
parent::PostDeleteActions();
|
||||||
}
|
}
|
||||||
@@ -4692,6 +4682,8 @@ HTML;
|
|||||||
/** @var \iApplicationObjectExtension $oExtensionInstance */
|
/** @var \iApplicationObjectExtension $oExtensionInstance */
|
||||||
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
||||||
{
|
{
|
||||||
|
$sExtensionClass = get_class($oExtensionInstance);
|
||||||
|
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnDBDelete()");
|
||||||
$oKPI = new ExecutionKPI();
|
$oKPI = new ExecutionKPI();
|
||||||
$oExtensionInstance->OnDBDelete($this, self::GetCurrentChange());
|
$oExtensionInstance->OnDBDelete($this, self::GetCurrentChange());
|
||||||
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnDBDelete');
|
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnDBDelete');
|
||||||
@@ -4713,6 +4705,7 @@ HTML;
|
|||||||
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
||||||
{
|
{
|
||||||
$sExtensionClass = get_class($oExtensionInstance);
|
$sExtensionClass = get_class($oExtensionInstance);
|
||||||
|
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnIsModified()");
|
||||||
$oKPI = new ExecutionKPI();
|
$oKPI = new ExecutionKPI();
|
||||||
$bIsModified = $oExtensionInstance->OnIsModified($this);
|
$bIsModified = $oExtensionInstance->OnIsModified($this);
|
||||||
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnIsModified');
|
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnIsModified');
|
||||||
@@ -4772,6 +4765,8 @@ HTML;
|
|||||||
/** @var \iApplicationObjectExtension $oExtensionInstance */
|
/** @var \iApplicationObjectExtension $oExtensionInstance */
|
||||||
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
||||||
{
|
{
|
||||||
|
$sExtensionClass = get_class($oExtensionInstance);
|
||||||
|
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnCheckToWrite()");
|
||||||
$oKPI = new ExecutionKPI();
|
$oKPI = new ExecutionKPI();
|
||||||
$aNewIssues = $oExtensionInstance->OnCheckToWrite($this);
|
$aNewIssues = $oExtensionInstance->OnCheckToWrite($this);
|
||||||
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnCheckToWrite');
|
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnCheckToWrite');
|
||||||
@@ -4822,6 +4817,8 @@ HTML;
|
|||||||
/** @var \iApplicationObjectExtension $oExtensionInstance */
|
/** @var \iApplicationObjectExtension $oExtensionInstance */
|
||||||
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
||||||
{
|
{
|
||||||
|
$sExtensionClass = get_class($oExtensionInstance);
|
||||||
|
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnCheckToDelete()");
|
||||||
$oKPI = new ExecutionKPI();
|
$oKPI = new ExecutionKPI();
|
||||||
$aNewIssues = $oExtensionInstance->OnCheckToDelete($this);
|
$aNewIssues = $oExtensionInstance->OnCheckToDelete($this);
|
||||||
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnCheckToDelete');
|
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnCheckToDelete');
|
||||||
@@ -5948,7 +5945,7 @@ JS
|
|||||||
final protected function FireEventAfterWrite(array $aChanges, bool $bIsNew): void
|
final protected function FireEventAfterWrite(array $aChanges, bool $bIsNew): void
|
||||||
{
|
{
|
||||||
$this->NotifyAttachedObjectsOnLinkClassModification();
|
$this->NotifyAttachedObjectsOnLinkClassModification();
|
||||||
$this->FireEventDbLinksChangedForCurrentObject();
|
$this->RemoveObjectAwaitingEventDbLinksChanged(get_class($this), $this->GetKey());
|
||||||
$this->FireEvent(EVENT_DB_AFTER_WRITE, ['is_new' => $bIsNew, 'changes' => $aChanges]);
|
$this->FireEvent(EVENT_DB_AFTER_WRITE, ['is_new' => $bIsNew, 'changes' => $aChanges]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6061,31 +6058,6 @@ JS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Fire the EVENT_DB_LINKS_CHANGED event if current object is registered
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
* @throws \ArchivedObjectException
|
|
||||||
* @throws \CoreException
|
|
||||||
*
|
|
||||||
* @since 3.1.0 N°5906
|
|
||||||
*/
|
|
||||||
final protected function FireEventDbLinksChangedForCurrentObject(): void
|
|
||||||
{
|
|
||||||
if (true === static::IsEventDBLinksChangedBlocked()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sClass = get_class($this);
|
|
||||||
$sId = $this->GetKey();
|
|
||||||
$bIsObjectAwaitingEventDbLinksChanged = self::RemoveObjectAwaitingEventDbLinksChanged($sClass, $sId);
|
|
||||||
if (false === $bIsObjectAwaitingEventDbLinksChanged) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
self::FireEventDbLinksChangedForObject($this);
|
|
||||||
self::RemoveObjectAwaitingEventDbLinksChanged($sClass, $sId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fire the EVENT_DB_LINKS_CHANGED event if given object is registered, and unregister it
|
* Fire the EVENT_DB_LINKS_CHANGED event if given object is registered, and unregister it
|
||||||
*
|
*
|
||||||
@@ -6124,9 +6096,9 @@ JS
|
|||||||
self::SetEventDBLinksChangedBlocked(true);
|
self::SetEventDBLinksChangedBlocked(true);
|
||||||
// N°6408 The object can have been deleted
|
// N°6408 The object can have been deleted
|
||||||
if (!is_null($oObject)) {
|
if (!is_null($oObject)) {
|
||||||
MetaModel::StartReentranceProtection($oObject);
|
|
||||||
$oObject->FireEvent(EVENT_DB_LINKS_CHANGED);
|
$oObject->FireEvent(EVENT_DB_LINKS_CHANGED);
|
||||||
MetaModel::StopReentranceProtection($oObject);
|
|
||||||
|
// Update the object if needed
|
||||||
if (count($oObject->ListChanges()) !== 0) {
|
if (count($oObject->ListChanges()) !== 0) {
|
||||||
$oObject->DBUpdate();
|
$oObject->DBUpdate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CSVPage.php, now loadable using autoloader
|
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CSVPage.php, now loadable using autoloader
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CSVPage.php, now loadable using autoloader');
|
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CSVPage.php, now loadable using autoloader');
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -24,7 +24,7 @@ use Combodo\iTop\Application\WebPage\WebPage;
|
|||||||
/**
|
/**
|
||||||
* Dashboard presentation
|
* Dashboard presentation
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
abstract class DashboardLayout
|
abstract class DashboardLayout
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2012-2023 Combodo SARL
|
// Copyright (C) 2012-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -30,7 +30,7 @@ require_once(APPROOT.'application/forms.class.inc.php');
|
|||||||
/**
|
/**
|
||||||
* Base class for all 'dashlets' (i.e. widgets to be inserted into a dashboard)
|
* Base class for all 'dashlets' (i.e. widgets to be inserted into a dashboard)
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
abstract class Dashlet
|
abstract class Dashlet
|
||||||
|
|||||||
@@ -40,6 +40,36 @@
|
|||||||
<presentation/>
|
<presentation/>
|
||||||
<methods/>
|
<methods/>
|
||||||
</class>
|
</class>
|
||||||
|
<class id="WelcomePopupAcknowledge" _delta="define">
|
||||||
|
<parent>DBObject</parent>
|
||||||
|
<properties>
|
||||||
|
<comment>/** Acknowledge welcome popup messages */</comment>
|
||||||
|
<abstract>false</abstract>
|
||||||
|
<category></category>
|
||||||
|
<key_type>autoincrement</key_type>
|
||||||
|
<db_table>priv_welcome_popup_acknowledge</db_table>
|
||||||
|
</properties>
|
||||||
|
<fields>
|
||||||
|
<field id="message_uuid" xsi:type="AttributeString">
|
||||||
|
<sql>message_uuid</sql>
|
||||||
|
<default_value/>
|
||||||
|
<is_null_allowed>false</is_null_allowed>
|
||||||
|
</field>
|
||||||
|
<field id="user_id" xsi:type="AttributeExternalKey">
|
||||||
|
<sql>user_id</sql>
|
||||||
|
<target_class>User</target_class>
|
||||||
|
<is_null_allowed>false</is_null_allowed>
|
||||||
|
<on_target_delete>DEL_SILENT</on_target_delete>
|
||||||
|
</field>
|
||||||
|
<field id="acknowledge_date" xsi:type="AttributeDateTime">
|
||||||
|
<sql>acknowledge_date</sql>
|
||||||
|
<default_value/>
|
||||||
|
<is_null_allowed>false</is_null_allowed>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<presentation/>
|
||||||
|
<methods/>
|
||||||
|
</class>
|
||||||
</classes>
|
</classes>
|
||||||
<portals>
|
<portals>
|
||||||
<portal id="backoffice" _delta="define">
|
<portal id="backoffice" _delta="define">
|
||||||
@@ -155,6 +185,11 @@
|
|||||||
<decoration_classes>fas fa-cog</decoration_classes>
|
<decoration_classes>fas fa-cog</decoration_classes>
|
||||||
</style>
|
</style>
|
||||||
</menu>
|
</menu>
|
||||||
|
<menu id="Integrations" xsi:type="TemplateMenuNode" _delta="define">
|
||||||
|
<rank>50</rank>
|
||||||
|
<parent>ConfigurationTools</parent>
|
||||||
|
<template_file/>
|
||||||
|
</menu>
|
||||||
<menu id="DataSources" xsi:type="OQLMenuNode" _delta="define">
|
<menu id="DataSources" xsi:type="OQLMenuNode" _delta="define">
|
||||||
<rank>20</rank>
|
<rank>20</rank>
|
||||||
<parent>ConfigurationTools</parent>
|
<parent>ConfigurationTools</parent>
|
||||||
@@ -212,7 +247,9 @@ The object can be modified.]]></description>
|
|||||||
<event id="EVENT_DB_CHECK_TO_WRITE" _delta="define">
|
<event id="EVENT_DB_CHECK_TO_WRITE" _delta="define">
|
||||||
<name>Check to write</name>
|
<name>Check to write</name>
|
||||||
<description><![CDATA[Check an object before it is written into the database (no change possible).
|
<description><![CDATA[Check an object before it is written into the database (no change possible).
|
||||||
Call $this->AddCheckIssue() to signal an issue.]]></description>
|
Call $this->AddCheckIssue($sErrorMessage) to report a blocking issue.
|
||||||
|
Call $this->AddCheckWarning($sWarningMessage) to display a warning.
|
||||||
|
]]></description>
|
||||||
<sources>
|
<sources>
|
||||||
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
||||||
</sources>
|
</sources>
|
||||||
@@ -262,7 +299,7 @@ The modifications can be propagated to other objects.]]></description>
|
|||||||
<event id="EVENT_DB_CHECK_TO_DELETE" _delta="define">
|
<event id="EVENT_DB_CHECK_TO_DELETE" _delta="define">
|
||||||
<name>Check to delete</name>
|
<name>Check to delete</name>
|
||||||
<description><![CDATA[Check an object before it is deleted from the database.
|
<description><![CDATA[Check an object before it is deleted from the database.
|
||||||
Call $this->AddDeleteIssue() to signal an issue.]]></description>
|
Call $this->AddDeleteIssue($sIssueMessage) to signal an issue.]]></description>
|
||||||
<sources>
|
<sources>
|
||||||
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
||||||
</sources>
|
</sources>
|
||||||
@@ -317,7 +354,7 @@ Call $this->AddDeleteIssue() to signal an issue.]]></description>
|
|||||||
<event id="EVENT_ENUM_TRANSITIONS" _delta="define">
|
<event id="EVENT_ENUM_TRANSITIONS" _delta="define">
|
||||||
<name>Enum transitions</name>
|
<name>Enum transitions</name>
|
||||||
<description><![CDATA[Manage the allowed transitions in current object state.
|
<description><![CDATA[Manage the allowed transitions in current object state.
|
||||||
The only action allowed is to deny transitions with $this->DenyTransition()]]></description>
|
The only action allowed is to deny transitions with $this->DenyTransition($sTransitionCode)]]></description>
|
||||||
<sources>
|
<sources>
|
||||||
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
||||||
</sources>
|
</sources>
|
||||||
@@ -426,7 +463,7 @@ The only action allowed is to deny transitions with $this->DenyTransition()]]></
|
|||||||
<event id="EVENT_DB_SET_ATTRIBUTES_FLAGS" _delta="define">
|
<event id="EVENT_DB_SET_ATTRIBUTES_FLAGS" _delta="define">
|
||||||
<name>Set attributes flags</name>
|
<name>Set attributes flags</name>
|
||||||
<description><![CDATA[Set object attributes flags.
|
<description><![CDATA[Set object attributes flags.
|
||||||
Call $this->AddAttributeFlags() for all the attributes to be set for this target state.]]></description>
|
Call $this->AddAttributeFlags($sAttCode, $iFlags) for all the attributes to be set for this target state.]]></description>
|
||||||
<sources>
|
<sources>
|
||||||
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
||||||
</sources>
|
</sources>
|
||||||
@@ -448,7 +485,7 @@ Call $this->AddAttributeFlags() for all the attributes to be set for this target
|
|||||||
<event id="EVENT_DB_SET_INITIAL_ATTRIBUTES_FLAGS" _delta="define">
|
<event id="EVENT_DB_SET_INITIAL_ATTRIBUTES_FLAGS" _delta="define">
|
||||||
<name>Set initial attributes flags</name>
|
<name>Set initial attributes flags</name>
|
||||||
<description><![CDATA[Set object initial attributes flags.
|
<description><![CDATA[Set object initial attributes flags.
|
||||||
Call $this->AddInitialAttributeFlags() for all the initial attributes to be set initially.]]></description>
|
Call $this->AddInitialAttributeFlags($sAttCode, $iFlags) for all the initial attributes to be set initially.]]></description>
|
||||||
<sources>
|
<sources>
|
||||||
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
||||||
</sources>
|
</sources>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use Combodo\iTop\Application\WebPage\WebPage;
|
|||||||
use Combodo\iTop\Renderer\Console\ConsoleBlockRenderer;
|
use Combodo\iTop\Renderer\Console\ConsoleBlockRenderer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
@@ -566,7 +566,7 @@ EOF;
|
|||||||
{
|
{
|
||||||
if (is_object($aObjects[$sAlias]))
|
if (is_object($aObjects[$sAlias]))
|
||||||
{
|
{
|
||||||
$sHilightClass = $aObjects[$sAlias]->GetHilightClass();
|
$sHilightClass = MetaModel::GetHilightClass($sClassName, $aObjects[$sAlias]);
|
||||||
if ($sHilightClass != '')
|
if ($sHilightClass != '')
|
||||||
{
|
{
|
||||||
$aRow['@class'] = $sHilightClass;
|
$aRow['@class'] = $sHilightClass;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -706,7 +706,7 @@ class DisplayBlock
|
|||||||
if ($bDoSearch)
|
if ($bDoSearch)
|
||||||
{
|
{
|
||||||
// Keep the table_id identifying this table if we're performing a search
|
// Keep the table_id identifying this table if we're performing a search
|
||||||
$sTableId = utils::ReadParam('_table_id_', null, false, 'raw_data');
|
$sTableId = utils::ReadParam('_table_id_', null, false, utils::ENUM_SANITIZATION_FILTER_ELEMENT_IDENTIFIER);
|
||||||
if ($sTableId != null)
|
if ($sTableId != null)
|
||||||
{
|
{
|
||||||
$aExtraParams['table_id'] = $sTableId;
|
$aExtraParams['table_id'] = $sTableId;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/ErrorPage.php, now loadable using autoloader
|
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/ErrorPage.php, now loadable using autoloader
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/ErrorPage.php, now loadable using autoloader');
|
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/ErrorPage.php, now loadable using autoloader');
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -60,6 +60,24 @@ class CoreCannotSaveObjectException extends CoreException
|
|||||||
return $sContent;
|
return $sContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getTextMessage()
|
||||||
|
{
|
||||||
|
$sTitle = Dict::S('UI:Error:SaveFailed');
|
||||||
|
$sContent = utils::HtmlEntities($sTitle);
|
||||||
|
|
||||||
|
if (count($this->aIssues) == 1) {
|
||||||
|
$sIssue = reset($this->aIssues);
|
||||||
|
$sContent .= utils::HtmlEntities($sIssue);
|
||||||
|
} else {
|
||||||
|
foreach ($this->aIssues as $sError) {
|
||||||
|
$sContent .= " ".utils::HtmlEntities($sError).", ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getIssues()
|
public function getIssues()
|
||||||
{
|
{
|
||||||
return $this->aIssues;
|
return $this->aIssues;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -21,7 +21,7 @@ use Combodo\iTop\Application\WebPage\WebPage;
|
|||||||
* Helper class to build interactive forms to be used either in stand-alone
|
* Helper class to build interactive forms to be used either in stand-alone
|
||||||
* modal dialog or in "property-sheet" panes.
|
* modal dialog or in "property-sheet" panes.
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
class DesignerForm
|
class DesignerForm
|
||||||
@@ -209,7 +209,7 @@ class DesignerForm
|
|||||||
public function RenderAsPropertySheet($oP, $bReturnHTML = false, $sNotifyParentSelector = null)
|
public function RenderAsPropertySheet($oP, $bReturnHTML = false, $sNotifyParentSelector = null)
|
||||||
{
|
{
|
||||||
$sReturn = '';
|
$sReturn = '';
|
||||||
$sActionUrl = addslashes($this->sSubmitTo);
|
$sActionUrl = addslashes($this->sSubmitTo ?? '');
|
||||||
$sJSSubmitParams = json_encode($this->aSubmitParams);
|
$sJSSubmitParams = json_encode($this->aSubmitParams);
|
||||||
$sFormId = $this->GetFormId();
|
$sFormId = $this->GetFormId();
|
||||||
if ($this->oParentForm == null) {
|
if ($this->oParentForm == null) {
|
||||||
@@ -1330,7 +1330,8 @@ class DesignerComboField extends DesignerFormField
|
|||||||
{
|
{
|
||||||
if ($this->bMultipleSelection)
|
if ($this->bMultipleSelection)
|
||||||
{
|
{
|
||||||
$sHtml = "<span><select $sCSSClasses multiple size=\"8\"id=\"$sId\" name=\"$sName\">";
|
$iSize = max(1, min(8, count($this->aAllowedValues)));
|
||||||
|
$sHtml = "<span><select $sCSSClasses multiple size=\"$iSize\" id=\"$sId\" name=\"$sName\">";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Persistent class InputOutputTask
|
* Persistent class InputOutputTask
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/iTopWebPage.php, now loadable using autoloader
|
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/iTopWebPage.php, now loadable using autoloader
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// cannot notify depreciation for now as this is still MASSIVELY used in iTop core !
|
// cannot notify depreciation for now as this is still MASSIVELY used in iTop core !
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/iTopWizardWebPage.php, now loadable using autoloader
|
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/iTopWizardWebPage.php, now loadable using autoloader
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/iTopWizardWebPage.php, now loadable using autoloader');
|
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/iTopWizardWebPage.php, now loadable using autoloader');
|
||||||
@@ -5,7 +5,7 @@ use Combodo\iTop\Application\Helper\Session;
|
|||||||
/**
|
/**
|
||||||
* Class LoginBasic
|
* Class LoginBasic
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -53,6 +53,12 @@ class LoginDefaultBefore extends AbstractLoginFSMExtension
|
|||||||
{
|
{
|
||||||
// Force login mode
|
// Force login mode
|
||||||
LoginWebPage::SetLoginModeAndReload($sProposedLoginMode);
|
LoginWebPage::SetLoginModeAndReload($sProposedLoginMode);
|
||||||
|
} else {
|
||||||
|
$sRawLoginMode = utils::ReadParam('login_mode', '', false, utils::ENUM_SANITIZATION_FILTER_RAW_DATA);
|
||||||
|
if ($sProposedLoginMode !== $sRawLoginMode) {
|
||||||
|
IssueLog::Error("Authentication issue due to login_mode parameter sanitization. Please avoid special characters", null, ['sRawLoginMode' => $sRawLoginMode]);
|
||||||
|
//IssueLog::Error("Authentication issue due to login_mode parameter sanitization. Please avoid special characters", null, ['sRawLoginMode' => utils::HtmlEntities($sRawLoginMode)]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use Combodo\iTop\Application\Helper\Session;
|
|||||||
/**
|
/**
|
||||||
* Class LoginExternal
|
* Class LoginExternal
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -52,12 +52,13 @@ class LoginTwigContext
|
|||||||
/**
|
/**
|
||||||
* Set the absolute path on disk of the folder containing the twig templates
|
* Set the absolute path on disk of the folder containing the twig templates
|
||||||
*
|
*
|
||||||
* @param string $sPath absolute path of twig templates directory
|
|
||||||
* @api
|
* @api
|
||||||
|
*
|
||||||
|
*@param string $sAbsPath Absolute path of twig templates directory
|
||||||
*/
|
*/
|
||||||
public function SetLoaderPath($sPath)
|
public function SetLoaderPath($sAbsPath)
|
||||||
{
|
{
|
||||||
$this->sTwigLoaderPath = $sPath;
|
$this->sTwigLoaderPath = $sAbsPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -84,24 +85,27 @@ class LoginTwigContext
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the URL of a CSS file to link to the login screen
|
* Add the absolute URL of a CSS file to link to the login screen
|
||||||
*
|
*
|
||||||
* @param string $sFile URL of the CSS file to link
|
|
||||||
* @api
|
* @api
|
||||||
|
*
|
||||||
|
* @param string $sFileAbsURL Absolute URL of the CSS file to link
|
||||||
*/
|
*/
|
||||||
public function AddCSSFile($sFile)
|
public function AddCSSFile($sFileAbsURL)
|
||||||
{
|
{
|
||||||
$this->aCSSFiles[] = $sFile;
|
$this->aCSSFiles[] = $sFileAbsURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the URL of a javascript file to link to the login screen
|
* Add the absolute URL of a javascript file to link to the login screen
|
||||||
* @param string $sFile URL of the javascript file to link
|
*
|
||||||
* @api
|
* @api
|
||||||
|
*
|
||||||
|
* @param string $sFileAbsURL Absolute URL of the javascript file to link
|
||||||
*/
|
*/
|
||||||
public function AddJsFile($sFile)
|
public function AddJsFile($sFileAbsURL)
|
||||||
{
|
{
|
||||||
$this->aJsFiles[] = $sFile;
|
$this->aJsFiles[] = $sFileAbsURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -133,7 +137,7 @@ class LoginTwigContext
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array Absolute URLs of the CSS files
|
||||||
*/
|
*/
|
||||||
public function GetCSSFiles()
|
public function GetCSSFiles()
|
||||||
{
|
{
|
||||||
@@ -141,7 +145,7 @@ class LoginTwigContext
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array Absolute URLs of the JS files
|
||||||
*/
|
*/
|
||||||
public function GetJsFiles()
|
public function GetJsFiles()
|
||||||
{
|
{
|
||||||
@@ -274,12 +278,12 @@ class LoginTwigRenderer
|
|||||||
$aCSSFiles = $oFormData->GetCSSFiles();
|
$aCSSFiles = $oFormData->GetCSSFiles();
|
||||||
foreach ($aCSSFiles as $sCSSFile)
|
foreach ($aCSSFiles as $sCSSFile)
|
||||||
{
|
{
|
||||||
$oPage->add_linked_stylesheet($sCSSFile);
|
$oPage->LinkStylesheetFromURI($sCSSFile);
|
||||||
}
|
}
|
||||||
$aJsFiles = $oFormData->GetJsFiles();
|
$aJsFiles = $oFormData->GetJsFiles();
|
||||||
foreach ($aJsFiles as $sJsFile)
|
foreach ($aJsFiles as $sJsFile)
|
||||||
{
|
{
|
||||||
$oPage->add_linked_script($sJsFile);
|
$oPage->LinkScriptFromURI($sJsFile);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use Combodo\iTop\Application\Helper\Session;
|
|||||||
/**
|
/**
|
||||||
* Class LoginURL
|
* Class LoginURL
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Class LoginWebPage
|
* Class LoginWebPage
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -971,7 +971,7 @@ class LoginWebPage extends NiceWebPage
|
|||||||
}
|
}
|
||||||
else if($ret === false)
|
else if($ret === false)
|
||||||
{
|
{
|
||||||
throw new Exception('Nowhere to go??');
|
throw new Exception('Nowhere to go: Your combination of user Profiles denies you access to any '.ITOP_APPLICATION_SHORT.' portal. Please contact your administrator');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/NiceWebPage.php, now loadable using autoloader
|
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/NiceWebPage.php, now loadable using autoloader
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/NiceWebPage.php, now loadable using autoloader');
|
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/NiceWebPage.php, now loadable using autoloader');
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/PDFPage.php, now loadable using autoloader
|
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/PDFPage.php, now loadable using autoloader
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/PDFPage.php, now loadable using autoloader');
|
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/PDFPage.php, now loadable using autoloader');
|
||||||
@@ -9,11 +9,17 @@ class PortalDispatcher
|
|||||||
$this->sPortalid = $sPortalId;
|
$this->sPortalid = $sPortalId;
|
||||||
$this->aData = PortalDispatcherData::GetData($sPortalId);
|
$this->aData = PortalDispatcherData::GetData($sPortalId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function IsUserAllowed()
|
/**
|
||||||
|
* @param \User|null $oUser
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
* @since 3.2.0 N°2039 Add $oUser parameter
|
||||||
|
*/
|
||||||
|
public function IsUserAllowed(?User $oUser = null)
|
||||||
{
|
{
|
||||||
$bRet = true;
|
$bRet = true;
|
||||||
$aProfiles = UserRights::ListProfiles();
|
$aProfiles = UserRights::ListProfiles($oUser);
|
||||||
|
|
||||||
foreach($this->aData['deny'] as $sDeniedProfile)
|
foreach($this->aData['deny'] as $sDeniedProfile)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2010-2023 Combodo SARL
|
* Copyright (C) 2010-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -23,7 +23,7 @@ use Combodo\iTop\Application\WebPage\WebPage;
|
|||||||
* Persistent class Shortcut and derived
|
* Persistent class Shortcut and derived
|
||||||
* Shortcuts of any kind
|
* Shortcuts of any kind
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -27,7 +27,7 @@ require_once(APPROOT.'setup/setuputils.class.inc.php');
|
|||||||
/**
|
/**
|
||||||
* File to include to initialize the datamodel in memory
|
* File to include to initialize the datamodel in memory
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
<div style="width:100%;background: #fff url(../images/welcome.jpg) top left no-repeat;">
|
|
||||||
<style>
|
|
||||||
.welcome_popup_cell {
|
|
||||||
vertical-align:top;
|
|
||||||
width:50%;
|
|
||||||
border:0px solid #000;
|
|
||||||
-moz-border-radius:10px;
|
|
||||||
padding:5px;
|
|
||||||
text-align:left;
|
|
||||||
}
|
|
||||||
tr td.welcome_popup_cell, tr td.welcome_popup_cell ul {
|
|
||||||
font-size:10pt;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<p></p>
|
|
||||||
<p></p>
|
|
||||||
<p style="text-align:left; font-size:32px;padding-left:400px;padding-top:40px;margin-bottom:30px;margin-top:0;color:#FFFFFF;"><itopstring>UI:WelcomeMenu:Title</itopstring></p>
|
|
||||||
<p></p>
|
|
||||||
<table border="0" style="padding:10px;border-spacing: 10px;width:100%">
|
|
||||||
<tr>
|
|
||||||
<td class="welcome_popup_cell">
|
|
||||||
<itopstring>UI:WelcomeMenu:LeftBlock</itopstring>
|
|
||||||
</td>
|
|
||||||
<td class="welcome_popup_cell">
|
|
||||||
<itopstring>UI:WelcomeMenu:RightBlock</itopstring>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -24,7 +24,7 @@ use Combodo\iTop\Application\Helper\Session;
|
|||||||
* which choice is configured via the parameter 'transaction_storage'
|
* which choice is configured via the parameter 'transaction_storage'
|
||||||
*
|
*
|
||||||
* @package iTop
|
* @package iTop
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
class privUITransaction
|
class privUITransaction
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -26,7 +26,7 @@ use Combodo\iTop\Renderer\BlockRenderer;
|
|||||||
* UI wdiget for displaying and editing one-way encrypted passwords
|
* UI wdiget for displaying and editing one-way encrypted passwords
|
||||||
*
|
*
|
||||||
* @author Romain Quetiez
|
* @author Romain Quetiez
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -57,81 +57,41 @@ class UIHTMLEditorWidget
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the HTML fragment corresponding to the HTML editor widget
|
* Get the HTML fragment corresponding to the HTML editor widget
|
||||||
* @param WebPage $oP The web page used for all the output
|
*
|
||||||
* @param Hash $aArgs Extra context arguments
|
* @param WebPage $oPage The web page used for all the output
|
||||||
|
* @param array $aArgs Extra context arguments
|
||||||
|
*
|
||||||
* @return string The HTML fragment to be inserted into the page
|
* @return string The HTML fragment to be inserted into the page
|
||||||
*/
|
*/
|
||||||
public function Display(WebPage $oPage, $aArgs = array())
|
public function Display(WebPage $oPage, array $aArgs = array()) : string
|
||||||
{
|
{
|
||||||
$iId = $this->m_iId;
|
$iId = $this->m_iId;
|
||||||
$sCode = $this->m_sAttCode.$this->m_sNameSuffix;
|
$sCode = $this->m_sAttCode.$this->m_sNameSuffix;
|
||||||
$sValue = $this->m_sValue;
|
$sValue = $this->m_sValue;
|
||||||
$sHelpText = $this->m_sHelpText;
|
$sHelpText = $this->m_sHelpText;
|
||||||
$sValidationField = $this->m_sValidationField;
|
$sValidationField = $this->m_sValidationField;
|
||||||
|
$aConfig = [];
|
||||||
|
|
||||||
$sHtmlValue = "<div class=\"field_input_zone field_input_html ibo-input-wrapper\"><textarea class=\"htmlEditor ibo-input-richtext-placeholder\" title=\"$sHelpText\" name=\"attr_{$this->m_sFieldPrefix}{$sCode}\" id=\"$iId\">$sValue</textarea></div>$sValidationField";
|
$sEncodedValue = CKEditorHelper::PrepareCKEditorValueTextEncodingForTextarea($sValue);
|
||||||
|
$sHtmlValue = "<div class=\"field_input_zone field_input_html ibo-input-wrapper\"><textarea class=\"htmlEditor ibo-input-richtext-placeholder\" title=\"$sHelpText\" name=\"attr_{$this->m_sFieldPrefix}{$sCode}\" id=\"$iId\">$sEncodedValue</textarea></div>$sValidationField";
|
||||||
|
|
||||||
// Replace the text area with CKEditor
|
// Prepare CKEditor size
|
||||||
// To change the default settings of the editor,
|
|
||||||
// a) edit the file /js/ckeditor/config.js
|
|
||||||
// b) or override some of the configuration settings, using the second parameter of ckeditor()
|
|
||||||
$sJSDefineWidth = '';
|
|
||||||
$aConfig = CKEditorHelper::GetCkeditorPref();
|
|
||||||
$sWidthSpec = addslashes(trim($this->m_oAttDef->GetWidth()));
|
$sWidthSpec = addslashes(trim($this->m_oAttDef->GetWidth()));
|
||||||
if ($sWidthSpec != '') {
|
if ($sWidthSpec != '') {
|
||||||
/*N°6543 - the function min allow to keep text inside the column when width is defined*/
|
/* N°6543 - the function min allow to keep text inside the column when width is defined*/
|
||||||
$aConfig['width'] = "min($sWidthSpec,100%)";
|
$aConfig['width'] = "min($sWidthSpec,100%)";
|
||||||
$sJSDefineWidth = '$("#cke_'.$iId.' iframe").contents().find("body").css("width", "'.$sWidthSpec.'")';
|
|
||||||
}
|
}
|
||||||
$sHeightSpec = addslashes(trim($this->m_oAttDef->GetHeight()));
|
$sHeightSpec = addslashes(trim($this->m_oAttDef->GetHeight()));
|
||||||
if ($sHeightSpec != '') {
|
if ($sHeightSpec != '') {
|
||||||
$aConfig['height'] = $sHeightSpec;
|
$aConfig['height'] = $sHeightSpec;
|
||||||
}
|
}
|
||||||
// TODO 3.2.0 Add the configuration for the editor
|
|
||||||
$sConfigJS = json_encode($aConfig);
|
|
||||||
|
|
||||||
WebResourcesHelper::EnableCKEditorToWebPage($oPage);
|
// Enable CKEditor
|
||||||
$oPage->add_ready_script("CombodoCKEditorHandler.CreateInstance('#$iId', $sConfigJS)");
|
CKEditorHelper::ConfigureCKEditorElementForWebPage($oPage, $iId, $sValue, true, $aConfig);
|
||||||
|
|
||||||
// inject mention item renderer template
|
|
||||||
$oTwig = TwigHelper::GetTwigEnvironment(BlockRenderer::TWIG_BASE_PATH);
|
|
||||||
$sTemplate = $oTwig->render('application/object/set/option_renderer.html.twig');
|
|
||||||
$oPage->add(<<<HTML
|
|
||||||
<template id="{$iId}_items_template">
|
|
||||||
$sTemplate
|
|
||||||
</template>
|
|
||||||
HTML);
|
|
||||||
|
|
||||||
// Please read...
|
|
||||||
// ValidateCKEditField triggers a timer... calling itself indefinitely
|
|
||||||
// This design was the quickest way to achieve the field validation (only checking if the field is blank)
|
|
||||||
// because the ckeditor does not fire events like "change" or "keyup", etc.
|
|
||||||
// See http://dev.ckeditor.com/ticket/900 => won't fix
|
|
||||||
// The most relevant solution would be to implement a plugin to CKEdit, and handle the internal events like: setData, insertHtml, insertElement, loadSnapshot, key, afterUndo, afterRedo
|
|
||||||
|
|
||||||
// Could also be bound to 'instanceReady.ckeditor'
|
// Could also be bound to 'instanceReady.ckeditor'
|
||||||
$oPage->add_ready_script("$('#$iId').on('validate', function(evt, sFormId) { return ValidateCKEditField('$iId', '', {$this->m_sMandatory}, sFormId, '') } );\n");
|
$oPage->add_ready_script("$('#$iId').on('validate', function(evt, sFormId) { return ValidateCKEditField('$iId', '', {$this->m_sMandatory}, sFormId, '') } );\n");
|
||||||
$oPage->add_ready_script(
|
|
||||||
<<<EOF
|
|
||||||
$('#$iId').on('update', function(evt){
|
|
||||||
BlockField('cke_$iId', $('#$iId').prop('disabled'));
|
|
||||||
//Delayed execution - ckeditor must be properly initialized before setting readonly
|
|
||||||
var retryCount = 0;
|
|
||||||
var oMe = $('#$iId');
|
|
||||||
var delayedSetReadOnly = function () {
|
|
||||||
if (oMe.data('ckeditorInstance').editable() == undefined && retryCount++ < 10) {
|
|
||||||
setTimeout(delayedSetReadOnly, retryCount * 100); //Wait a while longer each iteration
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
oMe.data('ckeditorInstance').setReadOnly(oMe.prop('disabled'));
|
|
||||||
$sJSDefineWidth
|
|
||||||
}
|
|
||||||
};
|
|
||||||
setTimeout(delayedSetReadOnly, 50);
|
|
||||||
});
|
|
||||||
EOF
|
|
||||||
);
|
|
||||||
return $sHtmlValue;
|
return $sHtmlValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ use Combodo\iTop\Renderer\Console\ConsoleBlockRenderer;
|
|||||||
/**
|
/**
|
||||||
* Class UILinksWidgetDirect
|
* Class UILinksWidgetDirect
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
class UILinksWidgetDirect
|
class UILinksWidgetDirect
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -17,6 +17,7 @@ require_once(APPROOT.'application/displayblock.class.inc.php');
|
|||||||
class UILinksWidget
|
class UILinksWidget
|
||||||
{
|
{
|
||||||
protected $m_sClass;
|
protected $m_sClass;
|
||||||
|
protected $m_sClassLabel;
|
||||||
protected $m_sAttCode;
|
protected $m_sAttCode;
|
||||||
protected $m_sNameSuffix;
|
protected $m_sNameSuffix;
|
||||||
protected $m_sInputId;
|
protected $m_sInputId;
|
||||||
@@ -24,6 +25,7 @@ class UILinksWidget
|
|||||||
protected $m_sExtKeyToRemote;
|
protected $m_sExtKeyToRemote;
|
||||||
protected $m_sExtKeyToMe;
|
protected $m_sExtKeyToMe;
|
||||||
protected $m_sLinkedClass;
|
protected $m_sLinkedClass;
|
||||||
|
protected $m_sLinkedClassLabel;
|
||||||
protected $m_sRemoteClass;
|
protected $m_sRemoteClass;
|
||||||
protected $m_bDuplicatesAllowed;
|
protected $m_bDuplicatesAllowed;
|
||||||
/** @var string[] list of editables attcodes */
|
/** @var string[] list of editables attcodes */
|
||||||
@@ -46,6 +48,7 @@ class UILinksWidget
|
|||||||
public function __construct($sClass, $sAttCode, $sInputId, $sNameSuffix = '', $bDuplicatesAllowed = false)
|
public function __construct($sClass, $sAttCode, $sInputId, $sNameSuffix = '', $bDuplicatesAllowed = false)
|
||||||
{
|
{
|
||||||
$this->m_sClass = $sClass;
|
$this->m_sClass = $sClass;
|
||||||
|
$this->m_sClassLabel = MetaModel::GetName($this->m_sClass);
|
||||||
$this->m_sAttCode = $sAttCode;
|
$this->m_sAttCode = $sAttCode;
|
||||||
$this->m_sInputId = $sInputId;
|
$this->m_sInputId = $sInputId;
|
||||||
$this->m_sNameSuffix = $sNameSuffix;
|
$this->m_sNameSuffix = $sNameSuffix;
|
||||||
@@ -56,6 +59,7 @@ class UILinksWidget
|
|||||||
/** @var AttributeLinkedSetIndirect $oAttDef */
|
/** @var AttributeLinkedSetIndirect $oAttDef */
|
||||||
$oAttDef = MetaModel::GetAttributeDef($this->m_sClass, $this->m_sAttCode);
|
$oAttDef = MetaModel::GetAttributeDef($this->m_sClass, $this->m_sAttCode);
|
||||||
$this->m_sLinkedClass = $oAttDef->GetLinkedClass();
|
$this->m_sLinkedClass = $oAttDef->GetLinkedClass();
|
||||||
|
$this->m_sLinkedClassLabel = MetaModel::GetName($this->m_sLinkedClass);
|
||||||
$this->m_sExtKeyToRemote = $oAttDef->GetExtKeyToRemote();
|
$this->m_sExtKeyToRemote = $oAttDef->GetExtKeyToRemote();
|
||||||
$this->m_sExtKeyToMe = $oAttDef->GetExtKeyToMe();
|
$this->m_sExtKeyToMe = $oAttDef->GetExtKeyToMe();
|
||||||
|
|
||||||
@@ -365,11 +369,21 @@ class UILinksWidget
|
|||||||
return $this->m_sClass;
|
return $this->m_sClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function GetClassLabel(): string
|
||||||
|
{
|
||||||
|
return $this->m_sClassLabel;
|
||||||
|
}
|
||||||
|
|
||||||
public function GetLinkedClass(): string
|
public function GetLinkedClass(): string
|
||||||
{
|
{
|
||||||
return $this->m_sLinkedClass;
|
return $this->m_sLinkedClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function GetLinkedClassLabel(): string
|
||||||
|
{
|
||||||
|
return $this->m_sLinkedClassLabel;
|
||||||
|
}
|
||||||
|
|
||||||
public function GetAttCode(): string
|
public function GetAttCode(): string
|
||||||
{
|
{
|
||||||
return $this->m_sAttCode;
|
return $this->m_sAttCode;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
* Class UIPasswordWidget
|
* Class UIPasswordWidget
|
||||||
* UI wdiget for displaying and editing one-way encrypted passwords
|
* UI wdiget for displaying and editing one-way encrypted passwords
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2023 Combodo SARL
|
* Copyright (C) 2010-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user