mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Compare commits
2091 Commits
2.5.4
...
feature/bl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1004dd9afb | ||
|
|
9628a1d028 | ||
|
|
5585385d08 | ||
|
|
98870b06e3 | ||
|
|
46d91322c1 | ||
|
|
ca28f8f3c4 | ||
|
|
0aaa55b35b | ||
|
|
e9a1167da6 | ||
|
|
a67fce66fc | ||
|
|
491d1d7d53 | ||
|
|
54b48dc908 | ||
|
|
dadeab58eb | ||
|
|
0ecdc6620b | ||
|
|
80161b909e | ||
|
|
888232e8c3 | ||
|
|
94f9b16c03 | ||
|
|
311aeb0b07 | ||
|
|
d904883bdd | ||
|
|
68fe3f01be | ||
|
|
35d2c3afac | ||
|
|
7cee8c3cd0 | ||
|
|
27622bbcec | ||
|
|
219270ce81 | ||
|
|
16dd47a3b9 | ||
|
|
70835984de | ||
|
|
7ce94486bd | ||
|
|
d9224f43f2 | ||
|
|
6523b34d58 | ||
|
|
be20705449 | ||
|
|
5b9643d6fb | ||
|
|
e7abaa2838 | ||
|
|
d3525190d5 | ||
|
|
f20808d929 | ||
|
|
8d73eb6dff | ||
|
|
f84995a58f | ||
|
|
aee80e41ca | ||
|
|
7f66e26b5f | ||
|
|
a6639b067f | ||
|
|
8a6d66effd | ||
|
|
6885d64124 | ||
|
|
6fa153ae8b | ||
|
|
e226222c2a | ||
|
|
aca0143e89 | ||
|
|
1968c60770 | ||
|
|
56ea6c8848 | ||
|
|
26014f410a | ||
|
|
b7136c0b7a | ||
|
|
ea94986247 | ||
|
|
8912618732 | ||
|
|
7bee718a13 | ||
|
|
d8363067e6 | ||
|
|
2705543efd | ||
|
|
1e6b885301 | ||
|
|
c768e18e2b | ||
|
|
d4b93f3bf0 | ||
|
|
6354c62c2b | ||
|
|
cf8a12fe95 | ||
|
|
36804dfcf4 | ||
|
|
6966c0498a | ||
|
|
bbffc40ee0 | ||
|
|
b302569feb | ||
|
|
1b7473365d | ||
|
|
0b84e809f6 | ||
|
|
a858362622 | ||
|
|
d195c2b4c9 | ||
|
|
28b75f29e5 | ||
|
|
9d8a7bf561 | ||
|
|
8064a20718 | ||
|
|
f301a283e2 | ||
|
|
e6a8f492d5 | ||
|
|
336637a7a4 | ||
|
|
0e5a501b2a | ||
|
|
59af58a173 | ||
|
|
7f922560ba | ||
|
|
d2e286345e | ||
|
|
44008fc179 | ||
|
|
fb120bdc7c | ||
|
|
5548997f3e | ||
|
|
156828c448 | ||
|
|
04ef2b0454 | ||
|
|
076d2e3d46 | ||
|
|
0c6ab86e54 | ||
|
|
876db3e58f | ||
|
|
5f7fe345cc | ||
|
|
cb6f78c9e3 | ||
|
|
8c86908652 | ||
|
|
7e69256cb4 | ||
|
|
83e3c089a4 | ||
|
|
0d1059a8fc | ||
|
|
e2f15ca24a | ||
|
|
7628b85b70 | ||
|
|
525f600c18 | ||
|
|
0ffa2850ea | ||
|
|
fa3610cfee | ||
|
|
898ee95a2c | ||
|
|
730570f1f8 | ||
|
|
80ce1eb125 | ||
|
|
228a945da9 | ||
|
|
79909fadc0 | ||
|
|
746b47bb0e | ||
|
|
150d3e096d | ||
|
|
c2f62a13e6 | ||
|
|
23afee514d | ||
|
|
48c5698f08 | ||
|
|
1a4ee0f977 | ||
|
|
1ca39618e1 | ||
|
|
7bb1f9f423 | ||
|
|
834297e675 | ||
|
|
21c2574cd9 | ||
|
|
6d9923be68 | ||
|
|
839bbc425f | ||
|
|
70cc19768a | ||
|
|
873d109b98 | ||
|
|
a81950571a | ||
|
|
bcd9679957 | ||
|
|
2c10913fe5 | ||
|
|
0342b89481 | ||
|
|
3c9318d56a | ||
|
|
30d10b6f11 | ||
|
|
3fd55c6dd6 | ||
|
|
f8e39877b3 | ||
|
|
0a3f7d7ef7 | ||
|
|
222eb47bd2 | ||
|
|
c15b3462d1 | ||
|
|
32f05ea917 | ||
|
|
6a50b55a2a | ||
|
|
72f11c6a4d | ||
|
|
609ea47f7b | ||
|
|
74b3cfd46c | ||
|
|
f7ea6c09cd | ||
|
|
526a7f9817 | ||
|
|
5ccb1ef72a | ||
|
|
180da03f08 | ||
|
|
7ec7626aa0 | ||
|
|
f92a980b4d | ||
|
|
5d7582bb6f | ||
|
|
7a40db94fb | ||
|
|
843798505a | ||
|
|
bf13f9fc8a | ||
|
|
289171b9f1 | ||
|
|
9b065ffb0a | ||
|
|
96d888fcf3 | ||
|
|
a182a37139 | ||
|
|
accda04a37 | ||
|
|
23c15c1b6c | ||
|
|
866e4ab995 | ||
|
|
f364e7b043 | ||
|
|
42afe033ef | ||
|
|
75730eeea0 | ||
|
|
58fd8709be | ||
|
|
f18ea18a5b | ||
|
|
1904bfdba6 | ||
|
|
e1949cd3eb | ||
|
|
1b2d3d1e84 | ||
|
|
c5b1f02d2b | ||
|
|
f81ab4d71a | ||
|
|
0b95dbee7f | ||
|
|
8de4c0360d | ||
|
|
db593ff85e | ||
|
|
1f750bb12d | ||
|
|
4ee66377ce | ||
|
|
432a950f8c | ||
|
|
24130dd94f | ||
|
|
bbc751bee4 | ||
|
|
a77ba2fbab | ||
|
|
5b60ec9edf | ||
|
|
b88b9dabdb | ||
|
|
06b17e82db | ||
|
|
2add79a473 | ||
|
|
3103f361a4 | ||
|
|
3a37e24496 | ||
|
|
59cc6d3f76 | ||
|
|
ee37373cfa | ||
|
|
621295199c | ||
|
|
b1d703bff3 | ||
|
|
a3a34a94e7 | ||
|
|
6edc365685 | ||
|
|
4b7f736af0 | ||
|
|
016fbaed36 | ||
|
|
bfcd137e52 | ||
|
|
56d9653f15 | ||
|
|
f9af8fc912 | ||
|
|
c1a7a36896 | ||
|
|
d5670abdcc | ||
|
|
0360a3160d | ||
|
|
bcd21aefb4 | ||
|
|
d5fe653e51 | ||
|
|
fc2fb235a2 | ||
|
|
d7211509bd | ||
|
|
c182b1a01f | ||
|
|
15e5e21a89 | ||
|
|
ee0d231426 | ||
|
|
3282b46c9b | ||
|
|
05649ba50f | ||
|
|
40efc4cbb1 | ||
|
|
30034d381b | ||
|
|
986eb90546 | ||
|
|
3cbcdd4f13 | ||
|
|
c46d0f5662 | ||
|
|
eb41d3e2ef | ||
|
|
c6b16bb52e | ||
|
|
95adbbb58f | ||
|
|
60f5c60059 | ||
|
|
c0284ecc3b | ||
|
|
fc7b772ba3 | ||
|
|
b2454d44ae | ||
|
|
79cfb95f6e | ||
|
|
ff2e1a3507 | ||
|
|
503afb9831 | ||
|
|
b6772917ae | ||
|
|
011d742ae3 | ||
|
|
5b496f4d15 | ||
|
|
97f4c32271 | ||
|
|
c002ca7902 | ||
|
|
ff22074418 | ||
|
|
84968ff550 | ||
|
|
46151c87c0 | ||
|
|
75a900c6f8 | ||
|
|
e8c9d99783 | ||
|
|
00971f9ec7 | ||
|
|
a3a97fa228 | ||
|
|
18c4ca9131 | ||
|
|
1600302ad9 | ||
|
|
a9c3a1b782 | ||
|
|
74848254a4 | ||
|
|
d7d9bfe0fd | ||
|
|
dd96dec100 | ||
|
|
16ff51f3b7 | ||
|
|
466ddf768e | ||
|
|
76d26e8ef9 | ||
|
|
27c651b33c | ||
|
|
32375265cb | ||
|
|
0cba163dc9 | ||
|
|
fd1e17cc32 | ||
|
|
d85e1906b7 | ||
|
|
f8df84aa7b | ||
|
|
c26b9459bb | ||
|
|
4f7676c42d | ||
|
|
ceddafaebe | ||
|
|
950640babe | ||
|
|
11e6be1037 | ||
|
|
29d963317f | ||
|
|
dd300e075c | ||
|
|
774ace2302 | ||
|
|
bbfddea93d | ||
|
|
c5c7fd5c85 | ||
|
|
b526d6422b | ||
|
|
5d4b9f4a89 | ||
|
|
d01caaf4e4 | ||
|
|
63c02ff33d | ||
|
|
f895821db9 | ||
|
|
19f34d1a72 | ||
|
|
7ff1a03a3c | ||
|
|
eadc3b72c2 | ||
|
|
c06f8e9a98 | ||
|
|
6675d7d42a | ||
|
|
afc118e9c2 | ||
|
|
f36fcb2a2d | ||
|
|
f062af367d | ||
|
|
29d24faf52 | ||
|
|
33f3f2810e | ||
|
|
fad00200b6 | ||
|
|
56ef6feadf | ||
|
|
2be16f9078 | ||
|
|
6874aed4a2 | ||
|
|
07b8830436 | ||
|
|
39d3e00ba1 | ||
|
|
ffa43160bf | ||
|
|
a45d1336f4 | ||
|
|
5a287fabba | ||
|
|
da86ee4114 | ||
|
|
5157788afe | ||
|
|
386e25efd6 | ||
|
|
649e2f8e6a | ||
|
|
3c3d744747 | ||
|
|
1371eee826 | ||
|
|
6645a5053f | ||
|
|
e2a3e0e74f | ||
|
|
401f82062a | ||
|
|
5a01a76f80 | ||
|
|
3e5520d079 | ||
|
|
beef2a89a3 | ||
|
|
2f920cbb46 | ||
|
|
4688c92e7c | ||
|
|
feae36e5b8 | ||
|
|
92ae0e72e1 | ||
|
|
ed030403aa | ||
|
|
dfc894f6fd | ||
|
|
368b49ef8f | ||
|
|
ccfd3848fb | ||
|
|
ea59f7bc23 | ||
|
|
9d6ed7f489 | ||
|
|
0aa006f7c4 | ||
|
|
c669d6951b | ||
|
|
9412f260ae | ||
|
|
9781a11988 | ||
|
|
1ed0210fe2 | ||
|
|
1ce5ec73ea | ||
|
|
98304e2bda | ||
|
|
04fc58b55c | ||
|
|
096c3a3f13 | ||
|
|
87e22163d7 | ||
|
|
4cc8b89f4e | ||
|
|
19809249a2 | ||
|
|
7347eed3ac | ||
|
|
69d816e345 | ||
|
|
4008cb7688 | ||
|
|
41a1bede70 | ||
|
|
e12845e412 | ||
|
|
b30ad45792 | ||
|
|
84a11fb3c1 | ||
|
|
ee39a387db | ||
|
|
e3c6ac814e | ||
|
|
d668d65c70 | ||
|
|
e21e7c9cf0 | ||
|
|
27a0de1da1 | ||
|
|
d76e54996c | ||
|
|
a4710f7542 | ||
|
|
98a9c680c5 | ||
|
|
a92157f763 | ||
|
|
412f1a394f | ||
|
|
dba6e8ce1a | ||
|
|
a127ca9ca0 | ||
|
|
0b5ee1e05c | ||
|
|
f94e86ecea | ||
|
|
fe770f36c5 | ||
|
|
cf83bc7364 | ||
|
|
76982a2846 | ||
|
|
4cedd30625 | ||
|
|
a86079c477 | ||
|
|
128a237392 | ||
|
|
0ecfffe413 | ||
|
|
ef3bdd63a4 | ||
|
|
585135c6c7 | ||
|
|
b3faa96a45 | ||
|
|
6f04525cdf | ||
|
|
03834fedb8 | ||
|
|
6bde8e867f | ||
|
|
0e3d195250 | ||
|
|
fae8c9edbd | ||
|
|
133d267aca | ||
|
|
166986f336 | ||
|
|
f76d649d1a | ||
|
|
30747b92c7 | ||
|
|
12ce718662 | ||
|
|
a1cdb46663 | ||
|
|
824d8398a3 | ||
|
|
406774aa15 | ||
|
|
dd8712e2e8 | ||
|
|
767bcdf117 | ||
|
|
5e060737df | ||
|
|
d9bf0fe012 | ||
|
|
93c9783b1a | ||
|
|
e9c1467026 | ||
|
|
863cb4cad6 | ||
|
|
94b70fc473 | ||
|
|
4dc383cba8 | ||
|
|
55d8a2316a | ||
|
|
fe8f274c14 | ||
|
|
72fad49c4e | ||
|
|
888d0775e6 | ||
|
|
db19f71758 | ||
|
|
a259443735 | ||
|
|
58e8ca1f50 | ||
|
|
ab79426508 | ||
|
|
7e61917521 | ||
|
|
e42aab30a5 | ||
|
|
a79ef0bd51 | ||
|
|
5d88391109 | ||
|
|
c56c04d84d | ||
|
|
f2b8f50a94 | ||
|
|
9de11a29fb | ||
|
|
6537e00453 | ||
|
|
dd5f4909da | ||
|
|
ed67df734f | ||
|
|
44894526f1 | ||
|
|
de78963b30 | ||
|
|
948fd6f0ce | ||
|
|
214dbeef5b | ||
|
|
f2fbd8457d | ||
|
|
6a432c6a25 | ||
|
|
e96a8387a0 | ||
|
|
f3576cffb0 | ||
|
|
c5625e6a8d | ||
|
|
3d2a844fef | ||
|
|
110a030902 | ||
|
|
5ccd885607 | ||
|
|
e5c6efbe69 | ||
|
|
bd083d632f | ||
|
|
65b8132914 | ||
|
|
3c2130aa72 | ||
|
|
e70a2f75d3 | ||
|
|
fe8e6ba4b0 | ||
|
|
008614fde6 | ||
|
|
ac6e60f5a1 | ||
|
|
bf18d623d6 | ||
|
|
10d04756ee | ||
|
|
6e927114e0 | ||
|
|
682c24a873 | ||
|
|
d4b4ced649 | ||
|
|
c2589492d9 | ||
|
|
15c9cf926e | ||
|
|
78d4c8c7c7 | ||
|
|
d9e8eed084 | ||
|
|
ebe86d09ee | ||
|
|
5e5d368299 | ||
|
|
f990a83453 | ||
|
|
c6325dce8e | ||
|
|
bbca1625fb | ||
|
|
53975d1d8f | ||
|
|
1358bf9b7f | ||
|
|
7c17be4db6 | ||
|
|
367a92b711 | ||
|
|
0a3201dd41 | ||
|
|
d82690dd84 | ||
|
|
7f9e4385ac | ||
|
|
aa3e284af3 | ||
|
|
a941e5f752 | ||
|
|
b1878f7265 | ||
|
|
b106a54c50 | ||
|
|
002da0b387 | ||
|
|
6b9e723a45 | ||
|
|
b54e457cbb | ||
|
|
e750dd53d8 | ||
|
|
da6a55504e | ||
|
|
b58356c42e | ||
|
|
524e43b8c4 | ||
|
|
a80bd6f2b9 | ||
|
|
08eb9ee630 | ||
|
|
05485b838e | ||
|
|
029fe6882d | ||
|
|
b31eb6aab9 | ||
|
|
a96c194676 | ||
|
|
0d85331bca | ||
|
|
e9dec8ae05 | ||
|
|
6a6a0ffa24 | ||
|
|
87623fba3d | ||
|
|
a7619f2820 | ||
|
|
cff53d71ba | ||
|
|
71708cfbc7 | ||
|
|
e05b3a5fb9 | ||
|
|
bfcb1fdb30 | ||
|
|
cc4e1ea104 | ||
|
|
5485897bbb | ||
|
|
27f343e543 | ||
|
|
cca79735fc | ||
|
|
c48bbfd32a | ||
|
|
3ae2058f6f | ||
|
|
0a63568715 | ||
|
|
f878eea68d | ||
|
|
8ad2b8091c | ||
|
|
d6ca08efb8 | ||
|
|
ba8a2c1b15 | ||
|
|
bd9da07734 | ||
|
|
0ae0336e04 | ||
|
|
8df0ef6af9 | ||
|
|
d77c77c03b | ||
|
|
5967895561 | ||
|
|
6e754d4fa5 | ||
|
|
165fd0e700 | ||
|
|
d100ce8005 | ||
|
|
770f5a7b67 | ||
|
|
a993f6a80b | ||
|
|
c8bb710d21 | ||
|
|
d963fbd8cf | ||
|
|
beda8e2810 | ||
|
|
083f8d69c2 | ||
|
|
1c16eeb5e4 | ||
|
|
ecc0b57b31 | ||
|
|
be9f6eff29 | ||
|
|
50a8af4082 | ||
|
|
6a1125875b | ||
|
|
900e8ac6d7 | ||
|
|
2fcea4d02e | ||
|
|
1927fc743a | ||
|
|
6aff09eaf7 | ||
|
|
54e9830a3b | ||
|
|
a45819dbf0 | ||
|
|
e8aaec5789 | ||
|
|
d16c0ffef9 | ||
|
|
24ad593dc8 | ||
|
|
0b67828ab9 | ||
|
|
8a1a78444d | ||
|
|
4552bc0778 | ||
|
|
3a113e31fb | ||
|
|
8a666b09d6 | ||
|
|
0d9dc34a08 | ||
|
|
c7ca1eeab5 | ||
|
|
02265135e3 | ||
|
|
2c1bf665c3 | ||
|
|
60b6fcc783 | ||
|
|
53adb37f43 | ||
|
|
a6fe564a95 | ||
|
|
4945f25d49 | ||
|
|
e5f3daf88a | ||
|
|
cc3e6d64e1 | ||
|
|
8024aad43d | ||
|
|
757dbb8b25 | ||
|
|
b370deaac9 | ||
|
|
026b7e1836 | ||
|
|
d03b924240 | ||
|
|
97a047e38f | ||
|
|
5be800cfce | ||
|
|
956b597e50 | ||
|
|
57100dee9f | ||
|
|
c3cc1afec1 | ||
|
|
7fe24f58f3 | ||
|
|
e4160c7cf2 | ||
|
|
7d87768ec4 | ||
|
|
9946e6c41a | ||
|
|
02b483e33e | ||
|
|
7b6481efbd | ||
|
|
efef582119 | ||
|
|
5056e561fe | ||
|
|
4400cfde62 | ||
|
|
5a39581c60 | ||
|
|
4eab0e6450 | ||
|
|
f3b66a44ee | ||
|
|
558f108520 | ||
|
|
07a93d12e2 | ||
|
|
ce127278bb | ||
|
|
887946144c | ||
|
|
cc887c29fd | ||
|
|
460836852e | ||
|
|
208d7ee7ba | ||
|
|
3d92b73ae5 | ||
|
|
deddb0824b | ||
|
|
3718899663 | ||
|
|
7f30d74f30 | ||
|
|
21199fce34 | ||
|
|
ad821e7d9c | ||
|
|
881fc2a1de | ||
|
|
44ee6baddb | ||
|
|
42d782740e | ||
|
|
cf16229948 | ||
|
|
a25427f4c6 | ||
|
|
04b2f7c836 | ||
|
|
0f917af55a | ||
|
|
daaed4696e | ||
|
|
5f52c273d9 | ||
|
|
b8d35e4783 | ||
|
|
149dff4b4d | ||
|
|
f235e0cd66 | ||
|
|
e47e02932a | ||
|
|
4544bba652 | ||
|
|
9445e12254 | ||
|
|
951945a607 | ||
|
|
34f8fff01c | ||
|
|
8d45e48ce1 | ||
|
|
ed26f1cecc | ||
|
|
bc298afda3 | ||
|
|
4f0e3430c0 | ||
|
|
1fc290587c | ||
|
|
77fa02fcf9 | ||
|
|
d445551031 | ||
|
|
ebfe9da464 | ||
|
|
fdd79e91f0 | ||
|
|
94a09493b0 | ||
|
|
56dbbb09dc | ||
|
|
f019e05af5 | ||
|
|
838c4f123c | ||
|
|
2043010aad | ||
|
|
cda18b950e | ||
|
|
acf28ca4aa | ||
|
|
864ded2102 | ||
|
|
5cdc58846b | ||
|
|
45cd96eb0d | ||
|
|
c8335499fd | ||
|
|
7f3efe59ab | ||
|
|
69551378c2 | ||
|
|
f3fd4bde87 | ||
|
|
c115f64cb5 | ||
|
|
ee61c1e8fb | ||
|
|
e716fb118b | ||
|
|
b0c76346a5 | ||
|
|
56807fd941 | ||
|
|
b56f248b79 | ||
|
|
7a85201a07 | ||
|
|
97ebffd5fb | ||
|
|
46c239c211 | ||
|
|
906e309791 | ||
|
|
4ad1ca0fc6 | ||
|
|
015955f396 | ||
|
|
9bee1905c8 | ||
|
|
8ab157eae4 | ||
|
|
17978b829b | ||
|
|
4ddb23cd7c | ||
|
|
e27eb7419e | ||
|
|
64ef572429 | ||
|
|
2f81e0fd6f | ||
|
|
987f1f7dbf | ||
|
|
b53c91f7f3 | ||
|
|
5fce2a2c1c | ||
|
|
13d31ac211 | ||
|
|
57ae29cf2f | ||
|
|
0b3895e39e | ||
|
|
0d231d9b94 | ||
|
|
27a6abeeb3 | ||
|
|
c75e6960a7 | ||
|
|
4766ca3fd0 | ||
|
|
523dd97eca | ||
|
|
c09bd2bfc6 | ||
|
|
bd662eaf19 | ||
|
|
ff75ecfe27 | ||
|
|
54f8b74383 | ||
|
|
18a506673f | ||
|
|
a108be8517 | ||
|
|
3e57c3b1e9 | ||
|
|
f18e27a183 | ||
|
|
358efb0f2f | ||
|
|
723fc917f1 | ||
|
|
01f34eea29 | ||
|
|
705d941979 | ||
|
|
691acb45e6 | ||
|
|
97e4ff30ff | ||
|
|
34c76c735a | ||
|
|
47d8e35639 | ||
|
|
d4dc739b30 | ||
|
|
b84859b07e | ||
|
|
3f154fa765 | ||
|
|
f31e32d7a9 | ||
|
|
1589535a45 | ||
|
|
53353ec9e1 | ||
|
|
a601b1c59a | ||
|
|
e093abcb2b | ||
|
|
01cb88a661 | ||
|
|
5ef32b6b31 | ||
|
|
ba1c719568 | ||
|
|
0507e4f4a8 | ||
|
|
60eb312e68 | ||
|
|
044a8926b3 | ||
|
|
acf8c9d49e | ||
|
|
d99e79eb3f | ||
|
|
843c8ccd38 | ||
|
|
d45326606d | ||
|
|
5886d038e3 | ||
|
|
8fed7c7005 | ||
|
|
604522aa61 | ||
|
|
7af35c2d09 | ||
|
|
87497eb491 | ||
|
|
434ed0dd4e | ||
|
|
473a55bde6 | ||
|
|
0b65b36e74 | ||
|
|
4aeb78ccac | ||
|
|
21d5de1756 | ||
|
|
797893d317 | ||
|
|
dd5ac38dd4 | ||
|
|
2741a446ea | ||
|
|
da3d886bd7 | ||
|
|
ad40e02fee | ||
|
|
7cc63e21dd | ||
|
|
611e828d1a | ||
|
|
3abcd59b03 | ||
|
|
48f4cd8943 | ||
|
|
abd5e27c2e | ||
|
|
ccb3a21c68 | ||
|
|
aa060746d7 | ||
|
|
6ec441e501 | ||
|
|
52d3d8cfe7 | ||
|
|
081ba68af4 | ||
|
|
38d5889979 | ||
|
|
5b4808c378 | ||
|
|
2af22d3387 | ||
|
|
7c1a8c90da | ||
|
|
e7726a17db | ||
|
|
57da9a848d | ||
|
|
464ee46631 | ||
|
|
46358b6e36 | ||
|
|
46d6779562 | ||
|
|
ea708e1e05 | ||
|
|
374946505a | ||
|
|
18db31f138 | ||
|
|
332c6eb33c | ||
|
|
e5c49e3bd4 | ||
|
|
60769dc4b7 | ||
|
|
9e652ef214 | ||
|
|
d2825c1b24 | ||
|
|
8482be7068 | ||
|
|
9dc56b727e | ||
|
|
c6759220b9 | ||
|
|
470af54acb | ||
|
|
344f74f444 | ||
|
|
0d1ca1bc0e | ||
|
|
d9e3684d3d | ||
|
|
e59db3f3d9 | ||
|
|
c883d618c3 | ||
|
|
8911a9a3ed | ||
|
|
366d2754ef | ||
|
|
4db114f64d | ||
|
|
d36340a3cd | ||
|
|
7e6de5d8dd | ||
|
|
490eda4f4a | ||
|
|
b5b4d70c2d | ||
|
|
a74cff6902 | ||
|
|
1010274c48 | ||
|
|
c39ff13217 | ||
|
|
58da108e85 | ||
|
|
8b4fdb54ea | ||
|
|
1877cb5e93 | ||
|
|
1530b3f2ca | ||
|
|
4c3c5228aa | ||
|
|
3ae4ca89f4 | ||
|
|
b415b1eeae | ||
|
|
c0ae983faa | ||
|
|
7845cbcc55 | ||
|
|
a33977251e | ||
|
|
b0d668b124 | ||
|
|
b0856c1abf | ||
|
|
2bffa3cf17 | ||
|
|
5ab05c6a6a | ||
|
|
72af2b7cd6 | ||
|
|
143c0a5b07 | ||
|
|
daf79f2324 | ||
|
|
15d11c6c86 | ||
|
|
b298a1fa82 | ||
|
|
007b8147c7 | ||
|
|
4013b76c9e | ||
|
|
ed81391aff | ||
|
|
28818010d6 | ||
|
|
928c19f923 | ||
|
|
34aa240840 | ||
|
|
6872dbd180 | ||
|
|
c5bea30c64 | ||
|
|
071a254611 | ||
|
|
d2d203df34 | ||
|
|
e1ffdea172 | ||
|
|
9abcf40df7 | ||
|
|
b67dc888fe | ||
|
|
c7b101d169 | ||
|
|
df5a7440a4 | ||
|
|
a59a8c0ec5 | ||
|
|
bf9f43da8b | ||
|
|
928b82a9c8 | ||
|
|
b9008d2459 | ||
|
|
50dddaaa9b | ||
|
|
1b168501af | ||
|
|
35a49bad60 | ||
|
|
97c1ff55e9 | ||
|
|
ffead92d5a | ||
|
|
81ea2b1fe4 | ||
|
|
9cdfe0ecb4 | ||
|
|
0473269132 | ||
|
|
4798bf2f79 | ||
|
|
c3c5c56dd8 | ||
|
|
4fb9bbb831 | ||
|
|
267cdd2aee | ||
|
|
fe0bd1a4b8 | ||
|
|
9fa510d2a8 | ||
|
|
fd29986354 | ||
|
|
8ec6bb4758 | ||
|
|
f3306f5fb4 | ||
|
|
20683fdf50 | ||
|
|
603ae8c0e1 | ||
|
|
f1d0418e48 | ||
|
|
9c8c306df3 | ||
|
|
d2543e9c67 | ||
|
|
55a0d910fa | ||
|
|
bd8144a67c | ||
|
|
004d1a7245 | ||
|
|
09fb99ed58 | ||
|
|
ae8071f707 | ||
|
|
c1cf084e43 | ||
|
|
87c794b22e | ||
|
|
a382d6ad35 | ||
|
|
2d86599a19 | ||
|
|
914971b30d | ||
|
|
443763de48 | ||
|
|
ff3c7ebe54 | ||
|
|
c0f82f25a3 | ||
|
|
f90381d412 | ||
|
|
d367d2e864 | ||
|
|
9d20eba2ad | ||
|
|
863746852f | ||
|
|
f416f994c9 | ||
|
|
70dfbbc15e | ||
|
|
85932eab98 | ||
|
|
0ee77d8c88 | ||
|
|
2f2d9547b7 | ||
|
|
32b065708b | ||
|
|
18285df154 | ||
|
|
b1b6c9f426 | ||
|
|
ff884533f9 | ||
|
|
417e80fe8d | ||
|
|
c203e6c7be | ||
|
|
730a0d1c98 | ||
|
|
d9b374f723 | ||
|
|
b9cb692504 | ||
|
|
23fc4bb4f7 | ||
|
|
4ae035dd51 | ||
|
|
3a791162c5 | ||
|
|
06791b06c4 | ||
|
|
5ebc290b94 | ||
|
|
675221a15e | ||
|
|
2f431a0d14 | ||
|
|
fd4e41950c | ||
|
|
41d5ae704a | ||
|
|
83fc069bf4 | ||
|
|
32c5cd245b | ||
|
|
a259be9033 | ||
|
|
fbbdee242a | ||
|
|
4a12635ea5 | ||
|
|
db7278e9c1 | ||
|
|
10056aa4ca | ||
|
|
bb566df432 | ||
|
|
4042a12d39 | ||
|
|
5ae4f9ade8 | ||
|
|
1636f9839c | ||
|
|
c76cccd2e7 | ||
|
|
532eb466a1 | ||
|
|
e8879a0455 | ||
|
|
ef5b4e212c | ||
|
|
24eb82d140 | ||
|
|
cdc8edb56b | ||
|
|
7235c63445 | ||
|
|
fd3b33b04b | ||
|
|
e8815e5653 | ||
|
|
551b9a3b76 | ||
|
|
1c6b639992 | ||
|
|
6fb7587d95 | ||
|
|
3953e74cb4 | ||
|
|
a8f616bba7 | ||
|
|
560eb5e071 | ||
|
|
c665bb4761 | ||
|
|
36584092e5 | ||
|
|
30430bb7dc | ||
|
|
fdf5cff12a | ||
|
|
4816b2b0fe | ||
|
|
9c808bf2ed | ||
|
|
7a12c2c615 | ||
|
|
149bc9f4ef | ||
|
|
b91183e9ec | ||
|
|
b67639f9ec | ||
|
|
cdbcc9ce8c | ||
|
|
6c7d094921 | ||
|
|
23466f6e00 | ||
|
|
08c1f4f072 | ||
|
|
1194c5c7fe | ||
|
|
f63fb16233 | ||
|
|
a4143df36a | ||
|
|
3e78568755 | ||
|
|
9b14cd7633 | ||
|
|
2b2488f376 | ||
|
|
fd77554cb7 | ||
|
|
2ee3d27ba8 | ||
|
|
af24f46803 | ||
|
|
da1684a8b9 | ||
|
|
5e7ae930c5 | ||
|
|
541226356c | ||
|
|
a30345c96c | ||
|
|
d035130d00 | ||
|
|
7d8181c44f | ||
|
|
45536cf957 | ||
|
|
da5ccaaa85 | ||
|
|
7c773991e7 | ||
|
|
bf976e5b8f | ||
|
|
d9ad3f5e98 | ||
|
|
9054dcb9ff | ||
|
|
57116ef054 | ||
|
|
c6f5b8b1f9 | ||
|
|
9e015ba59a | ||
|
|
6144cfad3d | ||
|
|
3844a18b86 | ||
|
|
e88c6e9583 | ||
|
|
6793fb2a35 | ||
|
|
4834c326aa | ||
|
|
e6167adefd | ||
|
|
a8c3756ba7 | ||
|
|
34b47f0239 | ||
|
|
0d13d9eabe | ||
|
|
358adb2109 | ||
|
|
92285b55b6 | ||
|
|
dda91be6d1 | ||
|
|
bec4dbafd2 | ||
|
|
dcb46990c2 | ||
|
|
fe03342b6f | ||
|
|
ee037acd34 | ||
|
|
d4a696cb6b | ||
|
|
5c483efd15 | ||
|
|
9aeba1df9b | ||
|
|
e98683ae1c | ||
|
|
c552e73d20 | ||
|
|
1851163cee | ||
|
|
3667f95b7c | ||
|
|
b6796d2742 | ||
|
|
047983cb91 | ||
|
|
8455abdfe9 | ||
|
|
b7c3fbb176 | ||
|
|
5642552f9a | ||
|
|
6f6b654dba | ||
|
|
c8b791efd3 | ||
|
|
52fd58cd93 | ||
|
|
66d638e224 | ||
|
|
16c4f18a81 | ||
|
|
cd6104ddb3 | ||
|
|
4fe7cd5adc | ||
|
|
3f59141407 | ||
|
|
8b37f503c7 | ||
|
|
7c9353d299 | ||
|
|
dfc901ffa4 | ||
|
|
611bf3035f | ||
|
|
35bb2da6bd | ||
|
|
53e034ce4f | ||
|
|
cd4db1db06 | ||
|
|
b1dbddffb9 | ||
|
|
221c10aa9b | ||
|
|
15ecd7bccf | ||
|
|
0d8dd0dc17 | ||
|
|
ec986e0fbc | ||
|
|
f0e0c73e9b | ||
|
|
d9a24d2e14 | ||
|
|
93618f974d | ||
|
|
4dfc217992 | ||
|
|
5a1a6cf6f0 | ||
|
|
36b325f71d | ||
|
|
74a3712116 | ||
|
|
1fe7eb6cf4 | ||
|
|
0d0f8e9ffc | ||
|
|
0a2063ce69 | ||
|
|
ce207e5c56 | ||
|
|
f22eaae457 | ||
|
|
fbc5280add | ||
|
|
65512ca984 | ||
|
|
385b4f8d4a | ||
|
|
f65f22f333 | ||
|
|
607d355c61 | ||
|
|
29c30c1f89 | ||
|
|
2ff771c16a | ||
|
|
5e641f2273 | ||
|
|
d52254bbf0 | ||
|
|
a97c8be31a | ||
|
|
9c067e5645 | ||
|
|
24d6857069 | ||
|
|
ed9259df9e | ||
|
|
75794fb4d9 | ||
|
|
4c386da7d2 | ||
|
|
abbd2e64c9 | ||
|
|
300a723fca | ||
|
|
ddf42d0358 | ||
|
|
88be0d7638 | ||
|
|
e26428a0eb | ||
|
|
7b36852d7a | ||
|
|
d1eb674314 | ||
|
|
4afed39b0e | ||
|
|
c1460cfdc7 | ||
|
|
85a94ee1e7 | ||
|
|
68895551b2 | ||
|
|
eece09e5ed | ||
|
|
0dd1f26b39 | ||
|
|
1b958a3c4d | ||
|
|
a1d23cddc5 | ||
|
|
14c25e3d9b | ||
|
|
c3915ee48e | ||
|
|
21ff03e28f | ||
|
|
2c8887398d | ||
|
|
f51cd65b1f | ||
|
|
dbb5a5191b | ||
|
|
03b8ed5ce4 | ||
|
|
e9844aed45 | ||
|
|
aaf6289953 | ||
|
|
b0d0223821 | ||
|
|
f271606e5e | ||
|
|
23a9bae391 | ||
|
|
b7c795c313 | ||
|
|
46c553fbad | ||
|
|
fc5bbfbed2 | ||
|
|
afe760a8bc | ||
|
|
7e78c35d23 | ||
|
|
56f0e95a22 | ||
|
|
7f9024465f | ||
|
|
75dc11b882 | ||
|
|
db0a5bd071 | ||
|
|
64434f8065 | ||
|
|
044623309c | ||
|
|
a54695b2e0 | ||
|
|
7acb53a22f | ||
|
|
a2d05e8119 | ||
|
|
dfcebfcbea | ||
|
|
3f165c9803 | ||
|
|
85971ea9f3 | ||
|
|
ff3ec219ef | ||
|
|
e0374dd186 | ||
|
|
51ee3b31cb | ||
|
|
496ea830c5 | ||
|
|
1e911b5094 | ||
|
|
6073be25de | ||
|
|
93a736e42a | ||
|
|
128afc8a56 | ||
|
|
a8d5630030 | ||
|
|
d83a256b9d | ||
|
|
5af33ffe0a | ||
|
|
ffd37d7802 | ||
|
|
31a34c247c | ||
|
|
4ccd842bdf | ||
|
|
f186c9e242 | ||
|
|
4e66c9fc23 | ||
|
|
99e21652a0 | ||
|
|
24a0cc2f64 | ||
|
|
e9dee86b7c | ||
|
|
42d7901828 | ||
|
|
7f156e961d | ||
|
|
d71b3b1893 | ||
|
|
cb1488c17f | ||
|
|
a625733885 | ||
|
|
e13bcba89a | ||
|
|
7d8e8df0c5 | ||
|
|
0e5c0ff46d | ||
|
|
67bff3e19d | ||
|
|
19d9c69fb8 | ||
|
|
cb772a9527 | ||
|
|
ee621c1b92 | ||
|
|
20aa1bfdd6 | ||
|
|
9c52f6b949 | ||
|
|
0f890ad228 | ||
|
|
aac6ab0fc6 | ||
|
|
3fde778c0c | ||
|
|
348bdbdc0d | ||
|
|
3e9223a0bc | ||
|
|
a905a8a3c1 | ||
|
|
b2ab07aa69 | ||
|
|
9bd1da95e0 | ||
|
|
83c0df2157 | ||
|
|
8d7c64be66 | ||
|
|
0625a01a4f | ||
|
|
208a8723ff | ||
|
|
f4c2a9ca7d | ||
|
|
c97fd63e6d | ||
|
|
58402cdda8 | ||
|
|
59fa3e10a3 | ||
|
|
0831a427cc | ||
|
|
08517f0c7e | ||
|
|
97e58c2d79 | ||
|
|
6693ec48a0 | ||
|
|
9a13d4ce04 | ||
|
|
51bbe1f79d | ||
|
|
5dd92ab506 | ||
|
|
7120201469 | ||
|
|
046eeb03f2 | ||
|
|
ce22dc9309 | ||
|
|
953c9e588e | ||
|
|
2ceb4068ad | ||
|
|
11f62063a6 | ||
|
|
7885d712a6 | ||
|
|
a6ca282ff4 | ||
|
|
8ef67dee3b | ||
|
|
fb1b730bd5 | ||
|
|
af9c45849e | ||
|
|
a711a67f4c | ||
|
|
b743b7e2fb | ||
|
|
3db92359e5 | ||
|
|
088f08b315 | ||
|
|
71cd61dfe4 | ||
|
|
947e26d864 | ||
|
|
e3995a130f | ||
|
|
384641e274 | ||
|
|
0985415e11 | ||
|
|
3e13c9e825 | ||
|
|
ec09589646 | ||
|
|
83e3321a48 | ||
|
|
bb4c8ea52d | ||
|
|
5960dc6245 | ||
|
|
ca92316e7d | ||
|
|
b096472ccf | ||
|
|
261498d225 | ||
|
|
320a6b8a16 | ||
|
|
b3cadaf314 | ||
|
|
660852115e | ||
|
|
543e57ed7d | ||
|
|
4d78b7ca13 | ||
|
|
a32bdf3f2f | ||
|
|
5382d2006c | ||
|
|
ae1d60d11e | ||
|
|
e8c0bcfbb2 | ||
|
|
b8a04cb842 | ||
|
|
b4ffa8c045 | ||
|
|
7e540f16f9 | ||
|
|
e69275c6c5 | ||
|
|
16c123df49 | ||
|
|
446eee79fc | ||
|
|
cbc96d8a58 | ||
|
|
d2015b7d7b | ||
|
|
305b236f41 | ||
|
|
e172bd13df | ||
|
|
94cb4a2bb4 | ||
|
|
7abbbf6b7b | ||
|
|
66287757b3 | ||
|
|
661ecc57c5 | ||
|
|
15f9f79a24 | ||
|
|
286374fe7c | ||
|
|
ea288c2194 | ||
|
|
927cd60ad2 | ||
|
|
fb6e47e42a | ||
|
|
34d4f6b1f9 | ||
|
|
f7170953fb | ||
|
|
e80d52cc0f | ||
|
|
75da1ce7a7 | ||
|
|
7894c872dc | ||
|
|
14b2d2ed4c | ||
|
|
a7b5077e0c | ||
|
|
de2b88b707 | ||
|
|
130734bec7 | ||
|
|
d7fad4b646 | ||
|
|
db4c241cba | ||
|
|
be09909976 | ||
|
|
f4d538ef6c | ||
|
|
a6b1da393b | ||
|
|
501c20a34d | ||
|
|
b858ba3786 | ||
|
|
60863c5fcf | ||
|
|
1ee3f4a984 | ||
|
|
aadb605dec | ||
|
|
f63f2bd445 | ||
|
|
0205f150a3 | ||
|
|
cdbdf580c8 | ||
|
|
e4ba2b0828 | ||
|
|
28d00cc7c9 | ||
|
|
b897da8f6f | ||
|
|
dc868b16ab | ||
|
|
ee2e109769 | ||
|
|
2b955ddd53 | ||
|
|
33cb4fd42b | ||
|
|
a03af7e9ef | ||
|
|
90dbc35d41 | ||
|
|
66e9fc2068 | ||
|
|
0a9b376684 | ||
|
|
83ba909c08 | ||
|
|
9ed33f16dd | ||
|
|
e9fdb61bb5 | ||
|
|
073b1cd303 | ||
|
|
e712791f43 | ||
|
|
fefd9aae95 | ||
|
|
a4743901a3 | ||
|
|
ced9489643 | ||
|
|
0c45a0ca49 | ||
|
|
f3572e82ec | ||
|
|
dd620022a8 | ||
|
|
2237ec581c | ||
|
|
a0cd70ae71 | ||
|
|
80fce579a0 | ||
|
|
1313484ebe | ||
|
|
95aa541293 | ||
|
|
c4702f6a87 | ||
|
|
5c0fc0bec5 | ||
|
|
d8de7b19cb | ||
|
|
38640b01a8 | ||
|
|
a11e783867 | ||
|
|
8ca2fffa78 | ||
|
|
3f3cbd17ed | ||
|
|
5a18769336 | ||
|
|
cd6fe171cd | ||
|
|
ee45e546a8 | ||
|
|
c8be217a1d | ||
|
|
618df6de1d | ||
|
|
e6e79df8db | ||
|
|
509ca47b36 | ||
|
|
066353e1e7 | ||
|
|
a6737afb2f | ||
|
|
d5b3a62df5 | ||
|
|
7f82faefe1 | ||
|
|
08731857e5 | ||
|
|
90062acc35 | ||
|
|
030d912820 | ||
|
|
9e9187b169 | ||
|
|
c1258d0527 | ||
|
|
b7039c81ba | ||
|
|
7088b96c16 | ||
|
|
d31273dff5 | ||
|
|
85460ef6e2 | ||
|
|
5ab059c404 | ||
|
|
322ea1870d | ||
|
|
878b87b68c | ||
|
|
ab3024d98a | ||
|
|
d447c96385 | ||
|
|
e3ac4d1039 | ||
|
|
8fc4aa7240 | ||
|
|
aff9d8cbca | ||
|
|
260c15c6b6 | ||
|
|
dab48146bf | ||
|
|
14ae9f0809 | ||
|
|
1115cdd2ec | ||
|
|
44673b9fd2 | ||
|
|
faf9b32176 | ||
|
|
a93c1092fc | ||
|
|
6c81163d20 | ||
|
|
f71edbf45b | ||
|
|
0d3e48475e | ||
|
|
ae8451e837 | ||
|
|
33903f570b | ||
|
|
123e734046 | ||
|
|
008261e918 | ||
|
|
d388086baa | ||
|
|
f7af705bb5 | ||
|
|
a827cb7546 | ||
|
|
c7fe6f388a | ||
|
|
a04080a93e | ||
|
|
04158f5589 | ||
|
|
127809a836 | ||
|
|
a93be39aeb | ||
|
|
6de6c38834 | ||
|
|
a5745ba72d | ||
|
|
7c93d116ec | ||
|
|
0867d8a3c4 | ||
|
|
71f5d29cba | ||
|
|
f948d6e026 | ||
|
|
a222ead43c | ||
|
|
d6bfbbcd30 | ||
|
|
17df9d0f9d | ||
|
|
e68340273b | ||
|
|
5c341138e1 | ||
|
|
56b9eb6cf3 | ||
|
|
db20244212 | ||
|
|
6f9f74e72f | ||
|
|
8070d5b9b7 | ||
|
|
6197ecbaf4 | ||
|
|
ca585d3f42 | ||
|
|
9e5d668c02 | ||
|
|
051656f295 | ||
|
|
9a51a44549 | ||
|
|
d04102bab3 | ||
|
|
c723d19e01 | ||
|
|
b0414748cb | ||
|
|
dac77e0606 | ||
|
|
02b98543d9 | ||
|
|
519aaadd9a | ||
|
|
fe27fef530 | ||
|
|
72dbb6f937 | ||
|
|
ccb29d10ae | ||
|
|
e479775833 | ||
|
|
86a7192f5a | ||
|
|
4a1be13904 | ||
|
|
0f3347f64d | ||
|
|
6564d84a2f | ||
|
|
f4747c5cef | ||
|
|
1e92c2f28a | ||
|
|
e4b097b196 | ||
|
|
85653c9ffc | ||
|
|
b1761e04b2 | ||
|
|
da5d8b20fa | ||
|
|
9a5a5f858f | ||
|
|
d6b194b0aa | ||
|
|
50ed52bacc | ||
|
|
daa906a697 | ||
|
|
a0cd281c42 | ||
|
|
ecd8f40c0f | ||
|
|
616c1b9b73 | ||
|
|
6bb5606c00 | ||
|
|
a6ceb88fca | ||
|
|
7bb7a94fbc | ||
|
|
e4324cedb4 | ||
|
|
07781c7c9d | ||
|
|
ea58a807fc | ||
|
|
fb6806a1c1 | ||
|
|
d24870e0ae | ||
|
|
166451c4e9 | ||
|
|
7c1290f684 | ||
|
|
179c774ba8 | ||
|
|
b57c224052 | ||
|
|
e886d80de6 | ||
|
|
3791b2dd24 | ||
|
|
12c916f4e5 | ||
|
|
ba7e00e130 | ||
|
|
895abde39c | ||
|
|
bada955725 | ||
|
|
b6418d95e7 | ||
|
|
f9e18675f3 | ||
|
|
22416cc0be | ||
|
|
ec086ad94a | ||
|
|
17d4b570e8 | ||
|
|
2dfad12553 | ||
|
|
b7dc55604e | ||
|
|
991bc359cb | ||
|
|
26dcaa0ded | ||
|
|
b5d3ddb7e3 | ||
|
|
8b178914b3 | ||
|
|
ce6fd4d775 | ||
|
|
bc55bfbee1 | ||
|
|
9c75cb4537 | ||
|
|
633fa343a5 | ||
|
|
a1d01e252b | ||
|
|
e9119e95ac | ||
|
|
af332a34d6 | ||
|
|
2d6251e5df | ||
|
|
b157fad0b6 | ||
|
|
70d2bb163c | ||
|
|
d9bf3339d2 | ||
|
|
b4ee5cd59c | ||
|
|
fae6c89e9a | ||
|
|
89d310258b | ||
|
|
a58529f46c | ||
|
|
12a2035791 | ||
|
|
b1ff7f0e9b | ||
|
|
3c4fe338b6 | ||
|
|
6159ab33b7 | ||
|
|
91f410a85c | ||
|
|
58ffd37f9e | ||
|
|
0a48696cd8 | ||
|
|
2f71570390 | ||
|
|
5c9d98d12c | ||
|
|
15362df69a | ||
|
|
77f757995e | ||
|
|
ab0c97621a | ||
|
|
78b6c03af7 | ||
|
|
22342cdc05 | ||
|
|
99f398a87e | ||
|
|
dccdd84c25 | ||
|
|
d4d16f43ac | ||
|
|
dcf4963e0c | ||
|
|
a773a4957a | ||
|
|
87ee731dbe | ||
|
|
9ec36a76f6 | ||
|
|
5dc8283229 | ||
|
|
09b470e6c7 | ||
|
|
40151c7a43 | ||
|
|
34c030b501 | ||
|
|
e9a2528b13 | ||
|
|
e9d72bd022 | ||
|
|
b166686a15 | ||
|
|
c59d3cc624 | ||
|
|
ca95060b05 | ||
|
|
f2380ae354 | ||
|
|
2d039af278 | ||
|
|
831879fe37 | ||
|
|
0451ae07c8 | ||
|
|
ea1dfd8933 | ||
|
|
24519c69a4 | ||
|
|
3e55693bfa | ||
|
|
f5d0947b27 | ||
|
|
b5c4801beb | ||
|
|
3eff8f62b1 | ||
|
|
2da181a399 | ||
|
|
6e8bcf7b69 | ||
|
|
b83e5e2b72 | ||
|
|
da6791d75f | ||
|
|
2a0928b4be | ||
|
|
cac0da4e3d | ||
|
|
7e064365eb | ||
|
|
4918b9c83a | ||
|
|
9bb365e60d | ||
|
|
b3c80e6ecf | ||
|
|
e5c77f64aa | ||
|
|
ed95f4e05f | ||
|
|
693fdfdc5b | ||
|
|
01108ca83d | ||
|
|
3d5b7197f6 | ||
|
|
c313ed2efc | ||
|
|
54c027823b | ||
|
|
f63aceeabe | ||
|
|
243aab1030 | ||
|
|
22dba9ae07 | ||
|
|
d8f75495fe | ||
|
|
2240743100 | ||
|
|
a6a2410c50 | ||
|
|
02857a86fd | ||
|
|
d663d01798 | ||
|
|
3602163b38 | ||
|
|
34751a52a8 | ||
|
|
cb7c382b99 | ||
|
|
83bb3b6d72 | ||
|
|
75737b4ffe | ||
|
|
a5340917a7 | ||
|
|
914d19e7e4 | ||
|
|
eb49dbbdc8 | ||
|
|
912bab5a43 | ||
|
|
76c3f640db | ||
|
|
94092f445f | ||
|
|
f5b56d9855 | ||
|
|
b25a8b4c9f | ||
|
|
7ad9b9dd08 | ||
|
|
856c037bb0 | ||
|
|
388896b963 | ||
|
|
1d8addf675 | ||
|
|
c8c3d32b18 | ||
|
|
bc841dd239 | ||
|
|
9c71d32964 | ||
|
|
d199d84b27 | ||
|
|
065895aa73 | ||
|
|
24aca83de4 | ||
|
|
5a0edb5c39 | ||
|
|
38951fab1a | ||
|
|
1224570fa5 | ||
|
|
733c908e34 | ||
|
|
06592d7d37 | ||
|
|
377b4b038c | ||
|
|
49e31ddb3d | ||
|
|
fd55bdf9a8 | ||
|
|
3f7fd6f9f9 | ||
|
|
1cb36621a1 | ||
|
|
ddd9188eb7 | ||
|
|
02254eac67 | ||
|
|
ebe026b2e9 | ||
|
|
efc7c5b0f4 | ||
|
|
6eb3a243df | ||
|
|
f68a77450d | ||
|
|
b52e972a39 | ||
|
|
2d344e0209 | ||
|
|
519252efd4 | ||
|
|
e59e62fb1b | ||
|
|
1f7923beae | ||
|
|
a35690d13c | ||
|
|
4857569813 | ||
|
|
a2d34d1779 | ||
|
|
48f15d7781 | ||
|
|
a89bca4626 | ||
|
|
63a36fd0f6 | ||
|
|
7cf7e55454 | ||
|
|
5067c867b8 | ||
|
|
acf80b4b92 | ||
|
|
7bb49893ee | ||
|
|
818b4d08da | ||
|
|
f438fbd06f | ||
|
|
297a45d477 | ||
|
|
17fe9dfd5f | ||
|
|
084d12bb45 | ||
|
|
9d0cbca497 | ||
|
|
1587218c6d | ||
|
|
a613b4b101 | ||
|
|
c989e2eda5 | ||
|
|
12d3e36887 | ||
|
|
c6fd381b01 | ||
|
|
a784661025 | ||
|
|
1f9a638bc1 | ||
|
|
456b51d7f8 | ||
|
|
43b0747b83 | ||
|
|
6f0effcc66 | ||
|
|
84767692b0 | ||
|
|
d484614c0f | ||
|
|
3dd8f214bf | ||
|
|
b403bace6c | ||
|
|
0b751a9dd6 | ||
|
|
d3700ac9f8 | ||
|
|
8f434cad08 | ||
|
|
f83292fccc | ||
|
|
90e128f951 | ||
|
|
8efc372a68 | ||
|
|
257fb4d036 | ||
|
|
97261820f6 | ||
|
|
2f83a2168c | ||
|
|
7aa5d84ff4 | ||
|
|
46e99bfb40 | ||
|
|
fb5f59e72e | ||
|
|
8af1a53721 | ||
|
|
7034ffea39 | ||
|
|
c0275eec21 | ||
|
|
94ed0354c2 | ||
|
|
2bd7a7b5f8 | ||
|
|
2cf3408023 | ||
|
|
3b16d33775 | ||
|
|
3ff6374ace | ||
|
|
505aad1e89 | ||
|
|
0ea2fed481 | ||
|
|
6bbc543ac1 | ||
|
|
1ca4f993b0 | ||
|
|
44f448fec4 | ||
|
|
abf7e65816 | ||
|
|
55bce63cea | ||
|
|
710e5afe08 | ||
|
|
cbf37677cb | ||
|
|
efb98c6414 | ||
|
|
01fbcb7044 | ||
|
|
53d2f6320b | ||
|
|
9d02da9d9c | ||
|
|
a0841d76db | ||
|
|
e3c4d611c3 | ||
|
|
79e8c48824 | ||
|
|
9ef298608e | ||
|
|
3ee8d5125b | ||
|
|
59c490fcea | ||
|
|
b8b468195c | ||
|
|
d873a5e68b | ||
|
|
6ad27b43ab | ||
|
|
1df19f65c4 | ||
|
|
00c59b7f2c | ||
|
|
c22a20c1ef | ||
|
|
dbcde14f5e | ||
|
|
a6f4adfed8 | ||
|
|
c140ab970e | ||
|
|
effaba42d0 | ||
|
|
340cacc691 | ||
|
|
a85bedd31c | ||
|
|
23269eab77 | ||
|
|
27ad2e2169 | ||
|
|
5d09841cd5 | ||
|
|
5723e9a77e | ||
|
|
bdedd83368 | ||
|
|
2f5f92ddca | ||
|
|
11ec46c18b | ||
|
|
87a98fe382 | ||
|
|
2b563d4fc8 | ||
|
|
8894ff0fda | ||
|
|
488d2ed886 | ||
|
|
48f190447c | ||
|
|
2773a8bf2f | ||
|
|
63184d0bf5 | ||
|
|
ad36011fc8 | ||
|
|
b82b095f58 | ||
|
|
a9bd5a8bb0 | ||
|
|
6c9850b8f6 | ||
|
|
e89b4e070c | ||
|
|
2f5c810276 | ||
|
|
d90e094d4d | ||
|
|
352f8cee10 | ||
|
|
9f3332b2f2 | ||
|
|
2b71621628 | ||
|
|
5349fc6f4b | ||
|
|
1665b12b86 | ||
|
|
1bbed99636 | ||
|
|
911d84d513 | ||
|
|
bb6bd61c37 | ||
|
|
1a3f836a5a | ||
|
|
b51b5582a0 | ||
|
|
27b1b1f8a8 | ||
|
|
a45e543eac | ||
|
|
50235bbb04 | ||
|
|
a2ddb30f78 | ||
|
|
75fbb831c9 | ||
|
|
3219957eed | ||
|
|
44671a5085 | ||
|
|
bc4873dfe5 | ||
|
|
92657951c7 | ||
|
|
8b2c18ab8c | ||
|
|
18999f29c5 | ||
|
|
e8075bf5fd | ||
|
|
5338325a73 | ||
|
|
4d3810a10d | ||
|
|
672bc471be | ||
|
|
3089cbc2bc | ||
|
|
ce9416d887 | ||
|
|
473d1fb756 | ||
|
|
b880ca05a5 | ||
|
|
cbc9784d21 | ||
|
|
16cb1bbbbf | ||
|
|
a1c2b809ba | ||
|
|
c9691457b8 | ||
|
|
9ef6c78395 | ||
|
|
81f70c4c58 | ||
|
|
869f590bf4 | ||
|
|
3b6aa7eaf5 | ||
|
|
53ef2b0b5d | ||
|
|
4dfe6fc817 | ||
|
|
260143050e | ||
|
|
6adde38399 | ||
|
|
76a40b2f45 | ||
|
|
77c2537df7 | ||
|
|
6a88f622ad | ||
|
|
9b5d8b8a01 | ||
|
|
b4448c5bb9 | ||
|
|
7faf3258f7 | ||
|
|
7c0d03ea3b | ||
|
|
d1837377a4 | ||
|
|
1c3a503a82 | ||
|
|
daafa9123c | ||
|
|
5a1b6e43c9 | ||
|
|
81d502cae8 | ||
|
|
4a99ed2ad8 | ||
|
|
7016724abc | ||
|
|
0a8e3f099e | ||
|
|
45910dc115 | ||
|
|
afd6428411 | ||
|
|
7eb419507b | ||
|
|
b4a6d378ab | ||
|
|
44b7821015 | ||
|
|
52ac819c1f | ||
|
|
c4ba1d55ac | ||
|
|
85acac60c7 | ||
|
|
f54da5f9a6 | ||
|
|
36d47c2274 | ||
|
|
bd082c0a6e | ||
|
|
29dd196193 | ||
|
|
80a8f7a888 | ||
|
|
7f497fe3be | ||
|
|
53fe826f9f | ||
|
|
56b4ecb4ce | ||
|
|
d17717e4b5 | ||
|
|
68da3a4aad | ||
|
|
855480fd7b | ||
|
|
79200e8f96 | ||
|
|
540bc3a54b | ||
|
|
35752a8041 | ||
|
|
86dce21849 | ||
|
|
fca5a625d2 | ||
|
|
2766fad61a | ||
|
|
c6da1db72b | ||
|
|
843c06b007 | ||
|
|
7cf7628b8f | ||
|
|
41b096ba76 | ||
|
|
2a4bd4b0dc | ||
|
|
f4f5281769 | ||
|
|
a4a09cd8c7 | ||
|
|
831b18b4d2 | ||
|
|
e4e5f627c4 | ||
|
|
53e532cbaf | ||
|
|
3fa0cbf0fe | ||
|
|
af8b06dda6 | ||
|
|
72e2473444 | ||
|
|
6e31a040b2 | ||
|
|
6c07688c34 | ||
|
|
598c22a285 | ||
|
|
d392b9c0f6 | ||
|
|
387c166985 | ||
|
|
9115bc118d | ||
|
|
aca11ac966 | ||
|
|
c15d626095 | ||
|
|
79d00b9fe6 | ||
|
|
a92e2fd882 | ||
|
|
7ed51984c7 | ||
|
|
cdf11a3485 | ||
|
|
bbefd22950 | ||
|
|
e08369122d | ||
|
|
0ce0572c40 | ||
|
|
9d19556419 | ||
|
|
67c0e0eb1c | ||
|
|
c5d0dd05b9 | ||
|
|
4e1f877ab4 | ||
|
|
19d4de482d | ||
|
|
bb0e797cee | ||
|
|
122c3a9542 | ||
|
|
15d9ba9906 | ||
|
|
95a22a1a7e | ||
|
|
5309aa225a | ||
|
|
c0cd450c5f | ||
|
|
1b4b71cb35 | ||
|
|
f37f3c4c22 | ||
|
|
83b3fb80d5 | ||
|
|
c242f90440 | ||
|
|
e4912ee175 | ||
|
|
83e1f35f9c | ||
|
|
c42333d085 | ||
|
|
c4c0b0f630 | ||
|
|
aec3c34eea | ||
|
|
c4ff20b9fb | ||
|
|
c7ce35a877 | ||
|
|
5ccfa24b27 | ||
|
|
1c6a6edf5a | ||
|
|
a659de9c9b | ||
|
|
29e28dedf1 | ||
|
|
0acc0b4a74 | ||
|
|
c300e46480 | ||
|
|
0a3f076335 | ||
|
|
12d9551845 | ||
|
|
0d6c799f9c | ||
|
|
a395f5b63c | ||
|
|
2e46fa50b3 | ||
|
|
f9bb2e7a14 | ||
|
|
57e8b9faaf | ||
|
|
c737b83eb5 | ||
|
|
5c91a1a612 | ||
|
|
0c49641094 | ||
|
|
99e909dae4 | ||
|
|
ecf34b47cb | ||
|
|
949b4495fc | ||
|
|
bd7e0174f3 | ||
|
|
ac89b2dc44 | ||
|
|
7e3fceb7dc | ||
|
|
b28ed08a85 | ||
|
|
a488c42dca | ||
|
|
fb233709e0 | ||
|
|
9169cced20 | ||
|
|
1db9708624 | ||
|
|
52b42d0210 | ||
|
|
67f5f09530 | ||
|
|
b9e0747825 | ||
|
|
e44ed248ef | ||
|
|
b0c120d7fd | ||
|
|
177b6d1757 | ||
|
|
ff39b7bc51 | ||
|
|
7401e88844 | ||
|
|
b1e1e29254 | ||
|
|
ffac3250af | ||
|
|
e9fb885d34 | ||
|
|
b87037d187 | ||
|
|
a97680fb04 | ||
|
|
798e526010 | ||
|
|
d344478b48 | ||
|
|
b898a09c4c | ||
|
|
17589e060a | ||
|
|
7867cc1dca | ||
|
|
114b18d7c8 | ||
|
|
5baff6257b | ||
|
|
8264d21520 | ||
|
|
8bd10a2d11 | ||
|
|
05d866f0f7 | ||
|
|
cce88f09b0 | ||
|
|
26475ad10f | ||
|
|
c1a81e4f0d | ||
|
|
4a5cb23730 | ||
|
|
f0e5128fb5 | ||
|
|
63b08b0e70 | ||
|
|
4072ed09ac | ||
|
|
70137808f0 | ||
|
|
36ade3b15c | ||
|
|
6b5f32611d | ||
|
|
43bfe06882 | ||
|
|
e7fbb2273d | ||
|
|
29df8f8f92 | ||
|
|
405b1b8e6f | ||
|
|
b050210737 | ||
|
|
ed02e3522e | ||
|
|
a327b5fb5e | ||
|
|
f9b2fda092 | ||
|
|
0d082bf378 | ||
|
|
d8cef95d56 | ||
|
|
2258e8c652 | ||
|
|
5e19d338b9 | ||
|
|
14ecfc4ce8 | ||
|
|
91f159841b | ||
|
|
170d84d635 | ||
|
|
a962f6535e | ||
|
|
a4055c4a74 | ||
|
|
9ed550ee7f | ||
|
|
00bd7583f7 | ||
|
|
e4619fbc0f | ||
|
|
518d94f5f3 | ||
|
|
389a1791d7 | ||
|
|
905dba67c3 | ||
|
|
54eb41b66f | ||
|
|
ede2673ba5 | ||
|
|
dd50c99ec4 | ||
|
|
357555e507 | ||
|
|
1f6a51b31f | ||
|
|
6d4cf71197 | ||
|
|
87f898d29d | ||
|
|
d5576522ae | ||
|
|
676b83519a | ||
|
|
6addd9acec | ||
|
|
9b5942bf4e | ||
|
|
9faa4e4cbd | ||
|
|
8b80bd71e7 | ||
|
|
8989206461 | ||
|
|
89a21c8e44 | ||
|
|
a7ec6e5ca0 | ||
|
|
a08675352a | ||
|
|
7158b1f787 | ||
|
|
3925ad252f | ||
|
|
f3fd47a792 | ||
|
|
af92f58265 | ||
|
|
81b5f18579 | ||
|
|
184c0cb84b | ||
|
|
c892862822 | ||
|
|
b61d1feec4 | ||
|
|
a73ff16642 | ||
|
|
0e2c8ff220 | ||
|
|
e39a6b96bd | ||
|
|
7763983ef4 | ||
|
|
35f7fe98ae | ||
|
|
da1268fc05 | ||
|
|
533acbde8d | ||
|
|
d72da422de | ||
|
|
891608f812 | ||
|
|
e66da81a20 | ||
|
|
cae0cd00c2 | ||
|
|
32fc87023c | ||
|
|
0021482c1b | ||
|
|
276427e3df | ||
|
|
7b49bde3ad | ||
|
|
a94d940bd3 | ||
|
|
313c3c6fc3 | ||
|
|
de86f71c90 | ||
|
|
098b0531d8 | ||
|
|
34552214bf | ||
|
|
d61a8ba160 | ||
|
|
84ebca58ac | ||
|
|
fb07d19a64 | ||
|
|
def4c54d26 | ||
|
|
027b0fcff7 | ||
|
|
fc0cb44a84 | ||
|
|
574d72b0e7 | ||
|
|
cd5e1afb2b | ||
|
|
0298d6bc19 | ||
|
|
60d2fd4f7e | ||
|
|
487e0c8769 | ||
|
|
5faa0ffe08 | ||
|
|
705ce02580 | ||
|
|
78c674a989 | ||
|
|
84d9be3293 | ||
|
|
30c622052e | ||
|
|
ada56da63e | ||
|
|
5ee125c593 | ||
|
|
4876ae7c22 | ||
|
|
21c5638e1e | ||
|
|
02da84b4cf | ||
|
|
ebb5ede613 | ||
|
|
db4b8b2f43 | ||
|
|
c17f7caa29 | ||
|
|
d7df975971 | ||
|
|
f3f70d6296 | ||
|
|
256d4e2cb3 | ||
|
|
fb31c9006a | ||
|
|
bf000e6a89 | ||
|
|
94b4f10277 | ||
|
|
15671f6dd4 | ||
|
|
2460d2112f | ||
|
|
709badd0f7 | ||
|
|
99153d02ee | ||
|
|
4347b2c5ff | ||
|
|
c13b6ea13a | ||
|
|
6e5d4834f1 | ||
|
|
9f489d8a59 | ||
|
|
c9be1a8e71 | ||
|
|
c1e2f35c96 | ||
|
|
462148a12f | ||
|
|
7e4edc6e3a | ||
|
|
452e7cce01 | ||
|
|
cb7b5dfffb | ||
|
|
0a34fb7a7a | ||
|
|
460337954b | ||
|
|
74a8c3f5bd | ||
|
|
3347d32f2a | ||
|
|
4c2be6b2c5 | ||
|
|
860bb6d615 | ||
|
|
950ffcde2b | ||
|
|
0580c71749 | ||
|
|
c66b0bea41 | ||
|
|
7281bd4a1a | ||
|
|
c9d73fc0c8 | ||
|
|
8720ac2b08 | ||
|
|
33e8b6a64c | ||
|
|
d7cf339ab5 | ||
|
|
714fada9f0 | ||
|
|
d36fd6a47d | ||
|
|
c0d83e96d8 | ||
|
|
3da6251cc7 | ||
|
|
1bf39aa092 | ||
|
|
3387d8fdd2 | ||
|
|
9f926fccd8 | ||
|
|
e9a77c798e | ||
|
|
29691a09fe | ||
|
|
cb73c2a3f9 | ||
|
|
713a41909b | ||
|
|
9972e253d5 | ||
|
|
55309be9a1 | ||
|
|
fd75f3af28 | ||
|
|
af7e5eb03e | ||
|
|
b97ce7a25f | ||
|
|
89d617c152 | ||
|
|
4595c565cc | ||
|
|
8f55d4054a | ||
|
|
2e255b10a7 | ||
|
|
cf9c1b52ed | ||
|
|
d3b3c44cbd | ||
|
|
edb25b6dca | ||
|
|
4bf748641d | ||
|
|
16a6b70708 | ||
|
|
40355cb2d0 | ||
|
|
b52aaaadf2 | ||
|
|
f55c0aa1c9 | ||
|
|
333c51b0f9 | ||
|
|
46dee2919e | ||
|
|
799618dee7 | ||
|
|
96aaa0d8e1 | ||
|
|
5556e3efec | ||
|
|
d8b2d4435a | ||
|
|
a4315b4789 | ||
|
|
3e8dd61607 | ||
|
|
1d28a67d21 | ||
|
|
3a551e9cec | ||
|
|
cf6693a534 | ||
|
|
8c5c275952 | ||
|
|
5fa4b4cb88 | ||
|
|
58525f247e | ||
|
|
d78f19525e | ||
|
|
5559c8205f | ||
|
|
2a6a97526d | ||
|
|
1adea8f014 | ||
|
|
29177ec86b | ||
|
|
741e88e1f0 | ||
|
|
66bddc5730 | ||
|
|
6eaa7c0530 | ||
|
|
b257fae03e | ||
|
|
2d24324dea | ||
|
|
ec597f697a | ||
|
|
3bed62a473 | ||
|
|
b5f7227ecd | ||
|
|
615adf8281 | ||
|
|
cb7bb3242a | ||
|
|
4b08eea998 | ||
|
|
01551942b3 | ||
|
|
720d334053 | ||
|
|
9397d1ac2e | ||
|
|
1530bb89fe | ||
|
|
e9b04b923e | ||
|
|
f09683949d | ||
|
|
e1f96974bb | ||
|
|
1fc261937f | ||
|
|
a94211d3d3 | ||
|
|
534f6b6a54 | ||
|
|
901764bf70 | ||
|
|
e67d6e8a80 | ||
|
|
16476f736a | ||
|
|
e9ecd89cda | ||
|
|
55036511ab | ||
|
|
3cf5d31f5d | ||
|
|
84ae36cf1a | ||
|
|
00515ac14a | ||
|
|
245612d0eb | ||
|
|
ae6e3b4f17 | ||
|
|
12a3f1c36c | ||
|
|
1af1e92b60 | ||
|
|
5d8b9fd4db | ||
|
|
a1ad7a5def | ||
|
|
398d1aa820 | ||
|
|
38278f3432 | ||
|
|
baf4662ed8 | ||
|
|
cf07c9f1a2 | ||
|
|
446bd0ad1f | ||
|
|
3d5e46faac | ||
|
|
b8fba8997a | ||
|
|
a07c81d0d9 | ||
|
|
0252d091ca | ||
|
|
18d9ada58d | ||
|
|
055d2cc62c | ||
|
|
e15c5c58d8 | ||
|
|
b734aca4d0 | ||
|
|
e495b36dfb | ||
|
|
cdcfe03d67 | ||
|
|
2c6dc20046 | ||
|
|
a8c3b7ac2e | ||
|
|
98572c6efb | ||
|
|
70840c53aa | ||
|
|
9fbd27f3a8 | ||
|
|
c3c1897258 | ||
|
|
5403219746 | ||
|
|
fb08903a8a | ||
|
|
416005654e | ||
|
|
1debf77ab4 | ||
|
|
f1a8bb08da | ||
|
|
7edff12bbf | ||
|
|
34d601f49c | ||
|
|
ec38473d88 | ||
|
|
875c77ae65 | ||
|
|
75e24f9f79 | ||
|
|
16a4662129 | ||
|
|
1eda1eb9de | ||
|
|
d981fd35ef | ||
|
|
6f1dc44932 | ||
|
|
95b929dd27 | ||
|
|
0c75b98f48 | ||
|
|
ecc5a0bf8a | ||
|
|
d9315bec84 | ||
|
|
d1ee7f4353 | ||
|
|
979095337b | ||
|
|
34b528b1f4 | ||
|
|
5ea056a3fc | ||
|
|
2ba31244c2 | ||
|
|
3ea16694b4 | ||
|
|
35e872310d | ||
|
|
b86b24d444 | ||
|
|
45e1a6ffd6 | ||
|
|
c87f001956 | ||
|
|
1fc3b3a4ed | ||
|
|
c706a2d77c | ||
|
|
8577fc6701 | ||
|
|
ead3067d49 | ||
|
|
4772b8c5bb | ||
|
|
6817cfbeea | ||
|
|
f851238eab | ||
|
|
79157c465a | ||
|
|
64438f6b6d | ||
|
|
f2b914a4c5 | ||
|
|
da71004898 | ||
|
|
e9019b294a | ||
|
|
e2c3ea22e4 | ||
|
|
c7f3f20229 | ||
|
|
46dc024335 | ||
|
|
34c68cfef0 | ||
|
|
d6a564a38b | ||
|
|
31c69088ca | ||
|
|
49bb8fd515 | ||
|
|
b8f8a0d455 | ||
|
|
374e34a8b8 | ||
|
|
7ef1d72314 | ||
|
|
5666a3d74c | ||
|
|
8004b411da | ||
|
|
e473c46dc3 | ||
|
|
148309245b | ||
|
|
5dc39fe068 | ||
|
|
47c7a3c5e3 | ||
|
|
85b7e86e58 | ||
|
|
f871581997 | ||
|
|
3fca465f1d | ||
|
|
7955dd86f4 | ||
|
|
40a4e6d7b0 | ||
|
|
bef4ac83a4 | ||
|
|
bde83fc705 | ||
|
|
cad18bee73 | ||
|
|
98e5eaa4e0 | ||
|
|
3129e94363 | ||
|
|
7ac0e50bd9 | ||
|
|
7d502fae23 | ||
|
|
894eeef140 | ||
|
|
7991069282 | ||
|
|
39f3972a24 | ||
|
|
fc0e5ecd3b | ||
|
|
8897d9f82b | ||
|
|
1329b5f684 | ||
|
|
e58bc738d0 | ||
|
|
af63579f31 | ||
|
|
55fad3a9ec | ||
|
|
3250e0a1e6 | ||
|
|
8df287f45e | ||
|
|
f458a77449 | ||
|
|
1953c05b33 | ||
|
|
a03c553000 | ||
|
|
ecdc4076d9 | ||
|
|
cd2ea3793e | ||
|
|
d40ffd944f | ||
|
|
0ee4b52baa | ||
|
|
5e7db7a27e | ||
|
|
9631021f84 | ||
|
|
157193c831 | ||
|
|
1415f12506 | ||
|
|
4df497a768 | ||
|
|
9a13eb0f90 | ||
|
|
eaa49bce05 | ||
|
|
96334d859a | ||
|
|
13855b1501 | ||
|
|
277b24e2f0 | ||
|
|
abb2a2a6e2 | ||
|
|
961f5fd387 | ||
|
|
bdb62de81c | ||
|
|
422a850792 | ||
|
|
1dfcc77098 | ||
|
|
13097d7e0e | ||
|
|
ea9b7eddde | ||
|
|
07056613e5 | ||
|
|
4d45793ec7 | ||
|
|
4718133ab6 | ||
|
|
ba518fa975 | ||
|
|
0311e78690 | ||
|
|
9db47428db | ||
|
|
84dc3c2093 | ||
|
|
7d37b06555 | ||
|
|
6e6a89fb8c | ||
|
|
135d9c5e55 | ||
|
|
dd46048ea6 | ||
|
|
8fe38b03f6 | ||
|
|
0adadeb280 | ||
|
|
775a5122c9 | ||
|
|
5099060be2 | ||
|
|
201c93e20a | ||
|
|
c852d91a72 | ||
|
|
a3c6e62bd5 | ||
|
|
8cd18fe190 | ||
|
|
5e1452f9b9 | ||
|
|
b76de65886 | ||
|
|
48b3bd8bf3 | ||
|
|
ab1715edec | ||
|
|
3589783ee1 | ||
|
|
af43e22f03 | ||
|
|
956f6403b8 | ||
|
|
82ed1853fa | ||
|
|
eb0403945b | ||
|
|
3126af94ac | ||
|
|
e71ad536a9 | ||
|
|
d0322b471d | ||
|
|
a6af11e644 | ||
|
|
1809180d41 | ||
|
|
9612b1b9e9 | ||
|
|
526d4c4d15 | ||
|
|
3f4c824fd5 | ||
|
|
9c25feb67c | ||
|
|
e31faf81a9 | ||
|
|
6eb13c24aa | ||
|
|
dd20017b0a | ||
|
|
6630051ef3 | ||
|
|
a66d91c507 | ||
|
|
2f34f0458b | ||
|
|
076abc8ae7 | ||
|
|
5134e57109 | ||
|
|
3d1ccf2028 | ||
|
|
60b980fbff | ||
|
|
df20f1b5ab | ||
|
|
27144f07b1 | ||
|
|
8135fdb9d2 | ||
|
|
985ad18048 | ||
|
|
768ed2666d | ||
|
|
c289a53ed3 | ||
|
|
5c206718c8 | ||
|
|
d7f18e879a | ||
|
|
4881a2c274 | ||
|
|
5eb5fa05bc | ||
|
|
c7e0f36d7c | ||
|
|
54d54ca78e | ||
|
|
4cd591f81c | ||
|
|
d21d732545 | ||
|
|
ea4854d239 | ||
|
|
7ca95b9413 | ||
|
|
00d0d383f8 | ||
|
|
401a8cdd77 | ||
|
|
b2384855fd | ||
|
|
602c087c29 | ||
|
|
0d96ed5436 | ||
|
|
97fa3ac3b3 |
103
.doc/README.md
Normal file
103
.doc/README.md
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
# Phpdoc dokuwiki template
|
||||||
|
This directory contains a template for rendering iTop phpdoc as dokuwiki pages.
|
||||||
|
|
||||||
|
|
||||||
|
Conventional tags that you should use:
|
||||||
|
* `@internal` : exclude from the documentation.
|
||||||
|
* `@api` : it means that a method is an api, thus it may be interacted with.
|
||||||
|
* `@see` : it points to another documented method
|
||||||
|
* `@link` : external url
|
||||||
|
* if you point to another page of the wiki, please use relative links.
|
||||||
|
* `@example` : let you provide example of code
|
||||||
|
* `@param`, `@return`, `@throws`, ...
|
||||||
|
|
||||||
|
|
||||||
|
## Special instructions
|
||||||
|
|
||||||
|
Some iTop specific tags were added :
|
||||||
|
* `@api-advanced`: it means that a method is an `@api` but mark it also as "complex" to use
|
||||||
|
* `@overwritable-hook`: used to mark a method as "designed to be extended"
|
||||||
|
* `@extension-hook`: not used for now
|
||||||
|
* `@phpdoc-tuning-exclude-inherited`: once this tag is present on a class, it's inherited methods won't be showed.
|
||||||
|
|
||||||
|
|
||||||
|
### known limitations:
|
||||||
|
#### `@see` tags must be very specific:
|
||||||
|
* always prefix class members (attributes or methods) with `ClassName::` (do not use self)
|
||||||
|
* for methods always suffix them with `()`,
|
||||||
|
* do not reference variables since they are not documented. If you have to, always prefix them with `$`
|
||||||
|
|
||||||
|
examples:
|
||||||
|
```
|
||||||
|
/**
|
||||||
|
* @see DBObject
|
||||||
|
* @see DBObject::Get()
|
||||||
|
* @see DBObject::$foo
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Do not use inline tags, they do not work properly, example:
|
||||||
|
```
|
||||||
|
/**
|
||||||
|
* This is a texts with an inline tag {@see [FQSEN] [<description>]} it must never be used
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### The `@example` tag must respect this very precise syntax
|
||||||
|
* the sentence in the first line (next to the tag) is the title, it must be enclosed by double quotes
|
||||||
|
* the following lines are the sample code.
|
||||||
|
* 💔 since we simply hack the official tag, this syntax must be respected carefully 💔
|
||||||
|
example:
|
||||||
|
```
|
||||||
|
/**
|
||||||
|
* @example "This is the title of the multiline example"
|
||||||
|
* $foo = DBObject::Get('foo');
|
||||||
|
* DBObject::Set('foo', ++$foo);
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
|
## How content is included into the documentation
|
||||||
|
|
||||||
|
**For a class** those requirements have to be respected:
|
||||||
|
- the file containing the class must be listed in `/phpdoc/files/file[]` of `.doc/phpdoc-objects-manipulation.dist.xml`
|
||||||
|
- the class **must not** have the tag `@internal`
|
||||||
|
- the class **must** have at least one of: `@api`, `@api-advanced`, `@overwritable-hook`, `@extension-hook`
|
||||||
|
|
||||||
|
Then, **for a method** of an eligible class:
|
||||||
|
- **public** methods **must** have at least one of: `@api`, `@api-advanced`, `@overwritable-hook`, `@extension-hook`
|
||||||
|
- **protected** methods **must** have at least one of: `@overwritable-hook`, `@extension-hook`
|
||||||
|
- **private** methods are **always excluded**
|
||||||
|
|
||||||
|
**Class properties** and **constants** are never documented (this is subject to change).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## A note about the rendering engine
|
||||||
|
|
||||||
|
:notebook: as spaces are used to mark code, the templates (`.doc/phpdoc-templates/combodo-wiki/*`) have very few indentation, thus they are awful to read (sorry).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
```
|
||||||
|
cd .doc
|
||||||
|
composer require phpdocumentor/phpdocumentor:~2 --dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## Generation
|
||||||
|
`./bin/build-doc-object-manipulation` and `./bin/build-doc-extensions` contains examples of doc. generation, beware: they have to be called from the .doc directory:
|
||||||
|
```shell
|
||||||
|
cd /path/to/itop/.doc
|
||||||
|
./bin/build-doc-object-manipulation
|
||||||
|
```
|
||||||
|
|
||||||
|
the resulting documentation is written into `data/phpdocumentor/output`
|
||||||
|
|
||||||
|
|
||||||
|
## Dokuwiki requirements
|
||||||
|
* the template uses the [wrap plugin](https://www.dokuwiki.org/plugin:wrap).
|
||||||
|
* the generated files have to be placed under an arbitrary directory of `[/path/to/dokuwiki]/data/pages`.
|
||||||
|
* the html has to be activated [config:htmlok](https://www.dokuwiki.org/config:htmlok)
|
||||||
|
* the generated files have to be in lowercase
|
||||||
6
.doc/bin/build-doc-extensions
Executable file
6
.doc/bin/build-doc-extensions
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh -x
|
||||||
|
|
||||||
|
rm -rf /tmp/phpdoc-twig-cache/ && rm -rf data/phpdocumentor/output/extensions/ && rm -rf data/phpdocumentor/temp/extensions/ && .doc/vendor/bin/phpdoc -c .doc/phpdoc-extensions.dist.xml -vvv
|
||||||
|
|
||||||
|
# now wee need to lowercase every generated file because dokuwiki can't handle uppercase
|
||||||
|
cd data/phpdocumentor/output/extensions/ && for i in $( ls | grep [A-Z] ); do mv -i $i `echo $i | tr 'A-Z' 'a-z'`; done
|
||||||
7
.doc/bin/build-doc-object-manipulation
Executable file
7
.doc/bin/build-doc-object-manipulation
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh -x
|
||||||
|
|
||||||
|
rm -rf /tmp/phpdoc-twig-cache/ && rm -rf ../data/phpdocumentor/output/objects-manipulation/ && rm -rf ../data/phpdocumentor/temp/objects-manipulation/ && ./vendor/bin/phpdoc -c ./phpdoc-objects-manipulation.dist.xml -vvv
|
||||||
|
|
||||||
|
|
||||||
|
# now wee need to lowercase every generated file because dokuwiki can't handle uppercase
|
||||||
|
cd ../data/phpdocumentor/output/objects-manipulation/ && for i in $( ls | grep [A-Z] ); do mv -i $i `echo $i | tr 'A-Z' 'a-z'`; done
|
||||||
6
.doc/composer.json
Normal file
6
.doc/composer.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"require-dev": {
|
||||||
|
"phpdocumentor/phpdocumentor": "~2",
|
||||||
|
"jms/serializer": "1.7.*"
|
||||||
|
}
|
||||||
|
}
|
||||||
3015
.doc/composer.lock
generated
Normal file
3015
.doc/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
20
.doc/phpdoc-extensions.dist.xml
Executable file
20
.doc/phpdoc-extensions.dist.xml
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<phpdoc>
|
||||||
|
<title><![CDATA[iTop extensions]]></title>
|
||||||
|
|
||||||
|
<parser>
|
||||||
|
<target>../data/phpdocumentor/temp/extensions</target>
|
||||||
|
</parser>
|
||||||
|
|
||||||
|
<transformer>
|
||||||
|
<target>../data/phpdocumentor/output/extensions</target>
|
||||||
|
</transformer>
|
||||||
|
|
||||||
|
<transformations>
|
||||||
|
<template name="phpdoc-templates/combodo-wiki"/>
|
||||||
|
</transformations>
|
||||||
|
|
||||||
|
<files>
|
||||||
|
<file>../application/applicationextension.inc.php</file>
|
||||||
|
</files>
|
||||||
|
</phpdoc>
|
||||||
58
.doc/phpdoc-objects-manipulation.dist.xml
Executable file
58
.doc/phpdoc-objects-manipulation.dist.xml
Executable file
@@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<phpdoc>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
/**
|
||||||
|
The documentation of this file can be found here : https://docs.phpdoc.org/references/configuration.html
|
||||||
|
it has to be completed by the CLI parameters documentation which is more comprehensive: https://docs.phpdoc.org/references/commands/project_run.html#usage
|
||||||
|
|
||||||
|
usage:
|
||||||
|
vendor/bin/phpdoc -c phpdoc-objects-manipulation.dist.xml
|
||||||
|
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<title><![CDATA[iTop's objects manipulation API]]></title>
|
||||||
|
|
||||||
|
<parser>
|
||||||
|
<default-package-name>iTopORM</default-package-name>
|
||||||
|
<target>../data/phpdocumentor/temp/objects-manipulation</target>
|
||||||
|
<visibility>public,protected</visibility>
|
||||||
|
<markers>
|
||||||
|
<!--<item>TODO</item>-->
|
||||||
|
<!--<item>FIXME</item>-->
|
||||||
|
</markers>
|
||||||
|
<extensions>
|
||||||
|
<extension>php</extension>
|
||||||
|
</extensions>
|
||||||
|
</parser>
|
||||||
|
|
||||||
|
<transformer>
|
||||||
|
<target>../data/phpdocumentor/output/objects-manipulation</target>
|
||||||
|
</transformer>
|
||||||
|
|
||||||
|
<transformations>
|
||||||
|
<template name="phpdoc-templates/combodo-wiki"/>
|
||||||
|
</transformations>
|
||||||
|
|
||||||
|
<!--<logging>-->
|
||||||
|
<!--<level>warn</level>-->
|
||||||
|
<!--<paths>-->
|
||||||
|
<!--<!–<default>data/phpdocumentor/log/objects-manipulation/{DATE}.log</default>–>-->
|
||||||
|
<!--<!–<errors>data/phpdocumentor/log/objects-manipulation/{DATE}.errors.log</errors>–>-->
|
||||||
|
|
||||||
|
<!--<default>{APP_ROOT}/data/log/{DATE}.log</default>-->
|
||||||
|
<!--<errors>{APP_ROOT}/data/log/{DATE}.errors.log</errors>-->
|
||||||
|
<!--</paths>-->
|
||||||
|
<!--</logging>-->
|
||||||
|
|
||||||
|
<files>
|
||||||
|
<file>../core/dbobject.class.php</file>
|
||||||
|
<file>../core/dbobjectsearch.class.php</file>
|
||||||
|
<file>../core/metamodel.class.php</file>
|
||||||
|
<file>../core/dbobjectset.class.php</file>
|
||||||
|
<file>../core/dbsearch.class.php</file>
|
||||||
|
<file>../core/dbunionsearch.class.php</file>
|
||||||
|
</files>
|
||||||
|
|
||||||
|
</phpdoc>
|
||||||
136
.doc/phpdoc-templates/combodo-wiki/class.txt.twig
Normal file
136
.doc/phpdoc-templates/combodo-wiki/class.txt.twig
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
{% extends 'layout.txt.twig' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<wrap button>[[start|🔙 Back]]</wrap>
|
||||||
|
|
||||||
|
{% if node.tags['internal'] is defined %}
|
||||||
|
====== {{ node.name }} ======
|
||||||
|
<WRAP alert>This class is "internal", and thus is not documented!</WRAP>
|
||||||
|
{% elseif node.tags['api'] is not defined and node.tags['api-advanced'] is not defined and node.tags['overwritable-hook'] is not defined and node.tags['extension-hook'] is not defined %}
|
||||||
|
====== {{ node.name }} ======
|
||||||
|
<WRAP alert>This class is neither "api", "api-advanced", "overwritable-hook" or "extension-hook", and thus is not documented!</WRAP>
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
====== {{ node.name }} ======
|
||||||
|
|
||||||
|
{% if node.deprecated %}<wrap danger>deprecated</wrap>{% endif %}
|
||||||
|
{% if node.abstract %}<wrap warning>abstract</wrap>{% endif %}
|
||||||
|
{% if node.final %}<wrap notice>final</wrap>{% endif %}
|
||||||
|
{% include 'includes/wrap-tags.txt.twig' with {structure:node, wrap: 'safety', wrapTags: ['api', 'api-advanced', 'overwritable-hook', 'extension-hook']} %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% if node.deprecated %}
|
||||||
|
=== **<del>Deprecated</del>**===
|
||||||
|
//{{ node.tags.deprecated[0].description }}//
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
== {{ node.summary|replace({"\n":""})|raw }} ==
|
||||||
|
<html>{{ node.description|markdown|raw }}</html>
|
||||||
|
|
||||||
|
|
||||||
|
{% include 'includes/code-examples.txt.twig' with {structure:node, title_level: '====='} %}
|
||||||
|
|
||||||
|
|
||||||
|
{% set class = node.parent %}
|
||||||
|
{% block hierarchy_element %}
|
||||||
|
|
||||||
|
{% if class and class.name is defined and class.name|trim != '' %}
|
||||||
|
==== parent ====
|
||||||
|
{% set child = class %}
|
||||||
|
{% set class = class.parent %}
|
||||||
|
{{ block('hierarchy_element') }}
|
||||||
|
[[{{ child.name }}|{{ child.name }}]]
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% for interface in node.interfaces|sort_asc %}
|
||||||
|
{% if loop.first %}
|
||||||
|
==== Implements ====
|
||||||
|
{% endif %}
|
||||||
|
{% if loop.length > 1 %} * {% endif %}{{ interface.fullyQualifiedStructuralElementName ?: interface }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
{% for trait in node.usedTraits|sort_asc %}
|
||||||
|
{% if loop.first %}
|
||||||
|
==== Uses traits ====
|
||||||
|
{% endif %}
|
||||||
|
{% if loop.length > 1 %} * {% endif %}{{ trait.fullyQualifiedStructuralElementName ?: trait }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
{% include 'includes/see-also.txt.twig' with {structure:node, title_level: '==='} %}
|
||||||
|
|
||||||
|
{% include 'includes/tags.txt.twig' with {structure:node, title_level: '=====', blacklist: ['link', 'see', 'abstract', 'example', 'method', 'property', 'property-read', 'property-write', 'package', 'subpackage', 'phpdoc-tuning-exclude-inherited', 'api', 'api-advanced', 'overwritable-hook', 'extension-hook', 'copyright', 'license', 'code-example']} %}
|
||||||
|
|
||||||
|
{% set methods = node.inheritedMethods.merge(node.methods.merge(node.magicMethods)) %}
|
||||||
|
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'api'} %}
|
||||||
|
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'api-advanced'} %}
|
||||||
|
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'overwritable-hook'} %}
|
||||||
|
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'extension-hook'} %}
|
||||||
|
|
||||||
|
|
||||||
|
{% include 'includes/code-examples.txt.twig' with {structure:node, title_level: '=====', sub_title_level: '=='} %}
|
||||||
|
|
||||||
|
<WRAP clear />
|
||||||
|
|
||||||
|
{% for method in methods|sort_asc
|
||||||
|
if method.visibility == 'public'
|
||||||
|
and (
|
||||||
|
method.tags['api'] is defined
|
||||||
|
or method.tags['api-advanced'] is defined
|
||||||
|
or method.tags['overwritable-hook'] is defined
|
||||||
|
or method.tags['extension-hook'] is defined
|
||||||
|
)
|
||||||
|
and (
|
||||||
|
node.tags['phpdoc-tuning-exclude-inherited'] is not defined
|
||||||
|
or method.parent.name == node.name
|
||||||
|
)
|
||||||
|
%}
|
||||||
|
{%- if loop.first %}
|
||||||
|
===== Public methods =====
|
||||||
|
{% endif %}
|
||||||
|
{{ block('method') }}
|
||||||
|
{% endfor %}
|
||||||
|
{% for method in methods|sort_asc if method.visibility == 'protected' and (method.tags['overwritable-hook'] is defined or method.tags['extension-hook'] is defined) %}
|
||||||
|
{%- if loop.first %}
|
||||||
|
===== Protected methods =====
|
||||||
|
{% endif %}
|
||||||
|
{{ block('method') }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% set constants = node.inheritedConstants.merge(node.constants) %}
|
||||||
|
{% if constants|length > 0 %}
|
||||||
|
===== Constants =====
|
||||||
|
{% for constant in constants|sort_asc %}
|
||||||
|
{{ block('constant') }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{#{% set properties = node.inheritedProperties.merge(node.properties.merge(node.magicProperties)) %}#}
|
||||||
|
{#{% for property in properties|sort_asc if property.visibility == 'public' %}#}
|
||||||
|
{#{%- if loop.first %}#}
|
||||||
|
{#===== Public properties =====#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
{#{{ block('property') }}#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
{#{% for property in properties|sort_asc if property.visibility == 'protected' %}#}
|
||||||
|
{#{%- if loop.first %}#}
|
||||||
|
{#===== Protected properties =====#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
{#{{ block('property') }}#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
|
||||||
|
|
||||||
|
{%- endif %} {#{% elseif node.tags['xxx'] is not defined and ... #}
|
||||||
|
|
||||||
|
<wrap button>[[start|🔙 Back]]</wrap>
|
||||||
|
{% endblock %}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{% block constant %}
|
||||||
|
|
||||||
|
<WRAP group box >
|
||||||
|
<WRAP twothirds column >
|
||||||
|
==== {{ constant.name }} ====
|
||||||
|
</WRAP>{# twothirds column#}
|
||||||
|
|
||||||
|
<WRAP third column>
|
||||||
|
{% if constant.deprecated %}<wrap danger>deprecated</wrap> {% endif %}
|
||||||
|
{% if (node.parent is not null and constant.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}<wrap notice>inherited</wrap> {% endif %}
|
||||||
|
</WRAP>{# third column#}
|
||||||
|
|
||||||
|
== {{ constant.summary|replace({"\n":""})|raw }} ==
|
||||||
|
<html>{{ constant.description|markdown|raw }}</html>
|
||||||
|
|
||||||
|
{% if constant.deprecated %}
|
||||||
|
=== Deprecated ===
|
||||||
|
{{ constant.tags.deprecated[0].description|raw }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'includes/inherited-from.txt.twig' with {structure:constant} %}
|
||||||
|
|
||||||
|
{% include 'includes/see-also.txt.twig' with {structure:constant, title_level: '=='} %}
|
||||||
|
|
||||||
|
{% include 'includes/uses.txt.twig' with {structure:constant, title_level: '=='} %}
|
||||||
|
|
||||||
|
{% include 'includes/tags.txt.twig' with {structure:constant, title_level: '==', blacklist: ['link', 'see', 'var', 'deprecated', 'uses', 'package', 'subpackage', 'todo', 'code-example']} %}
|
||||||
|
|
||||||
|
</WRAP>{# group #}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
95
.doc/phpdoc-templates/combodo-wiki/elements/method.txt.twig
Normal file
95
.doc/phpdoc-templates/combodo-wiki/elements/method.txt.twig
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
{% block method %}
|
||||||
|
|
||||||
|
|
||||||
|
<WRAP group box >
|
||||||
|
<WRAP twothirds column >
|
||||||
|
==== {{ method.name }} ====
|
||||||
|
</WRAP>{# twothirds column#}
|
||||||
|
<WRAP third column >
|
||||||
|
{% include 'includes/wrap-tags.txt.twig' with {structure:method, wrap: 'safety', wrapTags: ['api', 'api-advanced', 'overwritable-hook', 'extension-hook']} %}
|
||||||
|
{% if method.deprecated %}<wrap danger>deprecated</wrap> {% endif %}
|
||||||
|
{% if (node.parent is not null and method.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}<wrap notice>inherited</wrap> {% endif %}
|
||||||
|
{% if method.abstract %}<wrap warning>abstract</wrap> {% endif %}
|
||||||
|
{% if method.final %}<wrap notice>final</wrap> {% endif %}
|
||||||
|
<wrap notice>{{ method.visibility }}</wrap>
|
||||||
|
{% if method.static %}<wrap warning>static</wrap> {% endif %}
|
||||||
|
</WRAP>{# third column#}
|
||||||
|
|
||||||
|
|
||||||
|
== {{ method.summary|replace({"\n":""})|raw }} ==
|
||||||
|
<html>{{ method.description|markdown|raw }}</html>
|
||||||
|
|
||||||
|
<code php>{% if method.abstract %}abstract {% endif %}{% if method.final %}final {% endif %}{{ method.visibility }} {% if method.static %}static {% endif %}{{ method.name }}({% for argument in method.arguments %}{{ argument.isVariadic ? '...' }}{{ argument.name }}{{ argument.default ? (' = '~argument.default)|raw }}{% if not loop.last %}, {% endif %}{% endfor %})</code>
|
||||||
|
|
||||||
|
<WRAP twothirds column >
|
||||||
|
|
||||||
|
|
||||||
|
=== Parameters ===
|
||||||
|
{% if method.arguments|length > 0 -%}
|
||||||
|
^ types ^ name ^ default ^ description ^
|
||||||
|
{% for argument in method.arguments -%}
|
||||||
|
| **<nowiki>{{ argument.types|join('|')|raw }}</nowiki>** | {{ argument.name }} {{ argument.isVariadic ? '<small style="color: gray">variadic</small>' }} | <nowiki>{{ argument.default|raw }}</nowiki> | {{ argument.description|trim|replace("\n", ' ')|raw }} |{{ "\r\n" }}
|
||||||
|
{%- endfor %}
|
||||||
|
{% else %}
|
||||||
|
//none//
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{#=== Parameters ===#}
|
||||||
|
{#{% if method.arguments|length > 0 -%}#}
|
||||||
|
{#{% for argument in method.arguments -%}#}
|
||||||
|
{#== {{ argument.name }} ==#}
|
||||||
|
|
||||||
|
|
||||||
|
{#{% set varDesc %}#}
|
||||||
|
{#<span style="margin:0 10px; 0 20px; font-weight: bold;">{{ argument.types|join('|') }}</span>#}
|
||||||
|
{#{{ argument.isVariadic ? '<small style="color: gray">variadic</small>' }}#}
|
||||||
|
{#{{ argument.description|raw }}#}
|
||||||
|
{#{% endset %}#}
|
||||||
|
{#<html>{{ varDesc|markdown|raw }}</html>#}
|
||||||
|
{#{%- endfor %}#}
|
||||||
|
{#{% else %}#}
|
||||||
|
{#<wrap tip>This method has no parameter</wrap>#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
|
||||||
|
|
||||||
|
{% if method.response and method.response.types|join() != 'void' %}
|
||||||
|
=== Returns ===
|
||||||
|
<html>{{ ('**' ~ method.response.types|join('|')|trim ~ '** ' ~ method.response.description)|markdown|raw }}</html>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</WRAP>{# twothirds column#}
|
||||||
|
|
||||||
|
<WRAP third column >
|
||||||
|
|
||||||
|
{% if method.tags.throws|length > 0 or method.tags.throw|length > 0 %}
|
||||||
|
=== Throws ===
|
||||||
|
{% for exception in method.tags.throws -%}
|
||||||
|
{% if loop.length > 1 %} * {% endif %}''{{ exception.types|join('|')|raw }}'' <nowiki>{{ exception.description|raw }}</nowiki>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'includes/inherited-from.txt.twig' with {structure:method} %}
|
||||||
|
|
||||||
|
{% include 'includes/see-also.txt.twig' with {structure:method, title_level: '==='} %}
|
||||||
|
|
||||||
|
{% include 'includes/uses.txt.twig' with {structure:method, title_level: '==='} %}
|
||||||
|
|
||||||
|
{% include 'includes/used-by.txt.twig' with {structure:method, title_level: '==='} %}
|
||||||
|
|
||||||
|
{% include 'includes/tags-with-description.txt.twig' with {structure:method, title_level: '===', WRAP: 'info', tagsWithDescription: ['api', 'api-advanced', 'overwritable-hook', 'extension-hook']} %}
|
||||||
|
|
||||||
|
{% include 'includes/tags.txt.twig' with {structure:method, title_level: '===', blacklist: ['todo', 'link', 'see', 'abstract', 'example', 'param', 'return', 'access', 'deprecated', 'throws', 'throw', 'uses', 'api', 'api-advanced', 'overwritable-hook', 'extension-hook', 'used-by', 'inheritdoc', 'code-example']} %}
|
||||||
|
|
||||||
|
</WRAP>{# third column#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% include 'includes/code-examples.txt.twig' with {structure:method, title_level: '==='} %}
|
||||||
|
|
||||||
|
</WRAP>{# group #}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
{% block property %}
|
||||||
|
|
||||||
|
<WRAP group box>
|
||||||
|
<WRAP twothirds column >
|
||||||
|
==== ${{ property.name }} ====
|
||||||
|
</WRAP>{# twothirds column#}
|
||||||
|
|
||||||
|
<WRAP third column>
|
||||||
|
{% if property.deprecated %}<wrap danger>deprecated</wrap> {% endif %}
|
||||||
|
{% if (node.parent is not null and property.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}<wrap notice>inherited</wrap> {% endif %}
|
||||||
|
</WRAP>{# third column#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
== {{ property.summary|replace({"\n":""})|raw }} ==
|
||||||
|
<html>{{ property.description|markdown|raw }}</html>
|
||||||
|
{% if property.var.0.description %}<html>{{ property.var.0.description|markdown|raw }}</html>{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{#{% if property.types %}#}
|
||||||
|
{#== Type ==#}
|
||||||
|
{#{% for type in property.types %}#}
|
||||||
|
{#{% if loop.length > 1 %} * {% endif %}{{ type|raw }} : {{ type.description|raw }}#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
{#{{ property.types|join('|')|raw }}#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
|
||||||
|
|
||||||
|
{% if property.deprecated %}
|
||||||
|
== Deprecated ==
|
||||||
|
{{ property.tags.deprecated[0].description }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'includes/inherited-from.txt.twig' with {structure:property} %}
|
||||||
|
|
||||||
|
{% include 'includes/see-also.txt.twig' with {structure:property, title_level: '=='} %}
|
||||||
|
|
||||||
|
{% include 'includes/uses.txt.twig' with {structure:property, title_level: ''} %}
|
||||||
|
|
||||||
|
{% include 'includes/tags.txt.twig' with {structure:property, title_level: '==', blacklist: ['link', 'see', 'access', 'var', 'deprecated', 'uses', 'todo', 'code-example']} %}
|
||||||
|
|
||||||
|
|
||||||
|
<code php>{{ property.visibility }} ${{ property.name }}{% if property.types %} : {{ property.types|join('|')|raw }}{% endif %}</code>
|
||||||
|
|
||||||
|
</WRAP>{# group #}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
1
.doc/phpdoc-templates/combodo-wiki/file.source.txt.twig
Normal file
1
.doc/phpdoc-templates/combodo-wiki/file.source.txt.twig
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ node.source|raw }}
|
||||||
122
.doc/phpdoc-templates/combodo-wiki/file.txt.twig
Normal file
122
.doc/phpdoc-templates/combodo-wiki/file.txt.twig
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
{% extends 'layout.txt.twig' %}
|
||||||
|
|
||||||
|
{% block javascripts %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{#<section class="row-fluid">#}
|
||||||
|
{#<div class="span2 sidebar">#}
|
||||||
|
{#{% set namespace = project.namespace %}#}
|
||||||
|
{#{{ block('sidebarNamespaces') }}#}
|
||||||
|
{#</div>#}
|
||||||
|
{#</section>#}
|
||||||
|
{#<section class="row-fluid">#}
|
||||||
|
====== {{ node.path|split('/')|slice(0,-1)|join('/') }}{{ node.name }} ======
|
||||||
|
{{ node.summary }}
|
||||||
|
<html>{{ node.description|markdown|raw }}</html>
|
||||||
|
|
||||||
|
{% if node.traits|length > 0 %}
|
||||||
|
|
||||||
|
===== Traits =====
|
||||||
|
{% for trait in node.traits %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ trait|raw }}</td>
|
||||||
|
<td><em>{{ trait.summary }}</em></td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if node.interfaces|length > 0 %}
|
||||||
|
===== Interfaces =====
|
||||||
|
{% for interface in node.interfaces %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ interface|raw }}</td>
|
||||||
|
<td><em>{{ interface.summary }}</em></td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if node.classes|length > 0 %}
|
||||||
|
===== Classes =====
|
||||||
|
{% for class in node.classes %}
|
||||||
|
{{ class|raw }}
|
||||||
|
<em>{{ class.summary }}</em>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if node.package is not empty and node.package != '\\' %}
|
||||||
|
===== Package =====
|
||||||
|
{{ node.subpackage ? (node.package ~ '\\' ~ node.subpackage) : node.package }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% for tagName,tags in node.tags if tagName in ['link', 'see'] %}
|
||||||
|
{% if loop.first %}
|
||||||
|
===== See also =====
|
||||||
|
{% endif %}
|
||||||
|
{% for tag in tags %}
|
||||||
|
<dd><a href="{{ tag.reference ?: tag.link }}"><div class="namespace-wrapper">{{ tag.description ?: tag.reference }}</div></a></dd>
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
<h2>Tags</h2>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
{% for tagName,tags in node.tags if tagName not in ['link', 'see', 'package', 'subpackage'] %}
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
{{ tagName }}
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
{% for tag in tags %}
|
||||||
|
{{ tag.description|markdown|raw }}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% else %}
|
||||||
|
<tr><td colspan="2"><em>None found</em></td></tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if node.constants|length > 0 %}
|
||||||
|
<div class="row-fluid">
|
||||||
|
<section class="span8 content file">
|
||||||
|
<h2>Constants</h2>
|
||||||
|
</section>
|
||||||
|
<aside class="span4 detailsbar"></aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% for constant in node.constants %}
|
||||||
|
{{ block('constant') }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if node.functions|length > 0 %}
|
||||||
|
<div class="row-fluid">
|
||||||
|
<section class="span8 content file">
|
||||||
|
<h2>Functions</h2>
|
||||||
|
</section>
|
||||||
|
<aside class="span4 detailsbar"></aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% for method in node.functions %}
|
||||||
|
{{ block('method') }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h3 id="source-view-label">{{ node.file.name }}</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<pre data-src="{{ path('files/' ~ node.path ~ '.txt')|raw }}" class="language-php line-numbers"></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
42
.doc/phpdoc-templates/combodo-wiki/graphs/class.html.twig
Normal file
42
.doc/phpdoc-templates/combodo-wiki/graphs/class.html.twig
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{% extends 'layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block stylesheets %}
|
||||||
|
<link href="{{ path('css/jquery.iviewer.css') }}" rel="stylesheet" media="all"/>
|
||||||
|
<style>
|
||||||
|
#viewer {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.wrapper {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block javascripts %}
|
||||||
|
<script src="{{ path('js/jquery.mousewheel.js') }}" type="text/javascript"></script>
|
||||||
|
<script src="{{ path('js/jquery.iviewer.js') }}" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(window).resize(function(){
|
||||||
|
$("#viewer").height($(window).height() - 100);
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$("#viewer").iviewer({src: '{{ path('graphs/classes.svg') }}', zoom_animation: false});
|
||||||
|
$('#viewer img').bind('dragstart', function(event){
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
$(window).resize();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<div class="wrapper">
|
||||||
|
<div id="viewer" class="viewer"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
5
.doc/phpdoc-templates/combodo-wiki/htaccess.dist
Normal file
5
.doc/phpdoc-templates/combodo-wiki/htaccess.dist
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Fixes a vulnerability in CentOS: http://stackoverflow.com/questions/20533279/prevent-php-from-parsing-non-php-files-such-as-somefile-php-txt
|
||||||
|
<FilesMatch \.php\.txt$>
|
||||||
|
RemoveHandler .php
|
||||||
|
ForceType text/plain
|
||||||
|
</FilesMatch>
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
{% if title_level is not defined %}
|
||||||
|
{%- set title_level = '==' -%}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if sub_title_level is not defined %}
|
||||||
|
{%- set sub_title_level = title_level|slice(1) -%}
|
||||||
|
{% endif %}
|
||||||
|
{% if sub_title_level == '=' %}
|
||||||
|
{%- set sub_title_level = '' -%}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{#{% for tagName,tags in structure.tags if tagName in ['code-example'] %}#}
|
||||||
|
{#{% if loop.first %}#}
|
||||||
|
{#{{title_level}} Examples {{title_level}}#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
{#{% for tag in tags %}#}
|
||||||
|
{#{%- set descToken = tag.description|split("\n", 2) -%}#}
|
||||||
|
{#{%- set title = descToken[0] -%}#}
|
||||||
|
{#{%- set code = descToken[1] -%}#}
|
||||||
|
{#{{sub_title_level}} {{ title }} {{sub_title_level}}#}
|
||||||
|
{#<code php>{{ code|raw }}</code>#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
|
||||||
|
|
||||||
|
{% for tagName,tags in structure.tags if tagName in ['example'] %}
|
||||||
|
{% if loop.first %}
|
||||||
|
{{title_level}} Examples {{title_level}}
|
||||||
|
{% endif %}
|
||||||
|
{% for tag in tags %}
|
||||||
|
{{ sub_title_level }} {{ tag.filePath|escape }}{{ sub_title_level }}
|
||||||
|
<code php>{{ tag.description|raw }}</code>
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{% if title_level is not defined %}
|
||||||
|
{% set title_level='' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (node.parent is null) %}
|
||||||
|
{{title_level}} File {{ structure.path }} {{title_level}}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (node.parent is not null and structure.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}
|
||||||
|
{{title_level}} Inherited from {{title_level}}
|
||||||
|
[[{{structure.parent}}|{{structure.parent}}]]
|
||||||
|
{% endif %}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{% for structure in structures|sort_asc if structure.tags['internal'] is not defined and (structure.tags['api'] is defined or structure.tags['api-advanced'] is defined or structure.tags['overwritable-hook'] is defined or structure.tags['extension-hook'] is defined ) %}
|
||||||
|
{#{{ structure|raw }}#}
|
||||||
|
|
||||||
|
{% set structureName = structure|trim('\\', 'left') %}
|
||||||
|
|
||||||
|
<WRAP group box>
|
||||||
|
<WRAP twothirds column >
|
||||||
|
==== {{ structureName }} ====
|
||||||
|
</WRAP>{# twothirds column#}
|
||||||
|
|
||||||
|
<WRAP third column>
|
||||||
|
{% if structure.deprecated %}<wrap danger>deprecated</wrap>{% endif %}
|
||||||
|
{% if structure.abstract %}<wrap warning>abstract</wrap>{% endif %}
|
||||||
|
{% if structure.final %}<wrap notice>final</wrap>{% endif %}
|
||||||
|
{% if (node.parent is not null and structure.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}<wrap notice>inherited</wrap> {% endif %}
|
||||||
|
{% include 'includes/wrap-tags.txt.twig' with {structure:structure, wrap: 'safety', wrapTags: ['api', 'api-advanced', 'overwritable-hook', 'extension-hook']} %}
|
||||||
|
</WRAP>{# third column#}
|
||||||
|
|
||||||
|
|
||||||
|
{{ structure.summary|raw }}
|
||||||
|
[[{{structureName}}|More information]]
|
||||||
|
|
||||||
|
</WRAP>{# group #}
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{% if title_level is not defined %}
|
||||||
|
{%- set title_level='==' -%}
|
||||||
|
{% endif %}
|
||||||
|
{% for tagName,tags in structure.tags if tagName in ['link', 'see'] %}
|
||||||
|
{% if loop.first %}
|
||||||
|
{{title_level}} See also {{title_level}}
|
||||||
|
{% endif %}
|
||||||
|
{% for tag in tags %}
|
||||||
|
{%- set linkTag = tag.reference|trim('\\', 'left') -%}
|
||||||
|
{% if not('()' in linkTag or '$' in linkTag or node.name in linkTag or '::' in linkTag ) %}
|
||||||
|
{%- set linkTag = linkTag|lower -%}
|
||||||
|
{% elseif node.name~'::' in linkTag %}
|
||||||
|
{%- set linkTag = linkTag|replace({(node.name~'::'): '#'})|lower -%}
|
||||||
|
{% elseif '::' in linkTag -%}
|
||||||
|
{%- set linkTag = linkTag|replace({'::': '#'})|lower -%}
|
||||||
|
{% else %}
|
||||||
|
{%- set linkTag = '#' ~ linkTag|lower -%}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{% if loop.length > 1 %} * {% endif %}{% if tag.reference is not empty -%}
|
||||||
|
[[{{linkTag}}|{{ (tag.reference)|trim('\\', 'left') }}]] {% if tag.description|trim is not empty %}: {{ tag.description|trim('\\', 'left') }} {% endif %}
|
||||||
|
{%- else -%}
|
||||||
|
{#{{ tag.description|trim('\\', 'left') }}#}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
{% if tag is not defined -%}
|
||||||
|
{# Do not display @api if @api-advanced is also present #}
|
||||||
|
{%- set tag = "api" -%}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{% if hidden_by is not defined -%}
|
||||||
|
{# Do not display @api if @api-advanced is also present #}
|
||||||
|
{%- set hidden_by = {"api" : "api-advanced"} -%}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% for method in methods|sort_asc
|
||||||
|
if (method.visibility == 'public')
|
||||||
|
and (
|
||||||
|
method.tags[tag] is defined
|
||||||
|
and (
|
||||||
|
hidden_by[tag] is not defined or method.tags[hidden_by[tag]] is not defined
|
||||||
|
)
|
||||||
|
)
|
||||||
|
%}
|
||||||
|
{%- if loop.first %}
|
||||||
|
{% if tag == 'api' %}
|
||||||
|
===== API synthesis =====
|
||||||
|
<WRAP>
|
||||||
|
List of the public API methods.
|
||||||
|
When manipulating {{ node.name }}, You can call those methods:
|
||||||
|
</WRAP>
|
||||||
|
{% elseif tag == 'api-advanced' %}
|
||||||
|
===== Advanced API synthesis =====
|
||||||
|
<WRAP>
|
||||||
|
List of advanced API methods
|
||||||
|
Beware they usage is recommended to advanced users only.
|
||||||
|
</WRAP>
|
||||||
|
{% elseif tag == 'overwritable-hook' %}
|
||||||
|
===== overwritable-hook synthesis =====
|
||||||
|
<WRAP >When inheriting from {{ node.name }},
|
||||||
|
you can overwrite those methods in order to add custom logic:
|
||||||
|
</WRAP>
|
||||||
|
{% elseif tag == 'extension-hook' %}
|
||||||
|
===== extension-hook synthesis =====
|
||||||
|
<WRAP >
|
||||||
|
When inheriting from {{ node.name }},
|
||||||
|
you can extend the behaviour of iTop by implementing:
|
||||||
|
</WRAP>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% set sanitizedMethod = method|trim('\\', 'left')|replace({(node.name~'::'): ''}) %}
|
||||||
|
{% if '::' in sanitizedMethod -%}
|
||||||
|
{%- if node.tags['phpdoc-tuning-exclude-inherited'] is not defined %}
|
||||||
|
* [[{{sanitizedMethod|replace({'::': '#'})|lower}}|↪{{sanitizedMethod}}]] — {{ method.summary|replace({"\n":""})|raw }}
|
||||||
|
{% endif %}
|
||||||
|
{%- else %}
|
||||||
|
* [[#{{sanitizedMethod}}|{{sanitizedMethod}}]] — {{ method.summary|replace({"\n":""})|raw }}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{% if title_level is not defined %}
|
||||||
|
{% set title_level = '==' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{%- for tagName,tags in structure.tags if tagName in tagsWithDescription -%}
|
||||||
|
{%- for tag in tags -%}
|
||||||
|
{%- if tag.description is not empty -%}
|
||||||
|
{%- if WRAP is defined -%}
|
||||||
|
<WRAP {{WRAP}}>
|
||||||
|
{%- endif -%}
|
||||||
|
{{title_level}} {{ tagName }} {{title_level}}
|
||||||
|
{{ tag.description|escape }}
|
||||||
|
{%- if WRAP is defined -%}
|
||||||
|
</WRAP>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
|
||||||
22
.doc/phpdoc-templates/combodo-wiki/includes/tags.txt.twig
Normal file
22
.doc/phpdoc-templates/combodo-wiki/includes/tags.txt.twig
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{% if title_level is not defined %}
|
||||||
|
{% set title_level='=====' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if blacklist is not defined %}
|
||||||
|
{% set blacklist =['link', 'see', 'abstract', 'example', 'method', 'property', 'property-read', 'property-write', 'package', 'subpackage', 'api', 'api-advanced', 'todo', 'code-example'] %}
|
||||||
|
{% endif %}
|
||||||
|
{% if hidden_by is not defined -%}
|
||||||
|
{# Do not display @api if @api-advanced is also present #}
|
||||||
|
{%- set hidden_by = {"api" : "api-advanced"} -%}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{#^ {% for tagName,tags in structure.tags if tagName not in blacklist -%}#}
|
||||||
|
{#{{ tagName }} ^#}
|
||||||
|
{#{%- endfor %}#}
|
||||||
|
|
||||||
|
{% for tagName,tags in structure.tags if tagName not in blacklist and (hidden_by[tagName] is not defined or structure.tags[hidden_by[tagName]] is not defined) %}
|
||||||
|
{%- if loop.first %}
|
||||||
|
{{title_level}} Tags {{title_level}}
|
||||||
|
{% endif %}
|
||||||
|
^ {{ tagName }} | {% for tag in tags %}{{ tag.version ? tag.version ~ ' ' : '' }}{{ tag.description}}{% endfor %} |
|
||||||
|
{% endfor %}
|
||||||
24
.doc/phpdoc-templates/combodo-wiki/includes/used-by.txt.twig
Normal file
24
.doc/phpdoc-templates/combodo-wiki/includes/used-by.txt.twig
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{% if title_level is not defined %}
|
||||||
|
{% set title_level='' %}
|
||||||
|
{% endif %}
|
||||||
|
{% for tagName,tags in structure.tags if tagName in ['used-by'] %}
|
||||||
|
{% if loop.first %}
|
||||||
|
{{title_level}} Used by {{title_level}}
|
||||||
|
{% endif %}
|
||||||
|
{% for tag in tags %}
|
||||||
|
{% if loop.length > 1 %} * {% endif %}{{ tag.reference ?: tag.link }} : {{ tag.description ?: tag.reference }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{#{% for tagName,tags in method.tags if tagName in ['uses'] %}#}
|
||||||
|
{#{% if loop.first %}#}
|
||||||
|
{#<dt>Uses</dt>#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
{#{% for tag in tags %}#}
|
||||||
|
{#<dd>{{ tag.reference|raw }}</dd>#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
{#{% endfor %}#}
|
||||||
24
.doc/phpdoc-templates/combodo-wiki/includes/uses.txt.twig
Normal file
24
.doc/phpdoc-templates/combodo-wiki/includes/uses.txt.twig
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{% if title_level is not defined %}
|
||||||
|
{% set title_level='' %}
|
||||||
|
{% endif %}
|
||||||
|
{% for tagName,tags in structure.tags if tagName in ['uses'] %}
|
||||||
|
{% if loop.first %}
|
||||||
|
{{title_level}} Uses {{title_level}}
|
||||||
|
{% endif %}
|
||||||
|
{% for tag in tags %}
|
||||||
|
{% if loop.length > 1 %} * {% endif %}{{ tag.reference ?: tag.link }} : {{ tag.description ?: tag.reference }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{#{% for tagName,tags in method.tags if tagName in ['uses'] %}#}
|
||||||
|
{#{% if loop.first %}#}
|
||||||
|
{#<dt>Uses</dt>#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
{#{% for tag in tags %}#}
|
||||||
|
{#<dd>{{ tag.reference|raw }}</dd>#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
{#{% endfor %}#}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{% if wrap is not defined -%}
|
||||||
|
{% set wrap = 'notice' %}
|
||||||
|
{%- endif -%}
|
||||||
|
{% if hidden_by is not defined -%}
|
||||||
|
{# Do not display @api if @api-advanced is also present #}
|
||||||
|
{%- set hidden_by = {"api" : "api-advanced"} -%}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{%- for tagName,tags in structure.tags if tagName in wrapTags and (hidden_by[tagName] is not defined or structure.tags[hidden_by[tagName]] is not defined) %}
|
||||||
|
<wrap {{wrap}}>{{tagName}}</wrap>
|
||||||
|
{% endfor %}
|
||||||
121
.doc/phpdoc-templates/combodo-wiki/interface.txt.twig
Normal file
121
.doc/phpdoc-templates/combodo-wiki/interface.txt.twig
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
{% extends 'layout.txt.twig' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<wrap button>[[start|🔙 Back]]</wrap>
|
||||||
|
|
||||||
|
{% if node.tags['internal'] is defined %}
|
||||||
|
====== {{ node.name }} ======
|
||||||
|
<WRAP alert>This interface is "internal", and thus is not documented!</WRAP>
|
||||||
|
{% elseif node.tags['api'] is not defined and node.tags['api-advanced'] is not defined and node.tags['overwritable-hook'] is not defined and node.tags['extension-hook'] is not defined %}
|
||||||
|
====== {{ node.name }} ======
|
||||||
|
<WRAP alert>This interface is neither "api", "overwritable-hook" or "extension-hook", and thus is not documented!</WRAP>
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
====== {{ node.name }} ======
|
||||||
|
|
||||||
|
{% if node.deprecated %}<wrap danger>deprecated</wrap>{% endif %}
|
||||||
|
{% if node.abstract %}<wrap warning>abstract</wrap>{% endif %}
|
||||||
|
{% if node.final %}<wrap notice>final</wrap>{% endif %}
|
||||||
|
{% include 'includes/wrap-tags.txt.twig' with {structure:node, wrap: 'safety', wrapTags: ['api', 'api-advanced', 'overwritable-hook', 'extension-hook']} %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% if node.deprecated %}
|
||||||
|
=== **<del>Deprecated</del>**===
|
||||||
|
//{{ node.tags.deprecated[0].description }}//
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
== {{ node.summary|replace({"\n":""})|raw }} ==
|
||||||
|
<html>{{ node.description|markdown|raw }}</html>
|
||||||
|
|
||||||
|
|
||||||
|
{% include 'includes/code-examples.txt.twig' with {structure:node, title_level: '====='} %}
|
||||||
|
|
||||||
|
|
||||||
|
{% set class = node.parent %}
|
||||||
|
{% block hierarchy_element %}
|
||||||
|
|
||||||
|
{% if class and class.name is defined and class.name|trim != '' %}
|
||||||
|
==== parent ====
|
||||||
|
{% set child = class %}
|
||||||
|
{% set class = class.parent %}
|
||||||
|
{{ block('hierarchy_element') }}
|
||||||
|
[[{{ child.name }}|{{ child.name }}]]
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% for interface in node.interfaces|sort_asc %}
|
||||||
|
{% if loop.first %}
|
||||||
|
==== Implements ====
|
||||||
|
{% endif %}
|
||||||
|
{% if loop.length > 1 %} * {% endif %}{{ interface.fullyQualifiedStructuralElementName ?: interface }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
{% for trait in node.usedTraits|sort_asc %}
|
||||||
|
{% if loop.first %}
|
||||||
|
==== Uses traits ====
|
||||||
|
{% endif %}
|
||||||
|
{% if loop.length > 1 %} * {% endif %}{{ trait.fullyQualifiedStructuralElementName ?: trait }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
{% include 'includes/see-also.txt.twig' with {structure:node, title_level: '==='} %}
|
||||||
|
|
||||||
|
{% include 'includes/tags.txt.twig' with {structure:node, title_level: '=====', blacklist: ['link', 'see', 'abstract', 'example', 'method', 'property', 'property-read', 'property-write', 'package', 'subpackage', 'phpdoc-tuning-exclude-inherited', 'api', 'api-advanced', 'overwritable-hook', 'extension-hook', 'copyright', 'license', 'code-example']} %}
|
||||||
|
|
||||||
|
|
||||||
|
{% set methods = node.inheritedMethods.merge(node.methods) %}
|
||||||
|
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'api'} %}
|
||||||
|
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'api-advanced'} %}
|
||||||
|
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'overwritable-hook'} %}
|
||||||
|
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'extension-hook'} %}
|
||||||
|
|
||||||
|
<WRAP clear />
|
||||||
|
|
||||||
|
|
||||||
|
{% for method in methods|sort_asc if method.visibility == 'public' %}
|
||||||
|
{%- if loop.first %}
|
||||||
|
===== Public methods =====
|
||||||
|
{% endif %}
|
||||||
|
{{ block('method') }}
|
||||||
|
{% endfor %}
|
||||||
|
{% for method in methods|sort_asc if method.visibility == 'protected' %}
|
||||||
|
{%- if loop.first %}
|
||||||
|
===== Protected methods =====
|
||||||
|
{% endif %}
|
||||||
|
{{ block('method') }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% set constants = node.inheritedConstants.merge(node.constants) %}
|
||||||
|
{% if constants|length > 0 %}
|
||||||
|
===== Constants =====
|
||||||
|
{% for constant in constants|sort_asc %}
|
||||||
|
{{ block('constant') }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{#{% set properties = node.inheritedProperties.merge(node.properties) %}#}
|
||||||
|
{#{% for property in properties|sort_asc if property.visibility == 'public' %}#}
|
||||||
|
{#{%- if loop.first %}#}
|
||||||
|
{#===== Public properties =====#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
{#{{ block('property') }}#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
{#{% for property in properties|sort_asc if property.visibility == 'protected' %}#}
|
||||||
|
{#{%- if loop.first %}#}
|
||||||
|
{#===== Protected properties =====#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
{#{{ block('property') }}#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
|
||||||
|
|
||||||
|
{%- endif %} {#{% elseif node.tags['xxx'] is not defined and ... #}
|
||||||
|
|
||||||
|
<wrap button>[[start|🔙 Back]]</wrap>
|
||||||
|
{% endblock %}
|
||||||
5
.doc/phpdoc-templates/combodo-wiki/layout.txt.twig
Normal file
5
.doc/phpdoc-templates/combodo-wiki/layout.txt.twig
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{% use 'elements/constant.txt.twig' %}
|
||||||
|
{% use 'elements/property.txt.twig' %}
|
||||||
|
{% use 'elements/method.txt.twig' %}
|
||||||
|
|
||||||
|
{% block content %}{% endblock %}
|
||||||
51
.doc/phpdoc-templates/combodo-wiki/namespace.txt.twig
Normal file
51
.doc/phpdoc-templates/combodo-wiki/namespace.txt.twig
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{% extends 'layout.txt.twig' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% set namespace = project.namespace %}
|
||||||
|
{{ block('sidebarNamespaces') }}
|
||||||
|
|
||||||
|
{#{{ node.parent|raw }}#}
|
||||||
|
{#====== {{ node.parent.fullyQualifiedStructuralElementName }}{{ node.name }} ======#}
|
||||||
|
|
||||||
|
{% if node.children|length > 0 %}
|
||||||
|
=====Namespaces=====
|
||||||
|
{% include 'includes/namespace-structure-toc.html.twig' with {structures: node.children} %}
|
||||||
|
----
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if node.traits|length > 0 %}
|
||||||
|
===== Traits =====
|
||||||
|
{% include 'includes/namespace-structure-toc.html.twig' with {structures: node.traits} %}
|
||||||
|
----
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{% if node.interfaces|length > 0 %}
|
||||||
|
===== Interfaces =====
|
||||||
|
{% include 'includes/namespace-structure-toc.html.twig' with {structures: node.interfaces} %}
|
||||||
|
----
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if node.classes|length > 0 %}
|
||||||
|
===== Classes =====
|
||||||
|
{% include 'includes/namespace-structure-toc.html.twig' with {structures: node.classes} %}
|
||||||
|
----
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{#{% if node.constants|length > 0 %}#}
|
||||||
|
{#===== Constants =====#}
|
||||||
|
{#{% for constant in node.constants|sort_asc %}#}
|
||||||
|
{# {{ block('constant') }}#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
|
||||||
|
{#{% if node.functions|length > 0 %}#}
|
||||||
|
{#===== Functions =====#}
|
||||||
|
|
||||||
|
{#{% for method in node.functions|sort_asc %}#}
|
||||||
|
{# {{ block('method') }}#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
|
||||||
|
====== Deprecated elements ======
|
||||||
|
|
||||||
|
{#{% for element in project.indexes.elements if element.deprecated %}#}
|
||||||
|
{#{% if element.file.path != previousPath %}#}
|
||||||
|
{#<li><a href="#{{ element.file.path }}"><i class="icon-file"></i> {{ element.file.path }}</a></li>#}
|
||||||
|
{#{% endif %}#}
|
||||||
|
{#{% set previousPath = element.file.path %}#}
|
||||||
|
{#{% endfor %}#}
|
||||||
|
|
||||||
|
{% for element in project.indexes.elements if element.deprecated %}
|
||||||
|
{% if element.file.path != previousPath %}
|
||||||
|
{% if previousPath %}
|
||||||
|
</WRAP>{# group #}
|
||||||
|
{% endif %}
|
||||||
|
{#<a name="{{ element.file.path }}" id="{{ element.file.path }}"></a>#}
|
||||||
|
===== {{ element.file.path }} ({{ element.tags.deprecated.count }} found)=====
|
||||||
|
|
||||||
|
<WRAP group >
|
||||||
|
<WRAP third column >
|
||||||
|
Element
|
||||||
|
</WRAP>{# third column#}
|
||||||
|
<WRAP third column >
|
||||||
|
Line
|
||||||
|
</WRAP>{# third column#}
|
||||||
|
<WRAP third column >
|
||||||
|
Description
|
||||||
|
</WRAP>{# third column#}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% for tag in element.tags.deprecated %}
|
||||||
|
<WRAP group >
|
||||||
|
<WRAP third column >
|
||||||
|
{{ element.fullyQualifiedStructuralElementName }}
|
||||||
|
</WRAP>{# third column#}
|
||||||
|
<WRAP third column >
|
||||||
|
{{ element.line }}
|
||||||
|
</WRAP>{# third column#}
|
||||||
|
<WRAP third column >
|
||||||
|
{{ tag.description }}
|
||||||
|
</WRAP>{# third column#}
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
</WRAP>{# group #}
|
||||||
|
{% set previousPath = element.file.path %}
|
||||||
|
{% else %}
|
||||||
|
<WRAP info>No deprecated elements have been found in this project.</WRAP>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
27
.doc/phpdoc-templates/combodo-wiki/template.xml
Normal file
27
.doc/phpdoc-templates/combodo-wiki/template.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<template>
|
||||||
|
<author>Bruno DA SILVA</author>
|
||||||
|
<email>contact [at] combodo.com</email>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<copyright>Combodo 2018</copyright>
|
||||||
|
<description><![CDATA[
|
||||||
|
|
||||||
|
Forked from the clean theme of https://github.com/phpDocumentor/phpDocumentor2 provided under the MIT licence.
|
||||||
|
The original work is copyright "Mike van Riel".
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
To improve performance you can add the following to your .htaccess:
|
||||||
|
|
||||||
|
<ifModule mod_deflate.c>
|
||||||
|
<filesMatch "\.(js|css|html)$">
|
||||||
|
SetOutputFilter DEFLATE
|
||||||
|
</filesMatch>
|
||||||
|
</ifModule>
|
||||||
|
]]></description>
|
||||||
|
<transformations>
|
||||||
|
<transformation writer="twig" query="namespace" source="templates/combodo-wiki/namespace.txt.twig" artifact="start.txt"/>
|
||||||
|
<transformation writer="twig" query="indexes.classes" source="templates/combodo-wiki/class.txt.twig" artifact="{{name}}.txt"/>
|
||||||
|
<transformation writer="twig" query="indexes.interfaces" source="templates/combodo-wiki/interface.txt.twig" artifact="{{name}}.txt" />
|
||||||
|
</transformations>
|
||||||
|
</template>
|
||||||
711
.editorconfig
Normal file
711
.editorconfig
Normal file
@@ -0,0 +1,711 @@
|
|||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = false
|
||||||
|
max_line_length = 140
|
||||||
|
tab_width = 4
|
||||||
|
ij_continuation_indent_size = 8
|
||||||
|
ij_formatter_off_tag = @formatter:off
|
||||||
|
ij_formatter_on_tag = @formatter:on
|
||||||
|
ij_formatter_tags_enabled = false
|
||||||
|
ij_smart_tabs = false
|
||||||
|
ij_visual_guides = 80, 120, 140
|
||||||
|
ij_wrap_on_typing = true
|
||||||
|
|
||||||
|
[*.css]
|
||||||
|
indent_style = tab
|
||||||
|
ij_smart_tabs = true
|
||||||
|
ij_css_align_closing_brace_with_properties = false
|
||||||
|
ij_css_blank_lines_around_nested_selector = 1
|
||||||
|
ij_css_blank_lines_between_blocks = 1
|
||||||
|
ij_css_brace_placement = 0
|
||||||
|
ij_css_hex_color_long_format = false
|
||||||
|
ij_css_hex_color_lower_case = false
|
||||||
|
ij_css_hex_color_short_format = false
|
||||||
|
ij_css_hex_color_upper_case = false
|
||||||
|
ij_css_keep_blank_lines_in_code = 2
|
||||||
|
ij_css_keep_indents_on_empty_lines = false
|
||||||
|
ij_css_keep_single_line_blocks = false
|
||||||
|
ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||||
|
ij_css_space_after_colon = true
|
||||||
|
ij_css_space_before_opening_brace = true
|
||||||
|
ij_css_value_alignment = 0
|
||||||
|
|
||||||
|
[*.csv]
|
||||||
|
max_line_length = 2147483647
|
||||||
|
ij_wrap_on_typing = false
|
||||||
|
ij_csv_wrap_long_lines = false
|
||||||
|
|
||||||
|
[*.feature]
|
||||||
|
indent_size = 2
|
||||||
|
ij_gherkin_keep_indents_on_empty_lines = false
|
||||||
|
|
||||||
|
[*.less]
|
||||||
|
indent_size = 2
|
||||||
|
ij_less_align_closing_brace_with_properties = false
|
||||||
|
ij_less_blank_lines_around_nested_selector = 1
|
||||||
|
ij_less_blank_lines_between_blocks = 1
|
||||||
|
ij_less_brace_placement = 0
|
||||||
|
ij_less_hex_color_long_format = false
|
||||||
|
ij_less_hex_color_lower_case = false
|
||||||
|
ij_less_hex_color_short_format = false
|
||||||
|
ij_less_hex_color_upper_case = false
|
||||||
|
ij_less_keep_blank_lines_in_code = 2
|
||||||
|
ij_less_keep_indents_on_empty_lines = false
|
||||||
|
ij_less_keep_single_line_blocks = false
|
||||||
|
ij_less_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||||
|
ij_less_space_after_colon = true
|
||||||
|
ij_less_space_before_opening_brace = true
|
||||||
|
ij_less_value_alignment = 0
|
||||||
|
|
||||||
|
[*.sass]
|
||||||
|
indent_size = 2
|
||||||
|
ij_sass_align_closing_brace_with_properties = false
|
||||||
|
ij_sass_blank_lines_around_nested_selector = 1
|
||||||
|
ij_sass_blank_lines_between_blocks = 1
|
||||||
|
ij_sass_brace_placement = 0
|
||||||
|
ij_sass_hex_color_long_format = false
|
||||||
|
ij_sass_hex_color_lower_case = false
|
||||||
|
ij_sass_hex_color_short_format = false
|
||||||
|
ij_sass_hex_color_upper_case = false
|
||||||
|
ij_sass_keep_blank_lines_in_code = 2
|
||||||
|
ij_sass_keep_indents_on_empty_lines = false
|
||||||
|
ij_sass_keep_single_line_blocks = false
|
||||||
|
ij_sass_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||||
|
ij_sass_space_after_colon = true
|
||||||
|
ij_sass_space_before_opening_brace = true
|
||||||
|
ij_sass_value_alignment = 0
|
||||||
|
|
||||||
|
[*.scss]
|
||||||
|
indent_style = tab
|
||||||
|
ij_scss_align_closing_brace_with_properties = false
|
||||||
|
ij_scss_blank_lines_around_nested_selector = 1
|
||||||
|
ij_scss_blank_lines_between_blocks = 1
|
||||||
|
ij_scss_brace_placement = 0
|
||||||
|
ij_scss_hex_color_long_format = false
|
||||||
|
ij_scss_hex_color_lower_case = false
|
||||||
|
ij_scss_hex_color_short_format = false
|
||||||
|
ij_scss_hex_color_upper_case = false
|
||||||
|
ij_scss_keep_blank_lines_in_code = 2
|
||||||
|
ij_scss_keep_indents_on_empty_lines = false
|
||||||
|
ij_scss_keep_single_line_blocks = false
|
||||||
|
ij_scss_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||||
|
ij_scss_space_after_colon = true
|
||||||
|
ij_scss_space_before_opening_brace = true
|
||||||
|
ij_scss_value_alignment = 0
|
||||||
|
|
||||||
|
[*.twig]
|
||||||
|
indent_style = tab
|
||||||
|
ij_smart_tabs = true
|
||||||
|
ij_wrap_on_typing = false
|
||||||
|
ij_twig_keep_indents_on_empty_lines = false
|
||||||
|
ij_twig_spaces_inside_delimiters = true
|
||||||
|
ij_twig_spaces_inside_variable_delimiters = true
|
||||||
|
|
||||||
|
[.editorconfig]
|
||||||
|
ij_editorconfig_align_group_field_declarations = false
|
||||||
|
ij_editorconfig_space_after_colon = false
|
||||||
|
ij_editorconfig_space_after_comma = true
|
||||||
|
ij_editorconfig_space_before_colon = false
|
||||||
|
ij_editorconfig_space_before_comma = false
|
||||||
|
ij_editorconfig_spaces_around_assignment_operators = true
|
||||||
|
|
||||||
|
[{*.cjs,*.js}]
|
||||||
|
indent_style = tab
|
||||||
|
ij_continuation_indent_size = 4
|
||||||
|
ij_smart_tabs = true
|
||||||
|
ij_javascript_align_imports = false
|
||||||
|
ij_javascript_align_multiline_array_initializer_expression = false
|
||||||
|
ij_javascript_align_multiline_binary_operation = false
|
||||||
|
ij_javascript_align_multiline_chained_methods = false
|
||||||
|
ij_javascript_align_multiline_extends_list = false
|
||||||
|
ij_javascript_align_multiline_for = true
|
||||||
|
ij_javascript_align_multiline_parameters = true
|
||||||
|
ij_javascript_align_multiline_parameters_in_calls = false
|
||||||
|
ij_javascript_align_multiline_ternary_operation = false
|
||||||
|
ij_javascript_align_object_properties = 0
|
||||||
|
ij_javascript_align_union_types = false
|
||||||
|
ij_javascript_align_var_statements = 0
|
||||||
|
ij_javascript_array_initializer_new_line_after_left_brace = false
|
||||||
|
ij_javascript_array_initializer_right_brace_on_new_line = false
|
||||||
|
ij_javascript_array_initializer_wrap = off
|
||||||
|
ij_javascript_assignment_wrap = off
|
||||||
|
ij_javascript_binary_operation_sign_on_next_line = false
|
||||||
|
ij_javascript_binary_operation_wrap = off
|
||||||
|
ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**/*
|
||||||
|
ij_javascript_blank_lines_after_imports = 1
|
||||||
|
ij_javascript_blank_lines_around_class = 1
|
||||||
|
ij_javascript_blank_lines_around_field = 0
|
||||||
|
ij_javascript_blank_lines_around_function = 1
|
||||||
|
ij_javascript_blank_lines_around_method = 1
|
||||||
|
ij_javascript_block_brace_style = next_line
|
||||||
|
ij_javascript_call_parameters_new_line_after_left_paren = false
|
||||||
|
ij_javascript_call_parameters_right_paren_on_new_line = false
|
||||||
|
ij_javascript_call_parameters_wrap = off
|
||||||
|
ij_javascript_catch_on_new_line = false
|
||||||
|
ij_javascript_chained_call_dot_on_new_line = true
|
||||||
|
ij_javascript_class_brace_style = end_of_line
|
||||||
|
ij_javascript_comma_on_new_line = false
|
||||||
|
ij_javascript_do_while_brace_force = never
|
||||||
|
ij_javascript_else_on_new_line = true
|
||||||
|
ij_javascript_enforce_trailing_comma = keep
|
||||||
|
ij_javascript_extends_keyword_wrap = off
|
||||||
|
ij_javascript_extends_list_wrap = off
|
||||||
|
ij_javascript_field_prefix = _
|
||||||
|
ij_javascript_file_name_style = relaxed
|
||||||
|
ij_javascript_finally_on_new_line = false
|
||||||
|
ij_javascript_for_brace_force = never
|
||||||
|
ij_javascript_for_statement_new_line_after_left_paren = false
|
||||||
|
ij_javascript_for_statement_right_paren_on_new_line = false
|
||||||
|
ij_javascript_for_statement_wrap = off
|
||||||
|
ij_javascript_force_quote_style = false
|
||||||
|
ij_javascript_force_semicolon_style = false
|
||||||
|
ij_javascript_function_expression_brace_style = end_of_line
|
||||||
|
ij_javascript_if_brace_force = always
|
||||||
|
ij_javascript_import_merge_members = global
|
||||||
|
ij_javascript_import_prefer_absolute_path = global
|
||||||
|
ij_javascript_import_sort_members = true
|
||||||
|
ij_javascript_import_sort_module_name = false
|
||||||
|
ij_javascript_import_use_node_resolution = true
|
||||||
|
ij_javascript_imports_wrap = on_every_item
|
||||||
|
ij_javascript_indent_case_from_switch = true
|
||||||
|
ij_javascript_indent_chained_calls = true
|
||||||
|
ij_javascript_indent_package_children = 0
|
||||||
|
ij_javascript_jsx_attribute_value = braces
|
||||||
|
ij_javascript_keep_blank_lines_in_code = 2
|
||||||
|
ij_javascript_keep_first_column_comment = true
|
||||||
|
ij_javascript_keep_indents_on_empty_lines = false
|
||||||
|
ij_javascript_keep_line_breaks = true
|
||||||
|
ij_javascript_keep_simple_blocks_in_one_line = false
|
||||||
|
ij_javascript_keep_simple_methods_in_one_line = false
|
||||||
|
ij_javascript_line_comment_add_space = true
|
||||||
|
ij_javascript_line_comment_at_first_column = false
|
||||||
|
ij_javascript_method_brace_style = end_of_line
|
||||||
|
ij_javascript_method_call_chain_wrap = off
|
||||||
|
ij_javascript_method_parameters_new_line_after_left_paren = false
|
||||||
|
ij_javascript_method_parameters_right_paren_on_new_line = false
|
||||||
|
ij_javascript_method_parameters_wrap = off
|
||||||
|
ij_javascript_object_literal_wrap = on_every_item
|
||||||
|
ij_javascript_parentheses_expression_new_line_after_left_paren = false
|
||||||
|
ij_javascript_parentheses_expression_right_paren_on_new_line = false
|
||||||
|
ij_javascript_place_assignment_sign_on_next_line = false
|
||||||
|
ij_javascript_prefer_as_type_cast = false
|
||||||
|
ij_javascript_prefer_parameters_wrap = false
|
||||||
|
ij_javascript_reformat_c_style_comments = false
|
||||||
|
ij_javascript_space_after_colon = true
|
||||||
|
ij_javascript_space_after_comma = true
|
||||||
|
ij_javascript_space_after_dots_in_rest_parameter = false
|
||||||
|
ij_javascript_space_after_generator_mult = true
|
||||||
|
ij_javascript_space_after_property_colon = true
|
||||||
|
ij_javascript_space_after_quest = true
|
||||||
|
ij_javascript_space_after_type_colon = true
|
||||||
|
ij_javascript_space_after_unary_not = false
|
||||||
|
ij_javascript_space_before_async_arrow_lparen = true
|
||||||
|
ij_javascript_space_before_catch_keyword = true
|
||||||
|
ij_javascript_space_before_catch_left_brace = true
|
||||||
|
ij_javascript_space_before_catch_parentheses = true
|
||||||
|
ij_javascript_space_before_class_lbrace = true
|
||||||
|
ij_javascript_space_before_class_left_brace = true
|
||||||
|
ij_javascript_space_before_colon = true
|
||||||
|
ij_javascript_space_before_comma = false
|
||||||
|
ij_javascript_space_before_do_left_brace = true
|
||||||
|
ij_javascript_space_before_else_keyword = true
|
||||||
|
ij_javascript_space_before_else_left_brace = true
|
||||||
|
ij_javascript_space_before_finally_keyword = true
|
||||||
|
ij_javascript_space_before_finally_left_brace = true
|
||||||
|
ij_javascript_space_before_for_left_brace = true
|
||||||
|
ij_javascript_space_before_for_parentheses = true
|
||||||
|
ij_javascript_space_before_for_semicolon = false
|
||||||
|
ij_javascript_space_before_function_left_parenth = true
|
||||||
|
ij_javascript_space_before_generator_mult = false
|
||||||
|
ij_javascript_space_before_if_left_brace = true
|
||||||
|
ij_javascript_space_before_if_parentheses = true
|
||||||
|
ij_javascript_space_before_method_call_parentheses = false
|
||||||
|
ij_javascript_space_before_method_left_brace = true
|
||||||
|
ij_javascript_space_before_method_parentheses = false
|
||||||
|
ij_javascript_space_before_property_colon = false
|
||||||
|
ij_javascript_space_before_quest = true
|
||||||
|
ij_javascript_space_before_switch_left_brace = true
|
||||||
|
ij_javascript_space_before_switch_parentheses = true
|
||||||
|
ij_javascript_space_before_try_left_brace = true
|
||||||
|
ij_javascript_space_before_type_colon = false
|
||||||
|
ij_javascript_space_before_unary_not = false
|
||||||
|
ij_javascript_space_before_while_keyword = true
|
||||||
|
ij_javascript_space_before_while_left_brace = true
|
||||||
|
ij_javascript_space_before_while_parentheses = true
|
||||||
|
ij_javascript_spaces_around_additive_operators = false
|
||||||
|
ij_javascript_spaces_around_arrow_function_operator = true
|
||||||
|
ij_javascript_spaces_around_assignment_operators = true
|
||||||
|
ij_javascript_spaces_around_bitwise_operators = true
|
||||||
|
ij_javascript_spaces_around_equality_operators = true
|
||||||
|
ij_javascript_spaces_around_logical_operators = true
|
||||||
|
ij_javascript_spaces_around_multiplicative_operators = true
|
||||||
|
ij_javascript_spaces_around_relational_operators = true
|
||||||
|
ij_javascript_spaces_around_shift_operators = true
|
||||||
|
ij_javascript_spaces_around_unary_operator = false
|
||||||
|
ij_javascript_spaces_within_array_initializer_brackets = false
|
||||||
|
ij_javascript_spaces_within_brackets = false
|
||||||
|
ij_javascript_spaces_within_catch_parentheses = false
|
||||||
|
ij_javascript_spaces_within_for_parentheses = false
|
||||||
|
ij_javascript_spaces_within_if_parentheses = false
|
||||||
|
ij_javascript_spaces_within_imports = false
|
||||||
|
ij_javascript_spaces_within_interpolation_expressions = false
|
||||||
|
ij_javascript_spaces_within_method_call_parentheses = false
|
||||||
|
ij_javascript_spaces_within_method_parentheses = false
|
||||||
|
ij_javascript_spaces_within_object_literal_braces = false
|
||||||
|
ij_javascript_spaces_within_object_type_braces = true
|
||||||
|
ij_javascript_spaces_within_parentheses = false
|
||||||
|
ij_javascript_spaces_within_switch_parentheses = false
|
||||||
|
ij_javascript_spaces_within_type_assertion = false
|
||||||
|
ij_javascript_spaces_within_union_types = true
|
||||||
|
ij_javascript_spaces_within_while_parentheses = false
|
||||||
|
ij_javascript_special_else_if_treatment = true
|
||||||
|
ij_javascript_ternary_operation_signs_on_next_line = false
|
||||||
|
ij_javascript_ternary_operation_wrap = off
|
||||||
|
ij_javascript_union_types_wrap = on_every_item
|
||||||
|
ij_javascript_use_chained_calls_group_indents = true
|
||||||
|
ij_javascript_use_double_quotes = true
|
||||||
|
ij_javascript_use_explicit_js_extension = global
|
||||||
|
ij_javascript_use_path_mapping = always
|
||||||
|
ij_javascript_use_public_modifier = false
|
||||||
|
ij_javascript_use_semicolon_after_statement = true
|
||||||
|
ij_javascript_var_declaration_wrap = normal
|
||||||
|
ij_javascript_while_brace_force = never
|
||||||
|
ij_javascript_while_on_new_line = false
|
||||||
|
ij_javascript_wrap_comments = false
|
||||||
|
|
||||||
|
[{*.module,*.hphp,*.phtml,*.php5,*.php4,*.php,*.ctp,*.inc}]
|
||||||
|
indent_style = tab
|
||||||
|
ij_continuation_indent_size = 4
|
||||||
|
ij_smart_tabs = true
|
||||||
|
ij_wrap_on_typing = false
|
||||||
|
ij_php_align_assignments = false
|
||||||
|
ij_php_align_class_constants = false
|
||||||
|
ij_php_align_group_field_declarations = false
|
||||||
|
ij_php_align_inline_comments = false
|
||||||
|
ij_php_align_key_value_pairs = false
|
||||||
|
ij_php_align_multiline_array_initializer_expression = false
|
||||||
|
ij_php_align_multiline_binary_operation = false
|
||||||
|
ij_php_align_multiline_chained_methods = false
|
||||||
|
ij_php_align_multiline_extends_list = false
|
||||||
|
ij_php_align_multiline_for = true
|
||||||
|
ij_php_align_multiline_parameters = false
|
||||||
|
ij_php_align_multiline_parameters_in_calls = false
|
||||||
|
ij_php_align_multiline_ternary_operation = false
|
||||||
|
ij_php_align_phpdoc_comments = false
|
||||||
|
ij_php_align_phpdoc_param_names = false
|
||||||
|
ij_php_api_weight = 1
|
||||||
|
ij_php_array_initializer_new_line_after_left_brace = true
|
||||||
|
ij_php_array_initializer_right_brace_on_new_line = true
|
||||||
|
ij_php_array_initializer_wrap = on_every_item
|
||||||
|
ij_php_assignment_wrap = off
|
||||||
|
ij_php_author_weight = 7
|
||||||
|
ij_php_binary_operation_sign_on_next_line = false
|
||||||
|
ij_php_binary_operation_wrap = off
|
||||||
|
ij_php_blank_lines_after_class_header = 0
|
||||||
|
ij_php_blank_lines_after_function = 1
|
||||||
|
ij_php_blank_lines_after_imports = 1
|
||||||
|
ij_php_blank_lines_after_opening_tag = 0
|
||||||
|
ij_php_blank_lines_after_package = 1
|
||||||
|
ij_php_blank_lines_around_class = 1
|
||||||
|
ij_php_blank_lines_around_constants = 0
|
||||||
|
ij_php_blank_lines_around_field = 0
|
||||||
|
ij_php_blank_lines_around_method = 1
|
||||||
|
ij_php_blank_lines_before_class_end = 0
|
||||||
|
ij_php_blank_lines_before_imports = 1
|
||||||
|
ij_php_blank_lines_before_method_body = 0
|
||||||
|
ij_php_blank_lines_before_package = 1
|
||||||
|
ij_php_blank_lines_before_return_statement = 1
|
||||||
|
ij_php_block_brace_style = next_line
|
||||||
|
ij_php_call_parameters_new_line_after_left_paren = false
|
||||||
|
ij_php_call_parameters_right_paren_on_new_line = false
|
||||||
|
ij_php_call_parameters_wrap = normal
|
||||||
|
ij_php_catch_on_new_line = true
|
||||||
|
ij_php_category_weight = 28
|
||||||
|
ij_php_class_brace_style = next_line
|
||||||
|
ij_php_comma_after_last_array_element = true
|
||||||
|
ij_php_concat_spaces = false
|
||||||
|
ij_php_copyright_weight = 28
|
||||||
|
ij_php_deprecated_weight = 28
|
||||||
|
ij_php_do_while_brace_force = always
|
||||||
|
ij_php_else_if_style = as_is
|
||||||
|
ij_php_else_on_new_line = true
|
||||||
|
ij_php_example_weight = 3
|
||||||
|
ij_php_extends_keyword_wrap = off
|
||||||
|
ij_php_extends_list_wrap = off
|
||||||
|
ij_php_fields_default_visibility = private
|
||||||
|
ij_php_filesource_weight = 28
|
||||||
|
ij_php_finally_on_new_line = true
|
||||||
|
ij_php_for_brace_force = always
|
||||||
|
ij_php_for_statement_new_line_after_left_paren = false
|
||||||
|
ij_php_for_statement_right_paren_on_new_line = false
|
||||||
|
ij_php_for_statement_wrap = off
|
||||||
|
ij_php_force_short_declaration_array_style = false
|
||||||
|
ij_php_global_weight = 28
|
||||||
|
ij_php_group_use_wrap = on_every_item
|
||||||
|
ij_php_if_brace_force = always
|
||||||
|
ij_php_if_lparen_on_next_line = false
|
||||||
|
ij_php_if_rparen_on_next_line = false
|
||||||
|
ij_php_ignore_weight = 28
|
||||||
|
ij_php_import_sorting = alphabetic
|
||||||
|
ij_php_indent_break_from_case = true
|
||||||
|
ij_php_indent_case_from_switch = true
|
||||||
|
ij_php_indent_code_in_php_tags = false
|
||||||
|
ij_php_internal_weight = 0
|
||||||
|
ij_php_keep_blank_lines_after_lbrace = 2
|
||||||
|
ij_php_keep_blank_lines_before_right_brace = 2
|
||||||
|
ij_php_keep_blank_lines_in_code = 2
|
||||||
|
ij_php_keep_blank_lines_in_declarations = 2
|
||||||
|
ij_php_keep_control_statement_in_one_line = true
|
||||||
|
ij_php_keep_first_column_comment = true
|
||||||
|
ij_php_keep_indents_on_empty_lines = false
|
||||||
|
ij_php_keep_line_breaks = true
|
||||||
|
ij_php_keep_rparen_and_lbrace_on_one_line = true
|
||||||
|
ij_php_keep_simple_methods_in_one_line = false
|
||||||
|
ij_php_lambda_brace_style = end_of_line
|
||||||
|
ij_php_license_weight = 28
|
||||||
|
ij_php_line_comment_add_space = false
|
||||||
|
ij_php_line_comment_at_first_column = true
|
||||||
|
ij_php_link_weight = 28
|
||||||
|
ij_php_lower_case_boolean_const = true
|
||||||
|
ij_php_lower_case_null_const = true
|
||||||
|
ij_php_method_brace_style = next_line
|
||||||
|
ij_php_method_call_chain_wrap = off
|
||||||
|
ij_php_method_parameters_new_line_after_left_paren = true
|
||||||
|
ij_php_method_parameters_right_paren_on_new_line = true
|
||||||
|
ij_php_method_parameters_wrap = normal
|
||||||
|
ij_php_method_weight = 28
|
||||||
|
ij_php_modifier_list_wrap = false
|
||||||
|
ij_php_multiline_chained_calls_semicolon_on_new_line = false
|
||||||
|
ij_php_namespace_brace_style = 1
|
||||||
|
ij_php_null_type_position = in_the_end
|
||||||
|
ij_php_package_weight = 28
|
||||||
|
ij_php_param_weight = 4
|
||||||
|
ij_php_parentheses_expression_new_line_after_left_paren = false
|
||||||
|
ij_php_parentheses_expression_right_paren_on_new_line = false
|
||||||
|
ij_php_phpdoc_blank_line_before_tags = true
|
||||||
|
ij_php_phpdoc_blank_lines_around_parameters = true
|
||||||
|
ij_php_phpdoc_keep_blank_lines = true
|
||||||
|
ij_php_phpdoc_param_spaces_between_name_and_description = 1
|
||||||
|
ij_php_phpdoc_param_spaces_between_tag_and_type = 1
|
||||||
|
ij_php_phpdoc_param_spaces_between_type_and_name = 1
|
||||||
|
ij_php_phpdoc_use_fqcn = true
|
||||||
|
ij_php_phpdoc_wrap_long_lines = true
|
||||||
|
ij_php_place_assignment_sign_on_next_line = false
|
||||||
|
ij_php_place_parens_for_constructor = 0
|
||||||
|
ij_php_property_read_weight = 28
|
||||||
|
ij_php_property_weight = 28
|
||||||
|
ij_php_property_write_weight = 28
|
||||||
|
ij_php_return_type_on_new_line = false
|
||||||
|
ij_php_return_weight = 5
|
||||||
|
ij_php_see_weight = 2
|
||||||
|
ij_php_since_weight = 28
|
||||||
|
ij_php_sort_phpdoc_elements = true
|
||||||
|
ij_php_space_after_colon = true
|
||||||
|
ij_php_space_after_colon_in_return_type = true
|
||||||
|
ij_php_space_after_comma = true
|
||||||
|
ij_php_space_after_for_semicolon = true
|
||||||
|
ij_php_space_after_quest = true
|
||||||
|
ij_php_space_after_type_cast = false
|
||||||
|
ij_php_space_after_unary_not = false
|
||||||
|
ij_php_space_before_array_initializer_left_brace = false
|
||||||
|
ij_php_space_before_catch_keyword = true
|
||||||
|
ij_php_space_before_catch_left_brace = true
|
||||||
|
ij_php_space_before_catch_parentheses = true
|
||||||
|
ij_php_space_before_class_left_brace = true
|
||||||
|
ij_php_space_before_closure_left_parenthesis = true
|
||||||
|
ij_php_space_before_colon = true
|
||||||
|
ij_php_space_before_colon_in_return_type = false
|
||||||
|
ij_php_space_before_comma = false
|
||||||
|
ij_php_space_before_do_left_brace = true
|
||||||
|
ij_php_space_before_else_keyword = true
|
||||||
|
ij_php_space_before_else_left_brace = true
|
||||||
|
ij_php_space_before_finally_keyword = true
|
||||||
|
ij_php_space_before_finally_left_brace = true
|
||||||
|
ij_php_space_before_for_left_brace = true
|
||||||
|
ij_php_space_before_for_parentheses = true
|
||||||
|
ij_php_space_before_for_semicolon = false
|
||||||
|
ij_php_space_before_if_left_brace = true
|
||||||
|
ij_php_space_before_if_parentheses = true
|
||||||
|
ij_php_space_before_method_call_parentheses = false
|
||||||
|
ij_php_space_before_method_left_brace = true
|
||||||
|
ij_php_space_before_method_parentheses = false
|
||||||
|
ij_php_space_before_quest = true
|
||||||
|
ij_php_space_before_switch_left_brace = true
|
||||||
|
ij_php_space_before_switch_parentheses = true
|
||||||
|
ij_php_space_before_try_left_brace = true
|
||||||
|
ij_php_space_before_unary_not = false
|
||||||
|
ij_php_space_before_while_keyword = true
|
||||||
|
ij_php_space_before_while_left_brace = true
|
||||||
|
ij_php_space_before_while_parentheses = true
|
||||||
|
ij_php_space_between_ternary_quest_and_colon = false
|
||||||
|
ij_php_spaces_around_additive_operators = true
|
||||||
|
ij_php_spaces_around_arrow = false
|
||||||
|
ij_php_spaces_around_assignment_in_declare = false
|
||||||
|
ij_php_spaces_around_assignment_operators = true
|
||||||
|
ij_php_spaces_around_bitwise_operators = true
|
||||||
|
ij_php_spaces_around_equality_operators = true
|
||||||
|
ij_php_spaces_around_logical_operators = true
|
||||||
|
ij_php_spaces_around_multiplicative_operators = true
|
||||||
|
ij_php_spaces_around_null_coalesce_operator = true
|
||||||
|
ij_php_spaces_around_relational_operators = true
|
||||||
|
ij_php_spaces_around_shift_operators = true
|
||||||
|
ij_php_spaces_around_unary_operator = false
|
||||||
|
ij_php_spaces_around_var_within_brackets = false
|
||||||
|
ij_php_spaces_within_array_initializer_braces = false
|
||||||
|
ij_php_spaces_within_brackets = false
|
||||||
|
ij_php_spaces_within_catch_parentheses = false
|
||||||
|
ij_php_spaces_within_for_parentheses = false
|
||||||
|
ij_php_spaces_within_if_parentheses = false
|
||||||
|
ij_php_spaces_within_method_call_parentheses = false
|
||||||
|
ij_php_spaces_within_method_parentheses = false
|
||||||
|
ij_php_spaces_within_parentheses = false
|
||||||
|
ij_php_spaces_within_short_echo_tags = true
|
||||||
|
ij_php_spaces_within_switch_parentheses = false
|
||||||
|
ij_php_spaces_within_while_parentheses = false
|
||||||
|
ij_php_special_else_if_treatment = false
|
||||||
|
ij_php_subpackage_weight = 28
|
||||||
|
ij_php_ternary_operation_signs_on_next_line = false
|
||||||
|
ij_php_ternary_operation_wrap = off
|
||||||
|
ij_php_throws_weight = 6
|
||||||
|
ij_php_todo_weight = 28
|
||||||
|
ij_php_unknown_tag_weight = 28
|
||||||
|
ij_php_upper_case_boolean_const = false
|
||||||
|
ij_php_upper_case_null_const = false
|
||||||
|
ij_php_uses_weight = 28
|
||||||
|
ij_php_var_weight = 28
|
||||||
|
ij_php_variable_naming_style = mixed
|
||||||
|
ij_php_version_weight = 28
|
||||||
|
ij_php_while_brace_force = always
|
||||||
|
ij_php_while_on_new_line = false
|
||||||
|
|
||||||
|
[{*.sht,*.htm,*.html,*.shtm,*.shtml}]
|
||||||
|
indent_style = tab
|
||||||
|
ij_smart_tabs = true
|
||||||
|
ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3
|
||||||
|
ij_html_align_attributes = true
|
||||||
|
ij_html_align_text = false
|
||||||
|
ij_html_attribute_wrap = normal
|
||||||
|
ij_html_block_comment_at_first_column = true
|
||||||
|
ij_html_do_not_align_children_of_min_lines = 0
|
||||||
|
ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p
|
||||||
|
ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot,style,script,head
|
||||||
|
ij_html_enforce_quotes = false
|
||||||
|
ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var
|
||||||
|
ij_html_keep_blank_lines = 2
|
||||||
|
ij_html_keep_indents_on_empty_lines = false
|
||||||
|
ij_html_keep_line_breaks = true
|
||||||
|
ij_html_keep_line_breaks_in_text = true
|
||||||
|
ij_html_keep_whitespaces = false
|
||||||
|
ij_html_keep_whitespaces_inside = span,pre,textarea
|
||||||
|
ij_html_line_comment_at_first_column = true
|
||||||
|
ij_html_new_line_after_last_attribute = never
|
||||||
|
ij_html_new_line_before_first_attribute = never
|
||||||
|
ij_html_quote_style = double
|
||||||
|
ij_html_remove_new_line_before_tags = br
|
||||||
|
ij_html_space_after_tag_name = false
|
||||||
|
ij_html_space_around_equality_in_attribute = false
|
||||||
|
ij_html_space_inside_empty_tag = false
|
||||||
|
ij_html_text_wrap = normal
|
||||||
|
|
||||||
|
[{*.ts,*.ats}]
|
||||||
|
ij_continuation_indent_size = 4
|
||||||
|
ij_typescript_align_imports = false
|
||||||
|
ij_typescript_align_multiline_array_initializer_expression = false
|
||||||
|
ij_typescript_align_multiline_binary_operation = false
|
||||||
|
ij_typescript_align_multiline_chained_methods = false
|
||||||
|
ij_typescript_align_multiline_extends_list = false
|
||||||
|
ij_typescript_align_multiline_for = true
|
||||||
|
ij_typescript_align_multiline_parameters = true
|
||||||
|
ij_typescript_align_multiline_parameters_in_calls = false
|
||||||
|
ij_typescript_align_multiline_ternary_operation = false
|
||||||
|
ij_typescript_align_object_properties = 0
|
||||||
|
ij_typescript_align_union_types = false
|
||||||
|
ij_typescript_align_var_statements = 0
|
||||||
|
ij_typescript_array_initializer_new_line_after_left_brace = false
|
||||||
|
ij_typescript_array_initializer_right_brace_on_new_line = false
|
||||||
|
ij_typescript_array_initializer_wrap = off
|
||||||
|
ij_typescript_assignment_wrap = off
|
||||||
|
ij_typescript_binary_operation_sign_on_next_line = false
|
||||||
|
ij_typescript_binary_operation_wrap = off
|
||||||
|
ij_typescript_blacklist_imports = rxjs/Rx,node_modules/**/*
|
||||||
|
ij_typescript_blank_lines_after_imports = 1
|
||||||
|
ij_typescript_blank_lines_around_class = 1
|
||||||
|
ij_typescript_blank_lines_around_field = 0
|
||||||
|
ij_typescript_blank_lines_around_field_in_interface = 0
|
||||||
|
ij_typescript_blank_lines_around_function = 1
|
||||||
|
ij_typescript_blank_lines_around_method = 1
|
||||||
|
ij_typescript_blank_lines_around_method_in_interface = 1
|
||||||
|
ij_typescript_block_brace_style = end_of_line
|
||||||
|
ij_typescript_call_parameters_new_line_after_left_paren = false
|
||||||
|
ij_typescript_call_parameters_right_paren_on_new_line = false
|
||||||
|
ij_typescript_call_parameters_wrap = off
|
||||||
|
ij_typescript_catch_on_new_line = false
|
||||||
|
ij_typescript_chained_call_dot_on_new_line = true
|
||||||
|
ij_typescript_class_brace_style = end_of_line
|
||||||
|
ij_typescript_comma_on_new_line = false
|
||||||
|
ij_typescript_do_while_brace_force = never
|
||||||
|
ij_typescript_else_on_new_line = false
|
||||||
|
ij_typescript_enforce_trailing_comma = keep
|
||||||
|
ij_typescript_extends_keyword_wrap = off
|
||||||
|
ij_typescript_extends_list_wrap = off
|
||||||
|
ij_typescript_field_prefix = _
|
||||||
|
ij_typescript_file_name_style = relaxed
|
||||||
|
ij_typescript_finally_on_new_line = false
|
||||||
|
ij_typescript_for_brace_force = never
|
||||||
|
ij_typescript_for_statement_new_line_after_left_paren = false
|
||||||
|
ij_typescript_for_statement_right_paren_on_new_line = false
|
||||||
|
ij_typescript_for_statement_wrap = off
|
||||||
|
ij_typescript_force_quote_style = false
|
||||||
|
ij_typescript_force_semicolon_style = false
|
||||||
|
ij_typescript_function_expression_brace_style = end_of_line
|
||||||
|
ij_typescript_if_brace_force = never
|
||||||
|
ij_typescript_import_merge_members = global
|
||||||
|
ij_typescript_import_prefer_absolute_path = global
|
||||||
|
ij_typescript_import_sort_members = true
|
||||||
|
ij_typescript_import_sort_module_name = false
|
||||||
|
ij_typescript_import_use_node_resolution = true
|
||||||
|
ij_typescript_imports_wrap = on_every_item
|
||||||
|
ij_typescript_indent_case_from_switch = true
|
||||||
|
ij_typescript_indent_chained_calls = true
|
||||||
|
ij_typescript_indent_package_children = 0
|
||||||
|
ij_typescript_jsdoc_include_types = false
|
||||||
|
ij_typescript_jsx_attribute_value = braces
|
||||||
|
ij_typescript_keep_blank_lines_in_code = 2
|
||||||
|
ij_typescript_keep_first_column_comment = true
|
||||||
|
ij_typescript_keep_indents_on_empty_lines = false
|
||||||
|
ij_typescript_keep_line_breaks = true
|
||||||
|
ij_typescript_keep_simple_blocks_in_one_line = false
|
||||||
|
ij_typescript_keep_simple_methods_in_one_line = false
|
||||||
|
ij_typescript_line_comment_add_space = true
|
||||||
|
ij_typescript_line_comment_at_first_column = false
|
||||||
|
ij_typescript_method_brace_style = end_of_line
|
||||||
|
ij_typescript_method_call_chain_wrap = off
|
||||||
|
ij_typescript_method_parameters_new_line_after_left_paren = false
|
||||||
|
ij_typescript_method_parameters_right_paren_on_new_line = false
|
||||||
|
ij_typescript_method_parameters_wrap = off
|
||||||
|
ij_typescript_object_literal_wrap = on_every_item
|
||||||
|
ij_typescript_parentheses_expression_new_line_after_left_paren = false
|
||||||
|
ij_typescript_parentheses_expression_right_paren_on_new_line = false
|
||||||
|
ij_typescript_place_assignment_sign_on_next_line = false
|
||||||
|
ij_typescript_prefer_as_type_cast = false
|
||||||
|
ij_typescript_prefer_parameters_wrap = false
|
||||||
|
ij_typescript_reformat_c_style_comments = false
|
||||||
|
ij_typescript_space_after_colon = true
|
||||||
|
ij_typescript_space_after_comma = true
|
||||||
|
ij_typescript_space_after_dots_in_rest_parameter = false
|
||||||
|
ij_typescript_space_after_generator_mult = true
|
||||||
|
ij_typescript_space_after_property_colon = true
|
||||||
|
ij_typescript_space_after_quest = true
|
||||||
|
ij_typescript_space_after_type_colon = true
|
||||||
|
ij_typescript_space_after_unary_not = false
|
||||||
|
ij_typescript_space_before_async_arrow_lparen = true
|
||||||
|
ij_typescript_space_before_catch_keyword = true
|
||||||
|
ij_typescript_space_before_catch_left_brace = true
|
||||||
|
ij_typescript_space_before_catch_parentheses = true
|
||||||
|
ij_typescript_space_before_class_lbrace = true
|
||||||
|
ij_typescript_space_before_class_left_brace = true
|
||||||
|
ij_typescript_space_before_colon = true
|
||||||
|
ij_typescript_space_before_comma = false
|
||||||
|
ij_typescript_space_before_do_left_brace = true
|
||||||
|
ij_typescript_space_before_else_keyword = true
|
||||||
|
ij_typescript_space_before_else_left_brace = true
|
||||||
|
ij_typescript_space_before_finally_keyword = true
|
||||||
|
ij_typescript_space_before_finally_left_brace = true
|
||||||
|
ij_typescript_space_before_for_left_brace = true
|
||||||
|
ij_typescript_space_before_for_parentheses = true
|
||||||
|
ij_typescript_space_before_for_semicolon = false
|
||||||
|
ij_typescript_space_before_function_left_parenth = true
|
||||||
|
ij_typescript_space_before_generator_mult = false
|
||||||
|
ij_typescript_space_before_if_left_brace = true
|
||||||
|
ij_typescript_space_before_if_parentheses = true
|
||||||
|
ij_typescript_space_before_method_call_parentheses = false
|
||||||
|
ij_typescript_space_before_method_left_brace = true
|
||||||
|
ij_typescript_space_before_method_parentheses = false
|
||||||
|
ij_typescript_space_before_property_colon = false
|
||||||
|
ij_typescript_space_before_quest = true
|
||||||
|
ij_typescript_space_before_switch_left_brace = true
|
||||||
|
ij_typescript_space_before_switch_parentheses = true
|
||||||
|
ij_typescript_space_before_try_left_brace = true
|
||||||
|
ij_typescript_space_before_type_colon = false
|
||||||
|
ij_typescript_space_before_unary_not = false
|
||||||
|
ij_typescript_space_before_while_keyword = true
|
||||||
|
ij_typescript_space_before_while_left_brace = true
|
||||||
|
ij_typescript_space_before_while_parentheses = true
|
||||||
|
ij_typescript_spaces_around_additive_operators = true
|
||||||
|
ij_typescript_spaces_around_arrow_function_operator = true
|
||||||
|
ij_typescript_spaces_around_assignment_operators = true
|
||||||
|
ij_typescript_spaces_around_bitwise_operators = true
|
||||||
|
ij_typescript_spaces_around_equality_operators = true
|
||||||
|
ij_typescript_spaces_around_logical_operators = true
|
||||||
|
ij_typescript_spaces_around_multiplicative_operators = true
|
||||||
|
ij_typescript_spaces_around_relational_operators = true
|
||||||
|
ij_typescript_spaces_around_shift_operators = true
|
||||||
|
ij_typescript_spaces_around_unary_operator = false
|
||||||
|
ij_typescript_spaces_within_array_initializer_brackets = false
|
||||||
|
ij_typescript_spaces_within_brackets = false
|
||||||
|
ij_typescript_spaces_within_catch_parentheses = false
|
||||||
|
ij_typescript_spaces_within_for_parentheses = false
|
||||||
|
ij_typescript_spaces_within_if_parentheses = false
|
||||||
|
ij_typescript_spaces_within_imports = false
|
||||||
|
ij_typescript_spaces_within_interpolation_expressions = false
|
||||||
|
ij_typescript_spaces_within_method_call_parentheses = false
|
||||||
|
ij_typescript_spaces_within_method_parentheses = false
|
||||||
|
ij_typescript_spaces_within_object_literal_braces = false
|
||||||
|
ij_typescript_spaces_within_object_type_braces = true
|
||||||
|
ij_typescript_spaces_within_parentheses = false
|
||||||
|
ij_typescript_spaces_within_switch_parentheses = false
|
||||||
|
ij_typescript_spaces_within_type_assertion = false
|
||||||
|
ij_typescript_spaces_within_union_types = true
|
||||||
|
ij_typescript_spaces_within_while_parentheses = false
|
||||||
|
ij_typescript_special_else_if_treatment = true
|
||||||
|
ij_typescript_ternary_operation_signs_on_next_line = false
|
||||||
|
ij_typescript_ternary_operation_wrap = off
|
||||||
|
ij_typescript_union_types_wrap = on_every_item
|
||||||
|
ij_typescript_use_chained_calls_group_indents = false
|
||||||
|
ij_typescript_use_double_quotes = true
|
||||||
|
ij_typescript_use_explicit_js_extension = global
|
||||||
|
ij_typescript_use_path_mapping = always
|
||||||
|
ij_typescript_use_public_modifier = false
|
||||||
|
ij_typescript_use_semicolon_after_statement = true
|
||||||
|
ij_typescript_var_declaration_wrap = normal
|
||||||
|
ij_typescript_while_brace_force = never
|
||||||
|
ij_typescript_while_on_new_line = false
|
||||||
|
ij_typescript_wrap_comments = false
|
||||||
|
|
||||||
|
[{*.yml,*.yaml}]
|
||||||
|
indent_size = 2
|
||||||
|
ij_continuation_indent_size = 2
|
||||||
|
ij_yaml_keep_indents_on_empty_lines = false
|
||||||
|
ij_yaml_keep_line_breaks = true
|
||||||
|
|
||||||
|
[{*.zsh,*.bash,*.sh}]
|
||||||
|
ij_shell_binary_ops_start_line = false
|
||||||
|
ij_shell_keep_column_alignment_padding = false
|
||||||
|
ij_shell_minify_program = false
|
||||||
|
ij_shell_redirect_followed_by_space = false
|
||||||
|
ij_shell_switch_cases_indented = false
|
||||||
|
|
||||||
|
[{.stylelintrc,.eslintrc,.babelrc,jest.config,*.bowerrc,*.jsb3,*.jsb2,*.json}]
|
||||||
|
indent_size = 2
|
||||||
|
ij_json_keep_blank_lines_in_code = 0
|
||||||
|
ij_json_keep_indents_on_empty_lines = false
|
||||||
|
ij_json_keep_line_breaks = true
|
||||||
|
ij_json_space_after_colon = true
|
||||||
|
ij_json_space_after_comma = true
|
||||||
|
ij_json_space_before_colon = true
|
||||||
|
ij_json_space_before_comma = false
|
||||||
|
ij_json_spaces_within_braces = false
|
||||||
|
ij_json_spaces_within_brackets = false
|
||||||
|
ij_json_wrap_long_lines = false
|
||||||
|
|
||||||
|
[{phpunit.xml.dist,*.jhm,*.rng,*.wsdl,*.fxml,*.xslt,*.jrxml,*.ant,*.xul,*.xsl,*.xsd,*.tld,*.jnlp,*.xml}]
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = tab
|
||||||
|
tab_width = 2
|
||||||
|
ij_smart_tabs = true
|
||||||
|
ij_xml_block_comment_at_first_column = true
|
||||||
|
ij_xml_keep_indents_on_empty_lines = false
|
||||||
|
ij_xml_line_comment_at_first_column = true
|
||||||
9
.gitflow
Normal file
9
.gitflow
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[gitflow "branch"]
|
||||||
|
master = master
|
||||||
|
develop = develop
|
||||||
|
[gitflow "prefix"]
|
||||||
|
feature = feature/
|
||||||
|
release = release/
|
||||||
|
hotfix = hotfix/
|
||||||
|
versiontag =
|
||||||
|
support = support/
|
||||||
21
.gitignore
vendored
21
.gitignore
vendored
@@ -1,13 +1,26 @@
|
|||||||
|
|
||||||
# no slash at the end to handle also symlinks
|
# no slash at the end to handle also symlinks
|
||||||
/toolkit
|
/toolkit
|
||||||
/conf
|
|
||||||
/env-*
|
/env-*
|
||||||
|
|
||||||
|
# maintenance mode (N°2240)
|
||||||
|
/.maintenance
|
||||||
|
|
||||||
|
# listing prevention in conf directory
|
||||||
|
/conf/**
|
||||||
|
!/conf/.htaccess
|
||||||
|
!/conf/index.php
|
||||||
|
!/conf/web.config
|
||||||
|
|
||||||
# composer reserver directory, from sources, populate/update using "composer install"
|
# composer reserver directory, from sources, populate/update using "composer install"
|
||||||
vendor/*
|
vendor/*
|
||||||
test/vendor/*
|
test/vendor/*
|
||||||
|
|
||||||
|
# all conf but listing prevention
|
||||||
|
/conf/**
|
||||||
|
!/conf/.htaccess
|
||||||
|
!/conf/web.config
|
||||||
|
|
||||||
# all datas but listing prevention
|
# all datas but listing prevention
|
||||||
/data/**
|
/data/**
|
||||||
!/data/.htaccess
|
!/data/.htaccess
|
||||||
@@ -33,8 +46,13 @@ test/vendor/*
|
|||||||
!/.idea/inspectionProfiles
|
!/.idea/inspectionProfiles
|
||||||
!/.idea/inspectionProfiles/*
|
!/.idea/inspectionProfiles/*
|
||||||
|
|
||||||
|
# doc. generation
|
||||||
|
/.doc/vendor
|
||||||
|
|
||||||
|
|
||||||
|
#phpdocumentor temp file
|
||||||
|
ast.dump
|
||||||
|
|
||||||
# CMake
|
# CMake
|
||||||
cmake-build-*/
|
cmake-build-*/
|
||||||
|
|
||||||
@@ -121,3 +139,4 @@ local.properties
|
|||||||
.cache-main
|
.cache-main
|
||||||
.scala_dependencies
|
.scala_dependencies
|
||||||
.worksheet
|
.worksheet
|
||||||
|
|
||||||
|
|||||||
31
.idea/codeStyles/Project.xml
generated
31
.idea/codeStyles/Project.xml
generated
@@ -1,19 +1,44 @@
|
|||||||
<component name="ProjectCodeStyleConfiguration">
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
<code_scheme name="Project" version="173">
|
<code_scheme name="Project" version="173">
|
||||||
|
<option name="LINE_SEPARATOR" value=" " />
|
||||||
|
<option name="RIGHT_MARGIN" value="140" />
|
||||||
|
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
|
||||||
|
<option name="SOFT_MARGINS" value="140" />
|
||||||
|
<HTMLCodeStyleSettings>
|
||||||
|
<option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="html,body,thead,tbody,tfoot,style,script,head" />
|
||||||
|
</HTMLCodeStyleSettings>
|
||||||
|
<JSCodeStyleSettings version="0">
|
||||||
|
<option name="USE_CHAINED_CALLS_GROUP_INDENTS" value="true" />
|
||||||
|
</JSCodeStyleSettings>
|
||||||
<PHPCodeStyleSettings>
|
<PHPCodeStyleSettings>
|
||||||
<option name="CONCAT_SPACES" value="false" />
|
<option name="CONCAT_SPACES" value="false" />
|
||||||
|
<option name="COMMA_AFTER_LAST_ARRAY_ELEMENT" value="true" />
|
||||||
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
|
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
|
||||||
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
|
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
|
||||||
<option name="PHPDOC_WRAP_LONG_LINES" value="true" />
|
<option name="PHPDOC_WRAP_LONG_LINES" value="true" />
|
||||||
|
<option name="THROWS_WEIGHT" value="6" />
|
||||||
|
<option name="PARAM_WEIGHT" value="4" />
|
||||||
|
<option name="RETURN_WEIGHT" value="5" />
|
||||||
|
<option name="AUTHOR_WEIGHT" value="7" />
|
||||||
|
<option name="INTERNAL_WEIGHT" value="0" />
|
||||||
|
<option name="API_WEIGHT" value="1" />
|
||||||
|
<option name="EXAMPLE_WEIGHT" value="3" />
|
||||||
|
<option name="SEE_WEIGHT" value="2" />
|
||||||
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
|
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
|
||||||
<option name="LOWER_CASE_NULL_CONST" value="true" />
|
<option name="LOWER_CASE_NULL_CONST" value="true" />
|
||||||
<option name="BLANK_LINES_BEFORE_RETURN_STATEMENT" value="1" />
|
<option name="BLANK_LINES_BEFORE_RETURN_STATEMENT" value="1" />
|
||||||
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
|
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
|
||||||
<option name="PHPDOC_USE_FQCN" value="true" />
|
<option name="PHPDOC_USE_FQCN" value="true" />
|
||||||
</PHPCodeStyleSettings>
|
</PHPCodeStyleSettings>
|
||||||
|
<XML>
|
||||||
|
<option name="XML_TEXT_WRAP" value="0" />
|
||||||
|
<option name="XML_KEEP_LINE_BREAKS" value="false" />
|
||||||
|
<option name="XML_KEEP_WHITE_SPACES_INSIDE_CDATA" value="true" />
|
||||||
|
</XML>
|
||||||
<codeStyleSettings language="JavaScript">
|
<codeStyleSettings language="JavaScript">
|
||||||
<option name="BRACE_STYLE" value="2" />
|
<option name="BRACE_STYLE" value="2" />
|
||||||
<option name="ELSE_ON_NEW_LINE" value="true" />
|
<option name="ELSE_ON_NEW_LINE" value="true" />
|
||||||
|
<option name="SPACE_AROUND_ADDITIVE_OPERATORS" value="false" />
|
||||||
<option name="IF_BRACE_FORCE" value="3" />
|
<option name="IF_BRACE_FORCE" value="3" />
|
||||||
<indentOptions>
|
<indentOptions>
|
||||||
<option name="USE_TAB_CHARACTER" value="true" />
|
<option name="USE_TAB_CHARACTER" value="true" />
|
||||||
@@ -23,8 +48,9 @@
|
|||||||
<option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
|
<option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
|
||||||
<option name="BRACE_STYLE" value="2" />
|
<option name="BRACE_STYLE" value="2" />
|
||||||
<option name="ELSE_ON_NEW_LINE" value="true" />
|
<option name="ELSE_ON_NEW_LINE" value="true" />
|
||||||
|
<option name="CATCH_ON_NEW_LINE" value="true" />
|
||||||
|
<option name="FINALLY_ON_NEW_LINE" value="true" />
|
||||||
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
||||||
<option name="SPACE_BEFORE_FOR_PARENTHESES" value="false" />
|
|
||||||
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
||||||
<option name="METHOD_PARAMETERS_WRAP" value="1" />
|
<option name="METHOD_PARAMETERS_WRAP" value="1" />
|
||||||
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
|
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
|
||||||
@@ -41,5 +67,8 @@
|
|||||||
<option name="SMART_TABS" value="true" />
|
<option name="SMART_TABS" value="true" />
|
||||||
</indentOptions>
|
</indentOptions>
|
||||||
</codeStyleSettings>
|
</codeStyleSettings>
|
||||||
|
<codeStyleSettings language="XML">
|
||||||
|
<option name="WRAP_ON_TYPING" value="1" />
|
||||||
|
</codeStyleSettings>
|
||||||
</code_scheme>
|
</code_scheme>
|
||||||
</component>
|
</component>
|
||||||
2
.idea/encodings.xml
generated
2
.idea/encodings.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="Encoding">
|
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
|
||||||
<file url="PROJECT" charset="UTF-8" />
|
<file url="PROJECT" charset="UTF-8" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
171
.idea/inspectionProfiles/Combodo.xml
generated
Normal file
171
.idea/inspectionProfiles/Combodo.xml
generated
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Combodo" />
|
||||||
|
<inspection_tool class="CascadeStringReplacementInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="ForgottenDebugOutputInspection" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="configuration">
|
||||||
|
<list>
|
||||||
|
<option value="\Codeception\Util\Debug::debug" />
|
||||||
|
<option value="\Codeception\Util\Debug::pause" />
|
||||||
|
<option value="\Doctrine\Common\Util\Debug::dump" />
|
||||||
|
<option value="\Doctrine\Common\Util\Debug::export" />
|
||||||
|
<option value="\Illuminate\Support\Debug\Dumper::dump" />
|
||||||
|
<option value="\Symfony\Component\Debug\Debug::enable" />
|
||||||
|
<option value="\Symfony\Component\Debug\DebugClassLoader::enable" />
|
||||||
|
<option value="\Symfony\Component\Debug\ErrorHandler::register" />
|
||||||
|
<option value="\Symfony\Component\Debug\ExceptionHandler::register" />
|
||||||
|
<option value="\TYPO3\CMS\Core\Utility\DebugUtility::debug" />
|
||||||
|
<option value="\Zend\Debug\Debug::dump" />
|
||||||
|
<option value="\Zend\Di\Display\Console::export" />
|
||||||
|
<option value="dd" />
|
||||||
|
<option value="debug_print_backtrace" />
|
||||||
|
<option value="debug_zval_dump" />
|
||||||
|
<option value="dpm" />
|
||||||
|
<option value="dpq" />
|
||||||
|
<option value="dsm" />
|
||||||
|
<option value="dump" />
|
||||||
|
<option value="dvm" />
|
||||||
|
<option value="error_log" />
|
||||||
|
<option value="kpr" />
|
||||||
|
<option value="phpinfo" />
|
||||||
|
<option value="print_r" />
|
||||||
|
<option value="var_dump" />
|
||||||
|
<option value="var_export" />
|
||||||
|
<option value="xdebug_break" />
|
||||||
|
<option value="xdebug_call_class" />
|
||||||
|
<option value="xdebug_call_file" />
|
||||||
|
<option value="xdebug_call_function" />
|
||||||
|
<option value="xdebug_call_line" />
|
||||||
|
<option value="xdebug_code_coverage_started" />
|
||||||
|
<option value="xdebug_debug_zval" />
|
||||||
|
<option value="xdebug_debug_zval_stdout" />
|
||||||
|
<option value="xdebug_dump_superglobals" />
|
||||||
|
<option value="xdebug_enable" />
|
||||||
|
<option value="xdebug_get_code_coverage" />
|
||||||
|
<option value="xdebug_get_collected_errors" />
|
||||||
|
<option value="xdebug_get_declared_vars" />
|
||||||
|
<option value="xdebug_get_function_stack" />
|
||||||
|
<option value="xdebug_get_headers" />
|
||||||
|
<option value="xdebug_get_monitored_functions" />
|
||||||
|
<option value="xdebug_get_profiler_filename" />
|
||||||
|
<option value="xdebug_get_stack_depth" />
|
||||||
|
<option value="xdebug_get_tracefile_name" />
|
||||||
|
<option value="xdebug_is_enabled" />
|
||||||
|
<option value="xdebug_memory_usage" />
|
||||||
|
<option value="xdebug_peak_memory_usage" />
|
||||||
|
<option value="xdebug_print_function_stack" />
|
||||||
|
<option value="xdebug_start_code_coverage" />
|
||||||
|
<option value="xdebug_start_error_collection" />
|
||||||
|
<option value="xdebug_start_function_monitor" />
|
||||||
|
<option value="xdebug_start_trace" />
|
||||||
|
<option value="xdebug_stop_code_coverage" />
|
||||||
|
<option value="xdebug_stop_error_collection" />
|
||||||
|
<option value="xdebug_stop_function_monitor" />
|
||||||
|
<option value="xdebug_stop_trace" />
|
||||||
|
<option value="xdebug_time_index" />
|
||||||
|
<option value="xdebug_var_dump" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="migratedIntoUserSpace" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="HtmlRequiredAltAttribute" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="HtmlRequiredLangAttribute" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="IsNullFunctionUsageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="MysqlParsingInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="PhpComposerExtensionStubsInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="PhpIncludeInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PhpMethodParametersCountMismatchInspection" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PhpShortOpenTagInspection" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PhpTooManyParametersInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="limit" value="7" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PhpUndefinedClassInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="DONT_REPORT_MULTI_RESOLVE" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PhpUndefinedMethodInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PhpUnhandledExceptionInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PhpUnusedLocalVariableInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||||
|
<option name="DONT_REPORT_INSIDE_LIST" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PhpUnusedParameterInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||||
|
<option name="DONT_REPORT_ABSTRACT_CLASS" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="SecurityAdvisoriesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="optionConfiguration">
|
||||||
|
<list>
|
||||||
|
<option value="barryvdh/laravel-debugbar" />
|
||||||
|
<option value="behat/behat" />
|
||||||
|
<option value="brianium/paratest" />
|
||||||
|
<option value="codeception/codeception" />
|
||||||
|
<option value="codedungeon/phpunit-result-printer" />
|
||||||
|
<option value="composer/composer" />
|
||||||
|
<option value="doctrine/coding-standard" />
|
||||||
|
<option value="filp/whoops" />
|
||||||
|
<option value="friendsofphp/php-cs-fixer" />
|
||||||
|
<option value="humbug/humbug" />
|
||||||
|
<option value="infection/infection" />
|
||||||
|
<option value="jakub-onderka/php-parallel-lint" />
|
||||||
|
<option value="johnkary/phpunit-speedtrap" />
|
||||||
|
<option value="kalessil/production-dependencies-guard" />
|
||||||
|
<option value="mikey179/vfsStream" />
|
||||||
|
<option value="mockery/mockery" />
|
||||||
|
<option value="mybuilder/phpunit-accelerator" />
|
||||||
|
<option value="orchestra/testbench" />
|
||||||
|
<option value="pdepend/pdepend" />
|
||||||
|
<option value="phan/phan" />
|
||||||
|
<option value="phing/phing" />
|
||||||
|
<option value="phpcompatibility/php-compatibility" />
|
||||||
|
<option value="phpmd/phpmd" />
|
||||||
|
<option value="phpro/grumphp" />
|
||||||
|
<option value="phpspec/phpspec" />
|
||||||
|
<option value="phpspec/prophecy" />
|
||||||
|
<option value="phpstan/phpstan" />
|
||||||
|
<option value="phpunit/phpunit" />
|
||||||
|
<option value="povils/phpmnd" />
|
||||||
|
<option value="roave/security-advisories" />
|
||||||
|
<option value="satooshi/php-coveralls" />
|
||||||
|
<option value="sebastian/phpcpd" />
|
||||||
|
<option value="slevomat/coding-standard" />
|
||||||
|
<option value="spatie/phpunit-watcher" />
|
||||||
|
<option value="squizlabs/php_codesniffer" />
|
||||||
|
<option value="sstalle/php7cc" />
|
||||||
|
<option value="symfony/debug" />
|
||||||
|
<option value="symfony/maker-bundle" />
|
||||||
|
<option value="symfony/phpunit-bridge" />
|
||||||
|
<option value="symfony/var-dumper" />
|
||||||
|
<option value="vimeo/psalm" />
|
||||||
|
<option value="wimg/php-compatibility" />
|
||||||
|
<option value="wp-coding-standards/wpcs" />
|
||||||
|
<option value="yiisoft/yii2-coding-standards" />
|
||||||
|
<option value="yiisoft/yii2-debug" />
|
||||||
|
<option value="yiisoft/yii2-gii" />
|
||||||
|
<option value="zendframework/zend-coding-standard" />
|
||||||
|
<option value="zendframework/zend-debug" />
|
||||||
|
<option value="zendframework/zend-test" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="SqlAddNotNullColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlAmbiguousColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlAutoIncrementDuplicateInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlCheckUsingColumnsInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlConstantConditionInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlDeprecateTypeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlDerivedTableAliasInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlDialectInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlDropIndexedColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlIdentifierInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlInsertValuesInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlNullComparisonInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlPostgresqlSelectFromProcedureInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlResolveInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlShouldBeInGroupByInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlSideEffectsInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlSignatureInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlStorageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlTypeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlUnusedVariableInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
||||||
155
.idea/inspectionProfiles/Project_Default.xml
generated
155
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,154 +1,19 @@
|
|||||||
<component name="InspectionProjectProfileManager">
|
<component name="InspectionProjectProfileManager">
|
||||||
<profile version="1.0">
|
<profile version="1.0">
|
||||||
<option name="myName" value="Project Default" />
|
<option name="myName" value="Project Default" />
|
||||||
<inspection_tool class="BladeControlDirectives" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
<inspection_tool class="CheckEmptyScriptTag" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="PhpIncludeInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
<inspection_tool class="CheckImageSize" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="PhpMethodParametersCountMismatchInspection" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
<inspection_tool class="CheckNodeTest" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="PhpTooManyParametersInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
<inspection_tool class="CheckTagEmptyBody" enabled="false" level="WARNING" enabled_by_default="false" />
|
<option name="limit" value="7" />
|
||||||
<inspection_tool class="CheckValidXmlInScriptTagBody" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CoffeeScriptArgumentsOutsideFunction" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CoffeeScriptFunctionSignatures" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CoffeeScriptInfiniteLoop" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CoffeeScriptLiteralNotFunction" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CoffeeScriptSillyAssignment" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CoffeeScriptSwitchStatementWithNoDefaultBranch" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CoffeeScriptUnusedLocalSymbols" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="ComposeFileStructure" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssFloatPxLength" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssInvalidAtRule" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssInvalidCharsetRule" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssInvalidElement" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssInvalidFunction" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssInvalidHtmlTagReference" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssInvalidImport" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssInvalidMediaFeature" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssInvalidPropertyValue" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssInvalidPseudoSelector" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssMissingComma" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssNegativeValue" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssNoGenericFontName" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssOptimizeSimilarProperties" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssOverwrittenProperties" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssRedundantUnit" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssUnitlessNumber" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssUnknownProperty" enabled="false" level="WARNING" enabled_by_default="false">
|
|
||||||
<option name="myCustomPropertiesEnabled" value="false" />
|
|
||||||
<option name="myIgnoreVendorSpecificProperties" value="false" />
|
|
||||||
<option name="myCustomPropertiesList">
|
|
||||||
<value>
|
|
||||||
<list size="0" />
|
|
||||||
</value>
|
|
||||||
</option>
|
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
<inspection_tool class="CssUnknownTarget" enabled="false" level="ERROR" enabled_by_default="false" />
|
<inspection_tool class="PhpUndefinedClassInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
<inspection_tool class="CssUnresolvedClass" enabled="false" level="ERROR" enabled_by_default="false" />
|
<option name="DONT_REPORT_MULTI_RESOLVE" value="true" />
|
||||||
<inspection_tool class="CssUnresolvedCustomProperty" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssUnresolvedCustomPropertySet" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CssUnusedSymbol" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CucumberExamplesColon" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CucumberMissedExamples" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CucumberTableInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CucumberUndefinedStep" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="DockerFileArgumentCount" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="DuplicateKeyInSection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="DuplicateSectionInFile" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="EmptyEventHandler" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="FileHeaderInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="GherkinBrokenTableInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="GherkinMisplacedBackground" enabled="false" level="ERROR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="HamlNestedTagContent" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="HardwiredNamespacePrefix" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="HtmlDeprecatedTag" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="HtmlExtraClosingTag" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="HtmlFormInputWithoutLabel" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="HtmlMissingClosingTag" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="HtmlPresentationalElement" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="HtmlUnknownAnchorTarget" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="HtmlUnknownAttribute" enabled="false" level="WARNING" enabled_by_default="false">
|
|
||||||
<option name="myValues">
|
|
||||||
<value>
|
|
||||||
<list size="0" />
|
|
||||||
</value>
|
|
||||||
</option>
|
|
||||||
<option name="myCustomValuesEnabled" value="true" />
|
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
<inspection_tool class="HtmlUnknownBooleanAttribute" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="PhpUnhandledExceptionInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
<inspection_tool class="HtmlUnknownTag" enabled="false" level="WARNING" enabled_by_default="false">
|
<inspection_tool class="PhpUnusedParameterInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||||
<option name="myValues">
|
<option name="DONT_REPORT_ABSTRACT_CLASS" value="true" />
|
||||||
<value>
|
|
||||||
<list size="6">
|
|
||||||
<item index="0" class="java.lang.String" itemvalue="nobr" />
|
|
||||||
<item index="1" class="java.lang.String" itemvalue="noembed" />
|
|
||||||
<item index="2" class="java.lang.String" itemvalue="comment" />
|
|
||||||
<item index="3" class="java.lang.String" itemvalue="noscript" />
|
|
||||||
<item index="4" class="java.lang.String" itemvalue="embed" />
|
|
||||||
<item index="5" class="java.lang.String" itemvalue="script" />
|
|
||||||
</list>
|
|
||||||
</value>
|
|
||||||
</option>
|
|
||||||
<option name="myCustomValuesEnabled" value="true" />
|
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
<inspection_tool class="HtmlUnknownTarget" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="ImplicitTypeConversion" enabled="false" level="WARNING" enabled_by_default="false">
|
|
||||||
<option name="BITS" value="1720" />
|
|
||||||
<option name="FLAG_EXPLICIT_CONVERSION" value="true" />
|
|
||||||
<option name="IGNORE_NODESET_TO_BOOLEAN_VIA_STRING" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="IndexZeroUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="JSLastCommaInArrayLiteral" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="JSLastCommaInObjectLiteral" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="JSUnresolvedFunction" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="JSUnresolvedVariable" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="LossyEncoding" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="MissingSinceTagDocInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="MysqlParsingInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="NonAsciiCharacters" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpDocMissingReturnTagInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpDocMissingThrowsInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpIncludeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpRedundantClosingTagInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpUndefinedClassConstantInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpUndefinedClassInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpUndefinedConstantInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpUndefinedFieldInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpUndefinedFunctionInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpUndefinedGotoLabelInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpUndefinedMethodInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpUndefinedNamespaceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="PhpUnusedParameterInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="RedundantTypeConversion" enabled="false" level="WARNING" enabled_by_default="false">
|
|
||||||
<option name="CHECK_ANY" value="false" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="RequiredAttributes" enabled="false" level="WARNING" enabled_by_default="false">
|
|
||||||
<option name="myAdditionalRequiredHtmlAttributes" value="" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="SqlAddNotNullColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlAmbiguousColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlAutoIncrementDuplicateInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlCheckUsingColumnsInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlConstantConditionInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlDeprecateTypeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlDerivedTableAliasInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlDialectInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlDropIndexedColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlIdentifierInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlInsertValuesInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="SqlNullComparisonInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlPostgresqlSelectFromProcedureInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlResolveInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlShouldBeInGroupByInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlSignatureInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlStorageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlTypeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="SqlUnusedVariableInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="TaskProblemsInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="TypeScriptPreferShortImport" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="XmlDefaultAttributeValue" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="XmlUnboundNsPrefix" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="XmlUnusedNamespaceDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="XsltUnusedDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="XsltVariableShadowing" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
||||||
</profile>
|
</profile>
|
||||||
</component>
|
</component>
|
||||||
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="PROJECT_PROFILE" value="Combodo" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
||||||
@@ -10,5 +10,7 @@ mkdir -p toolkit
|
|||||||
rm -rf toolkit/*
|
rm -rf toolkit/*
|
||||||
|
|
||||||
# fill target dirs
|
# fill target dirs
|
||||||
curl http://www.combodo.com/documentation/iTopDataModelToolkit-2.3.zip | tar xvz --directory toolkit
|
curl https://www.combodo.com/documentation/iTopDataModelToolkit-2.3.zip > toolkit.zip
|
||||||
|
unzip toolkit.zip
|
||||||
|
rm toolkit.zip
|
||||||
cp -r .jenkins/configuration/default-environment/unattended_install/* toolkit
|
cp -r .jenkins/configuration/default-environment/unattended_install/* toolkit
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
# on the root dir
|
# on the root dir
|
||||||
composer install
|
# composer install -a # => Not needed anymore (libs were added to git with N°2435)
|
||||||
|
|
||||||
|
|
||||||
# under the test dir
|
# under the test dir
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
whoami
|
whoami
|
||||||
pwd
|
pwd
|
||||||
ls
|
ls
|
||||||
|
|||||||
@@ -3,6 +3,39 @@ set -x
|
|||||||
|
|
||||||
cd test
|
cd test
|
||||||
|
|
||||||
export DEBUG_UNIT_TEST="0"
|
export DEBUG_UNIT_TEST=0
|
||||||
|
RUN_NONREG_TESTS=0
|
||||||
|
|
||||||
php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml --teamcity
|
#USAGE ${debugMode} ${runNonRegOQLTests} "${coverture}" "${testFile}"
|
||||||
|
|
||||||
|
if [ $# -ge 1 -a "x$1" == "xtrue" ]
|
||||||
|
then
|
||||||
|
export DEBUG_UNIT_TEST=1
|
||||||
|
else
|
||||||
|
export DEBUG_UNIT_TEST=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
OPTION=""
|
||||||
|
if [ $# -ge 3 -a "x$3" == "xtrue" ]
|
||||||
|
then
|
||||||
|
##coverture
|
||||||
|
OPTION="-dxdebug.coverage_enable=1 --coverage-clover ../var/test/coverage.xml"
|
||||||
|
fi
|
||||||
|
|
||||||
|
TESTFILE="$4"
|
||||||
|
if [ "x$TESTFILE" != "x" ]
|
||||||
|
then
|
||||||
|
# shellcheck disable=SC2001
|
||||||
|
TESTFILE=$(echo "$TESTFILE" | sed 's|test/||1')
|
||||||
|
php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml $OPTION $TESTFILE --teamcity
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $# -ge 2 -a "x$2" == "xtrue" ]
|
||||||
|
then
|
||||||
|
php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml $OPTION --teamcity
|
||||||
|
else
|
||||||
|
#echo php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml --teamcity
|
||||||
|
php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml $OPTION --exclude-group OQL --teamcity
|
||||||
|
fi
|
||||||
|
|||||||
@@ -2,5 +2,7 @@
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
chmod 666 conf/production/config-itop.php
|
||||||
|
|
||||||
cd toolkit
|
cd toolkit
|
||||||
php unattended_install.php default-params.xml
|
php unattended_install.php --response_file=default-params.xml --clean=true
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ $MySettings = array(
|
|||||||
|
|
||||||
'db_host' => '',
|
'db_host' => '',
|
||||||
|
|
||||||
'db_name' => 'itop_ci_main',
|
'db_name' => 'itop_ci',
|
||||||
|
|
||||||
'db_pwd' => 'IKnowYouSeeMeInJenkinsConf',
|
'db_pwd' => 'IKnowYouSeeMeInJenkinsConf',
|
||||||
|
|
||||||
@@ -94,10 +94,6 @@ $MySettings = array(
|
|||||||
|
|
||||||
'default_language' => 'EN US',
|
'default_language' => 'EN US',
|
||||||
|
|
||||||
// disable_attachments_download_legacy_portal: Disable attachments download from legacy portal
|
|
||||||
// default: true
|
|
||||||
'disable_attachments_download_legacy_portal' => true,
|
|
||||||
|
|
||||||
// draft_attachments_lifetime: Lifetime (in seconds) of drafts' attachments and inline images: after this duration, the garbage collector will delete them.
|
// draft_attachments_lifetime: Lifetime (in seconds) of drafts' attachments and inline images: after this duration, the garbage collector will delete them.
|
||||||
// default: 3600
|
// default: 3600
|
||||||
'draft_attachments_lifetime' => 3600,
|
'draft_attachments_lifetime' => 3600,
|
||||||
@@ -251,6 +247,9 @@ $MySettings = array(
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
$MyModuleSettings = array(
|
$MyModuleSettings = array(
|
||||||
|
'authent-local' => array (
|
||||||
|
'password_validation.pattern' => '',
|
||||||
|
),
|
||||||
'itop-attachments' => array (
|
'itop-attachments' => array (
|
||||||
'allowed_classes' => array (
|
'allowed_classes' => array (
|
||||||
0 => 'Ticket',
|
0 => 'Ticket',
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</preinstall>
|
</preinstall>
|
||||||
<source_dir>datamodels/2.x/</source_dir>
|
<source_dir>datamodels/2.x/</source_dir>
|
||||||
<datamodel_version>2.5.0</datamodel_version>
|
<datamodel_version>2.5.0</datamodel_version>
|
||||||
<previous_configuration_file>/var/lib/jenkins/workspace/iTop-CI/unattended_install/default-config-itop.php</previous_configuration_file>
|
<previous_configuration_file>default-config-itop.php</previous_configuration_file>
|
||||||
<extensions_dir>extensions</extensions_dir>
|
<extensions_dir>extensions</extensions_dir>
|
||||||
<target_env>production</target_env>
|
<target_env>production</target_env>
|
||||||
<workspace_dir></workspace_dir>
|
<workspace_dir></workspace_dir>
|
||||||
|
|||||||
@@ -1,4 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2013-2019 Combodo SARL
|
||||||
|
*
|
||||||
|
* This file is part of iTop.
|
||||||
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
*/
|
||||||
|
|
||||||
//this scrit will be run under the ./toolkit directory, relatively to the document root
|
//this scrit will be run under the ./toolkit directory, relatively to the document root
|
||||||
|
|
||||||
require_once('../approot.inc.php');
|
require_once('../approot.inc.php');
|
||||||
@@ -83,7 +101,7 @@ if ($sMode == 'install')
|
|||||||
$oMysqli = new mysqli($sDBServer, $sDBUser, $sDBPwd);
|
$oMysqli = new mysqli($sDBServer, $sDBUser, $sDBPwd);
|
||||||
if ($oMysqli->connect_errno)
|
if ($oMysqli->connect_errno)
|
||||||
{
|
{
|
||||||
die("Cannot connect to the MySQL server (".$mysqli->connect_errno . ") ".$mysqli->connect_error."\nExiting");
|
die("Cannot connect to the MySQL server (".$oMysqli->connect_errno . ") ".$oMysqli->connect_error."\nExiting");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
6
.make/README.md
Normal file
6
.make/README.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
= Make Doc =
|
||||||
|
.make folder is meant to gather tools for releasing process. Maybe other new purposes will come as well....
|
||||||
|
|
||||||
|
== license ==
|
||||||
|
- updateLicenses.php: used to update community-licenses.xml easily based on composer.json files
|
||||||
|
- sortLicenceXml.php: used to sort licenses based on scope + product name
|
||||||
98
.make/composer/listOutdated.php
Normal file
98
.make/composer/listOutdated.php
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2010-2020 Combodo SARL
|
||||||
|
*
|
||||||
|
* This file is part of iTop.
|
||||||
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with iTop. If not, see <http: *www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
$iTopFolder = __DIR__ . "/../../" ;
|
||||||
|
|
||||||
|
require_once ("$iTopFolder/approot.inc.php");
|
||||||
|
$sApproot = APPROOT;
|
||||||
|
$aTrace = array();
|
||||||
|
|
||||||
|
$aParamsConfig = array(
|
||||||
|
'composer-path' => array(
|
||||||
|
'default' => 'composer.phar',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$aParamsConfigNotFound = array_flip(array_keys($aParamsConfig));
|
||||||
|
$aGivenArgs = $argv;
|
||||||
|
unset($aGivenArgs[0]);
|
||||||
|
|
||||||
|
$aParams = array();
|
||||||
|
|
||||||
|
foreach ($aParamsConfig as $sParam => $aConfig)
|
||||||
|
{
|
||||||
|
$bParamsFound = false;
|
||||||
|
foreach ($aGivenArgs as $sGivenArg)
|
||||||
|
{
|
||||||
|
if (preg_match("/--$sParam(?:=(?<value>.*))?$/", $sGivenArg, $aMatches))
|
||||||
|
{
|
||||||
|
$aParams[$sParam] =
|
||||||
|
isset($aMatches['value'])
|
||||||
|
? $aMatches['value']
|
||||||
|
: true
|
||||||
|
;
|
||||||
|
$bParamsFound = true;
|
||||||
|
unset($aGivenArgs[$sGivenArg]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($bParamsFound)
|
||||||
|
{
|
||||||
|
unset($aParamsConfigNotFound[$sParam]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($aParamsConfigNotFound as $sParamsConfigNotFound => $void)
|
||||||
|
{
|
||||||
|
if (isset($aParamsConfig[$sParamsConfigNotFound]['default']))
|
||||||
|
{
|
||||||
|
$aParams[$sParamsConfigNotFound] = $aParamsConfig[$sParamsConfigNotFound]['default'];
|
||||||
|
$aTrace[] = "\e[1;30mUsing default value '{$aParams[$sParamsConfigNotFound]}' for '$sParamsConfigNotFound'\e[0m\n";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
die("Missing '$sParamsConfigNotFound'");
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "This command aims at helping you find upgradable dependencies\n";
|
||||||
|
echo "\e[0;33mBeware of the version colored in orange, they probably introduce BC breaks!\e[0m\n";
|
||||||
|
|
||||||
|
$sCommand = "{$aParams['composer-path']} show -loD --working-dir=$sApproot --ansi";
|
||||||
|
$execCode = exec($sCommand, $output);
|
||||||
|
$sOutput = implode("\n", $output)."\n";
|
||||||
|
|
||||||
|
if (!$execCode)
|
||||||
|
{
|
||||||
|
echo "\e[41mFailed to execute '$sCommand'\e[0m\n";
|
||||||
|
echo "Trace: \n".implode("\n", $aTrace);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$iCountDepdendenciesFound = count($output);
|
||||||
|
|
||||||
|
$iCountBc = substr_count($sOutput, '[33m');
|
||||||
|
|
||||||
|
echo sprintf("Found \033[44m%d\033[0m upgradable dependencies, including \e[41m%s BC break\e[0m 😱 :\n\n", $iCountDepdendenciesFound, $iCountBc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo $sOutput;
|
||||||
|
|
||||||
57
.make/composer/rmDeniedTestDir.php
Normal file
57
.make/composer/rmDeniedTestDir.php
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2010-2020 Combodo SARL
|
||||||
|
*
|
||||||
|
* This file is part of iTop.
|
||||||
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with iTop. If not, see <http: *www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Combodo\iTop\Composer\iTopComposer;
|
||||||
|
|
||||||
|
$iTopFolder = __DIR__ . "/../../" ;
|
||||||
|
|
||||||
|
require_once ("$iTopFolder/approot.inc.php");
|
||||||
|
require_once (APPROOT."/setup/setuputils.class.inc.php");
|
||||||
|
|
||||||
|
if (php_sapi_name() !== 'cli')
|
||||||
|
{
|
||||||
|
throw new \Exception('This script can only run from CLI');
|
||||||
|
}
|
||||||
|
|
||||||
|
clearstatcache();
|
||||||
|
|
||||||
|
$oiTopComposer = new iTopComposer();
|
||||||
|
$aDeniedButStillPresent = $oiTopComposer->ListDeniedButStillPresent();
|
||||||
|
|
||||||
|
foreach ($aDeniedButStillPresent as $sDir)
|
||||||
|
{
|
||||||
|
if (! preg_match('#[tT]ests?/?$#', $sDir))
|
||||||
|
{
|
||||||
|
echo "\nfound INVALID denied test dir: '$sDir'\n";
|
||||||
|
throw new \Exception("$sDir must end with /Test/ or /test/");
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SetupUtils::rrmdir($sDir);
|
||||||
|
echo "Remove denied test dir: '$sDir'\n";
|
||||||
|
}
|
||||||
|
catch (\Exception $e)
|
||||||
|
{
|
||||||
|
echo "\nFAILED to remove denied test dir: '$sDir'\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
90
.make/license/gen-community-license.sh
Normal file
90
.make/license/gen-community-license.sh
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
#/bin/bash
|
||||||
|
|
||||||
|
#git diff --name-status 2.6.2..HEAD js |grep 'A\sjs/' |awk -F/ '{printf("lib/%s/%s\n",$2,$3)}'|sort |uniq >/tmp/toto
|
||||||
|
#git diff --name-status 2.6.2..HEAD lib |grep 'A\slib/' |awk -F/ '{printf("lib/%s/%s\n",$2,$3)}'|sort |uniq >/tmp/toto
|
||||||
|
|
||||||
|
function HELP(){
|
||||||
|
echo " Syntax: bash $0 /var/www/html/iTop"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "no iTop path provided"
|
||||||
|
HELP
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
iTopPath=$1
|
||||||
|
|
||||||
|
if [ ! -d $iTopPath ]
|
||||||
|
then
|
||||||
|
echo "$iTopPath is not an iTop path."
|
||||||
|
HELP
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "<?xml version=\"1.0\"?>
|
||||||
|
<licenses>"
|
||||||
|
|
||||||
|
for subfolder in lib datamodels
|
||||||
|
do
|
||||||
|
for l in $(find $iTopPath/$subfolder/ -name composer.json|sed 's|/composer.json||')
|
||||||
|
do
|
||||||
|
if [ ! -d $l ]
|
||||||
|
then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if [ "$subfolder" == "datamodels" ]
|
||||||
|
then
|
||||||
|
if [ $(find $l -name module*.php|wc -l) -ne 0 -o $(echo "$l"|grep -c "itop-portal-base") -ne 0 ]
|
||||||
|
then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
dir=$(dirname $(dirname $l))
|
||||||
|
prod=$(echo $l| sed "s|$dir/||1")
|
||||||
|
echo $l $subfolder
|
||||||
|
lictype=$(cd $l && composer licenses --format json |jq .license[] |sed 's|\"||g')
|
||||||
|
|
||||||
|
authors=""
|
||||||
|
if [ -f $l/composer.json ]
|
||||||
|
then
|
||||||
|
author_nb=$(grep -c authors $l/composer.json|sed 's| ||g')
|
||||||
|
if [ "x$author_nb" != "x0" ]
|
||||||
|
then
|
||||||
|
OLDIFS=$IFS
|
||||||
|
IFS=$'\n'
|
||||||
|
for a in $(cat $l/composer.json |jq .authors[].name|sed 's|\"||g')
|
||||||
|
do
|
||||||
|
authors="$authors$a - "
|
||||||
|
done
|
||||||
|
authors="$authors#"
|
||||||
|
authors=$(echo $authors |sed 's| - #||')
|
||||||
|
IFS=$OLDIFS
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
lic=""
|
||||||
|
for licf in $(find $l -name LICEN*)
|
||||||
|
do
|
||||||
|
lic=$(cat $licf)
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
#if [ "x$lic" == "x" ]
|
||||||
|
#then
|
||||||
|
# echo "============== no license found $l"
|
||||||
|
#fi
|
||||||
|
|
||||||
|
echo " <license>
|
||||||
|
<product scope=\"$subfolder\">$prod</product>
|
||||||
|
<author>$authors</author>
|
||||||
|
<license_type>$lictype</license_type>
|
||||||
|
<text><![CDATA[
|
||||||
|
$lic
|
||||||
|
]]></text>
|
||||||
|
</license>"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "</licenses>"
|
||||||
64
.make/license/sortLicenceXml.php
Normal file
64
.make/license/sortLicenceXml.php
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* script used to sort license file (usefull for autogeneration)
|
||||||
|
* Example:
|
||||||
|
*/
|
||||||
|
$iTopFolder = __DIR__ . "/../../" ;
|
||||||
|
$xmlFilePath = $iTopFolder . "setup/licenses/community-licenses.xml";
|
||||||
|
$dom = new DOMDocument();
|
||||||
|
$dom->load($xmlFilePath);
|
||||||
|
$xp = new DOMXPath($dom);
|
||||||
|
|
||||||
|
$licenseList = $xp->query('/licenses/license');
|
||||||
|
$licenses = iterator_to_array($licenseList);
|
||||||
|
|
||||||
|
|
||||||
|
function get_scope($product_node)
|
||||||
|
{
|
||||||
|
$scope = $product_node->getAttribute("scope");
|
||||||
|
|
||||||
|
if ($scope === "")
|
||||||
|
{ //put iTop first
|
||||||
|
return "aaaaaaaaa";
|
||||||
|
}
|
||||||
|
return $scope;
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_product_node($license_node)
|
||||||
|
{
|
||||||
|
foreach ($license_node->childNodes as $child)
|
||||||
|
{
|
||||||
|
if (is_a($child, 'DomElement') && $child->tagName === "product")
|
||||||
|
{
|
||||||
|
return $child;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sort_by_product($a, $b)
|
||||||
|
{
|
||||||
|
$aProductNode = get_product_node($a);
|
||||||
|
$bProductNode = get_product_node($b);
|
||||||
|
|
||||||
|
$res = strcmp(get_scope($aProductNode), get_scope($bProductNode));
|
||||||
|
if ($res !== 0)
|
||||||
|
{
|
||||||
|
return $res;
|
||||||
|
}
|
||||||
|
//sort on node product name
|
||||||
|
return strcmp($aProductNode->nodeValue, $bProductNode->nodeValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
usort($licenses, 'sort_by_product');
|
||||||
|
|
||||||
|
$newdom = new DOMDocument("1.0");
|
||||||
|
$newdom->formatOutput = true;
|
||||||
|
$root = $newdom->createElement("licenses");
|
||||||
|
$newdom->appendChild($root);
|
||||||
|
foreach ($licenses as $b) {
|
||||||
|
$node = $newdom->importNode($b,true);
|
||||||
|
$root->appendChild($newdom->importNode($b,true));
|
||||||
|
}
|
||||||
|
|
||||||
|
$newdom->save($xmlFilePath);
|
||||||
89
.make/license/updateLicenses.php
Normal file
89
.make/license/updateLicenses.php
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* script used to sort license file (usefull for autogeneration)
|
||||||
|
* Example: php
|
||||||
|
*/
|
||||||
|
|
||||||
|
$iTopFolder = __DIR__ . "/../../" ;
|
||||||
|
$xmlFilePath = $iTopFolder . "setup/licenses/community-licenses.xml";
|
||||||
|
|
||||||
|
function get_scope($product_node)
|
||||||
|
{
|
||||||
|
$scope = $product_node->getAttribute("scope");
|
||||||
|
|
||||||
|
if ($scope === "")
|
||||||
|
{ //put iTop first
|
||||||
|
return "aaaaaaaaa";
|
||||||
|
}
|
||||||
|
return $scope;
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_product_node($license_node)
|
||||||
|
{
|
||||||
|
foreach ($license_node->childNodes as $child)
|
||||||
|
{
|
||||||
|
if (is_a($child, 'DomElement') && $child->tagName === "product")
|
||||||
|
{
|
||||||
|
return $child;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sort_by_product($a, $b)
|
||||||
|
{
|
||||||
|
$aProductNode = get_product_node($a);
|
||||||
|
$bProductNode = get_product_node($b);
|
||||||
|
|
||||||
|
$res = strcmp(get_scope($aProductNode), get_scope($bProductNode));
|
||||||
|
if ($res !== 0)
|
||||||
|
{
|
||||||
|
return $res;
|
||||||
|
}
|
||||||
|
//sort on node product name
|
||||||
|
return strcmp($aProductNode->nodeValue, $bProductNode->nodeValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_license_nodes($file_path)
|
||||||
|
{
|
||||||
|
$dom = new DOMDocument();
|
||||||
|
$dom->load($file_path);
|
||||||
|
$xp = new DOMXPath($dom);
|
||||||
|
|
||||||
|
$licenseList = $xp->query('/licenses/license');
|
||||||
|
$licenses = iterator_to_array($licenseList);
|
||||||
|
|
||||||
|
usort($licenses, 'sort_by_product');
|
||||||
|
return $licenses;
|
||||||
|
}
|
||||||
|
|
||||||
|
$old_licenses = get_license_nodes($xmlFilePath);
|
||||||
|
|
||||||
|
//generate file with updated licenses
|
||||||
|
$generated_license_file_path = __DIR__."/provfile.xml";
|
||||||
|
exec("bash " . __DIR__ . "/gen-community-license.sh $iTopFolder > ". $generated_license_file_path);
|
||||||
|
$new_licenses = get_license_nodes($generated_license_file_path);
|
||||||
|
exec("rm -f ". $generated_license_file_path);
|
||||||
|
|
||||||
|
foreach ($old_licenses as $b) {
|
||||||
|
$aProductNode = get_product_node($b);
|
||||||
|
|
||||||
|
if (get_scope($aProductNode) !== "lib" && get_scope($aProductNode) !== "datamodels" )
|
||||||
|
{
|
||||||
|
$new_licenses[] = $b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
usort($new_licenses, 'sort_by_product');
|
||||||
|
|
||||||
|
$new_dom = new DOMDocument("1.0");
|
||||||
|
$new_dom->formatOutput = true;
|
||||||
|
$root = $new_dom->createElement("licenses");
|
||||||
|
$new_dom->appendChild($root);
|
||||||
|
|
||||||
|
foreach ($new_licenses as $b) {
|
||||||
|
$node = $new_dom->importNode($b,true);
|
||||||
|
$root->appendChild($new_dom->importNode($b,true));
|
||||||
|
}
|
||||||
|
|
||||||
|
$new_dom->save($xmlFilePath);
|
||||||
47
.make/release/update-versions.php
Normal file
47
.make/release/update-versions.php
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* Tool to automate version update before release
|
||||||
|
*
|
||||||
|
* Will update version in the following files :
|
||||||
|
*
|
||||||
|
* * datamodels/2.x/.../module.*.php
|
||||||
|
* * datamodels/2.x/version.xml
|
||||||
|
* * css/css-variables.scss $version
|
||||||
|
*
|
||||||
|
* Usage :
|
||||||
|
* `php .make\release\update-versions.php "2.7.0-rc"`
|
||||||
|
*
|
||||||
|
* @since 2.7.0
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
require_once (__DIR__.'/../../approot.inc.php');
|
||||||
|
require_once (__DIR__.DIRECTORY_SEPARATOR.'update.classes.inc.php');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** @var \FileVersionUpdater[] $aFilesUpdaters */
|
||||||
|
$aFilesUpdaters = array(
|
||||||
|
new iTopVersionFileUpdater(),
|
||||||
|
new CssVariablesFileUpdater(),
|
||||||
|
new DatamodelsModulesFiles(),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (count($argv) === 1)
|
||||||
|
{
|
||||||
|
echo '/!\ You must pass the new version as parameter';
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
$sVersionLabel = $argv[1];
|
||||||
|
if (empty($sVersionLabel))
|
||||||
|
{
|
||||||
|
echo 'Version passed as parameter is empty !';
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($aFilesUpdaters as $oFileVersionUpdater)
|
||||||
|
{
|
||||||
|
$oFileVersionUpdater->UpdateAllFiles($sVersionLabel);
|
||||||
|
}
|
||||||
36
.make/release/update-xml.php
Normal file
36
.make/release/update-xml.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* Tool to automate datamodel version update in XML
|
||||||
|
*
|
||||||
|
* Will update version in the following files :
|
||||||
|
*
|
||||||
|
* datamodels/2.x/.../datamodel.*.xml
|
||||||
|
*
|
||||||
|
* Usage :
|
||||||
|
* `php .make\release\update-xml.php "1.7"`
|
||||||
|
*
|
||||||
|
* @since 2.7.0
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
require_once (__DIR__.'/../../approot.inc.php');
|
||||||
|
require_once (__DIR__.DIRECTORY_SEPARATOR.'update.classes.inc.php');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (count($argv) === 1)
|
||||||
|
{
|
||||||
|
echo '/!\ You must pass the new version as parameter';
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
$sVersionLabel = $argv[1];
|
||||||
|
if (empty($sVersionLabel))
|
||||||
|
{
|
||||||
|
echo 'Version passed as parameter is empty !';
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
$oFileVersionUpdater = new DatamodelsXmlFiles();
|
||||||
|
$oFileVersionUpdater->UpdateAllFiles($sVersionLabel);
|
||||||
169
.make/release/update.classes.inc.php
Normal file
169
.make/release/update.classes.inc.php
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* Classes for updater tools
|
||||||
|
*
|
||||||
|
* @see update-versions.php
|
||||||
|
* @see update-xml.php
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
require_once (__DIR__.'/../../approot.inc.php');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
abstract class FileVersionUpdater
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @return string[] full path of files to modify
|
||||||
|
*/
|
||||||
|
abstract public function GetFiles();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Warnign : will consume lots of memory on larger files !
|
||||||
|
*
|
||||||
|
* @param string $sVersionLabel
|
||||||
|
* @param string $sFileContent
|
||||||
|
* @param string $sFileFullPath
|
||||||
|
*
|
||||||
|
* @return string file content with replaced values
|
||||||
|
*/
|
||||||
|
abstract public function UpdateFileContent($sVersionLabel, $sFileContent, $sFileFullPath);
|
||||||
|
|
||||||
|
public function UpdateAllFiles($sVersionLabel)
|
||||||
|
{
|
||||||
|
$aFilesToUpdate = $this->GetFiles();
|
||||||
|
$sFileUpdaterName = get_class($this);
|
||||||
|
echo "# Updater : $sFileUpdaterName\n";
|
||||||
|
foreach ($aFilesToUpdate as $sFileToUpdateFullPath)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$sCurrentFileContent = file_get_contents($sFileToUpdateFullPath);
|
||||||
|
$sNewFileContent = $this->UpdateFileContent($sVersionLabel, $sCurrentFileContent, $sFileToUpdateFullPath);
|
||||||
|
file_put_contents($sFileToUpdateFullPath, $sNewFileContent);
|
||||||
|
echo " - $sFileToUpdateFullPath : OK !\n";
|
||||||
|
}
|
||||||
|
catch (Exception $e)
|
||||||
|
{
|
||||||
|
echo " - $sFileToUpdateFullPath : Error :(\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class AbstractSingleFileVersionUpdater extends FileVersionUpdater
|
||||||
|
{
|
||||||
|
private $sFileToUpdate;
|
||||||
|
|
||||||
|
public function __construct($sFileToUpdate)
|
||||||
|
{
|
||||||
|
$this->sFileToUpdate = $sFileToUpdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function GetFiles()
|
||||||
|
{
|
||||||
|
return array(APPROOT.$this->sFileToUpdate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class iTopVersionFileUpdater extends AbstractSingleFileVersionUpdater
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct('datamodels/2.x/version.xml');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function UpdateFileContent($sVersionLabel, $sFileContent, $sFileFullPath)
|
||||||
|
{
|
||||||
|
return preg_replace(
|
||||||
|
'/(<version>)[^<]*(<\/version>)/',
|
||||||
|
'${1}'.$sVersionLabel.'${2}',
|
||||||
|
$sFileContent
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CssVariablesFileUpdater extends AbstractSingleFileVersionUpdater
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct('css/css-variables.scss');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function UpdateFileContent($sVersionLabel, $sFileContent, $sFileFullPath)
|
||||||
|
{
|
||||||
|
return preg_replace(
|
||||||
|
'/(\$version: "v)[^"]*(";)/',
|
||||||
|
'${1}'.$sVersionLabel.'${2}',
|
||||||
|
$sFileContent
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class AbstractGlobFileVersionUpdater extends FileVersionUpdater
|
||||||
|
{
|
||||||
|
protected $sGlobPattern;
|
||||||
|
|
||||||
|
public function __construct($sGlobPattern)
|
||||||
|
{
|
||||||
|
$this->sGlobPattern = $sGlobPattern;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function GetFiles()
|
||||||
|
{
|
||||||
|
return glob($this->sGlobPattern);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DatamodelsModulesFiles extends AbstractGlobFileVersionUpdater
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(APPROOT.'datamodels/2.x/*/module.*.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function UpdateFileContent($sVersionLabel, $sFileContent, $sFileFullPath)
|
||||||
|
{
|
||||||
|
$sModulePath = realpath($sFileFullPath);
|
||||||
|
$sModuleFileName = basename($sModulePath, 1);
|
||||||
|
$sModuleName = preg_replace('/[^.]+\.([^.]+)\.php/', '$1', $sModuleFileName);
|
||||||
|
|
||||||
|
return preg_replace(
|
||||||
|
"/('$sModuleName\/)[^']+(')/",
|
||||||
|
'${1}'.$sVersionLabel.'${2}',
|
||||||
|
$sFileContent
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DatamodelsXmlFiles extends AbstractGlobFileVersionUpdater
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(APPROOT.'datamodels/2.x/*/datamodel.*.xml');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function UpdateFileContent($sVersionLabel, $sFileContent, $sFileFullPath)
|
||||||
|
{
|
||||||
|
return preg_replace(
|
||||||
|
'/(<itop_design .* version=")[^"]+(">)/',
|
||||||
|
'${1}'.$sVersionLabel.'${2}',
|
||||||
|
$sFileContent
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
139
CONTRIBUTING.md
Normal file
139
CONTRIBUTING.md
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
# Contributing to iTop
|
||||||
|
|
||||||
|
You want to contribute to iTop? Many thanks to you! 🎉 👍
|
||||||
|
|
||||||
|
Here are some guidelines that will help us integrate your work!
|
||||||
|
|
||||||
|
|
||||||
|
## Contributions
|
||||||
|
|
||||||
|
### Subjects
|
||||||
|
You are welcome to create pull requests on any of those subjects:
|
||||||
|
|
||||||
|
* 🐛 bug fix
|
||||||
|
* 🌐 translation / i18n / l10n
|
||||||
|
|
||||||
|
If you want to implement a **new feature**, please [create a corresponding ticket](https://sourceforge.net/p/itop/tickets/new/) for review.
|
||||||
|
If you ever want to begin implementation, do so in a fork, and add a link to the corresponding commits in the ticket.
|
||||||
|
|
||||||
|
For all **security related subjects**, please see our [security policy](SECURITY.md).
|
||||||
|
|
||||||
|
All **datamodel modification** should be done in an extension. Beware that such change would
|
||||||
|
impact all existing customers, and could prevent them from
|
||||||
|
upgrading!
|
||||||
|
Combodo has a long experience of datamodel changes: they are very disruptive!
|
||||||
|
This is why we avoid them in iTop core, especially the changes on existing objects/fields.
|
||||||
|
If you have an idea you're sure would benefit to all of iTop users, you may
|
||||||
|
[create a corresponding ticket](https://sourceforge.net/p/itop/tickets/new/) to submit it, but be warned that there are lots of good
|
||||||
|
reasons to refuse such changes.
|
||||||
|
|
||||||
|
### 📄 License
|
||||||
|
iTop is distributed under the AGPL-3.0 license (see the [license.txt] file),
|
||||||
|
your code must comply with this license.
|
||||||
|
|
||||||
|
If you want to use another license, you may [create an extension][wiki new ext].
|
||||||
|
|
||||||
|
[license.txt]: https://github.com/Combodo/iTop/blob/develop/license.txt
|
||||||
|
[wiki new ext]: https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Astart#by_writing_your_own_extension
|
||||||
|
|
||||||
|
|
||||||
|
## 🔀 iTop branch model
|
||||||
|
|
||||||
|
When we first start with Git, we were using the [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) branch model. As
|
||||||
|
there was some confusions about branches to use for current developed release and previous maintained release, and also because we were
|
||||||
|
using just a very few of the GitFlow commands, we decided to add just a little modification to this branch model : since april 2020
|
||||||
|
we don't have anymore a `master` branch.
|
||||||
|
|
||||||
|
Here are the branches we use and their meaning :
|
||||||
|
|
||||||
|
- `develop`: ongoing development version
|
||||||
|
- `release/*`: if present, that means we are working on a alpha/beta/rc version for shipping
|
||||||
|
- `support/*`: maintenance branches for older versions
|
||||||
|
|
||||||
|
For example, if no version is currently prepared for shipping we could have:
|
||||||
|
|
||||||
|
- `develop` containing future 2.8.0 version
|
||||||
|
- `support/2.7`: 2.7.x maintenance version
|
||||||
|
- `support/2.6`: 2.6.x maintenance version
|
||||||
|
- `support/2.5`: 2.5.x maintenance version
|
||||||
|
|
||||||
|
In this example, when 2.8.0-beta is shipped that will become:
|
||||||
|
|
||||||
|
- `develop`: future 2.9.0 version
|
||||||
|
- `release/2.8.0`: 2.8.0-beta
|
||||||
|
- `support/2.7`: 2.7.x maintenance version
|
||||||
|
- `support/2.6`: 2.6.x maintenance version
|
||||||
|
- `support/2.5`: 2.5.x maintenance version
|
||||||
|
|
||||||
|
And when 2.8.0 final will be out:
|
||||||
|
|
||||||
|
- `develop`: future 2.9.0 version
|
||||||
|
- `support/2.8`: 2.8.x maintenance version (will host developments for 2.8.1)
|
||||||
|
- `support/2.7`: 2.7.x maintenance version
|
||||||
|
- `support/2.6`: 2.6.x maintenance version
|
||||||
|
- `support/2.5`: 2.5.x maintenance version
|
||||||
|
|
||||||
|
Also note that we have a "micro-version" concept : each of those versions have a very small amount of modifications. They are made from
|
||||||
|
`support/*` branches as well. For example 2.6.2-1 and 2.6.2-2 were made from the `support/2.6.2` branch.
|
||||||
|
|
||||||
|
|
||||||
|
## Coding
|
||||||
|
|
||||||
|
### 🌐 Translations
|
||||||
|
|
||||||
|
A [dedicated page](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Atranslation) is available in the official wiki.
|
||||||
|
|
||||||
|
### Where to start ?
|
||||||
|
|
||||||
|
1. Create a fork from our repository (see [Working with forks - GitHub Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/working-with-forks))
|
||||||
|
2. Create a branch in this fork, based on the develop branch
|
||||||
|
3. Code !
|
||||||
|
|
||||||
|
Do create a dedicated branch for each modification you want to propose : if you don't it will be very hard to merge back your work !
|
||||||
|
|
||||||
|
Most of the time you should based your developments on the develop branch.
|
||||||
|
That may be different if you want to fix a bug, please use develop anyway and ask in your PR if rebase is possible.
|
||||||
|
|
||||||
|
|
||||||
|
### 🎨 PHP styleguide
|
||||||
|
|
||||||
|
Please follow [our guidelines](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Acoding_standards).
|
||||||
|
|
||||||
|
### ✅ Tests
|
||||||
|
|
||||||
|
Please create tests that covers as much as possible the code you're submitting.
|
||||||
|
|
||||||
|
Our tests are located in the `test/` directory, containing a PHPUnit config file : `phpunit.xml.dist`.
|
||||||
|
|
||||||
|
### Git Commit Messages
|
||||||
|
|
||||||
|
* Describe the functional change instead of the technical modifications
|
||||||
|
* Use the present tense ("Add feature" not "Added feature")
|
||||||
|
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
|
||||||
|
* Limit the first line to 72 characters or less
|
||||||
|
* Please start the commit message with an applicable emoji code (following the [Gitmoji guide](https://gitmoji.carloscuesta.me/)).
|
||||||
|
Beware to use the code (for example `:bug:`) and not the character (🐛) as Unicode support in git clients is very poor for now...
|
||||||
|
Emoji examples :
|
||||||
|
* 🌐 `:globe_with_meridians:` for translations
|
||||||
|
* 🎨 `:art:` when improving the format/structure of the code
|
||||||
|
* ⚡️ `:zap:` when improving performance
|
||||||
|
* 🐛 `:bug:` when fixing a bug
|
||||||
|
* 🔥 `:fire:` when removing code or files
|
||||||
|
* 💚 `:green_heart:` when fixing the CI build
|
||||||
|
* ✅ `:white_check_mark:` when adding tests
|
||||||
|
* 🔒 `:lock:` when dealing with security
|
||||||
|
* ⬆️ `:arrow_up:` when upgrading dependencies
|
||||||
|
* ⬇️ `:arrow_down:` when downgrading dependencies
|
||||||
|
* ♻️ `:recycle:` code refactoring
|
||||||
|
* 💄 `:lipstick:` Updating the UI and style files.
|
||||||
|
|
||||||
|
|
||||||
|
## 👥 Pull request
|
||||||
|
|
||||||
|
When your code is working, please:
|
||||||
|
|
||||||
|
* stash as much as possible your commits,
|
||||||
|
* rebase your branch on our repo last commit,
|
||||||
|
* create a pull request.
|
||||||
|
|
||||||
|
Detailed procedure to work on fork and create PR is available [in GitHub help pages](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).
|
||||||
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@@ -1,5 +1,11 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
parameters {
|
||||||
|
booleanParam(name: 'debugMode', defaultValue: 'false', description: 'Debug mode?')
|
||||||
|
string(name: 'testFile', defaultValue: '', description: 'Provide test file to execute. Example: test/core/LogAPITest.php')
|
||||||
|
booleanParam(name: 'coverture', defaultValue: 'false', description: 'Test coverture?')
|
||||||
|
booleanParam(name: 'runNonRegOQLTests', defaultValue: 'false', description: 'Do You want to run legacy OQL regression tests?')
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
|
|
||||||
stage('init') {
|
stage('init') {
|
||||||
@@ -36,7 +42,7 @@ pipeline {
|
|||||||
parallel {
|
parallel {
|
||||||
stage('phpunit') {
|
stage('phpunit') {
|
||||||
steps {
|
steps {
|
||||||
sh './.jenkins/bin/tests/phpunit.sh'
|
sh './.jenkins/bin/tests/phpunit.sh ${debugMode} ${runNonRegOQLTests} "${coverture}" "${testFile}"'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,18 +52,20 @@ pipeline {
|
|||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
|
archiveArtifacts allowEmptyArchive:true, excludes: '.gitkeep', artifacts: 'var/test/*.xml'
|
||||||
junit 'var/test/phpunit-log.junit.xml'
|
junit 'var/test/phpunit-log.junit.xml'
|
||||||
}
|
}
|
||||||
failure {
|
failure {
|
||||||
slackSend(channel: "#jenkins-itop", color: '#FF0000', message: "Ho no! Build failed! (${currentBuild.result}), Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
|
slackSend(channel: "#jenkins-itop", color: '#FF0000', message: "Ho no! Build failed! (${currentBuild.result}), Job '${env.JOB_NAME_UNESCAPED} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
|
||||||
}
|
}
|
||||||
fixed {
|
fixed {
|
||||||
slackSend(channel: "#jenkins-itop", color: '#FFa500', message: "Yes! Build repaired! (${currentBuild.result}), Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
|
slackSend(channel: "#jenkins-itop", color: '#FFa500', message: "Yes! Build repaired! (${currentBuild.result}), Job '${env.JOB_NAME_UNESCAPED} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
DEBUG_UNIT_TEST = '0'
|
DEBUG_UNIT_TEST = '0'
|
||||||
|
JOB_NAME_UNESCAPED = env.JOB_NAME.replaceAll("%2F", "/")
|
||||||
}
|
}
|
||||||
options {
|
options {
|
||||||
timeout(time: 20, unit: 'MINUTES')
|
timeout(time: 20, unit: 'MINUTES')
|
||||||
|
|||||||
121
README.md
Normal file
121
README.md
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
<p align="center"><a href="https://www.combodo.com/itop-193" target="_blank">
|
||||||
|
<img src="https://www.combodo.com/logos/logo-itop.svg">
|
||||||
|
</a></p>
|
||||||
|
|
||||||
|
|
||||||
|
# iTop - ITSM & CMDB
|
||||||
|
|
||||||
|
iTop stands for *IT Operations Portal*.
|
||||||
|
It is a complete open source, ITIL, web based service management tool including a fully customizable CMDB, a helpdesk system and a document management tool.
|
||||||
|
iTop also offers mass import tools and web services to integrate with your IT
|
||||||
|
|
||||||
|
## Features
|
||||||
|
- Fully configurable [Configuration Management (CMDB)][10]
|
||||||
|
- [HelpDesk][11] and Incident Management
|
||||||
|
- [Service and Contract Management][12]
|
||||||
|
- [Change][13] Management
|
||||||
|
- Configurable [SLA][14] Management
|
||||||
|
- Graphical [impact analysis][15]
|
||||||
|
- [CSV import][16] tool for any data
|
||||||
|
- Consistency [audit][17] to check data quality
|
||||||
|
- [Data synchronization][18] (for data federation)
|
||||||
|
|
||||||
|
|
||||||
|
## Latest release
|
||||||
|
|
||||||
|
- [Changes since the previous version][62]
|
||||||
|
- [New features][63]
|
||||||
|
- [Installation notes][64]
|
||||||
|
- [Download][65]
|
||||||
|
|
||||||
|
[62]: https://www.itophub.io/wiki/page?id=latest:release:change_log
|
||||||
|
[63]: https://www.itophub.io/wiki/page?id=latest:release:start
|
||||||
|
[64]: https://www.itophub.io/wiki/page?id=latest:install:start
|
||||||
|
[65]: https://sourceforge.net/projects/itop/files/latest/download
|
||||||
|
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
- [iTop Forums][1]: community support
|
||||||
|
- [iTop Tickets][2]: for feature requests and bug reports
|
||||||
|
- [Releases download][3]
|
||||||
|
- [Software requirements][4]
|
||||||
|
- [Documentation][5] covering both iTop and its official extensions
|
||||||
|
- [iTop Hub][6] : discover and install extensions !
|
||||||
|
|
||||||
|
|
||||||
|
[1]: https://sourceforge.net/p/itop/discussion/
|
||||||
|
[2]: https://sourceforge.net/p/itop/tickets/
|
||||||
|
[3]: https://sourceforge.net/projects/itop/files/itop/
|
||||||
|
[4]: https://www.itophub.io/wiki/page?id=latest:install:upgrading_itop
|
||||||
|
[5]: https://www.itophub.io/wiki
|
||||||
|
[6]: https://store.itophub.io/en_US/
|
||||||
|
|
||||||
|
[10]: https://www.itophub.io/wiki/page?id=latest%3Adatamodel%3Astart#configuration_management_cmdb
|
||||||
|
[11]: https://www.itophub.io/wiki/page?id=latest%3Adatamodel%3Astart#ticketing
|
||||||
|
[12]: https://www.itophub.io/wiki/page?id=latest%3Adatamodel%3Astart#service_management
|
||||||
|
[13]: https://www.itophub.io/wiki/page?id=latest%3Adatamodel%3Astart#change_management
|
||||||
|
[14]: https://www.itophub.io/wiki/page?id=latest%3Aimplementation%3Astart#service_level_agreements_and_targets
|
||||||
|
[15]: https://www.itophub.io/wiki/page?id=latest%3Auser%3Aactions#relations
|
||||||
|
[16]: https://www.itophub.io/wiki/page?id=latest%3Auser%3Abulk_modify#uploading_data
|
||||||
|
[17]: https://www.itophub.io/wiki/page?id=latest%3Aadmin%3Aaudit
|
||||||
|
[18]: https://www.itophub.io/wiki/page?id=latest%3Aadvancedtopics%3Adata_synchro_overview
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## About Us
|
||||||
|
|
||||||
|
iTop development is sponsored, led and supported by [Combodo][0].
|
||||||
|
|
||||||
|
[0]: https://www.combodo.com
|
||||||
|
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
|
||||||
|
We would like to give a special thank you to the people from the community who contributed to this project, including:
|
||||||
|
|
||||||
|
### Names
|
||||||
|
- Alves, David
|
||||||
|
- Beck, Pedro
|
||||||
|
- Bilger, Jean-François
|
||||||
|
- Bostoen, Jeffrey
|
||||||
|
- Cardoso, Anderson
|
||||||
|
- Cassaro, Bruno
|
||||||
|
- Casteleyn, Thomas
|
||||||
|
- Castro, Randall Badilla
|
||||||
|
- Colantoni, Maria Laura
|
||||||
|
- Couronné, Guy
|
||||||
|
- Dvořák, Lukáš
|
||||||
|
- Goethals, Stefan
|
||||||
|
- Gumble, David
|
||||||
|
- Hippler, Lars
|
||||||
|
- Khamit, Shamil
|
||||||
|
- Kincel, Martin
|
||||||
|
- Konečný, Kamil
|
||||||
|
- Kunin, Vladimir
|
||||||
|
- Lassiter, Dennis
|
||||||
|
- Lazcano, Federico
|
||||||
|
- Lucas, Jonathan
|
||||||
|
- Malik, Remie
|
||||||
|
- Rosenke, Stephan
|
||||||
|
- Seki, Shoji
|
||||||
|
- Shilov, Vladimir
|
||||||
|
- Tulio, Marco
|
||||||
|
- Turrubiates, Miguel
|
||||||
|
|
||||||
|
### Aliases
|
||||||
|
- chifu1234
|
||||||
|
- cprobst
|
||||||
|
- Karkoff1212
|
||||||
|
- larhip
|
||||||
|
- Laura
|
||||||
|
- Purple Grape
|
||||||
|
- Schlobinux
|
||||||
|
- theBigOne
|
||||||
|
- ulmerspatz
|
||||||
|
|
||||||
|
### Companies
|
||||||
|
- Hardis
|
||||||
|
- ITOMIG
|
||||||
|
- Pimkie
|
||||||
|
|
||||||
36
SECURITY.md
Normal file
36
SECURITY.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# 🔒 Reporting vulnerabilities
|
||||||
|
|
||||||
|
We take all security bugs seriously. Thank you for improving the security of iTop! We appreciate your efforts and
|
||||||
|
responsible disclosure and will make every effort to acknowledge your contributions.
|
||||||
|
|
||||||
|
|
||||||
|
## ✉️ How to report
|
||||||
|
|
||||||
|
### iTop vulnerabilities
|
||||||
|
Please send a procedure to reproduce iTop vulnerabilities to [itop-security@combodo.com](mailto:itop-security@combodo.com).
|
||||||
|
|
||||||
|
You can send us a standard "given / then / when" report, including iTop version, impacts, and maybe installed modules or data if they are
|
||||||
|
needed to reproduce.
|
||||||
|
|
||||||
|
### Dependencies vulnerabilities
|
||||||
|
Report security bugs in third-party modules to the person or team maintaining the module, and notify us of this report by sending an email
|
||||||
|
to [itop-security@combodo.com](mailto:itop-security@combodo.com).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 📆 Disclosure Policy
|
||||||
|
|
||||||
|
Report sent to us will be acknowledged within the week.
|
||||||
|
|
||||||
|
Then, a Combodo developer will be assigned to the reported issue and will:
|
||||||
|
|
||||||
|
* confirm the problem and determine the affected iTop versions
|
||||||
|
* audit the code to search any potential similar problems
|
||||||
|
* try to find a workaround if any
|
||||||
|
* create fixes for all releases still under maintenance
|
||||||
|
* send you the commit(s) for review
|
||||||
|
* send you the next version(s) that will contain the fix, and the estimated release dates
|
||||||
|
|
||||||
|
Security issues always take precedence over bug fixes and feature work.
|
||||||
|
|
||||||
|
The assignee will keep you informed of the resolution progress, and may ask you for additional information or guidance.
|
||||||
@@ -121,20 +121,15 @@ class UserRightsMatrix extends UserRightsAddOnAPI
|
|||||||
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
|
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
|
||||||
{
|
{
|
||||||
// Maybe we should check that no other user with userid == 0 exists
|
// Maybe we should check that no other user with userid == 0 exists
|
||||||
|
CMDBObject::SetTrackInfo('Initialization');
|
||||||
$oUser = new UserLocal();
|
$oUser = new UserLocal();
|
||||||
$oUser->Set('login', $sAdminUser);
|
$oUser->Set('login', $sAdminUser);
|
||||||
$oUser->Set('password', $sAdminPwd);
|
$oUser->Set('password', $sAdminPwd);
|
||||||
$oUser->Set('contactid', 1); // one is for root !
|
$oUser->Set('contactid', 1); // one is for root !
|
||||||
$oUser->Set('language', $sLanguage); // Language was chosen during the installation
|
$oUser->Set('language', $sLanguage); // Language was chosen during the installation
|
||||||
|
|
||||||
// Create a change to record the history of the User object
|
|
||||||
$oChange = MetaModel::NewObject("CMDBChange");
|
|
||||||
$oChange->Set("date", time());
|
|
||||||
$oChange->Set("userinfo", "Initialization");
|
|
||||||
$iChangeId = $oChange->DBInsert();
|
|
||||||
|
|
||||||
// Now record the admin user object
|
// Now record the admin user object
|
||||||
$iUserId = $oUser->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
$iUserId = $oUser->DBInsertNoReload();
|
||||||
$this->SetupUser($iUserId, true);
|
$this->SetupUser($iUserId, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2013 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UserRightsProfile
|
* Copyright (C) 2013-2020 Combodo SARL
|
||||||
* User management Module, basing the right on profiles and a matrix (similar to UserRightsMatrix, but profiles and other decorations have been added)
|
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2012 Combodo SARL
|
* This file is part of iTop.
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('ADMIN_PROFILE_NAME', 'Administrator');
|
define('ADMIN_PROFILE_NAME', 'Administrator');
|
||||||
@@ -179,7 +172,7 @@ class URP_Profiles extends UserRightsBaseClassGUI
|
|||||||
parent::DisplayBareRelations($oPage, $bEditMode);
|
parent::DisplayBareRelations($oPage, $bEditMode);
|
||||||
if (!$bEditMode)
|
if (!$bEditMode)
|
||||||
{
|
{
|
||||||
$oPage->SetCurrentTab(Dict::S('UI:UserManagement:GrantMatrix'));
|
$oPage->SetCurrentTab('UI:UserManagement:GrantMatrix');
|
||||||
$this->DoShowGrantSumary($oPage);
|
$this->DoShowGrantSumary($oPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -437,8 +430,6 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
{
|
{
|
||||||
CMDBObject::SetTrackInfo('Initialization');
|
CMDBObject::SetTrackInfo('Initialization');
|
||||||
|
|
||||||
$oChange = CMDBObject::GetCurrentChange();
|
|
||||||
|
|
||||||
$iContactId = 0;
|
$iContactId = 0;
|
||||||
// Support drastic data model changes: no organization class (or not writable)!
|
// Support drastic data model changes: no organization class (or not writable)!
|
||||||
if (MetaModel::IsValidClass('Organization') && !MetaModel::IsAbstract('Organization'))
|
if (MetaModel::IsValidClass('Organization') && !MetaModel::IsAbstract('Organization'))
|
||||||
@@ -446,7 +437,7 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
$oOrg = new Organization();
|
$oOrg = new Organization();
|
||||||
$oOrg->Set('name', 'My Company/Department');
|
$oOrg->Set('name', 'My Company/Department');
|
||||||
$oOrg->Set('code', 'SOMECODE');
|
$oOrg->Set('code', 'SOMECODE');
|
||||||
$iOrgId = $oOrg->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
$iOrgId = $oOrg->DBInsertNoReload();
|
||||||
|
|
||||||
// Support drastic data model changes: no Person class (or not writable)!
|
// Support drastic data model changes: no Person class (or not writable)!
|
||||||
if (MetaModel::IsValidClass('Person') && !MetaModel::IsAbstract('Person'))
|
if (MetaModel::IsValidClass('Person') && !MetaModel::IsAbstract('Person'))
|
||||||
@@ -463,7 +454,7 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
$oContact->Set('phone', '+00 000 000 000');
|
$oContact->Set('phone', '+00 000 000 000');
|
||||||
}
|
}
|
||||||
$oContact->Set('email', 'my.email@foo.org');
|
$oContact->Set('email', 'my.email@foo.org');
|
||||||
$iContactId = $oContact->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
$iContactId = $oContact->DBInsertNoReload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -482,14 +473,12 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
if (is_object($oAdminProfile))
|
if (is_object($oAdminProfile))
|
||||||
{
|
{
|
||||||
$oUserProfile = new URP_UserProfile();
|
$oUserProfile = new URP_UserProfile();
|
||||||
//$oUserProfile->Set('userid', $iUserId);
|
|
||||||
$oUserProfile->Set('profileid', $oAdminProfile->GetKey());
|
$oUserProfile->Set('profileid', $oAdminProfile->GetKey());
|
||||||
$oUserProfile->Set('reason', 'By definition, the administrator must have the administrator profile');
|
$oUserProfile->Set('reason', 'By definition, the administrator must have the administrator profile');
|
||||||
//$oUserProfile->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
|
||||||
$oSet = DBObjectSet::FromObject($oUserProfile);
|
$oSet = DBObjectSet::FromObject($oUserProfile);
|
||||||
$oUser->Set('profile_list', $oSet);
|
$oUser->Set('profile_list', $oSet);
|
||||||
}
|
}
|
||||||
$iUserId = $oUser->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
$iUserId = $oUser->DBInsertNoReload();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2013 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UserRightsProfile
|
* Copyright (C) 2013-2020 Combodo SARL
|
||||||
* User management Module, basing the right on profiles and a matrix (similar to UserRightsMatrix, but profiles and other decorations have been added)
|
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2012 Combodo SARL
|
* This file is part of iTop.
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('ADMIN_PROFILE_NAME', 'Administrator');
|
define('ADMIN_PROFILE_NAME', 'Administrator');
|
||||||
@@ -321,7 +314,7 @@ class URP_Profiles extends UserRightsBaseClassGUI
|
|||||||
parent::DisplayBareRelations($oPage, $bEditMode);
|
parent::DisplayBareRelations($oPage, $bEditMode);
|
||||||
if (!$bEditMode)
|
if (!$bEditMode)
|
||||||
{
|
{
|
||||||
$oPage->SetCurrentTab(Dict::S('UI:UserManagement:GrantMatrix'));
|
$oPage->SetCurrentTab('UI:UserManagement:GrantMatrix');
|
||||||
$this->DoShowGrantSumary($oPage);
|
$this->DoShowGrantSumary($oPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -533,10 +526,10 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
|
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
|
||||||
{
|
{
|
||||||
// Create a change to record the history of the User object
|
// Create a change to record the history of the User object
|
||||||
|
/** @var \CMDBChange $oChange */
|
||||||
$oChange = MetaModel::NewObject("CMDBChange");
|
$oChange = MetaModel::NewObject("CMDBChange");
|
||||||
$oChange->Set("date", time());
|
$oChange->Set("date", time());
|
||||||
$oChange->Set("userinfo", "Initialization");
|
$oChange->Set("userinfo", "Initialization");
|
||||||
$iChangeId = $oChange->DBInsert();
|
|
||||||
|
|
||||||
$iContactId = 0;
|
$iContactId = 0;
|
||||||
// Support drastic data model changes: no organization class (or not writable)!
|
// Support drastic data model changes: no organization class (or not writable)!
|
||||||
@@ -545,7 +538,8 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
$oOrg = new Organization();
|
$oOrg = new Organization();
|
||||||
$oOrg->Set('name', 'My Company/Department');
|
$oOrg->Set('name', 'My Company/Department');
|
||||||
$oOrg->Set('code', 'SOMECODE');
|
$oOrg->Set('code', 'SOMECODE');
|
||||||
$iOrgId = $oOrg->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
$oOrg::SetCurrentChange($oChange);
|
||||||
|
$iOrgId = $oOrg->DBInsertNoReload();
|
||||||
|
|
||||||
// Support drastic data model changes: no Person class (or not writable)!
|
// Support drastic data model changes: no Person class (or not writable)!
|
||||||
if (MetaModel::IsValidClass('Person') && !MetaModel::IsAbstract('Person'))
|
if (MetaModel::IsValidClass('Person') && !MetaModel::IsAbstract('Person'))
|
||||||
@@ -562,7 +556,8 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
$oContact->Set('phone', '+00 000 000 000');
|
$oContact->Set('phone', '+00 000 000 000');
|
||||||
}
|
}
|
||||||
$oContact->Set('email', 'my.email@foo.org');
|
$oContact->Set('email', 'my.email@foo.org');
|
||||||
$iContactId = $oContact->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
$oContact::SetCurrentChange($oChange);
|
||||||
|
$iContactId = $oContact->DBInsertNoReload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -581,14 +576,13 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
if (is_object($oAdminProfile))
|
if (is_object($oAdminProfile))
|
||||||
{
|
{
|
||||||
$oUserProfile = new URP_UserProfile();
|
$oUserProfile = new URP_UserProfile();
|
||||||
//$oUserProfile->Set('userid', $iUserId);
|
|
||||||
$oUserProfile->Set('profileid', $oAdminProfile->GetKey());
|
$oUserProfile->Set('profileid', $oAdminProfile->GetKey());
|
||||||
$oUserProfile->Set('reason', 'By definition, the administrator must have the administrator profile');
|
$oUserProfile->Set('reason', 'By definition, the administrator must have the administrator profile');
|
||||||
//$oUserProfile->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
|
||||||
$oSet = DBObjectSet::FromObject($oUserProfile);
|
$oSet = DBObjectSet::FromObject($oUserProfile);
|
||||||
$oUser->Set('profile_list', $oSet);
|
$oUser->Set('profile_list', $oSet);
|
||||||
}
|
}
|
||||||
$iUserId = $oUser->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
$oUser::SetCurrentChange($oChange);
|
||||||
|
$iUserId = $oUser->DBInsertNoReload();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2012 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UserRightsProjection
|
* Copyright (C) 2013-2020 Combodo SARL
|
||||||
* User management Module, basing the right on profiles and a matrix (similar to UserRightsProfile, but enhanced with dimensions and projection of classes and profile over the dimensions)
|
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2012 Combodo SARL
|
* This file is part of iTop.
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('ADMIN_PROFILE_ID', 1);
|
define('ADMIN_PROFILE_ID', 1);
|
||||||
@@ -153,7 +146,7 @@ class URP_Profiles extends UserRightsBaseClass
|
|||||||
parent::DisplayBareRelations($oPage, $bEditMode);
|
parent::DisplayBareRelations($oPage, $bEditMode);
|
||||||
if (!$bEditMode)
|
if (!$bEditMode)
|
||||||
{
|
{
|
||||||
$oPage->SetCurrentTab(Dict::S('UI:UserManagement:GrantMatrix'));
|
$oPage->SetCurrentTab('UI:UserManagement:GrantMatrix');
|
||||||
$this->DoShowGrantSumary($oPage);
|
$this->DoShowGrantSumary($oPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -593,25 +586,12 @@ class UserRightsProjection extends UserRightsAddOnAPI
|
|||||||
$oChange = MetaModel::NewObject("CMDBChange");
|
$oChange = MetaModel::NewObject("CMDBChange");
|
||||||
$oChange->Set("date", time());
|
$oChange->Set("date", time());
|
||||||
$oChange->Set("userinfo", "Initialization");
|
$oChange->Set("userinfo", "Initialization");
|
||||||
$iChangeId = $oChange->DBInsert();
|
|
||||||
|
|
||||||
$oOrg = new Organization();
|
$oOrg = new Organization();
|
||||||
$oOrg->Set('name', 'My Company/Department');
|
$oOrg->Set('name', 'My Company/Department');
|
||||||
$oOrg->Set('code', 'SOMECODE');
|
$oOrg->Set('code', 'SOMECODE');
|
||||||
// $oOrg->Set('status', 'implementation');
|
$oOrg::SetCurrentChange($oChange);
|
||||||
//$oOrg->Set('parent_id', xxx);
|
$iOrgId = $oOrg->DBInsertNoReload();
|
||||||
$iOrgId = $oOrg->DBInsertTrackedNoReload($oChange, true /* skip strong security */);
|
|
||||||
|
|
||||||
// Location : optional
|
|
||||||
//$oLocation = new bizLocation();
|
|
||||||
//$oLocation->Set('name', 'MyOffice');
|
|
||||||
//$oLocation->Set('status', 'implementation');
|
|
||||||
//$oLocation->Set('org_id', $iOrgId);
|
|
||||||
//$oLocation->Set('severity', 'high');
|
|
||||||
//$oLocation->Set('address', 'my building in my city');
|
|
||||||
//$oLocation->Set('country', 'my country');
|
|
||||||
//$oLocation->Set('parent_location_id', xxx);
|
|
||||||
//$iLocationId = $oLocation->DBInsertNoReload();
|
|
||||||
|
|
||||||
$oContact = new Person();
|
$oContact = new Person();
|
||||||
$oContact->Set('name', 'My last name');
|
$oContact->Set('name', 'My last name');
|
||||||
@@ -619,24 +599,24 @@ class UserRightsProjection extends UserRightsAddOnAPI
|
|||||||
//$oContact->Set('status', 'available');
|
//$oContact->Set('status', 'available');
|
||||||
$oContact->Set('org_id', $iOrgId);
|
$oContact->Set('org_id', $iOrgId);
|
||||||
$oContact->Set('email', 'my.email@foo.org');
|
$oContact->Set('email', 'my.email@foo.org');
|
||||||
//$oContact->Set('phone', '');
|
$oContact::SetCurrentChange($oChange);
|
||||||
//$oContact->Set('location_id', $iLocationId);
|
$iContactId = $oContact->DBInsertNoReload();
|
||||||
//$oContact->Set('employee_number', '');
|
|
||||||
$iContactId = $oContact->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
|
||||||
|
|
||||||
$oUser = new UserLocal();
|
$oUser = new UserLocal();
|
||||||
$oUser->Set('login', $sAdminUser);
|
$oUser->Set('login', $sAdminUser);
|
||||||
$oUser->Set('password', $sAdminPwd);
|
$oUser->Set('password', $sAdminPwd);
|
||||||
$oUser->Set('contactid', $iContactId);
|
$oUser->Set('contactid', $iContactId);
|
||||||
$oUser->Set('language', $sLanguage); // Language was chosen during the installation
|
$oUser->Set('language', $sLanguage); // Language was chosen during the installation
|
||||||
$iUserId = $oUser->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
$oUser::SetCurrentChange($oChange);
|
||||||
|
$iUserId = $oUser->DBInsertNoReload();
|
||||||
|
|
||||||
// Add this user to the very specific 'admin' profile
|
// Add this user to the very specific 'admin' profile
|
||||||
$oUserProfile = new URP_UserProfile();
|
$oUserProfile = new URP_UserProfile();
|
||||||
$oUserProfile->Set('userid', $iUserId);
|
$oUserProfile->Set('userid', $iUserId);
|
||||||
$oUserProfile->Set('profileid', ADMIN_PROFILE_ID);
|
$oUserProfile->Set('profileid', ADMIN_PROFILE_ID);
|
||||||
$oUserProfile->Set('reason', 'By definition, the administrator must have the administrator profile');
|
$oUserProfile->Set('reason', 'By definition, the administrator must have the administrator profile');
|
||||||
$oUserProfile->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
$oUserProfile::SetCurrentChange($oChange);
|
||||||
|
$oUserProfile->DBInsertNoReload();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2018 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple web page with no includes, header or fancy formatting, useful to
|
* Copyright (C) 2013-2020 Combodo SARL
|
||||||
* generate HTML fragments when called by an AJAX method
|
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2017 Combodo SARL
|
* This file is part of iTop.
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(APPROOT."/application/webpage.class.inc.php");
|
require_once(APPROOT."/application/webpage.class.inc.php");
|
||||||
@@ -30,7 +23,7 @@ class ajax_page extends WebPage implements iTabbedPage
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Jquery style ready script
|
* Jquery style ready script
|
||||||
* @var Hash
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $m_sReadyScript;
|
protected $m_sReadyScript;
|
||||||
protected $m_oTabs;
|
protected $m_oTabs;
|
||||||
@@ -57,56 +50,67 @@ class ajax_page extends WebPage implements iTabbedPage
|
|||||||
utils::InitArchiveMode();
|
utils::InitArchiveMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
public function AddTabContainer($sTabContainer, $sPrefix = '')
|
public function AddTabContainer($sTabContainer, $sPrefix = '')
|
||||||
{
|
{
|
||||||
$this->add($this->m_oTabs->AddTabContainer($sTabContainer, $sPrefix));
|
$this->add($this->m_oTabs->AddTabContainer($sTabContainer, $sPrefix));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function AddToTab($sTabContainer, $sTabLabel, $sHtml)
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public function AddToTab($sTabContainer, $sTabCode, $sHtml)
|
||||||
{
|
{
|
||||||
$this->add($this->m_oTabs->AddToTab($sTabContainer, $sTabLabel, $sHtml));
|
$this->add($this->m_oTabs->AddToTab($sTabContainer, $sTabCode, $sHtml));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
public function SetCurrentTabContainer($sTabContainer = '')
|
public function SetCurrentTabContainer($sTabContainer = '')
|
||||||
{
|
{
|
||||||
return $this->m_oTabs->SetCurrentTabContainer($sTabContainer);
|
return $this->m_oTabs->SetCurrentTabContainer($sTabContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function SetCurrentTab($sTabLabel = '')
|
|
||||||
{
|
|
||||||
return $this->m_oTabs->SetCurrentTab($sTabLabel);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a tab which content will be loaded asynchronously via the supplied URL
|
* @inheritDoc
|
||||||
*
|
|
||||||
* Limitations:
|
|
||||||
* Cross site scripting is not not allowed for security reasons. Use a normal tab with an IFRAME if you want to pull content from another server.
|
|
||||||
* Static content cannot be added inside such tabs.
|
|
||||||
*
|
|
||||||
* @param string $sTabLabel The (localised) label of the tab
|
|
||||||
* @param string $sUrl The URL to load (on the same server)
|
|
||||||
* @param boolean $bCache Whether or not to cache the content of the tab once it has been loaded. flase will cause the tab to be reloaded upon each activation.
|
|
||||||
* @since 2.0.3
|
|
||||||
*/
|
*/
|
||||||
public function AddAjaxTab($sTabLabel, $sUrl, $bCache = true)
|
public function SetCurrentTab($sTabCode = '', $sTabTitle = null)
|
||||||
{
|
{
|
||||||
$this->add($this->m_oTabs->AddAjaxTab($sTabLabel, $sUrl, $bCache));
|
return $this->m_oTabs->SetCurrentTab($sTabCode, $sTabTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public function AddAjaxTab($sTabCode, $sUrl, $bCache = true, $sTabTitle = null)
|
||||||
|
{
|
||||||
|
$this->add($this->m_oTabs->AddAjaxTab($sTabCode, $sUrl, $bCache, $sTabTitle));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
public function GetCurrentTab()
|
public function GetCurrentTab()
|
||||||
{
|
{
|
||||||
return $this->m_oTabs->GetCurrentTab();
|
return $this->m_oTabs->GetCurrentTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function RemoveTab($sTabLabel, $sTabContainer = null)
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function RemoveTab($sTabCode, $sTabContainer = null)
|
||||||
{
|
{
|
||||||
$this->m_oTabs->RemoveTab($sTabLabel, $sTabContainer);
|
$this->m_oTabs->RemoveTab($sTabCode, $sTabContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds the tab whose title matches a given pattern
|
* @inheritDoc
|
||||||
* @return mixed The name of the tab as a string or false if not found
|
|
||||||
*/
|
*/
|
||||||
public function FindTab($sPattern, $sTabContainer = null)
|
public function FindTab($sPattern, $sTabContainer = null)
|
||||||
{
|
{
|
||||||
@@ -119,21 +123,23 @@ class ajax_page extends WebPage implements iTabbedPage
|
|||||||
* that we are using this is not supported... TO DO upgrade
|
* that we are using this is not supported... TO DO upgrade
|
||||||
* the whole jquery bundle...
|
* the whole jquery bundle...
|
||||||
*/
|
*/
|
||||||
public function SelectTab($sTabContainer, $sTabLabel)
|
public function SelectTab($sTabContainer, $sTabCode)
|
||||||
{
|
{
|
||||||
$this->add_ready_script($this->m_oTabs->SelectTab($sTabContainer, $sTabLabel));
|
$this->add_ready_script($this->m_oTabs->SelectTab($sTabContainer, $sTabCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $sHtml
|
||||||
|
*/
|
||||||
public function AddToMenu($sHtml)
|
public function AddToMenu($sHtml)
|
||||||
{
|
{
|
||||||
$this->m_sMenu .= $sHtml;
|
$this->m_sMenu .= $sHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Echoes the content of the whole page
|
* @inheritDoc
|
||||||
* @return void
|
*/
|
||||||
*/
|
public function output()
|
||||||
public function output()
|
|
||||||
{
|
{
|
||||||
if (!empty($this->sContentType))
|
if (!empty($this->sContentType))
|
||||||
{
|
{
|
||||||
@@ -214,8 +220,11 @@ PrepareWidgets();
|
|||||||
EOF
|
EOF
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$s_captured_output = $this->ob_get_clean_safe();
|
$this->outputCollapsibleSectionInit();
|
||||||
if (($this->sContentType == 'text/html') && ($this->sContentDisposition == 'inline'))
|
|
||||||
|
$oKPI = new ExecutionKPI();
|
||||||
|
$s_captured_output = $this->ob_get_clean_safe();
|
||||||
|
if (($this->sContentType == 'text/html') && ($this->sContentDisposition == 'inline'))
|
||||||
{
|
{
|
||||||
// inline content != attachment && html => filter all scripts for malicious XSS scripts
|
// inline content != attachment && html => filter all scripts for malicious XSS scripts
|
||||||
echo self::FilterXSS($this->s_content);
|
echo self::FilterXSS($this->s_content);
|
||||||
@@ -285,10 +294,16 @@ EOF
|
|||||||
echo self::FilterXSS($s_captured_output);
|
echo self::FilterXSS($s_captured_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$oKPI->ComputeAndReport('Echoing');
|
||||||
|
|
||||||
if (class_exists('DBSearch'))
|
if (class_exists('DBSearch'))
|
||||||
{
|
{
|
||||||
DBSearch::RecordQueryTrace();
|
DBSearch::RecordQueryTrace();
|
||||||
}
|
}
|
||||||
|
if (class_exists('ExecutionKPI'))
|
||||||
|
{
|
||||||
|
ExecutionKPI::ReportStats();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -301,7 +316,11 @@ EOF
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function add($sHtml)
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public function add($sHtml)
|
||||||
{
|
{
|
||||||
if (($this->m_oTabs->GetCurrentTabContainer() != '') && ($this->m_oTabs->GetCurrentTab() != ''))
|
if (($this->m_oTabs->GetCurrentTabContainer() != '') && ($this->m_oTabs->GetCurrentTab() != ''))
|
||||||
{
|
{
|
||||||
@@ -314,10 +333,9 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Records the current state of the 'html' part of the page output
|
* @inheritDoc
|
||||||
* @return mixed The current state of the 'html' output
|
*/
|
||||||
*/
|
public function start_capture()
|
||||||
public function start_capture()
|
|
||||||
{
|
{
|
||||||
$sCurrentTabContainer = $this->m_oTabs->GetCurrentTabContainer();
|
$sCurrentTabContainer = $this->m_oTabs->GetCurrentTabContainer();
|
||||||
$sCurrentTab = $this->m_oTabs->GetCurrentTab();
|
$sCurrentTab = $this->m_oTabs->GetCurrentTab();
|
||||||
@@ -333,13 +351,10 @@ EOF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the part of the html output that occurred since the call to start_capture
|
* @inheritDoc
|
||||||
* and removes this part from the current html output
|
*/
|
||||||
* @param $offset mixed The value returned by start_capture
|
public function end_capture($offset)
|
||||||
* @return string The part of the html output that was added since the call to start_capture
|
|
||||||
*/
|
|
||||||
public function end_capture($offset)
|
|
||||||
{
|
{
|
||||||
if (is_array($offset))
|
if (is_array($offset))
|
||||||
{
|
{
|
||||||
@@ -360,11 +375,9 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add any text or HTML fragment (identified by an ID) at the end of the body of the page
|
* @inheritDoc
|
||||||
* This is useful to add hidden content, DIVs or FORMs that should not
|
|
||||||
* be embedded into each other.
|
|
||||||
*/
|
*/
|
||||||
public function add_at_the_end($s_html, $sId = '')
|
public function add_at_the_end($s_html, $sId = '')
|
||||||
{
|
{
|
||||||
if ($sId != '')
|
if ($sId != '')
|
||||||
{
|
{
|
||||||
@@ -372,27 +385,27 @@ EOF
|
|||||||
}
|
}
|
||||||
$this->s_deferred_content .= $s_html;
|
$this->s_deferred_content .= $s_html;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a script to be executed when the DOM is ready (typical JQuery use)
|
* @inheritDoc
|
||||||
* NOT implemented in this version of the class.
|
*/
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function add_ready_script($sScript)
|
public function add_ready_script($sScript)
|
||||||
{
|
{
|
||||||
$this->m_sReadyScript .= $sScript."\n";
|
$this->m_sReadyScript .= $sScript."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cannot be called in this context, since Ajax pages do not share
|
* @inheritDoc
|
||||||
* any context with the calling page !!
|
|
||||||
*/
|
*/
|
||||||
public function GetUniqueId()
|
public function GetUniqueId()
|
||||||
{
|
{
|
||||||
assert(false);
|
assert(false);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
public static function FilterXSS($sHTML)
|
public static function FilterXSS($sHTML)
|
||||||
{
|
{
|
||||||
return str_ireplace(array('<script', '</script>'), array('<!-- <removed-script', '</removed-script> -->'), $sHTML);
|
return str_ireplace(array('<script', '</script>'), array('<!-- <removed-script', '</removed-script> -->'), $sHTML);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2012 Combodo SARL
|
// Copyright (C) 2010-2018 Combodo SARL
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Class ApplicationContext
|
* Class ApplicationContext
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2012 Combodo SARL
|
* @copyright Copyright (C) 2010-2018 Combodo SARL
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -31,6 +31,12 @@ require_once(APPROOT."/application/utils.inc.php");
|
|||||||
*/
|
*/
|
||||||
interface iDBObjectURLMaker
|
interface iDBObjectURLMaker
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param string $sClass
|
||||||
|
* @param string $iId
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public static function MakeObjectURL($sClass, $iId);
|
public static function MakeObjectURL($sClass, $iId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,6 +45,13 @@ interface iDBObjectURLMaker
|
|||||||
*/
|
*/
|
||||||
class iTopStandardURLMaker implements iDBObjectURLMaker
|
class iTopStandardURLMaker implements iDBObjectURLMaker
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param string $sClass
|
||||||
|
* @param string $iId
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
public static function MakeObjectURL($sClass, $iId)
|
public static function MakeObjectURL($sClass, $iId)
|
||||||
{
|
{
|
||||||
$sPage = DBObject::ComputeStandardUIPage($sClass);
|
$sPage = DBObject::ComputeStandardUIPage($sClass);
|
||||||
@@ -53,6 +66,13 @@ class iTopStandardURLMaker implements iDBObjectURLMaker
|
|||||||
*/
|
*/
|
||||||
class PortalURLMaker implements iDBObjectURLMaker
|
class PortalURLMaker implements iDBObjectURLMaker
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param string $sClass
|
||||||
|
* @param string $iId
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
public static function MakeObjectURL($sClass, $iId)
|
public static function MakeObjectURL($sClass, $iId)
|
||||||
{
|
{
|
||||||
$sAbsoluteUrl = utils::GetAbsoluteUrlAppRoot();
|
$sAbsoluteUrl = utils::GetAbsoluteUrlAppRoot();
|
||||||
@@ -74,10 +94,20 @@ class PortalURLMaker implements iDBObjectURLMaker
|
|||||||
*/
|
*/
|
||||||
class ApplicationContext
|
class ApplicationContext
|
||||||
{
|
{
|
||||||
|
public static $m_sUrlMakerClass = null;
|
||||||
|
protected static $m_aPluginProperties = null;
|
||||||
|
protected static $aDefaultValues; // Cache shared among all instances
|
||||||
|
|
||||||
protected $aNames;
|
protected $aNames;
|
||||||
protected $aValues;
|
protected $aValues;
|
||||||
protected static $aDefaultValues; // Cache shared among all instances
|
|
||||||
|
/**
|
||||||
|
* ApplicationContext constructor.
|
||||||
|
*
|
||||||
|
* @param bool $bReadContext
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
public function __construct($bReadContext = true)
|
public function __construct($bReadContext = true)
|
||||||
{
|
{
|
||||||
$this->aNames = array(
|
$this->aNames = array(
|
||||||
@@ -89,11 +119,13 @@ class ApplicationContext
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the context directly in the PHP parameters (either POST or GET)
|
* Read the context directly in the PHP parameters (either POST or GET)
|
||||||
* return nothing
|
* return nothing
|
||||||
*/
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
protected function ReadContext()
|
protected function ReadContext()
|
||||||
{
|
{
|
||||||
if (!isset(self::$aDefaultValues))
|
if (!isset(self::$aDefaultValues))
|
||||||
@@ -110,20 +142,26 @@ class ApplicationContext
|
|||||||
}
|
}
|
||||||
// Hmm, there must be a better (more generic) way to handle the case below:
|
// Hmm, there must be a better (more generic) way to handle the case below:
|
||||||
// When there is only one possible (allowed) organization, the context must be
|
// When there is only one possible (allowed) organization, the context must be
|
||||||
// fixed to this org
|
// fixed to this org unless there is only one organization in the system then
|
||||||
|
// no filter is applied
|
||||||
if ($sName == 'org_id')
|
if ($sName == 'org_id')
|
||||||
{
|
{
|
||||||
if (MetaModel::IsValidClass('Organization'))
|
if (MetaModel::IsValidClass('Organization'))
|
||||||
{
|
{
|
||||||
$oSearchFilter = new DBObjectSearch('Organization');
|
$oSearchFilter = new DBObjectSearch('Organization');
|
||||||
$oSearchFilter->SetModifierProperty('UserRightsGetSelectFilter', 'bSearchMode', true);
|
|
||||||
$oSet = new CMDBObjectSet($oSearchFilter);
|
$oSet = new CMDBObjectSet($oSearchFilter);
|
||||||
$iCount = $oSet->CountWithLimit(2);
|
$iCount = $oSet->CountWithLimit(2);
|
||||||
if ($iCount == 1)
|
if ($iCount > 1)
|
||||||
{
|
{
|
||||||
// Only one possible value for org_id, set it in the context
|
$oSearchFilter->SetModifierProperty('UserRightsGetSelectFilter', 'bSearchMode', true);
|
||||||
$oOrg = $oSet->Fetch();
|
$oSet = new CMDBObjectSet($oSearchFilter);
|
||||||
self::$aDefaultValues[$sName] = $oOrg->GetKey();
|
$iCount = $oSet->CountWithLimit(2);
|
||||||
|
if ($iCount == 1)
|
||||||
|
{
|
||||||
|
// Only one possible value for org_id, set it in the context
|
||||||
|
$oOrg = $oSet->Fetch();
|
||||||
|
self::$aDefaultValues[$sName] = $oOrg->GetKey();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -131,12 +169,15 @@ class ApplicationContext
|
|||||||
}
|
}
|
||||||
$this->aValues = self::$aDefaultValues;
|
$this->aValues = self::$aDefaultValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current value for the given parameter
|
* Returns the current value for the given parameter
|
||||||
* @param string $sParamName Name of the parameter to read
|
*
|
||||||
* @return mixed The value for this parameter
|
* @param string $sParamName Name of the parameter to read
|
||||||
*/
|
* @param string $defaultValue
|
||||||
|
*
|
||||||
|
* @return mixed The value for this parameter
|
||||||
|
*/
|
||||||
public function GetCurrentValue($sParamName, $defaultValue = '')
|
public function GetCurrentValue($sParamName, $defaultValue = '')
|
||||||
{
|
{
|
||||||
if (isset($this->aValues[$sParamName]))
|
if (isset($this->aValues[$sParamName]))
|
||||||
@@ -148,7 +189,7 @@ class ApplicationContext
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the context as string with the format name1=value1&name2=value2....
|
* Returns the context as string with the format name1=value1&name2=value2....
|
||||||
* return string The context as a string to be appended to an href property
|
* @return string The context as a string to be appended to an href property
|
||||||
*/
|
*/
|
||||||
public function GetForLink()
|
public function GetForLink()
|
||||||
{
|
{
|
||||||
@@ -162,7 +203,7 @@ class ApplicationContext
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the context as sequence of input tags to be inserted inside a <form> tag
|
* Returns the context as sequence of input tags to be inserted inside a <form> tag
|
||||||
* return string The context as a sequence of <input type="hidden" /> tags
|
* @return string The context as a sequence of <input type="hidden" /> tags
|
||||||
*/
|
*/
|
||||||
public function GetForForm()
|
public function GetForForm()
|
||||||
{
|
{
|
||||||
@@ -176,7 +217,7 @@ class ApplicationContext
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the context as a hash array 'parameter_name' => value
|
* Returns the context as a hash array 'parameter_name' => value
|
||||||
* return array The context information
|
* @return array The context information
|
||||||
*/
|
*/
|
||||||
public function GetAsHash()
|
public function GetAsHash()
|
||||||
{
|
{
|
||||||
@@ -199,8 +240,7 @@ class ApplicationContext
|
|||||||
/**
|
/**
|
||||||
* Removes the specified parameter from the context, for example when the same parameter
|
* Removes the specified parameter from the context, for example when the same parameter
|
||||||
* is already a search parameter
|
* is already a search parameter
|
||||||
* @param string $sParamName Name of the parameter to remove
|
* @param string $sParamName Name of the parameter to remove
|
||||||
* @return none
|
|
||||||
*/
|
*/
|
||||||
public function Reset($sParamName)
|
public function Reset($sParamName)
|
||||||
{
|
{
|
||||||
@@ -212,6 +252,11 @@ class ApplicationContext
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the given object with the default values provided by the context
|
* Initializes the given object with the default values provided by the context
|
||||||
|
*
|
||||||
|
* @param \DBObject $oObj
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
* @throws \CoreUnexpectedValue
|
||||||
*/
|
*/
|
||||||
public function InitObjectFromContext(DBObject &$oObj)
|
public function InitObjectFromContext(DBObject &$oObj)
|
||||||
{
|
{
|
||||||
@@ -238,13 +283,11 @@ class ApplicationContext
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static $m_sUrlMakerClass = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the current application url provider
|
* Set the current application url provider
|
||||||
* @param sClass string Class implementing iDBObjectURLMaker
|
* @param string $sClass Class implementing iDBObjectURLMaker
|
||||||
* @return void
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function SetUrlMakerClass($sClass = 'iTopStandardURLMaker')
|
public static function SetUrlMakerClass($sClass = 'iTopStandardURLMaker')
|
||||||
{
|
{
|
||||||
@@ -278,7 +321,14 @@ class ApplicationContext
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current application url provider
|
* Get the current application url provider
|
||||||
|
*
|
||||||
|
* @param string $sObjClass
|
||||||
|
* @param string $sObjKey
|
||||||
|
* @param null $sUrlMakerClass
|
||||||
|
* @param bool $bWithNavigationContext
|
||||||
|
*
|
||||||
* @return string the name of the class
|
* @return string the name of the class
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function MakeObjectUrl($sObjClass, $sObjKey, $sUrlMakerClass = null, $bWithNavigationContext = true)
|
public static function MakeObjectUrl($sObjClass, $sObjKey, $sUrlMakerClass = null, $bWithNavigationContext = true)
|
||||||
{
|
{
|
||||||
@@ -306,8 +356,6 @@ class ApplicationContext
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static $m_aPluginProperties = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load plugin properties for the current session
|
* Load plugin properties for the current session
|
||||||
* @return void
|
* @return void
|
||||||
@@ -326,9 +374,9 @@ class ApplicationContext
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set plugin properties
|
* Set plugin properties
|
||||||
* @param sPluginClass string Class implementing any plugin interface
|
* @param string $sPluginClass Class implementing any plugin interface
|
||||||
* @param sProperty string Name of the property
|
* @param string $sProperty Name of the property
|
||||||
* @param value scalar Value (numeric or string)
|
* @param mixed $value Value (numeric or string)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function SetPluginProperty($sPluginClass, $sProperty, $value)
|
public static function SetPluginProperty($sPluginClass, $sProperty, $value)
|
||||||
@@ -341,7 +389,7 @@ class ApplicationContext
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get plugin properties
|
* Get plugin properties
|
||||||
* @param sPluginClass string Class implementing any plugin interface
|
* @param string $sPluginClass Class implementing any plugin interface
|
||||||
* @return array of sProperty=>value pairs
|
* @return array of sProperty=>value pairs
|
||||||
*/
|
*/
|
||||||
public static function GetPluginProperties($sPluginClass)
|
public static function GetPluginProperties($sPluginClass)
|
||||||
@@ -359,4 +407,3 @@ class ApplicationContext
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -29,9 +29,13 @@ require_once(APPROOT."/application/webpage.class.inc.php");
|
|||||||
|
|
||||||
class CLIPage implements Page
|
class CLIPage implements Page
|
||||||
{
|
{
|
||||||
function __construct($s_title)
|
/** @var string */
|
||||||
|
public $s_title;
|
||||||
|
|
||||||
|
function __construct($s_title)
|
||||||
{
|
{
|
||||||
}
|
$this->s_title = $s_title;
|
||||||
|
}
|
||||||
|
|
||||||
public function output()
|
public function output()
|
||||||
{
|
{
|
||||||
@@ -48,22 +52,22 @@ class CLIPage implements Page
|
|||||||
public function add($sText)
|
public function add($sText)
|
||||||
{
|
{
|
||||||
echo $sText;
|
echo $sText;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function p($sText)
|
public function p($sText)
|
||||||
{
|
{
|
||||||
echo $sText."\n";
|
echo $sText."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function pre($sText)
|
public function pre($sText)
|
||||||
{
|
{
|
||||||
echo $sText."\n";
|
echo $sText."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function add_comment($sText)
|
public function add_comment($sText)
|
||||||
{
|
{
|
||||||
echo "#".$sText."\n";
|
echo "#".$sText."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function table($aConfig, $aData, $aParams = array())
|
public function table($aConfig, $aData, $aParams = array())
|
||||||
{
|
{
|
||||||
@@ -93,5 +97,3 @@ class CLIPage implements Page
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -32,7 +32,7 @@ class CSVPage extends WebPage
|
|||||||
function __construct($s_title)
|
function __construct($s_title)
|
||||||
{
|
{
|
||||||
parent::__construct($s_title);
|
parent::__construct($s_title);
|
||||||
$this->add_header("Content-type: text/plain; charset=utf-8");
|
$this->add_header("Content-type: text/plain; charset=".self::PAGES_CHARSET);
|
||||||
$this->add_header("Cache-control: no-cache");
|
$this->add_header("Cache-control: no-cache");
|
||||||
//$this->add_header("Content-Transfer-Encoding: binary");
|
//$this->add_header("Content-Transfer-Encoding: binary");
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -26,14 +26,17 @@
|
|||||||
|
|
||||||
abstract class DashboardLayout
|
abstract class DashboardLayout
|
||||||
{
|
{
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract public function Render($oPage, $aDashlets, $bEditMode = false);
|
abstract public function Render($oPage, $aDashlets, $bEditMode = false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $iCellIdx
|
||||||
|
*
|
||||||
|
* @return array Containing 2 scalars: Col number and row number (starting from 0)
|
||||||
|
* @since 2.7.0
|
||||||
|
*/
|
||||||
|
abstract public function GetDashletCoordinates($iCellIdx);
|
||||||
|
|
||||||
static public function GetInfo()
|
public static function GetInfo()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'label' => '',
|
'label' => '',
|
||||||
@@ -51,7 +54,7 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
|
|||||||
{
|
{
|
||||||
$this->iNbCols = 1;
|
$this->iNbCols = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function TrimCell($aDashlets)
|
protected function TrimCell($aDashlets)
|
||||||
{
|
{
|
||||||
$aKeys = array_reverse(array_keys($aDashlets));
|
$aKeys = array_reverse(array_keys($aDashlets));
|
||||||
@@ -59,8 +62,9 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
|
|||||||
$bNoVisibleFound = true;
|
$bNoVisibleFound = true;
|
||||||
while($idx < count($aKeys) && $bNoVisibleFound)
|
while($idx < count($aKeys) && $bNoVisibleFound)
|
||||||
{
|
{
|
||||||
|
/** @var \Dashlet $oDashlet */
|
||||||
$oDashlet = $aDashlets[$aKeys[$idx]];
|
$oDashlet = $aDashlets[$aKeys[$idx]];
|
||||||
if ($oDashlet->IsVisible())
|
if ($oDashlet::IsVisible())
|
||||||
{
|
{
|
||||||
$bNoVisibleFound = false;
|
$bNoVisibleFound = false;
|
||||||
}
|
}
|
||||||
@@ -98,33 +102,41 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
|
|||||||
return $aCells;
|
return $aCells;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param $aCells
|
||||||
|
* @param bool $bEditMode
|
||||||
|
* @param array $aExtraParams
|
||||||
|
*/
|
||||||
public function Render($oPage, $aCells, $bEditMode = false, $aExtraParams = array())
|
public function Render($oPage, $aCells, $bEditMode = false, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
// Trim the list of cells to remove the invisible/empty ones at the end of the array
|
// Trim the list of cells to remove the invisible/empty ones at the end of the array
|
||||||
$aCells = $this->TrimCellsArray($aCells);
|
$aCells = $this->TrimCellsArray($aCells);
|
||||||
|
|
||||||
$oPage->add('<table style="width:100%;table-layout:fixed;"><tbody>');
|
$oPage->add('<table style="width:100%;table-layout:fixed;"><tbody>');
|
||||||
$iCellIdx = 0;
|
$iCellIdx = 0;
|
||||||
$fColSize = 100 / $this->iNbCols;
|
$fColSize = 100 / $this->iNbCols;
|
||||||
$sStyle = $bEditMode ? 'border: 1px #ccc dashed; width:'.$fColSize.'%;' : 'width: '.$fColSize.'%;';
|
$sStyle = $bEditMode ? 'border: 1px #ccc dashed; width:'.$fColSize.'%;' : 'width: '.$fColSize.'%;';
|
||||||
$sClass = $bEditMode ? 'layout_cell edit_mode' : 'dashboard';
|
$sClass = $bEditMode ? 'layout_cell edit_mode' : 'dashboard';
|
||||||
$iNbRows = ceil(count($aCells) / $this->iNbCols);
|
$iNbRows = ceil(count($aCells) / $this->iNbCols);
|
||||||
|
|
||||||
for($iRows = 0; $iRows < $iNbRows; $iRows++)
|
for($iRows = 0; $iRows < $iNbRows; $iRows++)
|
||||||
{
|
{
|
||||||
$oPage->add('<tr>');
|
$oPage->add("<tr data-dashboard-row-index=\"$iRows\">");
|
||||||
for($iCols = 0; $iCols < $this->iNbCols; $iCols++)
|
for($iCols = 0; $iCols < $this->iNbCols; $iCols++)
|
||||||
{
|
{
|
||||||
$sCellClass = ($iRows == $iNbRows-1) ? $sClass.' layout_last_used_rank' : $sClass;
|
$sCellClass = ($iRows == $iNbRows-1) ? $sClass.' layout_last_used_rank' : $sClass;
|
||||||
$oPage->add("<td style=\"$sStyle\" class=\"$sCellClass\" data-dashboard-cell-index=\"$iCellIdx\">");
|
$oPage->add("<td style=\"$sStyle\" class=\"$sCellClass\" data-dashboard-column-index=\"$iCols\" data-dashboard-cell-index=\"$iCellIdx\">");
|
||||||
if (array_key_exists($iCellIdx, $aCells))
|
if (array_key_exists($iCellIdx, $aCells))
|
||||||
{
|
{
|
||||||
$aDashlets = $aCells[$iCellIdx];
|
$aDashlets = $aCells[$iCellIdx];
|
||||||
if (count($aDashlets) > 0)
|
if (count($aDashlets) > 0)
|
||||||
{
|
{
|
||||||
|
/** @var \Dashlet $oDashlet */
|
||||||
foreach($aDashlets as $oDashlet)
|
foreach($aDashlets as $oDashlet)
|
||||||
{
|
{
|
||||||
if ($oDashlet->IsVisible())
|
if ($oDashlet::IsVisible())
|
||||||
{
|
{
|
||||||
$oDashlet->DoRender($oPage, $bEditMode, true /* bEnclosingDiv */, $aExtraParams);
|
$oDashlet->DoRender($oPage, $bEditMode, true /* bEnclosingDiv */, $aExtraParams);
|
||||||
}
|
}
|
||||||
@@ -147,10 +159,10 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
|
|||||||
if ($bEditMode) // Add one row for extensibility
|
if ($bEditMode) // Add one row for extensibility
|
||||||
{
|
{
|
||||||
$sStyle = 'style="border: 1px #ccc dashed; width:'.$fColSize.'%;" class="layout_cell edit_mode layout_extension" data-dashboard-cell-index="'.$iCellIdx.'"';
|
$sStyle = 'style="border: 1px #ccc dashed; width:'.$fColSize.'%;" class="layout_cell edit_mode layout_extension" data-dashboard-cell-index="'.$iCellIdx.'"';
|
||||||
$oPage->add('<tr>');
|
$oPage->add("<tr data-dashboard-row-index=\"$iRows\">");
|
||||||
for($iCols = 0; $iCols < $this->iNbCols; $iCols++)
|
for($iCols = 0; $iCols < $this->iNbCols; $iCols++)
|
||||||
{
|
{
|
||||||
$oPage->add("<td $sStyle>");
|
$oPage->add("<td $sStyle data-dashboard-column-index=\"$iCols\">");
|
||||||
$oPage->add(' ');
|
$oPage->add(' ');
|
||||||
$oPage->add('</td>');
|
$oPage->add('</td>');
|
||||||
}
|
}
|
||||||
@@ -158,6 +170,17 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
|
|||||||
}
|
}
|
||||||
$oPage->add('</tbody></table>');
|
$oPage->add('</tbody></table>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function GetDashletCoordinates($iCellIdx)
|
||||||
|
{
|
||||||
|
$iColNumber = (int) $iCellIdx % $this->iNbCols;
|
||||||
|
$iRowNumber = (int) floor($iCellIdx / $this->iNbCols);
|
||||||
|
|
||||||
|
return array($iColNumber, $iRowNumber);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DashboardLayoutOneCol extends DashboardLayoutMultiCol
|
class DashboardLayoutOneCol extends DashboardLayoutMultiCol
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.5">
|
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.6">
|
||||||
<portals>
|
<portals>
|
||||||
<portal id="legacy_portal" _delta="define">
|
|
||||||
<url>portal/index.php</url>
|
|
||||||
<rank>1.0</rank>
|
|
||||||
<handler/>
|
|
||||||
<allow>
|
|
||||||
</allow>
|
|
||||||
<deny/>
|
|
||||||
</portal>
|
|
||||||
<portal id="backoffice" _delta="define">
|
<portal id="backoffice" _delta="define">
|
||||||
<url>pages/UI.php</url>
|
<url>pages/UI.php</url>
|
||||||
<rank>2.0</rank>
|
<rank>2.0</rank>
|
||||||
@@ -23,5 +15,10 @@
|
|||||||
<menu id="AdminTools" xsi:type="MenuGroup" _delta="define">
|
<menu id="AdminTools" xsi:type="MenuGroup" _delta="define">
|
||||||
<rank>80</rank>
|
<rank>80</rank>
|
||||||
</menu>
|
</menu>
|
||||||
|
<menu id="SystemTools" xsi:type="MenuGroup" _delta="define">
|
||||||
|
<rank>100</rank>
|
||||||
|
<enable_class>ResourceSystemMenu</enable_class>
|
||||||
|
<enable_action>UR_ACTION_MODIFY</enable_action>
|
||||||
|
</menu>
|
||||||
</menus>
|
</menus>
|
||||||
</itop_design>
|
</itop_design>
|
||||||
|
|||||||
@@ -1,30 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2017 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
/**
|
/**
|
||||||
* Data Table to display a set of objects in a tabular manner in HTML
|
* Copyright (C) 2013-2020 Combodo SARL
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2017 Combodo SARL
|
* This file is part of iTop.
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DataTable
|
class DataTable
|
||||||
{
|
{
|
||||||
protected $iListId; // Unique ID inside the web page
|
protected $iListId; // Unique ID inside the web page
|
||||||
|
/** @var string */
|
||||||
|
private $sDatatableContainerId;
|
||||||
protected $sTableId; // identifier for saving the settings (combined with the class aliases)
|
protected $sTableId; // identifier for saving the settings (combined with the class aliases)
|
||||||
protected $oSet; // The set of objects to display
|
protected $oSet; // The set of objects to display
|
||||||
protected $aClassAliases; // The aliases (alias => class) inside the set
|
protected $aClassAliases; // The aliases (alias => class) inside the set
|
||||||
@@ -34,14 +31,20 @@ class DataTable
|
|||||||
protected $bShowObsoleteData;
|
protected $bShowObsoleteData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $iListId mixed Unique ID for this div/table in the page
|
* @param string $iListId Unique ID for this div/table in the page
|
||||||
* @param $oSet DBObjectSet The set of data to display
|
* @param DBObjectSet $oSet The set of data to display
|
||||||
* @param $aClassAliases Hash The list of classes/aliases to be displayed in this set $sAlias => $sClassName
|
* @param array$aClassAliases The list of classes/aliases to be displayed in this set $sAlias => $sClassName
|
||||||
* @param $sTableId mixed A string (or null) identifying this table in order to persist its settings
|
* @param string $sTableId A string (or null) identifying this table in order to persist its settings
|
||||||
|
*
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \MissingQueryArgument
|
||||||
|
* @throws \MySQLException
|
||||||
|
* @throws \MySQLHasGoneAwayException
|
||||||
*/
|
*/
|
||||||
public function __construct($iListId, $oSet, $aClassAliases, $sTableId = null)
|
public function __construct($iListId, $oSet, $aClassAliases, $sTableId = null)
|
||||||
{
|
{
|
||||||
$this->iListId = utils::GetSafeId($iListId); // Make a "safe" ID for jQuery
|
$this->iListId = utils::GetSafeId($iListId); // Make a "safe" ID for jQuery
|
||||||
|
$this->sDatatableContainerId = 'datatable_'.utils::GetSafeId($iListId);
|
||||||
$this->oSet = $oSet;
|
$this->oSet = $oSet;
|
||||||
$this->aClassAliases = $aClassAliases;
|
$this->aClassAliases = $aClassAliases;
|
||||||
$this->sTableId = $sTableId;
|
$this->sTableId = $sTableId;
|
||||||
@@ -50,7 +53,19 @@ class DataTable
|
|||||||
$this->oDefaultSettings = null;
|
$this->oDefaultSettings = null;
|
||||||
$this->bShowObsoleteData = $oSet->GetShowObsoleteData();
|
$this->bShowObsoleteData = $oSet->GetShowObsoleteData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param \DataTableSettings $oSettings
|
||||||
|
* @param $bActionsMenu
|
||||||
|
* @param $sSelectMode
|
||||||
|
* @param $bViewLink
|
||||||
|
* @param $aExtraParams
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \MySQLException
|
||||||
|
*/
|
||||||
public function Display(WebPage $oPage, DataTableSettings $oSettings, $bActionsMenu, $sSelectMode, $bViewLink, $aExtraParams)
|
public function Display(WebPage $oPage, DataTableSettings $oSettings, $bActionsMenu, $sSelectMode, $bViewLink, $aExtraParams)
|
||||||
{
|
{
|
||||||
$this->oDefaultSettings = $oSettings;
|
$this->oDefaultSettings = $oSettings;
|
||||||
@@ -119,7 +134,23 @@ class DataTable
|
|||||||
|
|
||||||
return $this->GetAsHTML($oPage, $oCustomSettings->iDefaultPageSize, $oCustomSettings->iDefaultPageSize, 0, $oCustomSettings->aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams);
|
return $this->GetAsHTML($oPage, $oCustomSettings->iDefaultPageSize, $oCustomSettings->iDefaultPageSize, 0, $oCustomSettings->aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param $iPageSize
|
||||||
|
* @param $iDefaultPageSize
|
||||||
|
* @param $iPageIndex
|
||||||
|
* @param $aColumns
|
||||||
|
* @param $bActionsMenu
|
||||||
|
* @param $bToolkitMenu
|
||||||
|
* @param $sSelectMode
|
||||||
|
* @param $bViewLink
|
||||||
|
* @param $aExtraParams
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \ArchivedObjectException
|
||||||
|
* @throws \CoreException
|
||||||
|
*/
|
||||||
public function GetAsHTML(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex, $aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams)
|
public function GetAsHTML(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex, $aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams)
|
||||||
{
|
{
|
||||||
$sObjectsCount = $this->GetObjectCount($oPage, $sSelectMode);
|
$sObjectsCount = $this->GetObjectCount($oPage, $sSelectMode);
|
||||||
@@ -137,7 +168,7 @@ class DataTable
|
|||||||
$sDataTable = $this->GetHTMLTable($oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
|
$sDataTable = $this->GetHTMLTable($oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
|
||||||
$sConfigDlg = $this->GetTableConfigDlg($oPage, $aColumns, $bViewLink, $iDefaultPageSize);
|
$sConfigDlg = $this->GetTableConfigDlg($oPage, $aColumns, $bViewLink, $iDefaultPageSize);
|
||||||
|
|
||||||
$sHtml = "<table id=\"datatable_{$this->iListId}\" class=\"datatable\">";
|
$sHtml = "<table id=\"{$this->sDatatableContainerId}\" class=\"datatable\">";
|
||||||
$sHtml .= "<tr><td>";
|
$sHtml .= "<tr><td>";
|
||||||
$sHtml .= "<table style=\"width:100%;\">";
|
$sHtml .= "<table style=\"width:100%;\">";
|
||||||
$sHtml .= "<tr><td class=\"pagination_container\">$sObjectsCount</td><td class=\"menucontainer\">$sToolkitMenu $sActionsMenu</td></tr>";
|
$sHtml .= "<tr><td class=\"pagination_container\">$sObjectsCount</td><td class=\"menucontainer\">$sToolkitMenu $sActionsMenu</td></tr>";
|
||||||
@@ -173,7 +204,7 @@ class DataTable
|
|||||||
$aOptions['oDefaultSettings'] = $this->GetAsHash($this->oDefaultSettings);
|
$aOptions['oDefaultSettings'] = $this->GetAsHash($this->oDefaultSettings);
|
||||||
}
|
}
|
||||||
$sJSOptions = json_encode($aOptions);
|
$sJSOptions = json_encode($aOptions);
|
||||||
$oPage->add_ready_script("$('#datatable_{$this->iListId}').datatable($sJSOptions);");
|
$oPage->add_ready_script("$('#{$this->sDatatableContainerId}').datatable($sJSOptions);");
|
||||||
|
|
||||||
return $sHtml;
|
return $sHtml;
|
||||||
}
|
}
|
||||||
@@ -184,6 +215,10 @@ class DataTable
|
|||||||
*/
|
*/
|
||||||
public function GetAsHTMLTableRows(WebPage $oPage, $iPageSize, $aColumns, $sSelectMode, $bViewLink, $aExtraParams)
|
public function GetAsHTMLTableRows(WebPage $oPage, $iPageSize, $aColumns, $sSelectMode, $bViewLink, $aExtraParams)
|
||||||
{
|
{
|
||||||
|
if ($iPageSize < 1)
|
||||||
|
{
|
||||||
|
$iPageSize = -1; // convention: no pagination
|
||||||
|
}
|
||||||
$aAttribs = $this->GetHTMLTableConfig($aColumns, $sSelectMode, $bViewLink);
|
$aAttribs = $this->GetHTMLTableConfig($aColumns, $sSelectMode, $bViewLink);
|
||||||
$aValues = $this->GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
|
$aValues = $this->GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
|
||||||
|
|
||||||
@@ -194,7 +229,13 @@ class DataTable
|
|||||||
}
|
}
|
||||||
return $sHtml;
|
return $sHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param $sSelectMode
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
protected function GetObjectCount(WebPage $oPage, $sSelectMode)
|
protected function GetObjectCount(WebPage $oPage, $sSelectMode)
|
||||||
{
|
{
|
||||||
if (($sSelectMode == 'single') || ($sSelectMode == 'multiple'))
|
if (($sSelectMode == 'single') || ($sSelectMode == 'multiple'))
|
||||||
@@ -207,6 +248,15 @@ class DataTable
|
|||||||
}
|
}
|
||||||
return $sHtml;
|
return $sHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param $iPageSize
|
||||||
|
* @param $iDefaultPageSize
|
||||||
|
* @param $iPageIndex
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
protected function GetPager(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex)
|
protected function GetPager(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex)
|
||||||
{
|
{
|
||||||
$sHtml = '';
|
$sHtml = '';
|
||||||
@@ -222,14 +272,21 @@ class DataTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sCombo = '<select class="pagesize">';
|
$sCombo = '<select class="pagesize">';
|
||||||
for($iPage = 1; $iPage < 5; $iPage++)
|
if($iPageSize < 1)
|
||||||
{
|
{
|
||||||
$iNbItems = $iPage * $iDefaultPageSize;
|
$sCombo .= "<option selected=\"selected\" value=\"-1\">".Dict::S('UI:Pagination:All')."</option>";
|
||||||
$sSelected = ($iNbItems == $iPageSize) ? 'selected="selected"' : '';
|
|
||||||
$sCombo .= "<option $sSelected value=\"$iNbItems\">$iNbItems</option>";
|
|
||||||
}
|
}
|
||||||
$sSelected = ($iPageSize < 1) ? 'selected="selected"' : '';
|
else
|
||||||
$sCombo .= "<option $sSelected value=\"-1\">".Dict::S('UI:Pagination:All')."</option>";
|
{
|
||||||
|
for($iPage = 1; $iPage < 5; $iPage++)
|
||||||
|
{
|
||||||
|
$iNbItems = $iPage * $iDefaultPageSize;
|
||||||
|
$sSelected = ($iNbItems == $iPageSize) ? 'selected="selected"' : '';
|
||||||
|
$sCombo .= "<option $sSelected value=\"$iNbItems\">$iNbItems</option>";
|
||||||
|
}
|
||||||
|
$sCombo .= "<option value=\"-1\">".Dict::S('UI:Pagination:All')."</option>";
|
||||||
|
}
|
||||||
|
|
||||||
$sCombo .= '</select>';
|
$sCombo .= '</select>';
|
||||||
|
|
||||||
$sPages = Dict::S('UI:Pagination:PagesLabel');
|
$sPages = Dict::S('UI:Pagination:PagesLabel');
|
||||||
@@ -284,7 +341,17 @@ class DataTable
|
|||||||
EOF;
|
EOF;
|
||||||
return $sHtml;
|
return $sHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param $aExtraParams
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \DictExceptionMissingString
|
||||||
|
* @throws \MissingQueryArgument
|
||||||
|
* @throws \MySQLException
|
||||||
|
*/
|
||||||
protected function GetActionsMenu(WebPage $oPage, $aExtraParams)
|
protected function GetActionsMenu(WebPage $oPage, $aExtraParams)
|
||||||
{
|
{
|
||||||
$oMenuBlock = new MenuBlock($this->oSet->GetFilter(), 'list');
|
$oMenuBlock = new MenuBlock($this->oSet->GetFilter(), 'list');
|
||||||
@@ -292,13 +359,20 @@ EOF;
|
|||||||
$sHtml = $oMenuBlock->GetRenderContent($oPage, $aExtraParams, $this->iListId);
|
$sHtml = $oMenuBlock->GetRenderContent($oPage, $aExtraParams, $this->iListId);
|
||||||
return $sHtml;
|
return $sHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param $aExtraParams
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
protected function GetToolkitMenu(WebPage $oPage, $aExtraParams)
|
protected function GetToolkitMenu(WebPage $oPage, $aExtraParams)
|
||||||
{
|
{
|
||||||
if (!$oPage->IsPrintableVersion())
|
if (!$oPage->IsPrintableVersion())
|
||||||
{
|
{
|
||||||
$sMenuTitle = Dict::S('UI:ConfigureThisList');
|
$sMenuTitle = Dict::S('UI:ConfigureThisList');
|
||||||
$sHtml = '<div class="itop_popup toolkit_menu" id="tk_'.$this->iListId.'"><ul><li><img src="../images/toolkit_menu.png?t='.utils::GetCacheBusterTimestamp().'"><ul>';
|
$sHtml = '<div class="itop_popup toolkit_menu" id="tk_'.$this->iListId.'"><ul><li><i class="fas fa-tools"></i><i class="fas fa-caret-down"></i><ul>';
|
||||||
|
|
||||||
$oMenuItem1 = new JSPopupMenuItem('iTop::ConfigureList', $sMenuTitle, "$('#datatable_dlg_".$this->iListId."').dialog('open');");
|
$oMenuItem1 = new JSPopupMenuItem('iTop::ConfigureList', $sMenuTitle, "$('#datatable_dlg_".$this->iListId."').dialog('open');");
|
||||||
$aActions = array(
|
$aActions = array(
|
||||||
@@ -315,7 +389,15 @@ EOF;
|
|||||||
}
|
}
|
||||||
return $sHtml;
|
return $sHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param $aColumns
|
||||||
|
* @param $bViewLink
|
||||||
|
* @param $iDefaultPageSize
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
protected function GetTableConfigDlg(WebPage $oPage, $aColumns, $bViewLink, $iDefaultPageSize)
|
protected function GetTableConfigDlg(WebPage $oPage, $aColumns, $bViewLink, $iDefaultPageSize)
|
||||||
{
|
{
|
||||||
$sHtml = "<div id=\"datatable_dlg_{$this->iListId}\" style=\"display: none;\">";
|
$sHtml = "<div id=\"datatable_dlg_{$this->iListId}\" style=\"display: none;\">";
|
||||||
@@ -339,35 +421,54 @@ EOF;
|
|||||||
$sHtml .= "<input id=\"dtbl_dlg_all_{$this->iListId}\" type=\"radio\" name=\"scope\" $sGenericChecked value=\"defaults\"><label for=\"dtbl_dlg_all_{$this->iListId}\"> ".Dict::S('UI:ForAllLists').'</label></p>';
|
$sHtml .= "<input id=\"dtbl_dlg_all_{$this->iListId}\" type=\"radio\" name=\"scope\" $sGenericChecked value=\"defaults\"><label for=\"dtbl_dlg_all_{$this->iListId}\"> ".Dict::S('UI:ForAllLists').'</label></p>';
|
||||||
$sHtml .= "</fieldset>";
|
$sHtml .= "</fieldset>";
|
||||||
$sHtml .= '<table style="width:100%"><tr><td style="text-align:center;">';
|
$sHtml .= '<table style="width:100%"><tr><td style="text-align:center;">';
|
||||||
$sHtml .= '<button type="button" onclick="$(\'#datatable_'.$this->iListId.'\').datatable(\'onDlgCancel\'); $(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\')">'.Dict::S('UI:Button:Cancel').'</button>';
|
$sHtml .= '<button type="button" onclick="$(\'#'.$this->sDatatableContainerId.'\').datatable(\'onDlgCancel\'); $(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\')">'.Dict::S('UI:Button:Cancel').'</button>';
|
||||||
$sHtml .= '</td><td style="text-align:center;">';
|
$sHtml .= '</td><td style="text-align:center;">';
|
||||||
$sHtml .= '<button type="submit" onclick="$(\'#datatable_'.$this->iListId.'\').datatable(\'onDlgOk\');$(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\');">'.Dict::S('UI:Button:Ok').'</button>';
|
$sHtml .= '<button type="submit" onclick="$(\'#'.$this->sDatatableContainerId.'\').datatable(\'onDlgOk\');$(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\');">'.Dict::S('UI:Button:Ok').'</button>';
|
||||||
$sHtml .= '</td></tr></table>';
|
$sHtml .= '</td></tr></table>';
|
||||||
$sHtml .= "</form>";
|
$sHtml .= "</form>";
|
||||||
$sHtml .= "</div>";
|
$sHtml .= "</div>";
|
||||||
|
|
||||||
$sDlgTitle = addslashes(Dict::S('UI:ListConfigurationTitle'));
|
$sDlgTitle = addslashes(Dict::S('UI:ListConfigurationTitle'));
|
||||||
$oPage->add_ready_script("$('#datatable_dlg_{$this->iListId}').dialog({autoOpen: false, title: '$sDlgTitle', width: 500, close: function() { $('#datatable_{$this->iListId}').datatable('onDlgCancel'); } });");
|
$oPage->add_ready_script("$('#datatable_dlg_{$this->iListId}').dialog({autoOpen: false, title: '$sDlgTitle', width: 500, close: function() { $('#{$this->sDatatableContainerId}').datatable('onDlgCancel'); } });");
|
||||||
|
|
||||||
return $sHtml;
|
return $sHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $oSetting
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function GetAsHash($oSetting)
|
public function GetAsHash($oSetting)
|
||||||
{
|
{
|
||||||
$aSettings = array('iDefaultPageSize' => $oSetting->iDefaultPageSize, 'oColumns' => $oSetting->aColumns);
|
$aSettings = array('iDefaultPageSize' => $oSetting->iDefaultPageSize, 'oColumns' => $oSetting->aColumns);
|
||||||
return $aSettings;
|
return $aSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $aColumns
|
||||||
|
* @param string $sSelectMode
|
||||||
|
* @param bool $bViewLink
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \DictExceptionMissingString
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
protected function GetHTMLTableConfig($aColumns, $sSelectMode, $bViewLink)
|
protected function GetHTMLTableConfig($aColumns, $sSelectMode, $bViewLink)
|
||||||
{
|
{
|
||||||
$aAttribs = array();
|
$aAttribs = array();
|
||||||
if ($sSelectMode == 'multiple')
|
if ($sSelectMode == 'multiple')
|
||||||
{
|
{
|
||||||
$aAttribs['form::select'] = array('label' => "<input type=\"checkbox\" onClick=\"CheckAll('.selectList{$this->iListId}:not(:disabled)', this.checked);\" class=\"checkAll\"></input>", 'description' => Dict::S('UI:SelectAllToggle+'));
|
$aAttribs['form::select'] = array(
|
||||||
|
'label' => "<input type=\"checkbox\" onClick=\"CheckAll('.selectList{$this->iListId}:not(:disabled)', this.checked);\" class=\"checkAll\"></input>",
|
||||||
|
'description' => Dict::S('UI:SelectAllToggle+'),
|
||||||
|
'metadata' => array(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else if ($sSelectMode == 'single')
|
else if ($sSelectMode == 'single')
|
||||||
{
|
{
|
||||||
$aAttribs['form::select'] = array('label' => "", 'description' => '');
|
$aAttribs['form::select'] = array('label' => '', 'description' => '', 'metadata' => array());
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($this->aClassAliases as $sAlias => $sClassName)
|
foreach($this->aClassAliases as $sAlias => $sClassName)
|
||||||
@@ -378,19 +479,55 @@ EOF;
|
|||||||
{
|
{
|
||||||
if ($sAttCode == '_key_')
|
if ($sAttCode == '_key_')
|
||||||
{
|
{
|
||||||
$aAttribs['key_'.$sAlias] = array('label' => MetaModel::GetName($sClassName), 'description' => '');
|
$sAttLabel = MetaModel::GetName($sClassName);
|
||||||
|
|
||||||
|
$aAttribs['key_'.$sAlias] = array(
|
||||||
|
'label' => $sAttLabel,
|
||||||
|
'description' => '',
|
||||||
|
'metadata' => array(
|
||||||
|
'object_class' => $sClassName,
|
||||||
|
'attribute_label' => $sAttLabel,
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
|
$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
|
||||||
$aAttribs[$sAttCode.'_'.$sAlias] = array('label' => MetaModel::GetLabel($sClassName, $sAttCode), 'description' => $oAttDef->GetOrderByHint());
|
$sAttDefClass = get_class($oAttDef);
|
||||||
|
$sAttLabel = MetaModel::GetLabel($sClassName, $sAttCode);
|
||||||
|
|
||||||
|
$aAttribs[$sAttCode.'_'.$sAlias] = array(
|
||||||
|
'label' => $sAttLabel,
|
||||||
|
'description' => $oAttDef->GetOrderByHint(),
|
||||||
|
'metadata' => array(
|
||||||
|
'object_class' => $sClassName,
|
||||||
|
'attribute_code' => $sAttCode,
|
||||||
|
'attribute_type' => $sAttDefClass,
|
||||||
|
'attribute_label' => $sAttLabel,
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $aAttribs;
|
return $aAttribs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $aColumns
|
||||||
|
* @param $sSelectMode
|
||||||
|
* @param $iPageSize
|
||||||
|
* @param $bViewLink
|
||||||
|
* @param $aExtraParams
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \CoreUnexpectedValue
|
||||||
|
* @throws \MissingQueryArgument
|
||||||
|
* @throws \MySQLException
|
||||||
|
* @throws \MySQLHasGoneAwayException
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
protected function GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
|
protected function GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
|
||||||
{
|
{
|
||||||
$bLocalize = true;
|
$bLocalize = true;
|
||||||
@@ -400,6 +537,7 @@ EOF;
|
|||||||
}
|
}
|
||||||
|
|
||||||
$aValues = array();
|
$aValues = array();
|
||||||
|
$aAttDefsCache = array();
|
||||||
$this->oSet->Seek(0);
|
$this->oSet->Seek(0);
|
||||||
$iMaxObjects = $iPageSize;
|
$iMaxObjects = $iPageSize;
|
||||||
while (($aObjects = $this->oSet->FetchAssoc()) && ($iMaxObjects != 0))
|
while (($aObjects = $this->oSet->FetchAssoc()) && ($iMaxObjects != 0))
|
||||||
@@ -440,11 +578,41 @@ EOF;
|
|||||||
{
|
{
|
||||||
if ($sAttCode == '_key_')
|
if ($sAttCode == '_key_')
|
||||||
{
|
{
|
||||||
$aRow['key_'.$sAlias] = $aObjects[$sAlias]->GetHyperLink();
|
$aRow['key_'.$sAlias] = array(
|
||||||
|
'value_raw' => $aObjects[$sAlias]->GetKey(),
|
||||||
|
'value_html' => $aObjects[$sAlias]->GetHyperLink(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$aRow[$sAttCode.'_'.$sAlias] = $aObjects[$sAlias]->GetAsHTML($sAttCode, $bLocalize);
|
// Prepare att. def. classes cache to avoid retrieving AttDef for each row
|
||||||
|
if(!isset($aAttDefsCache[$sClassName][$sAttCode]))
|
||||||
|
{
|
||||||
|
$aAttDefClassesCache[$sClassName][$sAttCode] = get_class(MetaModel::GetAttributeDef($sClassName, $sAttCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only retrieve raw (stored) value for simple fields
|
||||||
|
$bExcludeRawValue = false;
|
||||||
|
foreach (cmdbAbstractObject::GetAttDefClassesToExcludeFromMarkupMetadataRawValue() as $sAttDefClassToExclude)
|
||||||
|
{
|
||||||
|
if (is_a($aAttDefClassesCache[$sClassName][$sAttCode], $sAttDefClassToExclude, true))
|
||||||
|
{
|
||||||
|
$bExcludeRawValue = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($bExcludeRawValue)
|
||||||
|
{
|
||||||
|
$aRow[$sAttCode.'_'.$sAlias] = $aObjects[$sAlias]->GetAsHTML($sAttCode, $bLocalize);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$aRow[$sAttCode.'_'.$sAlias] = array(
|
||||||
|
'value_raw' => $aObjects[$sAlias]->Get($sAttCode),
|
||||||
|
'value_html' => $aObjects[$sAlias]->GetAsHTML($sAttCode, $bLocalize),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -473,7 +641,25 @@ EOF;
|
|||||||
}
|
}
|
||||||
return $aValues;
|
return $aValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param $aColumns
|
||||||
|
* @param $sSelectMode
|
||||||
|
* @param $iPageSize
|
||||||
|
* @param $bViewLink
|
||||||
|
* @param $aExtraParams
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \ArchivedObjectException
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \CoreUnexpectedValue
|
||||||
|
* @throws \DictExceptionMissingString
|
||||||
|
* @throws \MissingQueryArgument
|
||||||
|
* @throws \MySQLException
|
||||||
|
* @throws \MySQLHasGoneAwayException
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
public function GetHTMLTable(WebPage $oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
|
public function GetHTMLTable(WebPage $oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
|
||||||
{
|
{
|
||||||
$iNbPages = ($iPageSize < 1) ? 1 : ceil($this->iNbObjects / $iPageSize);
|
$iNbPages = ($iPageSize < 1) ? 1 : ceil($this->iNbObjects / $iPageSize);
|
||||||
@@ -485,7 +671,7 @@ EOF;
|
|||||||
|
|
||||||
$aValues = $this->GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
|
$aValues = $this->GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
|
||||||
|
|
||||||
$sHtml = '<table class="listContainer">';
|
$sHtml = '<table class="listContainer object-list">';
|
||||||
|
|
||||||
foreach($this->oSet->GetFilter()->GetInternalParams() as $sName => $sValue)
|
foreach($this->oSet->GetFilter()->GetInternalParams() as $sName => $sValue)
|
||||||
{
|
{
|
||||||
@@ -562,23 +748,41 @@ EOF;
|
|||||||
}
|
}
|
||||||
$sOQL = addslashes($this->oSet->GetFilter()->serialize());
|
$sOQL = addslashes($this->oSet->GetFilter()->serialize());
|
||||||
$oPage->add_ready_script(
|
$oPage->add_ready_script(
|
||||||
<<<EOF
|
<<<JS
|
||||||
var oTable = $('#{$this->iListId} table.listResults');
|
var oTable = $('#{$this->sDatatableContainerId} table.listResults');
|
||||||
oTable.tableHover();
|
oTable.tableHover();
|
||||||
oTable.tablesorter( { $sHeaders widgets: ['myZebra', 'truncatedList']} ).tablesorterPager({container: $('#pager{$this->iListId}'), totalRows:$iCount, size: $iPageSize, filter: '$sOQL', extra_params: '$sExtraParams', select_mode: '$sSelectModeJS', displayKey: $sDisplayKey, table_id: '{$this->iListId}', columns: $sJSColumns, class_aliases: $sJSClassAliases $sCssCount});
|
oTable
|
||||||
EOF
|
.tablesorter({ $sHeaders widgets: ['myZebra', 'truncatedList']})
|
||||||
);
|
.tablesorterPager({
|
||||||
|
container: $('#pager{$this->iListId}'),
|
||||||
|
totalRows:$iCount,
|
||||||
|
size: $iPageSize,
|
||||||
|
filter: '$sOQL',
|
||||||
|
extra_params: '$sExtraParams',
|
||||||
|
select_mode: '$sSelectModeJS',
|
||||||
|
displayKey: $sDisplayKey,
|
||||||
|
table_id: '{$this->sDatatableContainerId}',
|
||||||
|
columns: $sJSColumns,
|
||||||
|
class_aliases: $sJSClassAliases $sCssCount
|
||||||
|
});
|
||||||
|
JS
|
||||||
|
);
|
||||||
if ($sFakeSortList != '')
|
if ($sFakeSortList != '')
|
||||||
{
|
{
|
||||||
$oPage->add_ready_script("oTable.trigger(\"fakesorton\", [$sFakeSortList]);");
|
$oPage->add_ready_script("oTable.trigger(\"fakesorton\", [$sFakeSortList]);");
|
||||||
}
|
}
|
||||||
return $sHtml;
|
return $sHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param $iDefaultPageSize
|
||||||
|
* @param $iStart
|
||||||
|
*/
|
||||||
public function UpdatePager(WebPage $oPage, $iDefaultPageSize, $iStart)
|
public function UpdatePager(WebPage $oPage, $iDefaultPageSize, $iStart)
|
||||||
{
|
{
|
||||||
$iPageSize = ($iDefaultPageSize < 1) ? 1 : $iDefaultPageSize;
|
$iPageSize = $iDefaultPageSize;
|
||||||
$iPageIndex = 1 + floor($iStart / $iPageSize);
|
$iPageIndex = 0;
|
||||||
$sHtml = $this->GetPager($oPage, $iPageSize, $iDefaultPageSize, $iPageIndex);
|
$sHtml = $this->GetPager($oPage, $iPageSize, $iDefaultPageSize, $iPageIndex);
|
||||||
$oPage->add_ready_script("$('#pager{$this->iListId}').html('".json_encode($sHtml)."');");
|
$oPage->add_ready_script("$('#pager{$this->iListId}').html('".json_encode($sHtml)."');");
|
||||||
if ($iDefaultPageSize < 1)
|
if ($iDefaultPageSize < 1)
|
||||||
@@ -598,11 +802,48 @@ EOF
|
|||||||
*/
|
*/
|
||||||
class PrintableDataTable extends DataTable
|
class PrintableDataTable extends DataTable
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param $iPageSize
|
||||||
|
* @param $iDefaultPageSize
|
||||||
|
* @param $iPageIndex
|
||||||
|
* @param $aColumns
|
||||||
|
* @param $bActionsMenu
|
||||||
|
* @param $bToolkitMenu
|
||||||
|
* @param $sSelectMode
|
||||||
|
* @param $bViewLink
|
||||||
|
* @param $aExtraParams
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \ArchivedObjectException
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \CoreUnexpectedValue
|
||||||
|
* @throws \DictExceptionMissingString
|
||||||
|
* @throws \MissingQueryArgument
|
||||||
|
* @throws \MySQLException
|
||||||
|
* @throws \MySQLHasGoneAwayException
|
||||||
|
*/
|
||||||
public function GetAsHTML(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex, $aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams)
|
public function GetAsHTML(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex, $aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams)
|
||||||
{
|
{
|
||||||
return $this->GetHTMLTable($oPage, $aColumns, $sSelectMode, -1, $bViewLink, $aExtraParams);
|
return $this->GetHTMLTable($oPage, $aColumns, $sSelectMode, -1, $bViewLink, $aExtraParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oPage
|
||||||
|
* @param $aColumns
|
||||||
|
* @param $sSelectMode
|
||||||
|
* @param $iPageSize
|
||||||
|
* @param $bViewLink
|
||||||
|
* @param $aExtraParams
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \CoreUnexpectedValue
|
||||||
|
* @throws \DictExceptionMissingString
|
||||||
|
* @throws \MissingQueryArgument
|
||||||
|
* @throws \MySQLException
|
||||||
|
* @throws \MySQLHasGoneAwayException
|
||||||
|
*/
|
||||||
public function GetHTMLTable(WebPage $oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
|
public function GetHTMLTable(WebPage $oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
|
||||||
{
|
{
|
||||||
$iNbPages = ($iPageSize < 1) ? 1 : ceil($this->iNbObjects / $iPageSize);
|
$iNbPages = ($iPageSize < 1) ? 1 : ceil($this->iNbObjects / $iPageSize);
|
||||||
@@ -627,7 +868,13 @@ class DataTableSettings implements Serializable
|
|||||||
public $iDefaultPageSize;
|
public $iDefaultPageSize;
|
||||||
public $aColumns;
|
public $aColumns;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DataTableSettings constructor.
|
||||||
|
*
|
||||||
|
* @param $aClassAliases
|
||||||
|
* @param null $sTableId
|
||||||
|
*/
|
||||||
public function __construct($aClassAliases, $sTableId = null)
|
public function __construct($aClassAliases, $sTableId = null)
|
||||||
{
|
{
|
||||||
$this->aClassAliases = $aClassAliases;
|
$this->aClassAliases = $aClassAliases;
|
||||||
@@ -635,14 +882,22 @@ class DataTableSettings implements Serializable
|
|||||||
$this->iDefaultPageSize = 10;
|
$this->iDefaultPageSize = 10;
|
||||||
$this->aColumns = array();
|
$this->aColumns = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $iDefaultPageSize
|
||||||
|
* @param $aSortOrder
|
||||||
|
* @param $aColumns
|
||||||
|
*/
|
||||||
protected function Init($iDefaultPageSize, $aSortOrder, $aColumns)
|
protected function Init($iDefaultPageSize, $aSortOrder, $aColumns)
|
||||||
{
|
{
|
||||||
$this->iDefaultPageSize = $iDefaultPageSize;
|
$this->iDefaultPageSize = $iDefaultPageSize;
|
||||||
$this->aColumns = $aColumns;
|
$this->aColumns = $aColumns;
|
||||||
$this->FixVisibleColumns();
|
$this->FixVisibleColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function serialize()
|
public function serialize()
|
||||||
{
|
{
|
||||||
// Save only the 'visible' columns
|
// Save only the 'visible' columns
|
||||||
@@ -668,7 +923,12 @@ class DataTableSettings implements Serializable
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $sData
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
public function unserialize($sData)
|
public function unserialize($sData)
|
||||||
{
|
{
|
||||||
$aData = unserialize($sData);
|
$aData = unserialize($sData);
|
||||||
@@ -701,7 +961,16 @@ class DataTableSettings implements Serializable
|
|||||||
}
|
}
|
||||||
$this->FixVisibleColumns();
|
$this->FixVisibleColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $aClassAliases
|
||||||
|
* @param $bViewLink
|
||||||
|
* @param $aDefaultLists
|
||||||
|
*
|
||||||
|
* @return \DataTableSettings
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \DictExceptionMissingString
|
||||||
|
*/
|
||||||
static public function GetDataModelSettings($aClassAliases, $bViewLink, $aDefaultLists)
|
static public function GetDataModelSettings($aClassAliases, $bViewLink, $aDefaultLists)
|
||||||
{
|
{
|
||||||
$oSettings = new DataTableSettings($aClassAliases);
|
$oSettings = new DataTableSettings($aClassAliases);
|
||||||
@@ -751,11 +1020,18 @@ class DataTableSettings implements Serializable
|
|||||||
$oSettings->Init($iDefaultPageSize, $aSortOrder, $aColumns);
|
$oSettings->Init($iDefaultPageSize, $aSortOrder, $aColumns);
|
||||||
return $oSettings;
|
return $oSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws \CoreException
|
||||||
|
*/
|
||||||
protected function FixVisibleColumns()
|
protected function FixVisibleColumns()
|
||||||
{
|
{
|
||||||
foreach($this->aClassAliases as $sAlias => $sClass)
|
foreach($this->aClassAliases as $sAlias => $sClass)
|
||||||
{
|
{
|
||||||
|
if (!isset($this->aColumns[$sAlias]))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
foreach($this->aColumns[$sAlias] as $sAttCode => $aData)
|
foreach($this->aColumns[$sAlias] as $sAttCode => $aData)
|
||||||
{
|
{
|
||||||
// Remove non-existent columns
|
// Remove non-existent columns
|
||||||
@@ -771,7 +1047,7 @@ class DataTableSettings implements Serializable
|
|||||||
$aTempData = array();
|
$aTempData = array();
|
||||||
foreach($aList as $sAttCode => $oAttDef)
|
foreach($aList as $sAttCode => $oAttDef)
|
||||||
{
|
{
|
||||||
if ( (!array_key_exists($sAttCode, $this->aColumns[$sAlias])) && (!$oAttDef instanceof AttributeLinkSet))
|
if ( (!array_key_exists($sAttCode, $this->aColumns[$sAlias])) && (!($oAttDef instanceof AttributeLinkedSet || $oAttDef instanceof AttributeDashboard)))
|
||||||
{
|
{
|
||||||
$aFieldData = $this->GetFieldData($sAlias, $sAttCode, $oAttDef, false /* bChecked */, 'none');
|
$aFieldData = $this->GetFieldData($sAlias, $sAttCode, $oAttDef, false /* bChecked */, 'none');
|
||||||
if ($aFieldData) $aTempData[$aFieldData['label']] = $aFieldData;
|
if ($aFieldData) $aTempData[$aFieldData['label']] = $aFieldData;
|
||||||
@@ -784,7 +1060,15 @@ class DataTableSettings implements Serializable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $aClassAliases
|
||||||
|
* @param null $sTableId
|
||||||
|
* @param bool $bOnlyOnTable
|
||||||
|
*
|
||||||
|
* @return \DataTableSettings|null
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
static public function GetTableSettings($aClassAliases, $sTableId = null, $bOnlyOnTable = false)
|
static public function GetTableSettings($aClassAliases, $sTableId = null, $bOnlyOnTable = false)
|
||||||
{
|
{
|
||||||
$pref = null;
|
$pref = null;
|
||||||
@@ -813,7 +1097,10 @@ class DataTableSettings implements Serializable
|
|||||||
|
|
||||||
return $oSettings;
|
return $oSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function GetSortOrder()
|
public function GetSortOrder()
|
||||||
{
|
{
|
||||||
$aSortOrder = array();
|
$aSortOrder = array();
|
||||||
@@ -831,7 +1118,12 @@ class DataTableSettings implements Serializable
|
|||||||
}
|
}
|
||||||
return $aSortOrder;
|
return $aSortOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param null $sTargetTableId
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function Save($sTargetTableId = null)
|
public function Save($sTargetTableId = null)
|
||||||
{
|
{
|
||||||
$sSaveId = is_null($sTargetTableId) ? $this->sTableId : $sTargetTableId;
|
$sSaveId = is_null($sTargetTableId) ? $this->sTableId : $sTargetTableId;
|
||||||
@@ -842,6 +1134,9 @@ class DataTableSettings implements Serializable
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function SaveAsDefault()
|
public function SaveAsDefault()
|
||||||
{
|
{
|
||||||
$sSettings = $this->serialize();
|
$sSettings = $this->serialize();
|
||||||
@@ -871,18 +1166,43 @@ class DataTableSettings implements Serializable
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param null $sTableId
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
protected function GetPrefsKey($sTableId = null)
|
protected function GetPrefsKey($sTableId = null)
|
||||||
{
|
{
|
||||||
if ($sTableId == null) $sTableId = '*';
|
return static::GetAppUserPreferenceKey($this->aClassAliases, $sTableId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function GetAppUserPreferenceKey($aClassAliases, $sTableId)
|
||||||
|
{
|
||||||
|
if ($sTableId === null)
|
||||||
|
{
|
||||||
|
$sTableId = '*';
|
||||||
|
}
|
||||||
|
|
||||||
$aKeys = array();
|
$aKeys = array();
|
||||||
foreach($this->aClassAliases as $sAlias => $sClass)
|
foreach($aClassAliases as $sAlias => $sClass)
|
||||||
{
|
{
|
||||||
$aKeys[] = $sAlias.'-'.$sClass;
|
$aKeys[] = $sAlias.'-'.$sClass;
|
||||||
}
|
}
|
||||||
return implode('/', $aKeys).'|'.$sTableId;
|
return implode('/', $aKeys).'|'.$sTableId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $sAlias
|
||||||
|
* @param $sAttCode
|
||||||
|
* @param $oAttDef
|
||||||
|
* @param $bChecked
|
||||||
|
* @param $sSort
|
||||||
|
*
|
||||||
|
* @return array|bool
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \DictExceptionMissingString
|
||||||
|
*/
|
||||||
protected function GetFieldData($sAlias, $sAttCode, $oAttDef, $bChecked, $sSort)
|
protected function GetFieldData($sAlias, $sAttCode, $oAttDef, $bChecked, $sSort)
|
||||||
{
|
{
|
||||||
$ret = false;
|
$ret = false;
|
||||||
@@ -932,4 +1252,4 @@ class DataTableSettings implements Serializable
|
|||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2017 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DisplayBlock and derived class
|
* Copyright (C) 2013-2019 Combodo SARL
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2017 Combodo SARL
|
* This file is part of iTop.
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(APPROOT.'/application/webpage.class.inc.php');
|
require_once(APPROOT.'/application/webpage.class.inc.php');
|
||||||
@@ -91,7 +85,7 @@ class DisplayBlock
|
|||||||
{
|
{
|
||||||
$oDummyFilter = new DBObjectSearch($oSet->GetClass());
|
$oDummyFilter = new DBObjectSearch($oSet->GetClass());
|
||||||
$aKeys = array();
|
$aKeys = array();
|
||||||
$oSet->OptimizeColumnLoad(array('id')); // No need to load all the columns just to get the id
|
$oSet->OptimizeColumnLoad(array($oSet->GetClassAlias() => array())); // No need to load all the columns just to get the id
|
||||||
while($oObject = $oSet->Fetch())
|
while($oObject = $oSet->Fetch())
|
||||||
{
|
{
|
||||||
$aKeys[] = $oObject->GetKey();
|
$aKeys[] = $oObject->GetKey();
|
||||||
@@ -220,9 +214,26 @@ class DisplayBlock
|
|||||||
$aExtraParams['currentId'] = $sId;
|
$aExtraParams['currentId'] = $sId;
|
||||||
$sExtraParams = addslashes(str_replace('"', "'", json_encode($aExtraParams))); // JSON encode, change the style of the quotes and escape them
|
$sExtraParams = addslashes(str_replace('"', "'", json_encode($aExtraParams))); // JSON encode, change the style of the quotes and escape them
|
||||||
|
|
||||||
|
if (isset($aExtraParams['query_params']))
|
||||||
|
{
|
||||||
|
$aQueryParams = $aExtraParams['query_params'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (isset($aExtraParams['this->id']) && isset($aExtraParams['this->class']))
|
||||||
|
{
|
||||||
|
$sClass = $aExtraParams['this->class'];
|
||||||
|
$iKey = $aExtraParams['this->id'];
|
||||||
|
$oObj = MetaModel::GetObject($sClass, $iKey);
|
||||||
|
$aQueryParams = array('this->object()' => $oObj);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$aQueryParams = array();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$sFilter = addslashes($this->m_oFilter->serialize(false, $aQueryParams)); // Used either for asynchronous or auto_reload
|
||||||
$sFilter = $this->m_oFilter->serialize(); // Used either for asynchronous or auto_reload
|
|
||||||
if (!$this->m_bAsynchronous)
|
if (!$this->m_bAsynchronous)
|
||||||
{
|
{
|
||||||
// render now
|
// render now
|
||||||
@@ -232,7 +243,7 @@ class DisplayBlock
|
|||||||
$sHtml .= $this->GetRenderContent($oPage, $aExtraParams, $sId);
|
$sHtml .= $this->GetRenderContent($oPage, $aExtraParams, $sId);
|
||||||
} catch (Exception $e)
|
} catch (Exception $e)
|
||||||
{
|
{
|
||||||
|
IssueLog::Error('Exception during GetDisplay: ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
$sHtml .= "</div>\n";
|
$sHtml .= "</div>\n";
|
||||||
}
|
}
|
||||||
@@ -314,20 +325,31 @@ class DisplayBlock
|
|||||||
* @throws MySQLException
|
* @throws MySQLException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function GetRenderContent(WebPage $oPage, $aExtraParams = array(), $sId)
|
public function GetRenderContent(WebPage $oPage, $aExtraParams, $sId)
|
||||||
{
|
{
|
||||||
$sHtml = '';
|
$sHtml = '';
|
||||||
// Add the extra params into the filter if they make sense for such a filter
|
// Add the extra params into the filter if they make sense for such a filter
|
||||||
$bDoSearch = utils::ReadParam('dosearch', false);
|
$bDoSearch = utils::ReadParam('dosearch', false);
|
||||||
|
$aQueryParams = array();
|
||||||
|
if (isset($aExtraParams['query_params']))
|
||||||
|
{
|
||||||
|
$aQueryParams = $aExtraParams['query_params'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (isset($aExtraParams['this->id']) && isset($aExtraParams['this->class']))
|
||||||
|
{
|
||||||
|
$sClass = $aExtraParams['this->class'];
|
||||||
|
$iKey = $aExtraParams['this->id'];
|
||||||
|
$oObj = MetaModel::GetObject($sClass, $iKey);
|
||||||
|
$aQueryParams = array('this->object()' => $oObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($this->m_oSet == null)
|
if ($this->m_oSet == null)
|
||||||
{
|
{
|
||||||
$aQueryParams = array();
|
|
||||||
if (isset($aExtraParams['query_params']))
|
|
||||||
{
|
|
||||||
$aQueryParams = $aExtraParams['query_params'];
|
|
||||||
}
|
|
||||||
// In case of search, the context filtering is done by the search itself
|
// In case of search, the context filtering is done by the search itself
|
||||||
if (($this->m_sStyle != 'links') && ($this->m_sStyle != 'search'))
|
if (($this->m_sStyle != 'links') && ($this->m_sStyle != 'search') && ($this->m_sStyle != 'list_search'))
|
||||||
{
|
{
|
||||||
$oAppContext = new ApplicationContext();
|
$oAppContext = new ApplicationContext();
|
||||||
$sClass = $this->m_oFilter->GetClass();
|
$sClass = $this->m_oFilter->GetClass();
|
||||||
@@ -457,14 +479,25 @@ class DisplayBlock
|
|||||||
$oSubsetSearch = $this->m_oFilter->DeepClone();
|
$oSubsetSearch = $this->m_oFilter->DeepClone();
|
||||||
$oCondition = new BinaryExpression($oGroupByExp, '=', new ScalarExpression($aValues[$iRow]));
|
$oCondition = new BinaryExpression($oGroupByExp, '=', new ScalarExpression($aValues[$iRow]));
|
||||||
$oSubsetSearch->AddConditionExpression($oCondition);
|
$oSubsetSearch->AddConditionExpression($oCondition);
|
||||||
$sFilter = urlencode($oSubsetSearch->serialize());
|
if (isset($aExtraParams['query_params']))
|
||||||
|
{
|
||||||
|
$aQueryParams = $aExtraParams['query_params'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$aQueryParams = array();
|
||||||
|
}
|
||||||
|
$sFilter = rawurlencode($oSubsetSearch->serialize(false, $aQueryParams));
|
||||||
|
|
||||||
$aData[] = array ('group' => $aLabels[$iRow],
|
$aData[] = array ('group' => $aLabels[$iRow],
|
||||||
'value' => "<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&dosearch=1&$sParams&filter=$sFilter\">$iCount</a>"); // TO DO: add the context information
|
'value' => "<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&dosearch=1&$sParams&filter=$sFilter\">$iCount</a>"); // TO DO: add the context information
|
||||||
}
|
}
|
||||||
$aAttribs =array(
|
$aAttribs =array(
|
||||||
'group' => array('label' => $sGroupByLabel, 'description' => ''),
|
'group' => array('label' => $sGroupByLabel, 'description' => ''),
|
||||||
'value' => array('label'=> Dict::S('UI:GroupBy:'.$sAggregationFunction), 'description' => Dict::Format('UI:GroupBy:'.$sAggregationFunction.'+', $sAggregationAttr))
|
'value' => array(
|
||||||
|
'label' => Dict::S('UI:GroupBy:'.$sAggregationFunction),
|
||||||
|
'description' => Dict::Format('UI:GroupBy:'.$sAggregationFunction.'+', $sAggregationAttr),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
$sFormat = isset($aExtraParams['format']) ? $aExtraParams['format'] : 'UI:Pagination:HeaderNoSelection';
|
$sFormat = isset($aExtraParams['format']) ? $aExtraParams['format'] : 'UI:Pagination:HeaderNoSelection';
|
||||||
$sHtml .= $oPage->GetP(Dict::Format($sFormat, $iTotalCount));
|
$sHtml .= $oPage->GetP(Dict::Format($sFormat, $iTotalCount));
|
||||||
@@ -580,6 +613,7 @@ class DisplayBlock
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'list_search':
|
||||||
case 'list':
|
case 'list':
|
||||||
$aClasses = $this->m_oSet->GetSelectedClasses();
|
$aClasses = $this->m_oSet->GetSelectedClasses();
|
||||||
$aAuthorizedClasses = array();
|
$aAuthorizedClasses = array();
|
||||||
@@ -662,7 +696,7 @@ class DisplayBlock
|
|||||||
'breadcrumb_label' => MetaModel::GetName($this->m_oSet->GetClass()),
|
'breadcrumb_label' => MetaModel::GetName($this->m_oSet->GetClass()),
|
||||||
'breadcrumb_max_count' => utils::GetConfig()->Get('breadcrumb.max_count'),
|
'breadcrumb_max_count' => utils::GetConfig()->Get('breadcrumb.max_count'),
|
||||||
'breadcrumb_instance_id' => MetaModel::GetConfig()->GetItopInstanceid(),
|
'breadcrumb_instance_id' => MetaModel::GetConfig()->GetItopInstanceid(),
|
||||||
'breadcrumb_icon' => utils::GetAbsoluteUrlAppRoot().'images/breadcrumb-search.png'
|
'breadcrumb_icon' => utils::GetAbsoluteUrlAppRoot().'images/breadcrumb-search.png',
|
||||||
));
|
));
|
||||||
|
|
||||||
$oPage->add_ready_script("$('body').trigger('update_history.itop', [$seventAttachedData])");
|
$oPage->add_ready_script("$('body').trigger('update_history.itop', [$seventAttachedData])");
|
||||||
@@ -715,7 +749,7 @@ class DisplayBlock
|
|||||||
$sClass = $this->m_oFilter->GetClass();
|
$sClass = $this->m_oFilter->GetClass();
|
||||||
$oAppContext = new ApplicationContext();
|
$oAppContext = new ApplicationContext();
|
||||||
$bContextFilter = isset($aExtraParams['context_filter']) ? isset($aExtraParams['context_filter']) != 0 : false;
|
$bContextFilter = isset($aExtraParams['context_filter']) ? isset($aExtraParams['context_filter']) != 0 : false;
|
||||||
if ($bContextFilter)
|
if ($bContextFilter && is_null($this->m_oSet))
|
||||||
{
|
{
|
||||||
foreach($oAppContext->GetNames() as $sFilterCode)
|
foreach($oAppContext->GetNames() as $sFilterCode)
|
||||||
{
|
{
|
||||||
@@ -734,7 +768,7 @@ class DisplayBlock
|
|||||||
$this->m_oSet->SetShowObsoleteData($this->m_bShowObsoleteData);
|
$this->m_oSet->SetShowObsoleteData($this->m_bShowObsoleteData);
|
||||||
}
|
}
|
||||||
$iCount = $this->m_oSet->Count();
|
$iCount = $this->m_oSet->Count();
|
||||||
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.urlencode($this->m_oFilter->serialize());
|
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.rawurlencode($this->m_oFilter->serialize());
|
||||||
$sHtml .= '<p><a class="actions" href="'.$sHyperlink.'">';
|
$sHtml .= '<p><a class="actions" href="'.$sHyperlink.'">';
|
||||||
// Note: border set to 0 due to various browser interpretations (IE9 adding a 2px border)
|
// Note: border set to 0 due to various browser interpretations (IE9 adding a 2px border)
|
||||||
$sHtml .= MetaModel::GetClassIcon($sClass, true, 'float;left;margin-right:10px;border:0;');
|
$sHtml .= MetaModel::GetClassIcon($sClass, true, 'float;left;margin-right:10px;border:0;');
|
||||||
@@ -803,7 +837,8 @@ class DisplayBlock
|
|||||||
|
|
||||||
foreach($aStates as $sStateValue)
|
foreach($aStates as $sStateValue)
|
||||||
{
|
{
|
||||||
$aStateLabels[$sStateValue] = htmlentities($oAttDef->GetValueLabel($sStateValue), ENT_QUOTES, 'UTF-8');
|
$sHtmlValue=$aGroupBy['group1']->MakeValueLabel($this->m_oFilter, $sStateValue, $sStateValue);
|
||||||
|
$aStateLabels[$sStateValue] = html_entity_decode(strip_tags($sHtmlValue), ENT_QUOTES, 'UTF-8');
|
||||||
|
|
||||||
$aCounts[$sStateValue] = (array_key_exists($sStateValue, $aCountsQueryResults))
|
$aCounts[$sStateValue] = (array_key_exists($sStateValue, $aCountsQueryResults))
|
||||||
? $aCountsQueryResults[$sStateValue]
|
? $aCountsQueryResults[$sStateValue]
|
||||||
@@ -823,7 +858,7 @@ class DisplayBlock
|
|||||||
}
|
}
|
||||||
$sHyperlink = utils::GetAbsoluteUrlAppRoot()
|
$sHyperlink = utils::GetAbsoluteUrlAppRoot()
|
||||||
.'pages/UI.php?operation=search&'.$oAppContext->GetForLink()
|
.'pages/UI.php?operation=search&'.$oAppContext->GetForLink()
|
||||||
.'&filter='.urlencode($oSingleGroupByValueFilter->serialize());
|
.'&filter='.rawurlencode($oSingleGroupByValueFilter->serialize());
|
||||||
$aCounts[$sStateValue] = "<a href=\"$sHyperlink\">{$aCounts[$sStateValue]}</a>";
|
$aCounts[$sStateValue] = "<a href=\"$sHyperlink\">{$aCounts[$sStateValue]}</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -832,7 +867,7 @@ class DisplayBlock
|
|||||||
$sHtml .= '<tr><td>'.implode('</td><td>', $aCounts).'</td></tr></table></div>';
|
$sHtml .= '<tr><td>'.implode('</td><td>', $aCounts).'</td></tr></table></div>';
|
||||||
// Title & summary
|
// Title & summary
|
||||||
$iCount = $this->m_oSet->Count();
|
$iCount = $this->m_oSet->Count();
|
||||||
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.urlencode($this->m_oFilter->serialize());
|
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.rawurlencode($this->m_oFilter->serialize());
|
||||||
$sHtml .= '<h1>'.Dict::S(str_replace('_', ':', $sTitle)).'</h1>';
|
$sHtml .= '<h1>'.Dict::S(str_replace('_', ':', $sTitle)).'</h1>';
|
||||||
$sHtml .= '<a class="summary" href="'.$sHyperlink.'">'.Dict::Format(str_replace('_', ':', $sLabel), $iCount).'</a>';
|
$sHtml .= '<a class="summary" href="'.$sHyperlink.'">'.Dict::Format(str_replace('_', ':', $sLabel), $iCount).'</a>';
|
||||||
$sHtml .= '<div style="clear:both;"></div>';
|
$sHtml .= '<div style="clear:both;"></div>';
|
||||||
@@ -843,7 +878,7 @@ class DisplayBlock
|
|||||||
|
|
||||||
$sCsvFile = strtolower($this->m_oFilter->GetClass()).'.csv';
|
$sCsvFile = strtolower($this->m_oFilter->GetClass()).'.csv';
|
||||||
$sDownloadLink = utils::GetAbsoluteUrlAppRoot().'webservices/export.php?expression='.urlencode($this->m_oFilter->ToOQL(true)).'&format=csv&filename='.urlencode($sCsvFile);
|
$sDownloadLink = utils::GetAbsoluteUrlAppRoot().'webservices/export.php?expression='.urlencode($this->m_oFilter->ToOQL(true)).'&format=csv&filename='.urlencode($sCsvFile);
|
||||||
$sLinkToToggle = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.urlencode($this->m_oFilter->serialize()).'&format=csv';
|
$sLinkToToggle = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.rawurlencode($this->m_oFilter->serialize()).'&format=csv';
|
||||||
// Pass the parameters via POST, since expression may be very long
|
// Pass the parameters via POST, since expression may be very long
|
||||||
$aParamsToPost = array(
|
$aParamsToPost = array(
|
||||||
'expression' => $this->m_oFilter->ToOQL(true),
|
'expression' => $this->m_oFilter->ToOQL(true),
|
||||||
@@ -912,11 +947,11 @@ class DisplayBlock
|
|||||||
$iChartCounter++;
|
$iChartCounter++;
|
||||||
|
|
||||||
$sChartType = isset($aExtraParams['chart_type']) ? $aExtraParams['chart_type'] : 'pie';
|
$sChartType = isset($aExtraParams['chart_type']) ? $aExtraParams['chart_type'] : 'pie';
|
||||||
$sTitle = isset($aExtraParams['chart_title']) ? '<h1 style="text-align:center">'.htmlentities(Dict::S($aExtraParams['chart_title']), ENT_QUOTES, 'UTF-8').'</h1>' : '';
|
$sTitle = isset($aExtraParams['chart_title']) ? '<div class="main_header"><h1> '.htmlentities(Dict::S($aExtraParams['chart_title']), ENT_QUOTES, 'UTF-8').'</h1></div>' : '';
|
||||||
$sHtml = "$sTitle<div style=\"height:200px;width:100%\" id=\"my_chart_$sId{$iChartCounter}\"><div style=\"height:200px;line-height:200px;vertical-align:center;text-align:center;width:100%\"><img src=\"../images/indicator.gif\"></div></div>\n";
|
$sHtml = "$sTitle<div style=\"height:200px;width:100%\" class=\"dashboard_chart\" id=\"my_chart_$sId{$iChartCounter}\"><div style=\"height:200px;line-height:200px;vertical-align:center;text-align:center;width:100%\"><img src=\"../images/indicator.gif\"></div></div>\n";
|
||||||
$sGroupBy = isset($aExtraParams['group_by']) ? $aExtraParams['group_by'] : '';
|
$sGroupBy = isset($aExtraParams['group_by']) ? $aExtraParams['group_by'] : '';
|
||||||
$sGroupByExpr = isset($aExtraParams['group_by_expr']) ? '¶ms[group_by_expr]='.$aExtraParams['group_by_expr'] : '';
|
$sGroupByExpr = isset($aExtraParams['group_by_expr']) ? '¶ms[group_by_expr]='.$aExtraParams['group_by_expr'] : '';
|
||||||
$sFilter = $this->m_oFilter->serialize();
|
$sFilter = $this->m_oFilter->serialize(false, $aQueryParams);
|
||||||
$oContext = new ApplicationContext();
|
$oContext = new ApplicationContext();
|
||||||
$sContextParam = $oContext->GetForLink();
|
$sContextParam = $oContext->GetForLink();
|
||||||
$sAggregationFunction = isset($aExtraParams['aggregation_function']) ? $aExtraParams['aggregation_function'] : '';
|
$sAggregationFunction = isset($aExtraParams['aggregation_function']) ? $aExtraParams['aggregation_function'] : '';
|
||||||
@@ -927,11 +962,11 @@ class DisplayBlock
|
|||||||
|
|
||||||
if (isset($aExtraParams['group_by_label']))
|
if (isset($aExtraParams['group_by_label']))
|
||||||
{
|
{
|
||||||
$sUrl = json_encode(utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$sGroupBy{$sGroupByExpr}¶ms[group_by_label]={$aExtraParams['group_by_label']}¶ms[chart_type]=$sChartType¶ms[currentId]=$sId{$iChartCounter}¶ms[order_direction]=$sOrderDirection¶ms[order_by]=$sOrderBy¶ms[limit]=$sLimit¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sId{$iChartCounter}&filter=".urlencode($sFilter).'&'.$sContextParam);
|
$sUrl = json_encode(utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$sGroupBy{$sGroupByExpr}¶ms[group_by_label]={$aExtraParams['group_by_label']}¶ms[chart_type]=$sChartType¶ms[currentId]=$sId{$iChartCounter}¶ms[order_direction]=$sOrderDirection¶ms[order_by]=$sOrderBy¶ms[limit]=$sLimit¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sId{$iChartCounter}&filter=".rawurlencode($sFilter).'&'.$sContextParam);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sUrl = json_encode(utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$sGroupBy{$sGroupByExpr}¶ms[chart_type]=$sChartType¶ms[currentId]=$sId{$iChartCounter}¶ms[order_direction]=$sOrderDirection¶ms[order_by]=$sOrderBy¶ms[limit]=$sLimit¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sId{$iChartCounter}&filter=".urlencode($sFilter).'&'.$sContextParam);
|
$sUrl = json_encode(utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$sGroupBy{$sGroupByExpr}¶ms[chart_type]=$sChartType¶ms[currentId]=$sId{$iChartCounter}¶ms[order_direction]=$sOrderDirection¶ms[order_by]=$sOrderBy¶ms[limit]=$sLimit¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sId{$iChartCounter}&filter=".rawurlencode($sFilter).'&'.$sContextParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oPage->add_ready_script(
|
$oPage->add_ready_script(
|
||||||
@@ -971,7 +1006,7 @@ EOF
|
|||||||
$oSubsetSearch = $this->m_oFilter->DeepClone();
|
$oSubsetSearch = $this->m_oFilter->DeepClone();
|
||||||
$oCondition = new BinaryExpression($oGroupByExp, '=', new ScalarExpression($sValue));
|
$oCondition = new BinaryExpression($oGroupByExp, '=', new ScalarExpression($sValue));
|
||||||
$oSubsetSearch->AddConditionExpression($oCondition);
|
$oSubsetSearch->AddConditionExpression($oCondition);
|
||||||
$aURLs[] = utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&format=html&filter=".urlencode($oSubsetSearch->serialize()).'&'.$sContextParam;
|
$aURLs[] = utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&format=html&filter=".rawurlencode($oSubsetSearch->serialize()).'&'.$sContextParam;
|
||||||
}
|
}
|
||||||
$sJSURLs = json_encode($aURLs);
|
$sJSURLs = json_encode($aURLs);
|
||||||
}
|
}
|
||||||
@@ -989,6 +1024,7 @@ EOF
|
|||||||
$sJson = json_encode($aValues);
|
$sJson = json_encode($aValues);
|
||||||
$oPage->add_ready_script(
|
$oPage->add_ready_script(
|
||||||
<<<EOF
|
<<<EOF
|
||||||
|
|
||||||
var chart = c3.generate({
|
var chart = c3.generate({
|
||||||
bindto: d3.select('#my_chart_$sId'),
|
bindto: d3.select('#my_chart_$sId'),
|
||||||
data: {
|
data: {
|
||||||
@@ -1036,6 +1072,12 @@ var chart = c3.generate({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (typeof(charts) === "undefined")
|
||||||
|
{
|
||||||
|
charts = [];
|
||||||
|
}
|
||||||
|
charts.push(chart);
|
||||||
EOF
|
EOF
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@@ -1074,6 +1116,12 @@ var chart = c3.generate({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (typeof(charts) === "undefined")
|
||||||
|
{
|
||||||
|
charts = [];
|
||||||
|
}
|
||||||
|
charts.push(chart);
|
||||||
EOF
|
EOF
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@@ -1122,16 +1170,26 @@ EOF
|
|||||||
}
|
}
|
||||||
if (($bAutoReload) && ($this->m_sStyle != 'search')) // Search form do NOT auto-reload
|
if (($bAutoReload) && ($this->m_sStyle != 'search')) // Search form do NOT auto-reload
|
||||||
{
|
{
|
||||||
$sFilter = $this->m_oFilter->serialize(); // Used either for asynchronous or auto_reload
|
// Used either for asynchronous or auto_reload
|
||||||
$sExtraParams = addslashes(str_replace('"', "'", json_encode($aExtraParams))); // JSON encode, change the style of the quotes and escape them
|
// does a json_encode twice to get a string usable as function parameter
|
||||||
|
$sFilterBefore = $this->m_oFilter->serialize();
|
||||||
|
$sFilter = json_encode($sFilterBefore);
|
||||||
|
$sExtraParams = json_encode(json_encode($aExtraParams));
|
||||||
|
|
||||||
$oPage->add_script('if (typeof window.oAutoReloadBlock == "undefined") {
|
$oPage->add_script(
|
||||||
window.oAutoReloadBlock = {};
|
<<<JS
|
||||||
}
|
if (typeof window.oAutoReloadBlock == "undefined") {
|
||||||
if (typeof window.oAutoReloadBlock[\''.$sId.'\'] != "undefined") {
|
window.oAutoReloadBlock = {};
|
||||||
clearInterval(window.oAutoReloadBlock[\''.$sId.'\']);
|
}
|
||||||
}
|
if (typeof window.oAutoReloadBlock['$sId'] != "undefined") {
|
||||||
window.oAutoReloadBlock[\''.$sId.'\'] = setInterval("ReloadBlock(\''.$sId.'\', \''.$this->m_sStyle.'\', \''.$sFilter.'\', \"'.$sExtraParams.'\")", '.$iReloadInterval.');');
|
clearInterval(window.oAutoReloadBlock['$sId']);
|
||||||
|
}
|
||||||
|
|
||||||
|
window.oAutoReloadBlock['$sId'] = setInterval(function() {
|
||||||
|
ReloadBlock('$sId', '{$this->m_sStyle}', $sFilter, $sExtraParams);
|
||||||
|
}, '$iReloadInterval');
|
||||||
|
JS
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $sHtml;
|
return $sHtml;
|
||||||
@@ -1391,7 +1449,7 @@ class HistoryBlock extends DisplayBlock
|
|||||||
default:
|
default:
|
||||||
if ($bTruncated)
|
if ($bTruncated)
|
||||||
{
|
{
|
||||||
$sFilter = $this->m_oFilter->serialize();
|
$sFilter = htmlentities($this->m_oFilter->serialize(), ENT_QUOTES, 'UTF-8');
|
||||||
$sHtml .= '<div id="history_container"><p>';
|
$sHtml .= '<div id="history_container"><p>';
|
||||||
$sHtml .= Dict::Format('UI:TruncatedResults', $this->iLimitCount, $oSet->Count());
|
$sHtml .= Dict::Format('UI:TruncatedResults', $this->iLimitCount, $oSet->Count());
|
||||||
$sHtml .= ' ';
|
$sHtml .= ' ';
|
||||||
@@ -1669,6 +1727,7 @@ class MenuBlock extends DisplayBlock
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
$this->AddMenuSeparator($aActions);
|
$this->AddMenuSeparator($aActions);
|
||||||
|
/** @var \iApplicationUIExtension $oExtensionInstance */
|
||||||
foreach (MetaModel::EnumPlugins('iApplicationUIExtension') as $oExtensionInstance)
|
foreach (MetaModel::EnumPlugins('iApplicationUIExtension') as $oExtensionInstance)
|
||||||
{
|
{
|
||||||
$oSet->Rewind();
|
$oSet->Rewind();
|
||||||
@@ -1764,6 +1823,7 @@ class MenuBlock extends DisplayBlock
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->AddMenuSeparator($aActions);
|
$this->AddMenuSeparator($aActions);
|
||||||
|
/** @var \iApplicationUIExtension $oExtensionInstance */
|
||||||
foreach (MetaModel::EnumPlugins('iApplicationUIExtension') as $oExtensionInstance)
|
foreach (MetaModel::EnumPlugins('iApplicationUIExtension') as $oExtensionInstance)
|
||||||
{
|
{
|
||||||
$oSet->Rewind();
|
$oSet->Rewind();
|
||||||
@@ -1821,11 +1881,11 @@ class MenuBlock extends DisplayBlock
|
|||||||
{
|
{
|
||||||
if (count($aFavoriteActions) > 0)
|
if (count($aFavoriteActions) > 0)
|
||||||
{
|
{
|
||||||
$sHtml .= "<div class=\"itop_popup actions_menu\"><ul>\n<li>".Dict::S('UI:Menu:OtherActions')."\n<ul>\n";
|
$sHtml .= "<div class=\"itop_popup actions_menu\"><ul>\n<li>".Dict::S('UI:Menu:OtherActions')."<i class=\"fas fa-caret-down\"></i>"."\n<ul>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sHtml .= "<div class=\"itop_popup actions_menu\"><ul>\n<li>".Dict::S('UI:Menu:Actions')."\n<ul>\n";
|
$sHtml .= "<div class=\"itop_popup actions_menu\"><ul>\n<li>".Dict::S('UI:Menu:Actions')."<i class=\"fas fa-caret-down\"></i>"."\n<ul>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sHtml .= $oPage->RenderPopupMenuItems($aActions, $aFavoriteActions);
|
$sHtml .= $oPage->RenderPopupMenuItems($aActions, $aFavoriteActions);
|
||||||
@@ -1833,7 +1893,8 @@ class MenuBlock extends DisplayBlock
|
|||||||
if ($this->m_sStyle == 'details')
|
if ($this->m_sStyle == 'details')
|
||||||
{
|
{
|
||||||
$sSearchAction = "window.location=\"{$sRootUrl}pages/UI.php?operation=search_form&do_search=0&class=$sClass{$sContext}\"";
|
$sSearchAction = "window.location=\"{$sRootUrl}pages/UI.php?operation=search_form&do_search=0&class=$sClass{$sContext}\"";
|
||||||
$sHtml .= "<div class=\"actions_button icon_actions_button\" title=\"".htmlentities(Dict::Format('UI:SearchFor_Class', MetaModel::GetName($sClass)), ENT_QUOTES, 'UTF-8')."\"><span class=\"search-button fa fa-search\" onclick='$sSearchAction'></span></div>";
|
$sHtml .= "<div class=\"actions_button icon_actions_button\" title=\"".htmlentities(Dict::Format('UI:SearchFor_Class',
|
||||||
|
MetaModel::GetName($sClass)), ENT_QUOTES, 'UTF-8')."\"><span class=\"search-button fas fa-search\" onclick='$sSearchAction'></span></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1844,7 +1905,8 @@ class MenuBlock extends DisplayBlock
|
|||||||
}
|
}
|
||||||
if (!$oPage->IsPrintableVersion() && ($sRefreshAction!=''))
|
if (!$oPage->IsPrintableVersion() && ($sRefreshAction!=''))
|
||||||
{
|
{
|
||||||
$sHtml .= "<div class=\"actions_button icon_actions_button\" title=\"".htmlentities(Dict::S('UI:Button:Refresh'), ENT_QUOTES, 'UTF-8')."\"><span class=\"refresh-button fa fa-refresh\" onclick=\"$sRefreshAction\"></span></div>";
|
$sHtml .= "<div class=\"actions_button icon_actions_button\" title=\"".htmlentities(Dict::S('UI:Button:Refresh'),
|
||||||
|
ENT_QUOTES, 'UTF-8')."\"><span class=\"refresh-button fas fa-sync\" onclick=\"$sRefreshAction\"></span></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
82
application/errorpage.class.inc.php
Normal file
82
application/errorpage.class.inc.php
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @copyright Copyright (C) 2010-2020 Combodo SARL
|
||||||
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class ErrorPage extends NiceWebPage
|
||||||
|
{
|
||||||
|
public function __construct($sTitle)
|
||||||
|
{
|
||||||
|
parent::__construct($sTitle);
|
||||||
|
$this->add_linked_script("../js/jquery.blockUI.js");
|
||||||
|
$this->add_linked_script("../setup/setup.js");
|
||||||
|
$this->add_saas("css/setup.scss");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function info($sText)
|
||||||
|
{
|
||||||
|
$this->add("<p class=\"info\">$sText</p>\n");
|
||||||
|
$this->log_info($sText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function ok($sText)
|
||||||
|
{
|
||||||
|
$this->add("<div class=\"message message-valid\"><span class=\"message-title\">Success:</span>$sText</div>");
|
||||||
|
$this->log_ok($sText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function warning($sText)
|
||||||
|
{
|
||||||
|
$this->add("<div class=\"message message-warning\"><span class=\"message-title\">Warning:</span>$sText</div>");
|
||||||
|
$this->log_warning($sText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function error($sText)
|
||||||
|
{
|
||||||
|
$this->add("<div class=\"message message-error\">$sText</div>");
|
||||||
|
$this->log_error($sText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function output()
|
||||||
|
{
|
||||||
|
$sLogo = utils::GetAbsoluteUrlAppRoot().'/images/itop-logo.png';
|
||||||
|
$sTimeStamp = utils::GetCacheBusterTimestamp();
|
||||||
|
$sTitle = utils::HtmlEntities($this->s_title);
|
||||||
|
$this->s_content = <<<HTML
|
||||||
|
<div id="header" class="error_page">
|
||||||
|
<h1><a href="http://www.combodo.com/itop" target="_blank"><img title="iTop by Combodo" alt=" " src="{$sLogo}?t={$sTimeStamp}"></a> {$sTitle}</h1>
|
||||||
|
</div>
|
||||||
|
<div id="setup" class="error_page">
|
||||||
|
{$this->s_content}
|
||||||
|
</div>
|
||||||
|
HTML;
|
||||||
|
return parent::output();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function log_error($sText)
|
||||||
|
{
|
||||||
|
IssueLog::Error($sText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function log_warning($sText)
|
||||||
|
{
|
||||||
|
IssueLog::Warning($sText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function log_info($sText)
|
||||||
|
{
|
||||||
|
IssueLog::Info($sText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function log_ok($sText)
|
||||||
|
{
|
||||||
|
IssueLog::Ok($sText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function log($sText)
|
||||||
|
{
|
||||||
|
IssueLog::Ok($sText);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -378,9 +378,9 @@ $('#$sDialogId').dialog({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} },
|
} },
|
||||||
{ text: "$sCancelButtonLabel", click: function() { KillAllMenus(); $(this).dialog( "close" ); $(this).remove(); } },
|
{ text: "$sCancelButtonLabel", click: function() { $(this).dialog( "close" ); $(this).remove(); } },
|
||||||
],
|
],
|
||||||
close: function() { KillAllMenus(); $(this).remove(); }
|
close: function() { $(this).remove(); }
|
||||||
});
|
});
|
||||||
var oForm = $('#$sDialogId form');
|
var oForm = $('#$sDialogId form');
|
||||||
var sFormId = oForm.attr('id');
|
var sFormId = oForm.attr('id');
|
||||||
@@ -395,6 +395,7 @@ EOF
|
|||||||
{
|
{
|
||||||
foreach($aFields as $oField)
|
foreach($aFields as $oField)
|
||||||
{
|
{
|
||||||
|
/** @var \DesignerFormField $oField */
|
||||||
$oField->ReadParam($aValues);
|
$oField->ReadParam($aValues);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -679,17 +680,34 @@ class DesignerTabularForm extends DesignerForm
|
|||||||
|
|
||||||
class DesignerFormField
|
class DesignerFormField
|
||||||
{
|
{
|
||||||
|
/** @var string $sLabel */
|
||||||
protected $sLabel;
|
protected $sLabel;
|
||||||
|
/** @var string $sCode */
|
||||||
protected $sCode;
|
protected $sCode;
|
||||||
|
/** @var mixed $defaultValue */
|
||||||
protected $defaultValue;
|
protected $defaultValue;
|
||||||
|
/** @var \DesignerForm $oForm */
|
||||||
protected $oForm;
|
protected $oForm;
|
||||||
|
/** @var bool $bMandatory */
|
||||||
protected $bMandatory;
|
protected $bMandatory;
|
||||||
|
/** @var bool $bReadOnly */
|
||||||
protected $bReadOnly;
|
protected $bReadOnly;
|
||||||
|
/** @var bool $bAutoApply */
|
||||||
protected $bAutoApply;
|
protected $bAutoApply;
|
||||||
|
/** @var array $aCSSClasses */
|
||||||
protected $aCSSClasses;
|
protected $aCSSClasses;
|
||||||
|
/** @var bool $bDisplayed */
|
||||||
protected $bDisplayed;
|
protected $bDisplayed;
|
||||||
|
/** @var array $aWidgetExtraParams */
|
||||||
protected $aWidgetExtraParams;
|
protected $aWidgetExtraParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DesignerFormField constructor.
|
||||||
|
*
|
||||||
|
* @param string $sCode
|
||||||
|
* @param string $sLabel
|
||||||
|
* @param mixed $defaultValue
|
||||||
|
*/
|
||||||
public function __construct($sCode, $sLabel, $defaultValue)
|
public function __construct($sCode, $sLabel, $defaultValue)
|
||||||
{
|
{
|
||||||
$this->sLabel = $sLabel;
|
$this->sLabel = $sLabel;
|
||||||
@@ -702,75 +720,120 @@ class DesignerFormField
|
|||||||
$this->bDisplayed = true;
|
$this->bDisplayed = true;
|
||||||
$this->aWidgetExtraParams = array();
|
$this->aWidgetExtraParams = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function GetCode()
|
public function GetCode()
|
||||||
{
|
{
|
||||||
return $this->sCode;
|
return $this->sCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function SetForm($oForm)
|
/**
|
||||||
|
* @param \DesignerForm $oForm
|
||||||
|
*/
|
||||||
|
public function SetForm(DesignerForm $oForm)
|
||||||
{
|
{
|
||||||
$this->oForm = $oForm;
|
$this->oForm = $oForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $bMandatory
|
||||||
|
*/
|
||||||
public function SetMandatory($bMandatory = true)
|
public function SetMandatory($bMandatory = true)
|
||||||
{
|
{
|
||||||
$this->bMandatory = $bMandatory;
|
$this->bMandatory = $bMandatory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $bReadOnly
|
||||||
|
*/
|
||||||
public function SetReadOnly($bReadOnly = true)
|
public function SetReadOnly($bReadOnly = true)
|
||||||
{
|
{
|
||||||
$this->bReadOnly = $bReadOnly;
|
$this->bReadOnly = $bReadOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function IsReadOnly()
|
public function IsReadOnly()
|
||||||
{
|
{
|
||||||
return ($this->oForm->IsReadOnly() || $this->bReadOnly);
|
return ($this->oForm->IsReadOnly() || $this->bReadOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $bAutoApply
|
||||||
|
*/
|
||||||
public function SetAutoApply($bAutoApply)
|
public function SetAutoApply($bAutoApply)
|
||||||
{
|
{
|
||||||
$this->bAutoApply = $bAutoApply;
|
$this->bAutoApply = $bAutoApply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function IsAutoApply()
|
public function IsAutoApply()
|
||||||
{
|
{
|
||||||
return $this->bAutoApply;
|
return $this->bAutoApply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $bDisplayed
|
||||||
|
*/
|
||||||
public function SetDisplayed($bDisplayed)
|
public function SetDisplayed($bDisplayed)
|
||||||
{
|
{
|
||||||
$this->bDisplayed = $bDisplayed;
|
$this->bDisplayed = $bDisplayed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function IsDisplayed()
|
public function IsDisplayed()
|
||||||
{
|
{
|
||||||
return $this->bDisplayed;
|
return $this->bDisplayed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function GetFieldId()
|
public function GetFieldId()
|
||||||
{
|
{
|
||||||
return $this->oForm->GetFieldId($this->sCode);
|
return $this->oForm->GetFieldId($this->sCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function GetWidgetClass()
|
public function GetWidgetClass()
|
||||||
{
|
{
|
||||||
return 'property_field';
|
return 'property_field';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function GetWidgetExtraParams()
|
public function GetWidgetExtraParams()
|
||||||
{
|
{
|
||||||
return $this->aWidgetExtraParams;
|
return $this->aWidgetExtraParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \WebPage $oP
|
||||||
|
* @param string $sFormId
|
||||||
|
* @param string $sRenderMode
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function Render(WebPage $oP, $sFormId, $sRenderMode='dialog')
|
public function Render(WebPage $oP, $sFormId, $sRenderMode='dialog')
|
||||||
{
|
{
|
||||||
$sId = $this->oForm->GetFieldId($this->sCode);
|
$sId = $this->oForm->GetFieldId($this->sCode);
|
||||||
$sName = $this->oForm->GetFieldName($this->sCode);
|
$sName = $this->oForm->GetFieldName($this->sCode);
|
||||||
return array('label' => $this->sLabel, 'value' => "<input type=\"text\" id=\"$sId\" name=\"$sName\" value=\"".htmlentities($this->defaultValue, ENT_QUOTES, 'UTF-8')."\">");
|
return array('label' => $this->sLabel, 'value' => "<input type=\"text\" id=\"$sId\" name=\"$sName\" value=\"".htmlentities($this->defaultValue, ENT_QUOTES, 'UTF-8')."\">");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $aValues
|
||||||
|
*/
|
||||||
public function ReadParam(&$aValues)
|
public function ReadParam(&$aValues)
|
||||||
{
|
{
|
||||||
if ($this->IsReadOnly())
|
if ($this->IsReadOnly())
|
||||||
@@ -797,12 +860,18 @@ class DesignerFormField
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function IsVisible()
|
public function IsVisible()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $sCSSClass
|
||||||
|
*/
|
||||||
public function AddCSSClass($sCSSClass)
|
public function AddCSSClass($sCSSClass)
|
||||||
{
|
{
|
||||||
$this->aCSSClasses[] = $sCSSClass;
|
$this->aCSSClasses[] = $sCSSClass;
|
||||||
@@ -810,6 +879,8 @@ class DesignerFormField
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A way to set/change the default value after constructing the field
|
* A way to set/change the default value after constructing the field
|
||||||
|
*
|
||||||
|
* @param array $aAllDefaultValue
|
||||||
*/
|
*/
|
||||||
public function SetDefaultValueFrom($aAllDefaultValue)
|
public function SetDefaultValueFrom($aAllDefaultValue)
|
||||||
{
|
{
|
||||||
@@ -818,7 +889,12 @@ class DesignerFormField
|
|||||||
$this->defaultValue = $aAllDefaultValue[$this->GetCode()];
|
$this->defaultValue = $aAllDefaultValue[$this->GetCode()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $sFieldCode
|
||||||
|
*
|
||||||
|
* @return \DesignerFormField|false
|
||||||
|
*/
|
||||||
public function FindField($sFieldCode)
|
public function FindField($sFieldCode)
|
||||||
{
|
{
|
||||||
if ($this->sCode == $sFieldCode)
|
if ($this->sCode == $sFieldCode)
|
||||||
@@ -828,11 +904,17 @@ class DesignerFormField
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function GetHandlerEquals()
|
public function GetHandlerEquals()
|
||||||
{
|
{
|
||||||
return 'null';
|
return 'null';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function GetHandlerGetValue()
|
public function GetHandlerGetValue()
|
||||||
{
|
{
|
||||||
return 'null';
|
return 'null';
|
||||||
@@ -841,25 +923,43 @@ class DesignerFormField
|
|||||||
|
|
||||||
class DesignerLabelField extends DesignerFormField
|
class DesignerLabelField extends DesignerFormField
|
||||||
{
|
{
|
||||||
|
/** @var int $iCount A counter to automatically make the field code */
|
||||||
|
protected static $iCount = 0;
|
||||||
|
/** @var string $sDescription */
|
||||||
protected $sDescription;
|
protected $sDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
public function __construct($sLabel, $sDescription)
|
public function __construct($sLabel, $sDescription)
|
||||||
{
|
{
|
||||||
parent::__construct('', $sLabel, '');
|
// Increase counter
|
||||||
|
static::$iCount++;
|
||||||
|
|
||||||
|
parent::__construct('label_number_' . static::$iCount, $sLabel, '');
|
||||||
$this->sDescription = $sDescription;
|
$this->sDescription = $sDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
public function Render(WebPage $oP, $sFormId, $sRenderMode='dialog')
|
public function Render(WebPage $oP, $sFormId, $sRenderMode='dialog')
|
||||||
{
|
{
|
||||||
$sId = $this->oForm->GetFieldId($this->sCode);
|
$sId = $this->oForm->GetFieldId($this->sCode);
|
||||||
$sName = $this->oForm->GetFieldName($this->sCode);
|
$sName = $this->oForm->GetFieldName($this->sCode);
|
||||||
return array('label' => $this->sLabel, 'value' => $this->sDescription);
|
return array('label' => $this->sLabel, 'value' => $this->sDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
public function ReadParam(&$aValues)
|
public function ReadParam(&$aValues)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
public function IsVisible()
|
public function IsVisible()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@@ -1330,7 +1430,8 @@ class DesignerIconSelectionField extends DesignerFormField
|
|||||||
$sPostUploadTo = ($this->sUploadUrl == null) ? 'null' : "'{$this->sUploadUrl}'";
|
$sPostUploadTo = ($this->sUploadUrl == null) ? 'null' : "'{$this->sUploadUrl}'";
|
||||||
if (!$this->IsReadOnly())
|
if (!$this->IsReadOnly())
|
||||||
{
|
{
|
||||||
$sValue = "<input type=\"hidden\" id=\"$sId\" name=\"$sName\" value=\"{$this->defaultValue}\"/>";
|
$sDefaultValue = ($this->defaultValue !== '') ? $this->defaultValue : $this->aAllowedValues[$idx]['value'];
|
||||||
|
$sValue = "<input type=\"hidden\" id=\"$sId\" name=\"$sName\" value=\"{$sDefaultValue}\"/>";
|
||||||
$oP->add_ready_script(
|
$oP->add_ready_script(
|
||||||
<<<EOF
|
<<<EOF
|
||||||
$('#$sId').icon_select({current_idx: $idx, items: $sJSItems, post_upload_to: $sPostUploadTo});
|
$('#$sId').icon_select({current_idx: $idx, items: $sJSItems, post_upload_to: $sPostUploadTo});
|
||||||
@@ -1392,6 +1493,7 @@ class RunTimeIconSelectionField extends DesignerIconSelectionField
|
|||||||
$sAvailableIcons .= ' static $sKey = '.var_export($sKey, true).';'.PHP_EOL;
|
$sAvailableIcons .= ' static $sKey = '.var_export($sKey, true).';'.PHP_EOL;
|
||||||
$sAvailableIcons .= ' static $aIconFiles = '.var_export($aFiles, true).';'.PHP_EOL;
|
$sAvailableIcons .= ' static $aIconFiles = '.var_export($aFiles, true).';'.PHP_EOL;
|
||||||
$sAvailableIcons .= '}'.PHP_EOL;
|
$sAvailableIcons .= '}'.PHP_EOL;
|
||||||
|
SetupUtils::builddir(dirname($sCacheFile));
|
||||||
file_put_contents($sCacheFile, $sAvailableIcons, LOCK_EX);
|
file_put_contents($sCacheFile, $sAvailableIcons, LOCK_EX);
|
||||||
}
|
}
|
||||||
return $aFiles;
|
return $aFiles;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
138
application/loginbasic.class.inc.php
Normal file
138
application/loginbasic.class.inc.php
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Class LoginBasic
|
||||||
|
*
|
||||||
|
* @copyright Copyright (C) 2010-2019 Combodo SARL
|
||||||
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
class LoginBasic extends AbstractLoginFSMExtension
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Return the list of supported login modes for this plugin
|
||||||
|
*
|
||||||
|
* @return array of supported login modes
|
||||||
|
*/
|
||||||
|
public function ListSupportedLoginModes()
|
||||||
|
{
|
||||||
|
return array('basic');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnModeDetection(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if (!isset($_SESSION['login_mode']))
|
||||||
|
{
|
||||||
|
if (isset($_SERVER['HTTP_AUTHORIZATION']) && !empty($_SERVER['HTTP_AUTHORIZATION']))
|
||||||
|
{
|
||||||
|
$_SESSION['login_mode'] = 'basic';
|
||||||
|
}
|
||||||
|
elseif (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']) && !empty($_SERVER['REDIRECT_HTTP_AUTHORIZATION']))
|
||||||
|
{
|
||||||
|
$_SESSION['login_mode'] = 'basic';
|
||||||
|
}
|
||||||
|
elseif (isset($_SERVER['PHP_AUTH_USER']))
|
||||||
|
{
|
||||||
|
$_SESSION['login_mode'] = 'basic';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnReadCredentials(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if (!isset($_SESSION['login_mode']) || $_SESSION['login_mode'] == 'basic')
|
||||||
|
{
|
||||||
|
list($sAuthUser, $sAuthPwd) = $this->GetAuthUserAndPassword();
|
||||||
|
$_SESSION['login_temp_auth_user'] = $sAuthUser;
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected function OnCheckCredentials(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'basic')
|
||||||
|
{
|
||||||
|
list($sAuthUser, $sAuthPwd) = $this->GetAuthUserAndPassword();
|
||||||
|
if (!UserRights::CheckCredentials($sAuthUser, $sAuthPwd, $_SESSION['login_mode'], 'internal'))
|
||||||
|
{
|
||||||
|
$iErrorCode = LoginWebPage::EXIT_CODE_WRONGCREDENTIALS;
|
||||||
|
return LoginWebPage::LOGIN_FSM_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnCredentialsOK(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'basic')
|
||||||
|
{
|
||||||
|
list($sAuthUser) = $this->GetAuthUserAndPassword();
|
||||||
|
LoginWebPage::OnLoginSuccess($sAuthUser, 'internal', $_SESSION['login_mode']);
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnError(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'basic')
|
||||||
|
{
|
||||||
|
LoginWebPage::HTTP401Error();
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnConnected(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'basic')
|
||||||
|
{
|
||||||
|
$_SESSION['can_logoff'] = true;
|
||||||
|
return LoginWebPage::CheckLoggedUser($iErrorCode);
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function GetAuthUserAndPassword()
|
||||||
|
{
|
||||||
|
$sAuthUser = '';
|
||||||
|
$sAuthPwd = null;
|
||||||
|
$sAuthorization = '';
|
||||||
|
if (isset($_SERVER['HTTP_AUTHORIZATION']) && !empty($_SERVER['HTTP_AUTHORIZATION']))
|
||||||
|
{
|
||||||
|
$sAuthorization = $_SERVER['HTTP_AUTHORIZATION'];
|
||||||
|
}
|
||||||
|
elseif (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']) && !empty($_SERVER['REDIRECT_HTTP_AUTHORIZATION']))
|
||||||
|
{
|
||||||
|
$sAuthorization = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($sAuthorization))
|
||||||
|
{
|
||||||
|
list($sAuthUser, $sAuthPwd) = explode(':', base64_decode(substr($sAuthorization, 6)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (isset($_SERVER['PHP_AUTH_USER']))
|
||||||
|
{
|
||||||
|
$sAuthUser = $_SERVER['PHP_AUTH_USER'];
|
||||||
|
// Unfortunately, the RFC is not clear about the encoding...
|
||||||
|
// IE and FF supply the user and password encoded in ISO-8859-1 whereas Chrome provides them encoded in UTF-8
|
||||||
|
// So let's try to guess if it's an UTF-8 string or not... fortunately all encodings share the same ASCII base
|
||||||
|
if (!LoginWebPage::LooksLikeUTF8($sAuthUser))
|
||||||
|
{
|
||||||
|
// Does not look like and UTF-8 string, try to convert it from iso-8859-1 to UTF-8
|
||||||
|
// Supposed to be harmless in case of a plain ASCII string...
|
||||||
|
$sAuthUser = iconv('iso-8859-1', 'utf-8', $sAuthUser);
|
||||||
|
}
|
||||||
|
$sAuthPwd = $_SERVER['PHP_AUTH_PW'];
|
||||||
|
if (!LoginWebPage::LooksLikeUTF8($sAuthPwd))
|
||||||
|
{
|
||||||
|
// Does not look like and UTF-8 string, try to convert it from iso-8859-1 to UTF-8
|
||||||
|
// Supposed to be harmless in case of a plain ASCII string...
|
||||||
|
$sAuthPwd = iconv('iso-8859-1', 'utf-8', $sAuthPwd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array($sAuthUser, $sAuthPwd);
|
||||||
|
}
|
||||||
|
}
|
||||||
129
application/logindefault.class.inc.php
Normal file
129
application/logindefault.class.inc.php
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @copyright Copyright (C) 2010-2019 Combodo SARL
|
||||||
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class LoginDefaultBefore
|
||||||
|
*/
|
||||||
|
class LoginDefaultBefore extends AbstractLoginFSMExtension
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Must be executed before the other login plugins
|
||||||
|
*
|
||||||
|
* @return array of supported login modes
|
||||||
|
*/
|
||||||
|
public function ListSupportedLoginModes()
|
||||||
|
{
|
||||||
|
return array('before');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnStart(&$iErrorCode)
|
||||||
|
{
|
||||||
|
$iErrorCode = LoginWebPage::EXIT_CODE_OK;
|
||||||
|
|
||||||
|
unset($_SESSION['login_temp_auth_user']);
|
||||||
|
|
||||||
|
// Check if proposed login mode is present and allowed
|
||||||
|
$aAllowedLoginTypes = MetaModel::GetConfig()->GetAllowedLoginTypes();
|
||||||
|
$sProposedLoginMode = utils::ReadParam('login_mode', '');
|
||||||
|
$index = array_search($sProposedLoginMode, $aAllowedLoginTypes);
|
||||||
|
if ($index !== false)
|
||||||
|
{
|
||||||
|
// Force login mode
|
||||||
|
$_SESSION['login_mode'] = $sProposedLoginMode;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unset($_SESSION['login_mode']);
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnReadCredentials(&$iErrorCode)
|
||||||
|
{
|
||||||
|
// Check if proposed login mode is present and allowed
|
||||||
|
$aAllowedLoginTypes = MetaModel::GetConfig()->GetAllowedLoginTypes();
|
||||||
|
$sProposedLoginMode = utils::ReadParam('login_mode', '');
|
||||||
|
$index = array_search($sProposedLoginMode, $aAllowedLoginTypes);
|
||||||
|
if ($index !== false)
|
||||||
|
{
|
||||||
|
// Force login mode
|
||||||
|
LoginWebPage::SetLoginModeAndReload($sProposedLoginMode);
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class LoginDefaultAfter
|
||||||
|
*/
|
||||||
|
class LoginDefaultAfter extends AbstractLoginFSMExtension implements iLogoutExtension
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Must be executed after the other login plugins
|
||||||
|
*
|
||||||
|
* @return array of supported login modes
|
||||||
|
*/
|
||||||
|
public function ListSupportedLoginModes()
|
||||||
|
{
|
||||||
|
return array('after');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnError(&$iErrorCode)
|
||||||
|
{
|
||||||
|
self::ResetLoginSession();
|
||||||
|
$iOnExit = LoginWebPage::getIOnExit();
|
||||||
|
if ($iOnExit == LoginWebPage::EXIT_RETURN)
|
||||||
|
{
|
||||||
|
return LoginWebPage::LOGIN_FSM_RETURN; // Error, exit FSM
|
||||||
|
}
|
||||||
|
elseif ($iOnExit == LoginWebPage::EXIT_HTTP_401)
|
||||||
|
{
|
||||||
|
LoginWebPage::HTTP401Error(); // Error, exit
|
||||||
|
}
|
||||||
|
// LoginWebPage::EXIT_PROMPT
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnCredentialsOk(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if (!isset($_SESSION['login_mode']))
|
||||||
|
{
|
||||||
|
// If no plugin validated the user, exit
|
||||||
|
self::ResetLoginSession();
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute all actions to log out properly
|
||||||
|
*/
|
||||||
|
public function LogoutAction()
|
||||||
|
{
|
||||||
|
self::ResetLoginSession();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnConnected(&$iErrorCode)
|
||||||
|
{
|
||||||
|
unset($_SESSION['login_temp_auth_user']);
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hard reset of the session
|
||||||
|
private static function ResetLoginSession()
|
||||||
|
{
|
||||||
|
LoginWebPage::ResetSession();
|
||||||
|
foreach (array_keys($_SESSION) as $sKey)
|
||||||
|
{
|
||||||
|
if (utils::StartsWith($sKey, 'login_'))
|
||||||
|
{
|
||||||
|
unset($_SESSION[$sKey]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
89
application/loginexternal.class.inc.php
Normal file
89
application/loginexternal.class.inc.php
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class LoginExternal
|
||||||
|
*
|
||||||
|
* @copyright Copyright (C) 2010-2019 Combodo SARL
|
||||||
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
class LoginExternal extends AbstractLoginFSMExtension
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the list of supported login modes for this plugin
|
||||||
|
*
|
||||||
|
* @return array of supported login modes
|
||||||
|
*/
|
||||||
|
public function ListSupportedLoginModes()
|
||||||
|
{
|
||||||
|
return array('external');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnModeDetection(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if (!isset($_SESSION['login_mode']))
|
||||||
|
{
|
||||||
|
$sAuthUser = $this->GetAuthUser();
|
||||||
|
if ($sAuthUser && (strlen($sAuthUser) > 0))
|
||||||
|
{
|
||||||
|
$_SESSION['login_mode'] = 'external';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnCheckCredentials(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'external')
|
||||||
|
{
|
||||||
|
$sAuthUser = $this->GetAuthUser();
|
||||||
|
if (!UserRights::CheckCredentials($sAuthUser, '', $_SESSION['login_mode'], 'external'))
|
||||||
|
{
|
||||||
|
$iErrorCode = LoginWebPage::EXIT_CODE_WRONGCREDENTIALS;
|
||||||
|
return LoginWebPage::LOGIN_FSM_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnCredentialsOK(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'external')
|
||||||
|
{
|
||||||
|
$sAuthUser = $this->GetAuthUser();
|
||||||
|
LoginWebPage::OnLoginSuccess($sAuthUser, 'external', $_SESSION['login_mode']);
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnConnected(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'external')
|
||||||
|
{
|
||||||
|
$_SESSION['can_logoff'] = false;
|
||||||
|
return LoginWebPage::CheckLoggedUser($iErrorCode);
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnError(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'external')
|
||||||
|
{
|
||||||
|
LoginWebPage::HTTP401Error();
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
private function GetAuthUser()
|
||||||
|
{
|
||||||
|
$sExtAuthVar = MetaModel::GetConfig()->GetExternalAuthenticationVariable(); // In which variable is the info passed ?
|
||||||
|
eval('$sAuthUser = isset('.$sExtAuthVar.') ? '.$sExtAuthVar.' : false;'); // Retrieve the value
|
||||||
|
/** @var string $sAuthUser */
|
||||||
|
return $sAuthUser; // Retrieve the value
|
||||||
|
}
|
||||||
|
}
|
||||||
156
application/loginform.class.inc.php
Normal file
156
application/loginform.class.inc.php
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @copyright Copyright (C) 2010-2019 Combodo SARL
|
||||||
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class LoginForm
|
||||||
|
*
|
||||||
|
* @since 2.7.0
|
||||||
|
*/
|
||||||
|
class LoginForm extends AbstractLoginFSMExtension implements iLoginUIExtension
|
||||||
|
{
|
||||||
|
private $bForceFormOnError = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the list of supported login modes for this plugin
|
||||||
|
*
|
||||||
|
* @return array of supported login modes
|
||||||
|
*/
|
||||||
|
public function ListSupportedLoginModes()
|
||||||
|
{
|
||||||
|
return array('form');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
protected function OnReadCredentials(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if (!isset($_SESSION['login_mode']) || ($_SESSION['login_mode'] == 'form'))
|
||||||
|
{
|
||||||
|
$sAuthUser = utils::ReadPostedParam('auth_user', '', 'raw_data');
|
||||||
|
$sAuthPwd = utils::ReadPostedParam('auth_pwd', null, 'raw_data');
|
||||||
|
if ($this->bForceFormOnError || empty($sAuthUser) || empty($sAuthPwd))
|
||||||
|
{
|
||||||
|
if (array_key_exists('HTTP_X_COMBODO_AJAX', $_SERVER))
|
||||||
|
{
|
||||||
|
// X-Combodo-Ajax is a special header automatically added to all ajax requests
|
||||||
|
// Let's reply that we're currently logged-out
|
||||||
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No credentials yet, display the form
|
||||||
|
$oPage = LoginWebPage::NewLoginWebPage();
|
||||||
|
$oPage->DisplayLoginForm($this->bForceFormOnError);
|
||||||
|
$oPage->output();
|
||||||
|
$this->bForceFormOnError = false;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$_SESSION['login_temp_auth_user'] = $sAuthUser;
|
||||||
|
$_SESSION['login_mode'] = 'form';
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
protected function OnCheckCredentials(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'form')
|
||||||
|
{
|
||||||
|
$sAuthUser = utils::ReadPostedParam('auth_user', '', 'raw_data');
|
||||||
|
$sAuthPwd = utils::ReadPostedParam('auth_pwd', null, 'raw_data');
|
||||||
|
if (!UserRights::CheckCredentials($sAuthUser, $sAuthPwd, $_SESSION['login_mode'], 'internal'))
|
||||||
|
{
|
||||||
|
$iErrorCode = LoginWebPage::EXIT_CODE_WRONGCREDENTIALS;
|
||||||
|
return LoginWebPage::LOGIN_FSM_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
protected function OnCredentialsOK(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'form')
|
||||||
|
{
|
||||||
|
if (isset($_SESSION['auth_user']))
|
||||||
|
{
|
||||||
|
// If FSM reenter this state (example 2FA) then the auth_user is not resubmitted
|
||||||
|
$sAuthUser = $_SESSION['auth_user'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sAuthUser = utils::ReadPostedParam('auth_user', '', 'raw_data');
|
||||||
|
}
|
||||||
|
// Store 'auth_user' in session for further use
|
||||||
|
LoginWebPage::OnLoginSuccess($sAuthUser, 'internal', $_SESSION['login_mode']);
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
protected function OnError(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'form')
|
||||||
|
{
|
||||||
|
$this->bForceFormOnError = true;
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
protected function OnConnected(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'form')
|
||||||
|
{
|
||||||
|
$_SESSION['can_logoff'] = true;
|
||||||
|
return LoginWebPage::CheckLoggedUser($iErrorCode);
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public function GetTwigContext()
|
||||||
|
{
|
||||||
|
$oLoginContext = new LoginTwigContext();
|
||||||
|
$oLoginContext->AddPostedVar('auth_user');
|
||||||
|
$oLoginContext->AddPostedVar('auth_pwd');
|
||||||
|
|
||||||
|
$sAuthUser = utils::ReadParam('auth_user', '', true, 'raw_data');
|
||||||
|
$sAuthPwd = utils::ReadParam('suggest_pwd', '', true, 'raw_data');
|
||||||
|
|
||||||
|
$aData = array(
|
||||||
|
'sAuthUser' => $sAuthUser,
|
||||||
|
'sAuthPwd' => $sAuthPwd,
|
||||||
|
);
|
||||||
|
$oLoginContext->AddBlockExtension('login_input', new LoginBlockExtension('extensionblock/loginforminput.html.twig', $aData));
|
||||||
|
$oLoginContext->AddBlockExtension('login_submit', new LoginBlockExtension('extensionblock/loginformsubmit.html.twig'));
|
||||||
|
$oLoginContext->AddBlockExtension('login_form_footer', new LoginBlockExtension('extensionblock/loginformfooter.html.twig'));
|
||||||
|
|
||||||
|
$bEnableResetPassword = MetaModel::GetConfig()->Get('forgot_password');
|
||||||
|
$sResetPasswordUrl = utils::GetAbsoluteUrlAppRoot() . 'pages/UI.php?loginop=forgot_pwd';
|
||||||
|
$aData = array(
|
||||||
|
'bEnableResetPassword' => $bEnableResetPassword,
|
||||||
|
'sResetPasswordUrl' => $sResetPasswordUrl,
|
||||||
|
);
|
||||||
|
$oLoginContext->AddBlockExtension('login_links', new LoginBlockExtension('extensionblock/loginformlinks.html.twig', $aData));
|
||||||
|
|
||||||
|
return $oLoginContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
321
application/logintwig.class.inc.php
Normal file
321
application/logintwig.class.inc.php
Normal file
@@ -0,0 +1,321 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @copyright Copyright (C) 2010-2019 Combodo SARL
|
||||||
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
use Combodo\iTop\TwigExtension;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Twig context for modules extending the login screen
|
||||||
|
* Class LoginTwigContext
|
||||||
|
*/
|
||||||
|
class LoginTwigContext
|
||||||
|
{
|
||||||
|
/** @var array */
|
||||||
|
private $aBlockExtension;
|
||||||
|
/** @var array */
|
||||||
|
private $aPostedVars;
|
||||||
|
/** @var string */
|
||||||
|
private $sTwigLoaderPath;
|
||||||
|
/** @var array */
|
||||||
|
private $aCSSFiles;
|
||||||
|
/** @var array */
|
||||||
|
private $aJsFiles;
|
||||||
|
private $sTwigNameSpace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build a context to display the twig files used
|
||||||
|
* to extend the login screens
|
||||||
|
*
|
||||||
|
* LoginTwigContext constructor.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->aBlockExtension = array();
|
||||||
|
$this->aPostedVars = array();
|
||||||
|
$this->sTwigLoaderPath = null;
|
||||||
|
$this->aCSSFiles = array();
|
||||||
|
$this->aJsFiles = array();
|
||||||
|
$this->sTwigNameSpace = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the absolute path on disk of the folder containing the twig templates
|
||||||
|
*
|
||||||
|
* @param string $sPath absolute path of twig templates directory
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
public function SetLoaderPath($sPath)
|
||||||
|
{
|
||||||
|
$this->sTwigLoaderPath = $sPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a Twig block extension
|
||||||
|
*
|
||||||
|
* @param string $sBlockName
|
||||||
|
* @param LoginBlockExtension $oBlockExtension
|
||||||
|
*/
|
||||||
|
public function AddBlockExtension($sBlockName, $oBlockExtension)
|
||||||
|
{
|
||||||
|
$this->aBlockExtension[$sBlockName] = $oBlockExtension;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a variable intended to be posted on URL (and managed) by the module.
|
||||||
|
* Declaring the posted variables will prevent the core engine to manipulate these variables.
|
||||||
|
*
|
||||||
|
* @param string $sPostedVar Name of the posted variable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
public function AddPostedVar($sPostedVar)
|
||||||
|
{
|
||||||
|
$this->aPostedVars[] = $sPostedVar;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add the URL of a CSS file to link to the login screen
|
||||||
|
*
|
||||||
|
* @param string $sFile URL of the CSS file to link
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
public function AddCSSFile($sFile)
|
||||||
|
{
|
||||||
|
$this->aCSSFiles[] = $sFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add the URL of a javascript file to link to the login screen
|
||||||
|
* @param string $sFile URL of the javascript file to link
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
public function AddJsFile($sFile)
|
||||||
|
{
|
||||||
|
$this->aJsFiles[] = $sFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $sBlockName
|
||||||
|
*
|
||||||
|
* @return \LoginBlockExtension
|
||||||
|
*/
|
||||||
|
public function GetBlockExtension($sBlockName)
|
||||||
|
{
|
||||||
|
/** @var LoginBlockExtension $oBlockExtension */
|
||||||
|
$oBlockExtension = isset($this->aBlockExtension[$sBlockName]) ? $this->aBlockExtension[$sBlockName] : null;
|
||||||
|
return $oBlockExtension;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function GetPostedVars()
|
||||||
|
{
|
||||||
|
return $this->aPostedVars;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function GetTwigLoaderPath()
|
||||||
|
{
|
||||||
|
return $this->sTwigLoaderPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function GetCSSFiles()
|
||||||
|
{
|
||||||
|
return $this->aCSSFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function GetJsFiles()
|
||||||
|
{
|
||||||
|
return $this->aJsFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Twig block description for login screen extension
|
||||||
|
* The login screen can be extended by adding twig templates
|
||||||
|
* to specific blocks of the login screens
|
||||||
|
*
|
||||||
|
* Class LoginBlockExtension
|
||||||
|
*/
|
||||||
|
class LoginBlockExtension
|
||||||
|
{
|
||||||
|
private $sTwig;
|
||||||
|
private $aData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new twig extension block
|
||||||
|
* The given twig template can be HTML, CSS or JavaScript.
|
||||||
|
* CSS goes to the block named 'css' and is inline in the page.
|
||||||
|
* JavaScript goes to the blocks named 'script' or 'ready_script' and are inline in the page.
|
||||||
|
* HTML goes to everywhere else
|
||||||
|
*
|
||||||
|
* LoginBlockExtension constructor.
|
||||||
|
*
|
||||||
|
* @param string $sTwig name of the twig file relative to the path given to the LoginTwigContext
|
||||||
|
* @param array $aData Data given to the twig template (into the variable {{ aData }})
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
public function __construct($sTwig, $aData = array())
|
||||||
|
{
|
||||||
|
$this->sTwig = $sTwig;
|
||||||
|
$this->aData = $aData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function GetTwig()
|
||||||
|
{
|
||||||
|
return $this->sTwig;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function GetData()
|
||||||
|
{
|
||||||
|
return $this->aData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used by LoginWebPage to display the login screen
|
||||||
|
* Class LoginTwigRenderer
|
||||||
|
*/
|
||||||
|
class LoginTwigRenderer
|
||||||
|
{
|
||||||
|
private $aLoginPluginList;
|
||||||
|
private $aPluginFormData;
|
||||||
|
private $aPostedVars;
|
||||||
|
private $oTwig;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->aLoginPluginList = LoginWebPage::GetLoginPluginList('iLoginUIExtension', false);
|
||||||
|
$this->aPluginFormData = array();
|
||||||
|
$aTwigLoaders = array();
|
||||||
|
$this->aPostedVars = array();
|
||||||
|
foreach ($this->aLoginPluginList as $oLoginPlugin)
|
||||||
|
{
|
||||||
|
/** @var \iLoginUIExtension $oLoginPlugin */
|
||||||
|
$oLoginContext = $oLoginPlugin->GetTwigContext();
|
||||||
|
if (is_null($oLoginContext))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$this->aPluginFormData[] = $oLoginContext;
|
||||||
|
$sTwigLoaderPath = $oLoginContext->GetTwigLoaderPath();
|
||||||
|
if ($sTwigLoaderPath != null)
|
||||||
|
{
|
||||||
|
$oExtensionLoader = new Twig_Loader_Filesystem();
|
||||||
|
$oExtensionLoader->setPaths($sTwigLoaderPath);
|
||||||
|
$aTwigLoaders[] = $oExtensionLoader;
|
||||||
|
}
|
||||||
|
$this->aPostedVars = array_merge($this->aPostedVars, $oLoginContext->GetPostedVars());
|
||||||
|
}
|
||||||
|
|
||||||
|
$oCoreLoader = new Twig_Loader_Filesystem(array(), APPROOT.'templates');
|
||||||
|
$aCoreTemplatesPaths = array('login', 'login/password');
|
||||||
|
// Having this path declared after the plugins let the plugins replace the core templates
|
||||||
|
$oCoreLoader->setPaths($aCoreTemplatesPaths);
|
||||||
|
// Having the core templates accessible within a different namespace offer the possibility to extend them while replacing them
|
||||||
|
$oCoreLoader->setPaths($aCoreTemplatesPaths, 'ItopCore');
|
||||||
|
$aTwigLoaders[] = $oCoreLoader;
|
||||||
|
|
||||||
|
$oLoader = new Twig_Loader_Chain($aTwigLoaders);
|
||||||
|
$this->oTwig = new Twig_Environment($oLoader);
|
||||||
|
TwigExtension::RegisterTwigExtensions($this->oTwig);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function GetDefaultVars()
|
||||||
|
{
|
||||||
|
$sLogo = 'itop-logo-external.png';
|
||||||
|
$sBrandingLogo = 'login-logo.png';
|
||||||
|
|
||||||
|
$sVersionShort = Dict::Format('UI:iTopVersion:Short', ITOP_APPLICATION, ITOP_VERSION);
|
||||||
|
$sIconUrl = Utils::GetConfig()->Get('app_icon_url');
|
||||||
|
$sDisplayIcon = utils::GetAbsoluteUrlAppRoot().'images/'.$sLogo.'?t='.utils::GetCacheBusterTimestamp();
|
||||||
|
if (file_exists(MODULESROOT.'branding/'.$sBrandingLogo))
|
||||||
|
{
|
||||||
|
$sDisplayIcon = utils::GetAbsoluteUrlModulesRoot().'branding/'.$sBrandingLogo.'?t='.utils::GetCacheBusterTimestamp();
|
||||||
|
}
|
||||||
|
|
||||||
|
$aVars = array(
|
||||||
|
'sAppRootUrl' => utils::GetAbsoluteUrlAppRoot(),
|
||||||
|
'aPluginFormData' => $this->GetPluginFormData(),
|
||||||
|
'sItopVersion' => ITOP_VERSION,
|
||||||
|
'sVersionShort' => $sVersionShort,
|
||||||
|
'sIconUrl' => $sIconUrl,
|
||||||
|
'sDisplayIcon' => $sDisplayIcon,
|
||||||
|
);
|
||||||
|
|
||||||
|
return $aVars;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function Render(NiceWebPage $oPage, $sTwigFile, $aVars = array())
|
||||||
|
{
|
||||||
|
$oTemplate = $this->GetTwig()->load($sTwigFile);
|
||||||
|
$oPage->add($oTemplate->renderBlock('body', $aVars));
|
||||||
|
$oPage->add_script($oTemplate->renderBlock('script', $aVars));
|
||||||
|
$oPage->add_ready_script($oTemplate->renderBlock('ready_script', $aVars));
|
||||||
|
$oPage->add_style($oTemplate->renderBlock('css', $aVars));
|
||||||
|
|
||||||
|
// Render CSS links
|
||||||
|
foreach ($this->aPluginFormData as $oFormData)
|
||||||
|
{
|
||||||
|
/** @var \LoginTwigContext $oFormData */
|
||||||
|
$aCSSFiles = $oFormData->GetCSSFiles();
|
||||||
|
foreach ($aCSSFiles as $sCSSFile)
|
||||||
|
{
|
||||||
|
$oPage->add_linked_stylesheet($sCSSFile);
|
||||||
|
}
|
||||||
|
$aJsFiles = $oFormData->GetJsFiles();
|
||||||
|
foreach ($aJsFiles as $sJsFile)
|
||||||
|
{
|
||||||
|
$oPage->add_linked_script($sJsFile);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function GetLoginPluginList()
|
||||||
|
{
|
||||||
|
return $this->aLoginPluginList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function GetPluginFormData()
|
||||||
|
{
|
||||||
|
return $this->aPluginFormData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function GetPostedVars()
|
||||||
|
{
|
||||||
|
return $this->aPostedVars;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Twig_Environment
|
||||||
|
*/
|
||||||
|
public function GetTwig()
|
||||||
|
{
|
||||||
|
return $this->oTwig;
|
||||||
|
}
|
||||||
|
}
|
||||||
93
application/loginurl.class.inc.php
Normal file
93
application/loginurl.class.inc.php
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class LoginURL
|
||||||
|
*
|
||||||
|
* @copyright Copyright (C) 2010-2019 Combodo SARL
|
||||||
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
class LoginURL extends AbstractLoginFSMExtension
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private $bErrorOccurred = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the list of supported login modes for this plugin
|
||||||
|
*
|
||||||
|
* @return array of supported login modes
|
||||||
|
*/
|
||||||
|
public function ListSupportedLoginModes()
|
||||||
|
{
|
||||||
|
return array('url');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnModeDetection(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if (!isset($_SESSION['login_mode']) && !$this->bErrorOccurred)
|
||||||
|
{
|
||||||
|
$sAuthUser = utils::ReadParam('auth_user', '', false, 'raw_data');
|
||||||
|
$sAuthPwd = utils::ReadParam('auth_pwd', null, false, 'raw_data');
|
||||||
|
if (!empty($sAuthUser) && !empty($sAuthPwd))
|
||||||
|
{
|
||||||
|
$_SESSION['login_mode'] = 'url';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnReadCredentials(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'url')
|
||||||
|
{
|
||||||
|
$_SESSION['login_temp_auth_user'] = utils::ReadParam('auth_user', '', false, 'raw_data');
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnCheckCredentials(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'url')
|
||||||
|
{
|
||||||
|
$sAuthUser = utils::ReadParam('auth_user', '', false, 'raw_data');
|
||||||
|
$sAuthPwd = utils::ReadParam('auth_pwd', null, false, 'raw_data');
|
||||||
|
if (!UserRights::CheckCredentials($sAuthUser, $sAuthPwd, $_SESSION['login_mode'], 'internal'))
|
||||||
|
{
|
||||||
|
$iErrorCode = LoginWebPage::EXIT_CODE_WRONGCREDENTIALS;
|
||||||
|
return LoginWebPage::LOGIN_FSM_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnCredentialsOK(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'url')
|
||||||
|
{
|
||||||
|
$sAuthUser = utils::ReadParam('auth_user', '', false, 'raw_data');
|
||||||
|
LoginWebPage::OnLoginSuccess($sAuthUser, 'internal', $_SESSION['login_mode']);
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnError(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'url')
|
||||||
|
{
|
||||||
|
$this->bErrorOccurred = true;
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function OnConnected(&$iErrorCode)
|
||||||
|
{
|
||||||
|
if ($_SESSION['login_mode'] == 'url')
|
||||||
|
{
|
||||||
|
$_SESSION['can_logoff'] = true;
|
||||||
|
return LoginWebPage::CheckLoggedUser($iErrorCode);
|
||||||
|
}
|
||||||
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
93
application/maintenancemsg.php
Normal file
93
application/maintenancemsg.php
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2013-2019 Combodo SARL
|
||||||
|
*
|
||||||
|
* This file is part of iTop.
|
||||||
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Maintenance message display functions
|
||||||
|
// Only included by approot.inc.php
|
||||||
|
//
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use a setup page to display the maintenance message
|
||||||
|
* @param $sTitle
|
||||||
|
* @param $sMessage
|
||||||
|
*/
|
||||||
|
function _MaintenanceSetupPageMessage($sTitle, $sMessage)
|
||||||
|
{
|
||||||
|
// Web Page
|
||||||
|
@include_once(APPROOT.'setup/setuppage.class.inc.php');
|
||||||
|
if (class_exists('SetupPage'))
|
||||||
|
{
|
||||||
|
$oP = new ErrorPage($sTitle);
|
||||||
|
$oP->p("<h2 class=\"center\">$sMessage</h2>");
|
||||||
|
$oP->add_ready_script(
|
||||||
|
<<<JS
|
||||||
|
// Reload in 30s to check if maintenance is over
|
||||||
|
setTimeout(function(){ window.location.reload(); }, 30000);
|
||||||
|
JS
|
||||||
|
|
||||||
|
);
|
||||||
|
$oP->output();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_MaintenanceTextMessage($sMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use simple text to display the maintenance message
|
||||||
|
* @param $sMessage
|
||||||
|
*/
|
||||||
|
function _MaintenanceTextMessage($sMessage)
|
||||||
|
{
|
||||||
|
echo $sMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use a simple HTML to display the maintenance message
|
||||||
|
* @param $sMessage
|
||||||
|
*/
|
||||||
|
function _MaintenanceHtmlMessage($sMessage)
|
||||||
|
{
|
||||||
|
echo '<html><body><div>'.$sMessage.'</div></body></html>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use a simple JSON to display the maintenance message
|
||||||
|
*
|
||||||
|
* @param $sTitle
|
||||||
|
* @param $sMessage
|
||||||
|
*/
|
||||||
|
function _MaintenanceJsonMessage($sTitle, $sMessage)
|
||||||
|
{
|
||||||
|
@include_once(APPROOT."/application/ajaxwebpage.class.inc.php");
|
||||||
|
if (class_exists('ajax_page'))
|
||||||
|
{
|
||||||
|
$oP = new ajax_page($sTitle);
|
||||||
|
$oP->add_header('Access-Control-Allow-Origin: *');
|
||||||
|
$oP->SetContentType('application/json');
|
||||||
|
$oP->add('{"code":100, "message":"'.$sMessage.'"}');
|
||||||
|
$oP->Output();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_MaintenanceTextMessage($sMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,27 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2016 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construction and display of the application's main menu
|
* Copyright (C) 2013-2019 Combodo SARL
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2016 Combodo SARL
|
* This file is part of iTop.
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(APPROOT.'/application/utils.inc.php');
|
require_once(APPROOT.'/application/utils.inc.php');
|
||||||
@@ -84,14 +77,11 @@ class ApplicationMenu
|
|||||||
{
|
{
|
||||||
// Build menus from module handlers
|
// Build menus from module handlers
|
||||||
//
|
//
|
||||||
foreach(get_declared_classes() as $sPHPClass)
|
/** @var \ModuleHandlerApiInterface $oPHPClass */
|
||||||
{
|
foreach(MetaModel::EnumPlugins('ModuleHandlerApiInterface') as $oPHPClass)
|
||||||
if (is_subclass_of($sPHPClass, 'ModuleHandlerAPI'))
|
{
|
||||||
{
|
$oPHPClass::OnMenuCreation();
|
||||||
$aCallSpec = array($sPHPClass, 'OnMenuCreation');
|
}
|
||||||
call_user_func($aCallSpec);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build menus from the menus themselves (e.g. the ShortcutContainerMenuNode will do that)
|
// Build menus from the menus themselves (e.g. the ShortcutContainerMenuNode will do that)
|
||||||
//
|
//
|
||||||
@@ -125,9 +115,11 @@ class ApplicationMenu
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check wether a menu Id is enabled or not
|
* Check whether a menu Id is enabled or not
|
||||||
|
*
|
||||||
* @param $sMenuId
|
* @param $sMenuId
|
||||||
* @throws DictExceptionMissingString
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
static public function CheckMenuIdEnabled($sMenuId)
|
static public function CheckMenuIdEnabled($sMenuId)
|
||||||
{
|
{
|
||||||
@@ -136,7 +128,7 @@ class ApplicationMenu
|
|||||||
if (is_null($oMenuNode) || !$oMenuNode->IsEnabled())
|
if (is_null($oMenuNode) || !$oMenuNode->IsEnabled())
|
||||||
{
|
{
|
||||||
require_once(APPROOT.'/setup/setuppage.class.inc.php');
|
require_once(APPROOT.'/setup/setuppage.class.inc.php');
|
||||||
$oP = new SetupPage(Dict::S('UI:PageTitle:FatalError'));
|
$oP = new ErrorPage(Dict::S('UI:PageTitle:FatalError'));
|
||||||
$oP->add("<h1>".Dict::S('UI:Login:Error:AccessRestricted')."</h1>\n");
|
$oP->add("<h1>".Dict::S('UI:Login:Error:AccessRestricted')."</h1>\n");
|
||||||
$oP->p("<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/logoff.php\">".Dict::S('UI:LogOffMenu')."</a>");
|
$oP->p("<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/logoff.php\">".Dict::S('UI:LogOffMenu')."</a>");
|
||||||
$oP->output();
|
$oP->output();
|
||||||
@@ -167,7 +159,9 @@ class ApplicationMenu
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sParentId = self::$aMenusIndex[$iParentIndex]['node']->GetMenuId();
|
/** @var \MenuNode $oNode */
|
||||||
|
$oNode = self::$aMenusIndex[$iParentIndex]['node'];
|
||||||
|
$sParentId = $oNode->GetMenuId();
|
||||||
self::$aMenusIndex[$iParentIndex]['children'][] = array ('rank' => $fRank, 'index' => $index);
|
self::$aMenusIndex[$iParentIndex]['children'][] = array ('rank' => $fRank, 'index' => $index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,7 +175,9 @@ class ApplicationMenu
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// the menu already exists, let's combine the conditions that make it visible
|
// the menu already exists, let's combine the conditions that make it visible
|
||||||
self::$aMenusIndex[$index]['node']->AddCondition($oMenuNode);
|
/** @var \MenuNode $oNode */
|
||||||
|
$oNode = self::$aMenusIndex[$index]['node'];
|
||||||
|
$oNode->AddCondition($oMenuNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $index;
|
return $index;
|
||||||
@@ -198,7 +194,7 @@ class ApplicationMenu
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Entry point to display the whole menu into the web page, used by iTopWebPage
|
* Entry point to display the whole menu into the web page, used by iTopWebPage
|
||||||
* @param $oPage
|
* @param \WebPage $oPage
|
||||||
* @param $aExtraParams
|
* @param $aExtraParams
|
||||||
* @throws DictExceptionMissingString
|
* @throws DictExceptionMissingString
|
||||||
*/
|
*/
|
||||||
@@ -208,12 +204,13 @@ class ApplicationMenu
|
|||||||
// Sort the root menu based on the rank
|
// Sort the root menu based on the rank
|
||||||
usort(self::$aRootMenus, array('ApplicationMenu', 'CompareOnRank'));
|
usort(self::$aRootMenus, array('ApplicationMenu', 'CompareOnRank'));
|
||||||
$iAccordion = 0;
|
$iAccordion = 0;
|
||||||
|
$iActiveAccordion = $iAccordion;
|
||||||
$iActiveMenu = self::GetMenuIndexById(self::GetActiveNodeId());
|
$iActiveMenu = self::GetMenuIndexById(self::GetActiveNodeId());
|
||||||
foreach(self::$aRootMenus as $aMenu)
|
foreach(self::$aRootMenus as $aMenu)
|
||||||
{
|
{
|
||||||
if (!self::CanDisplayMenu($aMenu)) { continue; }
|
if (!self::CanDisplayMenu($aMenu)) { continue; }
|
||||||
$oMenuNode = self::GetMenuNode($aMenu['index']);
|
$oMenuNode = self::GetMenuNode($aMenu['index']);
|
||||||
$oPage->AddToMenu('<h3 id="'.utils::GetSafeId('AccordionMenu_'.$oMenuNode->GetMenuID()).'">'.$oMenuNode->GetTitle().'</h3>');
|
$oPage->AddToMenu('<h3 id="'.utils::GetSafeId('AccordionMenu_'.$oMenuNode->GetMenuID()).'" class="navigation-menu-group" data-menu-id="'.$oMenuNode->GetMenuId().'">'.$oMenuNode->GetTitle().'</h3>');
|
||||||
$oPage->AddToMenu('<div>');
|
$oPage->AddToMenu('<div>');
|
||||||
$oPage->AddToMenu('<ul>');
|
$oPage->AddToMenu('<ul>');
|
||||||
$aChildren = self::GetChildren($aMenu['index']);
|
$aChildren = self::GetChildren($aMenu['index']);
|
||||||
@@ -221,16 +218,18 @@ class ApplicationMenu
|
|||||||
$oPage->AddToMenu('</ul>');
|
$oPage->AddToMenu('</ul>');
|
||||||
if ($bActive)
|
if ($bActive)
|
||||||
{
|
{
|
||||||
$oPage->add_ready_script(
|
$iActiveAccordion = $iAccordion;
|
||||||
<<<EOF
|
|
||||||
// Accordion Menu
|
|
||||||
$("#accordion").css({display:'block'}).accordion({ header: "h3", navigation: true, heightStyle: "content", collapsible: true, active: $iAccordion, icons: false, animate:true }); // collapsible will be enabled once the item will be selected
|
|
||||||
EOF
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
$oPage->AddToMenu('</div>');
|
$oPage->AddToMenu('</div>');
|
||||||
$iAccordion++;
|
$iAccordion++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$oPage->add_ready_script(
|
||||||
|
<<<EOF
|
||||||
|
// Accordion Menu
|
||||||
|
$("#accordion").css({display:'block'}).accordion({ header: "h3", heightStyle: "content", collapsible: true, active: $iActiveAccordion, icons: false, animate: true }); // collapsible will be enabled once the item will be selected
|
||||||
|
EOF
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -264,12 +263,15 @@ EOF
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the display of the sub-menus (called recursively if necessary)
|
* Handles the display of the sub-menus (called recursively if necessary)
|
||||||
* @param WebPage $oPage
|
*
|
||||||
|
* @param \WebPage $oPage
|
||||||
* @param array $aMenus
|
* @param array $aMenus
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
* @param int $iActiveMenu
|
* @param int $iActiveMenu
|
||||||
|
*
|
||||||
* @return true if the currently selected menu is one of the submenus
|
* @return true if the currently selected menu is one of the submenus
|
||||||
* @throws DictExceptionMissingString
|
* @throws DictExceptionMissingString
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
static protected function DisplaySubMenu($oPage, $aMenus, $aExtraParams, $iActiveMenu = -1)
|
static protected function DisplaySubMenu($oPage, $aMenus, $aExtraParams, $iActiveMenu = -1)
|
||||||
{
|
{
|
||||||
@@ -278,21 +280,39 @@ EOF
|
|||||||
usort($aMenus, array('ApplicationMenu', 'CompareOnRank'));
|
usort($aMenus, array('ApplicationMenu', 'CompareOnRank'));
|
||||||
foreach($aMenus as $aMenu)
|
foreach($aMenus as $aMenu)
|
||||||
{
|
{
|
||||||
|
if (!self::CanDisplayMenu($aMenu))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$index = $aMenu['index'];
|
$index = $aMenu['index'];
|
||||||
$oMenu = self::GetMenuNode($index);
|
$oMenu = self::GetMenuNode($index);
|
||||||
if ($oMenu->IsEnabled())
|
if ($oMenu->IsEnabled())
|
||||||
{
|
{
|
||||||
$aChildren = self::GetChildren($index);
|
$aChildren = self::GetChildren($index);
|
||||||
$sCSSClass = (count($aChildren) > 0) ? ' class="submenu"' : '';
|
$aCSSClasses = array('navigation-menu-item');
|
||||||
|
if (count($aChildren) > 0)
|
||||||
|
{
|
||||||
|
$aCSSClasses[] = 'submenu';
|
||||||
|
}
|
||||||
$sHyperlink = $oMenu->GetHyperlink($aExtraParams);
|
$sHyperlink = $oMenu->GetHyperlink($aExtraParams);
|
||||||
|
$sItemHtml = '<li id="'.utils::GetSafeId('AccordionMenu_'.$oMenu->GetMenuID()).'" class="'.implode(' ', $aCSSClasses).'" data-menu-id="'.$oMenu->GetMenuID().'">';
|
||||||
if ($sHyperlink != '')
|
if ($sHyperlink != '')
|
||||||
{
|
{
|
||||||
$oPage->AddToMenu('<li id="'.utils::GetSafeId('AccordionMenu_'.$oMenu->GetMenuID()).'" '.$sCSSClass.'><a href="'.$oMenu->GetHyperlink($aExtraParams).'">'.$oMenu->GetTitle().'</a></li>');
|
$sLinkTarget = '';
|
||||||
|
if ($oMenu->IsHyperLinkInNewWindow())
|
||||||
|
{
|
||||||
|
$sLinkTarget .= ' target="_blank"';
|
||||||
|
}
|
||||||
|
$sURL = '"'.$oMenu->GetHyperlink($aExtraParams).'"'.$sLinkTarget;
|
||||||
|
$sTitle = utils::HtmlEntities($oMenu->GetTitle());
|
||||||
|
$sItemHtml .= "<a href={$sURL}>{$sTitle}</a>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$oPage->AddToMenu('<li id="'.utils::GetSafeId('AccordionMenu_'.$oMenu->GetMenuID()).'" '.$sCSSClass.'>'.$oMenu->GetTitle().'</li>');
|
$sItemHtml .= $oMenu->GetTitle();
|
||||||
}
|
}
|
||||||
|
$sItemHtml .= '</li>';
|
||||||
|
$oPage->AddToMenu($sItemHtml);
|
||||||
if ($iActiveMenu == $index)
|
if ($iActiveMenu == $index)
|
||||||
{
|
{
|
||||||
$bActive = true;
|
$bActive = true;
|
||||||
@@ -356,6 +376,7 @@ EOF
|
|||||||
static public function GetMenuIndexById($sTitle)
|
static public function GetMenuIndexById($sTitle)
|
||||||
{
|
{
|
||||||
$index = -1;
|
$index = -1;
|
||||||
|
/** @var MenuNode[] $aMenu */
|
||||||
foreach(self::$aMenusIndex as $aMenu)
|
foreach(self::$aMenusIndex as $aMenu)
|
||||||
{
|
{
|
||||||
if ($aMenu['node']->GetMenuId() == $sTitle)
|
if ($aMenu['node']->GetMenuId() == $sTitle)
|
||||||
@@ -592,13 +613,24 @@ abstract class MenuNode
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $aExtraParams
|
* @param $aExtraParams
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function GetHyperlink($aExtraParams)
|
public function GetHyperlink($aExtraParams)
|
||||||
{
|
{
|
||||||
$aExtraParams['c[menu]'] = $this->GetMenuId();
|
$aExtraParams['c[menu]'] = $this->GetMenuId();
|
||||||
return $this->AddParams(utils::GetAbsoluteUrlAppRoot().'pages/UI.php', $aExtraParams);
|
return $this->AddParams(utils::GetAbsoluteUrlAppRoot().'pages/UI.php', $aExtraParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool true if the link should be opened in a new window
|
||||||
|
* @since 2.7.0 N°1283
|
||||||
|
*/
|
||||||
|
public function IsHyperLinkInNewWindow()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a limiting display condition for the same menu node. The conditions will be combined with a AND
|
* Add a limiting display condition for the same menu node. The conditions will be combined with a AND
|
||||||
@@ -663,8 +695,8 @@ abstract class MenuNode
|
|||||||
public abstract function RenderContent(WebPage $oPage, $aExtraParams = array());
|
public abstract function RenderContent(WebPage $oPage, $aExtraParams = array());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $sHyperlink
|
* @param string $sHyperlink
|
||||||
* @param $aExtraParams
|
* @param array $aExtraParams
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function AddParams($sHyperlink, $aExtraParams)
|
protected function AddParams($sHyperlink, $aExtraParams)
|
||||||
@@ -708,8 +740,7 @@ class MenuGroup extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param WebPage $oPage
|
* @inheritDoc
|
||||||
* @param array $aExtraParams
|
|
||||||
*/
|
*/
|
||||||
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
@@ -747,8 +778,7 @@ class TemplateMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $aExtraParams
|
* @inheritDoc
|
||||||
* @return string
|
|
||||||
*/
|
*/
|
||||||
public function GetHyperlink($aExtraParams)
|
public function GetHyperlink($aExtraParams)
|
||||||
{
|
{
|
||||||
@@ -757,10 +787,8 @@ class TemplateMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param WebPage $oPage
|
* @inheritDoc
|
||||||
* @param array $aExtraParams
|
* @throws \Exception
|
||||||
* @return mixed|void
|
|
||||||
* @throws DictExceptionMissingString
|
|
||||||
*/
|
*/
|
||||||
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
@@ -837,7 +865,7 @@ class OQLMenuNode extends MenuNode
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set some extra parameters to be passed to the display block to fine tune its appearence
|
* Set some extra parameters to be passed to the display block to fine tune its appearence
|
||||||
* @param Hash $aParams paramCode => value. See DisplayBlock::GetDisplay for the meaning of the parameters
|
* @param array $aParams paramCode => value. See DisplayBlock::GetDisplay for the meaning of the parameters
|
||||||
*/
|
*/
|
||||||
public function SetParameters($aParams)
|
public function SetParameters($aParams)
|
||||||
{
|
{
|
||||||
@@ -849,12 +877,8 @@ class OQLMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param WebPage $oPage
|
* @inheritDoc
|
||||||
* @param array $aExtraParams
|
* @throws \Exception
|
||||||
* @return mixed|void
|
|
||||||
* @throws CoreException
|
|
||||||
* @throws DictExceptionMissingString
|
|
||||||
* @throws OQLException
|
|
||||||
*/
|
*/
|
||||||
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
@@ -873,11 +897,11 @@ class OQLMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $sOql
|
* @param string $sOql
|
||||||
* @param $sTitle
|
* @param string $sTitle
|
||||||
* @param $sUsageId
|
* @param string $sUsageId
|
||||||
* @param $bSearchPane
|
* @param bool $bSearchPane
|
||||||
* @param $bSearchOpen
|
* @param bool $bSearchOpen
|
||||||
* @param WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
* @param bool $bEnableBreadcrumb
|
* @param bool $bEnableBreadcrumb
|
||||||
@@ -898,7 +922,7 @@ class OQLMenuNode extends MenuNode
|
|||||||
$oBlock->Display($oPage, 0);
|
$oBlock->Display($oPage, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oPage->add("<p class=\"page-header\">$sIcon ".Dict::S($sTitle)."</p>");
|
$oPage->add("<p class=\"page-header\">$sIcon ".utils::HtmlEntities(Dict::S($sTitle))."</p>");
|
||||||
|
|
||||||
$aParams = array_merge(array('table_id' => $sUsageId), $aExtraParams);
|
$aParams = array_merge(array('table_id' => $sUsageId), $aExtraParams);
|
||||||
$oBlock = new DisplayBlock($oSearch, 'list', false /* Asynchronous */, $aParams);
|
$oBlock = new DisplayBlock($oSearch, 'list', false /* Asynchronous */, $aParams);
|
||||||
@@ -950,16 +974,14 @@ class SearchMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param WebPage $oPage
|
* @inheritDoc
|
||||||
* @param array $aExtraParams
|
* @throws \DictExceptionMissingString
|
||||||
* @return mixed|void
|
* @throws \Exception
|
||||||
* @throws DictExceptionMissingString
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
*/
|
||||||
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
ApplicationMenu::CheckMenuIdEnabled($this->GetMenuId());
|
ApplicationMenu::CheckMenuIdEnabled($this->GetMenuId());
|
||||||
$oPage->SetBreadCrumbEntry("menu-".$this->sMenuId, $this->GetTitle(), '', '', utils::GetAbsoluteUrlAppRoot().'images/search.png');
|
$oPage->SetBreadCrumbEntry("menu-".$this->sMenuId, $this->GetTitle(), '', '', utils::GetAbsoluteUrlAppRoot().'images/breadcrumb-search.png');
|
||||||
|
|
||||||
$oSearch = new DBObjectSearch($this->sClass);
|
$oSearch = new DBObjectSearch($this->sClass);
|
||||||
$aParams = array_merge(array('table_id' => 'Menu_'.utils::GetSafeId($this->GetMenuId())), $aExtraParams);
|
$aParams = array_merge(array('table_id' => 'Menu_'.utils::GetSafeId($this->GetMenuId())), $aExtraParams);
|
||||||
@@ -982,8 +1004,12 @@ class WebPageMenuNode extends MenuNode
|
|||||||
*/
|
*/
|
||||||
protected $sHyperlink;
|
protected $sHyperlink;
|
||||||
|
|
||||||
|
/** @var bool */
|
||||||
|
protected $bIsLinkInNewWindow;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a menu item that points to any web page (not only UI.php)
|
* Create a menu item that points to any web page (not only UI.php)
|
||||||
|
*
|
||||||
* @param string $sMenuId Unique identifier of the menu (used to identify the menu for bookmarking, and for getting the labels from the dictionary)
|
* @param string $sMenuId Unique identifier of the menu (used to identify the menu for bookmarking, and for getting the labels from the dictionary)
|
||||||
* @param string $sHyperlink URL to the page to load. Use relative URL if you want to keep the application portable !
|
* @param string $sHyperlink URL to the page to load. Use relative URL if you want to keep the application portable !
|
||||||
* @param integer $iParentIndex ID of the parent menu
|
* @param integer $iParentIndex ID of the parent menu
|
||||||
@@ -992,17 +1018,21 @@ class WebPageMenuNode extends MenuNode
|
|||||||
* @param integer $iActionCode Either UR_ACTION_READ, UR_ACTION_MODIFY, UR_ACTION_DELETE, UR_ACTION_BULKREAD, UR_ACTION_BULKMODIFY or UR_ACTION_BULKDELETE
|
* @param integer $iActionCode Either UR_ACTION_READ, UR_ACTION_MODIFY, UR_ACTION_DELETE, UR_ACTION_BULKREAD, UR_ACTION_BULKMODIFY or UR_ACTION_BULKDELETE
|
||||||
* @param integer $iAllowedResults Expected "rights" for the action: either UR_ALLOWED_YES, UR_ALLOWED_NO, UR_ALLOWED_DEPENDS or a mix of them...
|
* @param integer $iAllowedResults Expected "rights" for the action: either UR_ALLOWED_YES, UR_ALLOWED_NO, UR_ALLOWED_DEPENDS or a mix of them...
|
||||||
* @param string $sEnableStimulus
|
* @param string $sEnableStimulus
|
||||||
|
* @param bool $bIsLinkInNewWindow for the {@link WebPageMenuNode::IsHyperLinkInNewWindow} method
|
||||||
*/
|
*/
|
||||||
public function __construct($sMenuId, $sHyperlink, $iParentIndex, $fRank = 0.0, $sEnableClass = null, $iActionCode = null, $iAllowedResults = UR_ALLOWED_YES, $sEnableStimulus = null)
|
public function __construct(
|
||||||
|
$sMenuId, $sHyperlink, $iParentIndex, $fRank = 0.0, $sEnableClass = null, $iActionCode = null,
|
||||||
|
$iAllowedResults = UR_ALLOWED_YES, $sEnableStimulus = null, $bIsLinkInNewWindow = false
|
||||||
|
)
|
||||||
{
|
{
|
||||||
parent::__construct($sMenuId, $iParentIndex, $fRank, $sEnableClass, $iActionCode, $iAllowedResults, $sEnableStimulus);
|
parent::__construct($sMenuId, $iParentIndex, $fRank, $sEnableClass, $iActionCode, $iAllowedResults, $sEnableStimulus);
|
||||||
$this->sHyperlink = $sHyperlink;
|
$this->sHyperlink = $sHyperlink;
|
||||||
$this->aReflectionProperties['url'] = $sHyperlink;
|
$this->aReflectionProperties['url'] = $sHyperlink;
|
||||||
|
$this->bIsLinkInNewWindow = $bIsLinkInNewWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $aExtraParams
|
* @inheritDoc
|
||||||
* @return string
|
|
||||||
*/
|
*/
|
||||||
public function GetHyperlink($aExtraParams)
|
public function GetHyperlink($aExtraParams)
|
||||||
{
|
{
|
||||||
@@ -1011,8 +1041,15 @@ class WebPageMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param WebPage $oPage
|
* @inheritDoc
|
||||||
* @param array $aExtraParams
|
*/
|
||||||
|
public function IsHyperLinkInNewWindow()
|
||||||
|
{
|
||||||
|
return $this->bIsLinkInNewWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
@@ -1053,8 +1090,7 @@ class NewObjectMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string[] $aExtraParams
|
* @inheritDoc
|
||||||
* @return string
|
|
||||||
*/
|
*/
|
||||||
public function GetHyperlink($aExtraParams)
|
public function GetHyperlink($aExtraParams)
|
||||||
{
|
{
|
||||||
@@ -1088,8 +1124,7 @@ class NewObjectMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param WebPage $oPage
|
* @inheritDoc
|
||||||
* @param string[] $aExtraParams
|
|
||||||
*/
|
*/
|
||||||
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
@@ -1127,8 +1162,7 @@ class DashboardMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string[] $aExtraParams
|
* @inheritDoc
|
||||||
* @return string
|
|
||||||
*/
|
*/
|
||||||
public function GetHyperlink($aExtraParams)
|
public function GetHyperlink($aExtraParams)
|
||||||
{
|
{
|
||||||
@@ -1143,40 +1177,12 @@ class DashboardMenuNode extends MenuNode
|
|||||||
*/
|
*/
|
||||||
public function GetDashboard()
|
public function GetDashboard()
|
||||||
{
|
{
|
||||||
$sDashboardDefinition = @file_get_contents($this->sDashboardFile);
|
return RuntimeDashboard::GetDashboard($this->sDashboardFile, $this->sMenuId);
|
||||||
if ($sDashboardDefinition !== false)
|
|
||||||
{
|
|
||||||
$bCustomized = false;
|
|
||||||
|
|
||||||
// Search for an eventual user defined dashboard, overloading the existing one
|
|
||||||
$oUDSearch = new DBObjectSearch('UserDashboard');
|
|
||||||
$oUDSearch->AddCondition('user_id', UserRights::GetUserId(), '=');
|
|
||||||
$oUDSearch->AddCondition('menu_code', $this->sMenuId, '=');
|
|
||||||
$oUDSet = new DBObjectSet($oUDSearch);
|
|
||||||
if ($oUDSet->Count() > 0)
|
|
||||||
{
|
|
||||||
// Assuming there is at most one couple {user, menu}!
|
|
||||||
$oUserDashboard = $oUDSet->Fetch();
|
|
||||||
$sDashboardDefinition = $oUserDashboard->Get('contents');
|
|
||||||
$bCustomized = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
$oDashboard = new RuntimeDashboard($this->sMenuId);
|
|
||||||
$oDashboard->FromXml($sDashboardDefinition);
|
|
||||||
$oDashboard->SetCustomFlag($bCustomized);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$oDashboard = null;
|
|
||||||
}
|
|
||||||
return $oDashboard;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param WebPage $oPage
|
* @inheritDoc
|
||||||
* @param string[] $aExtraParams
|
* @throws \Exception
|
||||||
* @throws CoreException
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
*/
|
||||||
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
@@ -1184,40 +1190,12 @@ class DashboardMenuNode extends MenuNode
|
|||||||
$oDashboard = $this->GetDashboard();
|
$oDashboard = $this->GetDashboard();
|
||||||
if ($oDashboard != null)
|
if ($oDashboard != null)
|
||||||
{
|
{
|
||||||
$sDivId = preg_replace('/[^a-zA-Z0-9_]/', '', $this->sMenuId);
|
$sDivId = utils::Sanitize($this->sMenuId, '', 'element_identifier');
|
||||||
$oPage->add('<div class="dashboard_contents" id="'.$sDivId.'">');
|
$oPage->add('<div class="dashboard_contents" id="'.$sDivId.'">');
|
||||||
|
$aExtraParams['dashboard_div_id'] = $sDivId;
|
||||||
|
$oDashboard->SetReloadURL($this->GetHyperlink($aExtraParams));
|
||||||
$oDashboard->Render($oPage, false, $aExtraParams);
|
$oDashboard->Render($oPage, false, $aExtraParams);
|
||||||
$oPage->add('</div>');
|
$oPage->add('</div>');
|
||||||
$oDashboard->RenderEditionTools($oPage);
|
|
||||||
|
|
||||||
if ($oDashboard->GetAutoReload())
|
|
||||||
{
|
|
||||||
$sId = $this->sMenuId;
|
|
||||||
$sExtraParams = json_encode($aExtraParams);
|
|
||||||
$iReloadInterval = 1000 * $oDashboard->GetAutoReloadInterval();
|
|
||||||
$oPage->add_script(
|
|
||||||
<<<EOF
|
|
||||||
setInterval("ReloadDashboard('$sDivId');", $iReloadInterval);
|
|
||||||
|
|
||||||
function ReloadDashboard(sDivId)
|
|
||||||
{
|
|
||||||
var oExtraParams = $sExtraParams;
|
|
||||||
// Do not reload when a dialog box is active
|
|
||||||
if (!($('.ui-dialog:visible').length > 0))
|
|
||||||
{
|
|
||||||
$('.dashboard_contents#'+sDivId).block();
|
|
||||||
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php',
|
|
||||||
{ operation: 'reload_dashboard', dashboard_id: '$sId', extra_params: oExtraParams},
|
|
||||||
function(data){
|
|
||||||
$('.dashboard_contents#'+sDivId).html(data);
|
|
||||||
$('.dashboard_contents#'+sDivId).unblock();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$bEdit = utils::ReadParam('edit', false);
|
$bEdit = utils::ReadParam('edit', false);
|
||||||
if ($bEdit)
|
if ($bEdit)
|
||||||
@@ -1299,8 +1277,7 @@ EOF
|
|||||||
class ShortcutContainerMenuNode extends MenuNode
|
class ShortcutContainerMenuNode extends MenuNode
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param string[] $aExtraParams
|
* @inheritDoc
|
||||||
* @return string
|
|
||||||
*/
|
*/
|
||||||
public function GetHyperlink($aExtraParams)
|
public function GetHyperlink($aExtraParams)
|
||||||
{
|
{
|
||||||
@@ -1308,15 +1285,14 @@ class ShortcutContainerMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param WebPage $oPage
|
* @inheritDoc
|
||||||
* @param string[] $aExtraParams
|
|
||||||
* @return mixed|void
|
|
||||||
*/
|
*/
|
||||||
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @inheritDoc
|
||||||
* @throws CoreException
|
* @throws CoreException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@@ -1371,9 +1347,7 @@ class ShortcutMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string[] $aExtraParams
|
* @inheritDoc
|
||||||
* @return string
|
|
||||||
* @throws CoreException
|
|
||||||
*/
|
*/
|
||||||
public function GetHyperlink($aExtraParams)
|
public function GetHyperlink($aExtraParams)
|
||||||
{
|
{
|
||||||
@@ -1391,10 +1365,8 @@ class ShortcutMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param WebPage $oPage
|
* @inheritDoc
|
||||||
* @param string[] $aExtraParams
|
* @throws \Exception
|
||||||
* @return mixed|void
|
|
||||||
* @throws DictExceptionMissingString
|
|
||||||
*/
|
*/
|
||||||
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
@@ -1403,8 +1375,9 @@ class ShortcutMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @inheritDoc
|
||||||
* @throws CoreException
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function GetTitle()
|
public function GetTitle()
|
||||||
{
|
{
|
||||||
@@ -1412,8 +1385,9 @@ class ShortcutMenuNode extends MenuNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @inheritDoc
|
||||||
* @throws CoreException
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function GetLabel()
|
public function GetLabel()
|
||||||
{
|
{
|
||||||
|
|||||||
159
application/newsroomprovider.class.inc.php
Normal file
159
application/newsroomprovider.class.inc.php
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
<?php
|
||||||
|
// Copyright (C) 2010-2015 Combodo SARL
|
||||||
|
//
|
||||||
|
// This file is part of iTop.
|
||||||
|
//
|
||||||
|
// iTop is free software; you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// iTop is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A provider for messages to be displayed in the iTop Newsroom
|
||||||
|
*/
|
||||||
|
interface iNewsroomProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Inject the current configuration in the provider
|
||||||
|
* @param Config $oConfig
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function SetConfig(Config $oConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells if this provider is enabled for the given user
|
||||||
|
* @param User $oUser The user for who to check if the provider is applicable.
|
||||||
|
* return bool
|
||||||
|
*/
|
||||||
|
public function IsApplicable(User $oUser = null);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The human readable (localized) label for this provider
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function GetLabel();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The URL to query (from the browser, using jsonp) to fetch all unread messages
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function GetFetchURL();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The URL to navigate to in order to display all messages
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function GetViewAllURL();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The URL to query(from the browser, using jsonp) to mark all unread messages as read
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function GetMarkAllAsReadURL();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the URL to configure the preferences for this provider or null is there is nothing to configure
|
||||||
|
* @return string|null
|
||||||
|
*/
|
||||||
|
public function GetPreferencesUrl();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return an array key => value to be replaced in URL of the messages
|
||||||
|
* Example: '%itop_root%' => utils::GetAbsoluteUrlAppRoot();
|
||||||
|
* @return string[]
|
||||||
|
*/
|
||||||
|
public function GetPlaceholders();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The duration between to refreshes of the cache (in seconds)
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function GetTTL();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Basic implementation of a Newsroom provider, to be overloaded by your own provider implementation
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
abstract class NewsroomProviderBase implements iNewsroomProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The current configuration parameters
|
||||||
|
* @var Config
|
||||||
|
*/
|
||||||
|
protected $oConfig;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->oConfig = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see iNewsroomProvider::SetConfig()
|
||||||
|
*/
|
||||||
|
public function SetConfig(Config $oConfig)
|
||||||
|
{
|
||||||
|
$this->oConfig = $oConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see iNewsroomProvider::GetPreferencesUrl()
|
||||||
|
*/
|
||||||
|
public function GetPreferencesUrl()
|
||||||
|
{
|
||||||
|
return null; // No preferences
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see iNewsroomProvider::GetLabel()
|
||||||
|
*/
|
||||||
|
public abstract function GetLabel();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see iNewsroomProvider::GetFetchURL()
|
||||||
|
*/
|
||||||
|
public abstract function GetFetchURL();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see iNewsroomProvider::GetMarkAllURL()
|
||||||
|
*/
|
||||||
|
public abstract function GetMarkAllAsReadURL();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see iNewsroomProvider::GetViewAllURL()
|
||||||
|
*/
|
||||||
|
public abstract function GetViewAllURL();
|
||||||
|
|
||||||
|
public function IsApplicable(User $oUser = null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see iNewsroomProvider::GetPlaceholders()
|
||||||
|
*/
|
||||||
|
public function GetPlaceholders()
|
||||||
|
{
|
||||||
|
return array(); // By default, empty set of placeholders
|
||||||
|
}
|
||||||
|
|
||||||
|
public function GetTTL()
|
||||||
|
{
|
||||||
|
return 10*60; // Refresh every 10 minutes
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,27 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2016 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class NiceWebPage
|
* Copyright (C) 2013-2020 Combodo SARL
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2016 Combodo SARL
|
* This file is part of iTop.
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(APPROOT."/application/webpage.class.inc.php");
|
require_once(APPROOT."/application/webpage.class.inc.php");
|
||||||
@@ -37,16 +30,23 @@ class NiceWebPage extends WebPage
|
|||||||
{
|
{
|
||||||
parent::__construct($s_title, $bPrintable);
|
parent::__construct($s_title, $bPrintable);
|
||||||
$this->m_aReadyScripts = array();
|
$this->m_aReadyScripts = array();
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-1.12.4.min.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.min.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-migrate-1.4.1.min.js'); // Needed since many other plugins still rely on oldies like $.browser
|
if(utils::IsDevelopmentEnvironment()) // Needed since many other plugins still rely on oldies like $.browser
|
||||||
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/ui-lightness/jquery-ui-1.11.4.custom.css');
|
{
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-ui-1.11.4.custom.min.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-migrate.dev.js');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-migrate.prod.min.js');
|
||||||
|
}
|
||||||
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-ui-1.11.4.custom.min.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/utils.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/utils.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/hovertip.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/hovertip.js');
|
||||||
// table sorting
|
// table sorting
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablesorter.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablesorter.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablesorter.pager.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablesorter.pager.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablehover.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablehover.js');
|
||||||
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/table-selectable-lines.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/field_sorter.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/field_sorter.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/datatable.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/datatable.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.positionBy.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.positionBy.js');
|
||||||
@@ -61,11 +61,14 @@ class NiceWebPage extends WebPage
|
|||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_external_field.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_external_field.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_numeric.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_numeric.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_enum.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_enum.js');
|
||||||
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_tag_set.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_external_key.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_external_key.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_hierarchical_key.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_hierarchical_key.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date_abstract.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date_abstract.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date.js');
|
||||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date_time.js');
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date_time.js');
|
||||||
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/clipboard.min.js');
|
||||||
|
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/clipboardwidget.js');
|
||||||
|
|
||||||
$this->add_dict_entries('UI:Combo');
|
$this->add_dict_entries('UI:Combo');
|
||||||
|
|
||||||
@@ -113,7 +116,7 @@ class NiceWebPage extends WebPage
|
|||||||
$("table.listResults").tableHover(); // hover tables
|
$("table.listResults").tableHover(); // hover tables
|
||||||
EOF
|
EOF
|
||||||
);
|
);
|
||||||
$this->add_saas("css/light-grey.scss");
|
$this->LoadTheme();
|
||||||
|
|
||||||
$this->m_sRootUrl = $this->GetAbsoluteUrlAppRoot();
|
$this->m_sRootUrl = $this->GetAbsoluteUrlAppRoot();
|
||||||
$sAbsURLAppRoot = addslashes($this->m_sRootUrl);
|
$sAbsURLAppRoot = addslashes($this->m_sRootUrl);
|
||||||
@@ -223,7 +226,8 @@ EOF
|
|||||||
foreach($aChoices as $sKey => $sValue)
|
foreach($aChoices as $sKey => $sValue)
|
||||||
{
|
{
|
||||||
$sSelected = ($sKey == $sDefaultValue) ? " SELECTED" : "";
|
$sSelected = ($sKey == $sDefaultValue) ? " SELECTED" : "";
|
||||||
$this->add("<option style=\"width: ".$iWidthPx." px;\" value=\"".htmlspecialchars($sKey)."\"$sSelected>".htmlentities($sValue, ENT_QUOTES, 'UTF-8')."</option>");
|
$this->add("<option style=\"width: ".$iWidthPx." px;\" value=\"".htmlspecialchars($sKey)."\"$sSelected>".htmlentities($sValue,
|
||||||
|
ENT_QUOTES, self::PAGES_CHARSET)."</option>");
|
||||||
}
|
}
|
||||||
$this->add("</select>");
|
$this->add("</select>");
|
||||||
}
|
}
|
||||||
@@ -245,6 +249,14 @@ EOF
|
|||||||
}
|
}
|
||||||
parent::output();
|
parent::output();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
/**
|
||||||
|
* @throws \Exception
|
||||||
|
* @since 2.7.0
|
||||||
|
*/
|
||||||
|
protected function LoadTheme()
|
||||||
|
{
|
||||||
|
$sCssThemeUrl = ThemeHandler::GetCurrentThemeUrl();
|
||||||
|
$this->add_linked_stylesheet($sCssThemeUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,15 +1,53 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once(APPROOT.'lib/tcpdf/tcpdf.php');
|
/**
|
||||||
|
* Copyright (C) 2013-2019 Combodo SARL
|
||||||
|
*
|
||||||
|
* This file is part of iTop.
|
||||||
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once(APPROOT.'application/utils.inc.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom class derived from TCPDF for providing custom headers and footers
|
* Custom class derived from TCPDF for providing custom headers and footers
|
||||||
|
*
|
||||||
* @author denis
|
* @author denis
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class iTopPDF extends TCPDF
|
class iTopPDF extends TCPDF
|
||||||
{
|
{
|
||||||
protected $sDocumentTitle;
|
protected $sDocumentTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shortcut for {@link TCPDF::SetFont}, to use the font configured
|
||||||
|
*
|
||||||
|
* @param string $style
|
||||||
|
* @param int $size
|
||||||
|
* @param string $fontfile
|
||||||
|
* @param string $subset
|
||||||
|
* @param bool $out
|
||||||
|
*
|
||||||
|
* @uses \TCPDF::SetFont()
|
||||||
|
* @uses \iTopPDF::GetPdfFont()
|
||||||
|
* @since 2.7.0
|
||||||
|
*/
|
||||||
|
public function SetFontParams($style, $size, $fontfile='', $subset='default', $out=true)
|
||||||
|
{
|
||||||
|
$siTopFont = self::GetPdfFont();
|
||||||
|
$this->SetFont($siTopFont, $style, $size, $fontfile, $subset, $out);
|
||||||
|
}
|
||||||
|
|
||||||
public function SetDocumentTitle($sDocumentTitle)
|
public function SetDocumentTitle($sDocumentTitle)
|
||||||
{
|
{
|
||||||
$this->sDocumentTitle = $sDocumentTitle;
|
$this->sDocumentTitle = $sDocumentTitle;
|
||||||
@@ -17,26 +55,29 @@ class iTopPDF extends TCPDF
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the custom header. Called for each new page.
|
* Builds the custom header. Called for each new page.
|
||||||
|
*
|
||||||
* @see TCPDF::Header()
|
* @see TCPDF::Header()
|
||||||
*/
|
*/
|
||||||
public function Header()
|
public function Header()
|
||||||
{
|
{
|
||||||
// Title
|
// Title
|
||||||
// Set font
|
// Set font
|
||||||
$this->SetFont('dejavusans', 'B', 10);
|
$this->SetFontParams('B', 10);
|
||||||
|
|
||||||
$iPageNumberWidth = 25;
|
$iPageNumberWidth = 25;
|
||||||
$aMargins = $this->getMargins();
|
$aMargins = $this->getMargins();
|
||||||
|
|
||||||
// Display the title (centered)
|
// Display the title (centered)
|
||||||
$this->SetXY($aMargins['left'] + $iPageNumberWidth, 0);
|
$this->SetXY($aMargins['left'] + $iPageNumberWidth, 0);
|
||||||
$this->MultiCell($this->getPageWidth() - $aMargins['left'] - $aMargins['right'] - 2*$iPageNumberWidth, 15, $this->sDocumentTitle, 0, 'C', false, 0 /* $ln */, '', '', true, 0, false, true, 15, 'M' /* $valign */);
|
$this->MultiCell($this->getPageWidth() - $aMargins['left'] - $aMargins['right'] - 2 * $iPageNumberWidth, 15, $this->sDocumentTitle,
|
||||||
$this->SetFont('dejavusans', '', 10);
|
0, 'C', false, 0 /* $ln */, '', '', true, 0, false, true, 15, 'M' /* $valign */);
|
||||||
|
$this->SetFontParams('', 10);
|
||||||
|
|
||||||
// Display the page number (right aligned)
|
// Display the page number (right aligned)
|
||||||
// Warning: the 'R'ight alignment does not work when using placeholders like $this->getAliasNumPage() or $this->getAliasNbPages()
|
// Warning: the 'R'ight alignment does not work when using placeholders like $this->getAliasNumPage() or $this->getAliasNbPages()
|
||||||
$this->MultiCell($iPageNumberWidth, 15, 'Page '.$this->page, 0, 'R', false, 0 /* $ln */, '', '', true, 0, false, true, 15, 'M' /* $valign */);
|
$this->MultiCell($iPageNumberWidth, 15, Dict::Format('Core:BulkExport:PDF:PageNumber', $this->page), 0, 'R', false, 0 /* $ln */, '',
|
||||||
|
'', true, 0, false, true, 15, 'M' /* $valign */);
|
||||||
|
|
||||||
// Branding logo
|
// Branding logo
|
||||||
$sBrandingIcon = APPROOT.'images/itop-logo.png';
|
$sBrandingIcon = APPROOT.'images/itop-logo.png';
|
||||||
if (file_exists(MODULESROOT.'branding/main-logo.png'))
|
if (file_exists(MODULESROOT.'branding/main-logo.png'))
|
||||||
@@ -51,6 +92,18 @@ class iTopPDF extends TCPDF
|
|||||||
{
|
{
|
||||||
// No footer
|
// No footer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dejavusans is a UTF-8 Unicode font. Standard PDF fonts like helvetica or times new roman are NOT UTF-8
|
||||||
|
* @return string font in the config file (export_pdf_font)
|
||||||
|
*/
|
||||||
|
public static function GetPdfFont()
|
||||||
|
{
|
||||||
|
$oConfig = utils::GetConfig();
|
||||||
|
$sPdfFont = $oConfig->Get('export_pdf_font');
|
||||||
|
|
||||||
|
return $sPdfFont;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -58,49 +111,45 @@ class iTopPDF extends TCPDF
|
|||||||
*/
|
*/
|
||||||
class PDFPage extends WebPage
|
class PDFPage extends WebPage
|
||||||
{
|
{
|
||||||
/**
|
/** @var \iTopPDF Instance of the TCPDF object for creating the PDF */
|
||||||
* Instance of the TCPDF object for creating the PDF
|
|
||||||
* @var TCPDF
|
|
||||||
*/
|
|
||||||
protected $oPdf;
|
protected $oPdf;
|
||||||
|
|
||||||
public function __construct($s_title, $sPageFormat = 'A4', $sPageOrientation = 'L')
|
public function __construct($s_title, $sPageFormat = 'A4', $sPageOrientation = 'L')
|
||||||
{
|
{
|
||||||
parent::__construct($s_title);
|
parent::__construct($s_title);
|
||||||
define(K_PATH_FONTS, APPROOT.'lib/tcpdf/fonts');
|
define(K_PATH_FONTS, APPROOT.'lib/combodo/tcpdf/fonts');
|
||||||
$this->oPdf = new iTopPDF($sPageOrientation, 'mm', $sPageFormat, true, 'UTF-8', false);
|
$this->oPdf = new iTopPDF($sPageOrientation, 'mm', $sPageFormat, true, self::PAGES_CHARSET, false);
|
||||||
|
|
||||||
// set document information
|
// set document information
|
||||||
$this->oPdf->SetCreator(PDF_CREATOR);
|
$this->oPdf->SetCreator(PDF_CREATOR);
|
||||||
$this->oPdf->SetAuthor('iTop');
|
$this->oPdf->SetAuthor('iTop');
|
||||||
$this->oPdf->SetTitle($s_title);
|
$this->oPdf->SetTitle($s_title);
|
||||||
$this->oPdf->SetDocumentTitle($s_title);
|
$this->oPdf->SetDocumentTitle($s_title);
|
||||||
|
|
||||||
$this->oPdf->setFontSubsetting(true);
|
$this->oPdf->setFontSubsetting(true);
|
||||||
|
|
||||||
// Set font
|
|
||||||
// dejavusans is a UTF-8 Unicode font. Standard PDF fonts like helvetica or times new roman are NOT UTF-8
|
// dejavusans is a UTF-8 Unicode font. Standard PDF fonts like helvetica or times new roman are NOT UTF-8
|
||||||
$this->oPdf->SetFont('dejavusans', '', 10, '', true);
|
$this->oPdf->SetFontParams('', 10, '', true);
|
||||||
|
|
||||||
// set auto page breaks
|
// set auto page breaks
|
||||||
$this->oPdf->SetAutoPageBreak(true, 15); // 15 mm break margin at the bottom
|
$this->oPdf->SetAutoPageBreak(true, 15); // 15 mm break margin at the bottom
|
||||||
$this->oPdf->SetTopMargin(15);
|
$this->oPdf->SetTopMargin(15);
|
||||||
|
|
||||||
// Add a page, we're ready to start
|
// Add a page, we're ready to start
|
||||||
$this->oPdf->AddPage();
|
$this->oPdf->AddPage();
|
||||||
|
|
||||||
$this->SetContentDisposition('inline', $s_title.'.pdf');
|
$this->SetContentDisposition('inline', $s_title.'.pdf');
|
||||||
$this->SetDefaultStyle();
|
$this->SetDefaultStyle();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a default style (suitable for printing) to be included each time $this->oPdf->writeHTML() is called
|
* Sets a default style (suitable for printing) to be included each time $this->oPdf->writeHTML() is called
|
||||||
*/
|
*/
|
||||||
protected function SetDefaultStyle()
|
protected function SetDefaultStyle()
|
||||||
{
|
{
|
||||||
$this->add_style(
|
$this->add_style(
|
||||||
<<<EOF
|
<<<EOF
|
||||||
table {
|
table {
|
||||||
padding: 2pt;
|
padding: 2pt;
|
||||||
}
|
}
|
||||||
@@ -124,19 +173,21 @@ td.icon {
|
|||||||
width: 30px;
|
width: 30px;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get access to the underlying TCPDF object
|
* Get access to the underlying TCPDF object
|
||||||
* @return TCPDF
|
*
|
||||||
|
* @return \iTopPDF
|
||||||
*/
|
*/
|
||||||
public function get_tcpdf()
|
public function get_tcpdf()
|
||||||
{
|
{
|
||||||
$this->flush();
|
$this->flush();
|
||||||
|
|
||||||
return $this->oPdf;
|
return $this->oPdf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the currently buffered HTML content into the PDF. This can be useful:
|
* Writes the currently buffered HTML content into the PDF. This can be useful:
|
||||||
* - to sync the flow in case you want to access the underlying TCPDF object for some specific/graphic output
|
* - to sync the flow in case you want to access the underlying TCPDF object for some specific/graphic output
|
||||||
@@ -156,39 +207,42 @@ EOF
|
|||||||
$this->s_content = '';
|
$this->s_content = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the page is a PDF page
|
* Whether or not the page is a PDF page
|
||||||
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function is_pdf()
|
public function is_pdf()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates the PDF document and returns the PDF content as a string
|
* Generates the PDF document and returns the PDF content as a string
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
* @see WebPage::output()
|
* @see WebPage::output()
|
||||||
*/
|
*/
|
||||||
public function output()
|
public function output()
|
||||||
{
|
{
|
||||||
$this->add_header('Content-type: application/x-pdf');
|
$this->add_header('Content-type: application/x-pdf');
|
||||||
if (!empty($this->sContentDisposition))
|
if (!empty($this->sContentDisposition))
|
||||||
{
|
{
|
||||||
$this->add_header('Content-Disposition: '.$this->sContentDisposition.'; filename="'.$this->sContentFileName.'"');
|
$this->add_header('Content-Disposition: '.$this->sContentDisposition.'; filename="'.$this->sContentFileName.'"');
|
||||||
}
|
}
|
||||||
foreach($this->a_headers as $s_header)
|
foreach ($this->a_headers as $s_header)
|
||||||
{
|
{
|
||||||
header($s_header);
|
header($s_header);
|
||||||
}
|
}
|
||||||
$this->flush();
|
$this->flush();
|
||||||
echo $this->oPdf->Output($this->s_title.'.pdf', 'S');
|
echo $this->oPdf->Output($this->s_title.'.pdf', 'S');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_pdf()
|
public function get_pdf()
|
||||||
{
|
{
|
||||||
$this->flush();
|
$this->flush();
|
||||||
|
|
||||||
return $this->oPdf->Output($this->s_title.'.pdf', 'S');
|
return $this->oPdf->Output($this->s_title.'.pdf', 'S');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -47,13 +47,12 @@ abstract class Query extends cmdbAbstractObject
|
|||||||
MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values"=>null, "sql"=>"name", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values"=>null, "sql"=>"name", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
|
||||||
MetaModel::Init_AddAttribute(new AttributeText("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeText("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
|
||||||
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeText("fields", array("allowed_values"=>null, "sql"=>"fields", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array())));
|
|
||||||
|
|
||||||
// Display lists
|
// Display lists
|
||||||
MetaModel::Init_SetZListItems('details', array('name', 'description', 'fields')); // Attributes to be displayed for the complete details
|
MetaModel::Init_SetZListItems('details', array('name', 'description')); // Attributes to be displayed for the complete details
|
||||||
MetaModel::Init_SetZListItems('list', array('description')); // Attributes to be displayed for a list
|
MetaModel::Init_SetZListItems('list', array('description')); // Attributes to be displayed for a list
|
||||||
// Search criteria
|
// Search criteria
|
||||||
MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'fields')); // Criteria of the std search form
|
MetaModel::Init_SetZListItems('standard_search', array('name', 'description')); // Criteria of the std search form
|
||||||
MetaModel::Init_SetZListItems('default_search', array('name', 'description')); // Criteria of the default search form
|
MetaModel::Init_SetZListItems('default_search', array('name', 'description')); // Criteria of the default search form
|
||||||
// MetaModel::Init_SetZListItems('advanced_search', array('name')); // Criteria of the advanced search form
|
// MetaModel::Init_SetZListItems('advanced_search', array('name')); // Criteria of the advanced search form
|
||||||
}
|
}
|
||||||
@@ -78,6 +77,9 @@ class QueryOQL extends Query
|
|||||||
MetaModel::Init_Params($aParams);
|
MetaModel::Init_Params($aParams);
|
||||||
MetaModel::Init_InheritAttributes();
|
MetaModel::Init_InheritAttributes();
|
||||||
MetaModel::Init_AddAttribute(new AttributeOQL("oql", array("allowed_values"=>null, "sql"=>"oql", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeOQL("oql", array("allowed_values"=>null, "sql"=>"oql", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
|
||||||
|
MetaModel::Init_AddAttribute(new AttributeText("fields", array("allowed_values"=>null, "sql"=>"fields", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array())));
|
||||||
|
// Rolled back to AttributeText until AttributeQueryAttCodeSet can manage fields order correctly
|
||||||
|
//MetaModel::Init_AddAttribute(new AttributeQueryAttCodeSet("fields", array("allowed_values"=>null,"max_items" => 1000, "query_field" => "oql", "sql"=>"fields", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array('oql'))));
|
||||||
|
|
||||||
// Display lists
|
// Display lists
|
||||||
MetaModel::Init_SetZListItems('details', array('name', 'description', 'oql', 'fields')); // Attributes to be displayed for the complete details
|
MetaModel::Init_SetZListItems('details', array('name', 'description', 'oql', 'fields')); // Attributes to be displayed for the complete details
|
||||||
@@ -136,6 +138,41 @@ class QueryOQL extends Query
|
|||||||
}
|
}
|
||||||
return $aFieldsMap;
|
return $aFieldsMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rolled back until 'fields' can be properly managed by AttributeQueryAttCodeSet
|
||||||
|
//
|
||||||
|
// public function ComputeValues()
|
||||||
|
// {
|
||||||
|
// parent::ComputeValues();
|
||||||
|
//
|
||||||
|
// // Remove unwanted attribute codes
|
||||||
|
// $aChanges = $this->ListChanges();
|
||||||
|
// if (isset($aChanges['fields']))
|
||||||
|
// {
|
||||||
|
// $oAttDef = MetaModel::GetAttributeDef(get_class($this), 'fields');
|
||||||
|
// $aArgs = array('this' => $this);
|
||||||
|
// $aAllowedValues = $oAttDef->GetAllowedValues($aArgs);
|
||||||
|
//
|
||||||
|
// /** @var \ormSet $oValue */
|
||||||
|
// $oValue = $this->Get('fields');
|
||||||
|
// $aValues = $oValue->GetValues();
|
||||||
|
// $bChanged = false;
|
||||||
|
// foreach($aValues as $key => $sValue)
|
||||||
|
// {
|
||||||
|
// if (!isset($aAllowedValues[$sValue]))
|
||||||
|
// {
|
||||||
|
// unset($aValues[$key]);
|
||||||
|
// $bChanged = true;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if ($bChanged)
|
||||||
|
// {
|
||||||
|
// $oValue->SetValues($aValues);
|
||||||
|
// $this->Set('fields', $oValue);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
// iTop is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
@@ -15,18 +15,44 @@
|
|||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
require_once(APPROOT.'/core/cmdbobject.class.inc.php');
|
||||||
|
require_once(APPROOT.'/application/utils.inc.php');
|
||||||
|
require_once(APPROOT.'/core/contexttag.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-2016 Combodo SARL
|
* @copyright Copyright (C) 2010-2019 Combodo SARL
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(APPROOT.'/core/cmdbobject.class.inc.php');
|
// This storage is freed on error (case of allowed memory exhausted)
|
||||||
require_once(APPROOT.'/application/utils.inc.php');
|
$sReservedMemory = str_repeat('*', 1024 * 1024);
|
||||||
require_once(APPROOT.'/core/contexttag.class.inc.php');
|
register_shutdown_function(function()
|
||||||
|
{
|
||||||
|
global $sReservedMemory;
|
||||||
|
$sReservedMemory = null;
|
||||||
|
if (!is_null($err = error_get_last()) && ($err['type'] == E_ERROR))
|
||||||
|
{
|
||||||
|
IssueLog::error($err['message']);
|
||||||
|
if (strpos($err['message'], 'Allowed memory size of') !== false)
|
||||||
|
{
|
||||||
|
$sLimit = ini_get('memory_limit');
|
||||||
|
echo "<p>iTop: Allowed memory size of $sLimit exhausted, contact your administrator to increase 'memory_limit' in php.ini</p>\n";
|
||||||
|
}
|
||||||
|
elseif (strpos($err['message'], 'Maximum execution time') !== false)
|
||||||
|
{
|
||||||
|
$sLimit = ini_get('max_execution_time');
|
||||||
|
echo "<p>iTop: Maximum execution time of $sLimit exceeded, contact your administrator to increase 'max_execution_time' in php.ini</p>\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "<p>iTop: An error occurred, check server error log for more information.</p>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
session_name('itop-'.md5(APPROOT));
|
session_name('itop-'.md5(APPROOT));
|
||||||
session_start();
|
session_start();
|
||||||
$sSwitchEnv = utils::ReadParam('switch_env', null);
|
$sSwitchEnv = utils::ReadParam('switch_env', null);
|
||||||
@@ -59,4 +85,4 @@ else
|
|||||||
$_SESSION['itop_env'] = ITOP_DEFAULT_ENV;
|
$_SESSION['itop_env'] = ITOP_DEFAULT_ENV;
|
||||||
}
|
}
|
||||||
$sConfigFile = APPCONF.$sEnv.'/'.ITOP_CONFIG_FILE;
|
$sConfigFile = APPCONF.$sEnv.'/'.ITOP_CONFIG_FILE;
|
||||||
MetaModel::Startup($sConfigFile, false /* $bModelOnly */, $bAllowCache, false /* $bTraceSourceFiles */, $sEnv);
|
MetaModel::Startup($sConfigFile, false /* $bModelOnly */, $bAllowCache, false /* $bTraceSourceFiles */, $sEnv);
|
||||||
|
|||||||
@@ -1,27 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2017 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class DisplayTemplate
|
* Copyright (C) 2013-2020 Combodo SARL
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2017 Combodo SARL
|
* This file is part of iTop.
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(APPROOT.'/application/displayblock.class.inc.php');
|
require_once(APPROOT.'/application/displayblock.class.inc.php');
|
||||||
@@ -191,7 +184,7 @@ class DisplayTemplate
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'itoptab':
|
case 'itoptab':
|
||||||
$oPage->SetCurrentTab(Dict::S(str_replace('_', ' ', $aAttributes['name'])));
|
$oPage->SetCurrentTab($aAttributes['name'], str_replace('_', ' ', $aAttributes['name']));
|
||||||
$oTemplate = new DisplayTemplate($sContent);
|
$oTemplate = new DisplayTemplate($sContent);
|
||||||
$oTemplate->Render($oPage, array()); // no params to apply, they have already been applied
|
$oTemplate->Render($oPage, array()); // no params to apply, they have already been applied
|
||||||
//$oPage->p('iTop Tab Content:<pre>'.htmlentities($sContent, ENT_QUOTES, 'UTF-8').'</pre>');
|
//$oPage->p('iTop Tab Content:<pre>'.htmlentities($sContent, ENT_QUOTES, 'UTF-8').'</pre>');
|
||||||
@@ -399,6 +392,7 @@ class ObjectDetailsTemplate extends DisplayTemplate
|
|||||||
$aPlugInProperties = $aMatches[1];
|
$aPlugInProperties = $aMatches[1];
|
||||||
foreach($aPlugInProperties as $sPlugInClass)
|
foreach($aPlugInProperties as $sPlugInClass)
|
||||||
{
|
{
|
||||||
|
/** @var \iApplicationUIExtension $oInstance */
|
||||||
$oInstance = MetaModel::GetPlugins('iApplicationUIExtension', $sPlugInClass);
|
$oInstance = MetaModel::GetPlugins('iApplicationUIExtension', $sPlugInClass);
|
||||||
if ($oInstance != null) // Safety check...
|
if ($oInstance != null) // Safety check...
|
||||||
{
|
{
|
||||||
|
|||||||
190
application/themehandler.class.inc.php
Normal file
190
application/themehandler.class.inc.php
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2013-2020 Combodo SARL
|
||||||
|
*
|
||||||
|
* This file is part of iTop.
|
||||||
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ThemeHandler
|
||||||
|
*
|
||||||
|
* @author Stephen Abello <stephen.abello@combodo.com>
|
||||||
|
* @since 2.7.0
|
||||||
|
*/
|
||||||
|
class ThemeHandler
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Return default theme name and parameters
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
* @since 2.7.0
|
||||||
|
*/
|
||||||
|
public static function GetDefaultThemeInformation()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'name' => 'light-grey',
|
||||||
|
'parameters' => array(
|
||||||
|
'variables' => array(),
|
||||||
|
'imports' => array(
|
||||||
|
'css-variables' => '../css/css-variables.scss',
|
||||||
|
),
|
||||||
|
'stylesheets' => array(
|
||||||
|
'jqueryui' => '../css/ui-lightness/jqueryui.scss',
|
||||||
|
'main' => '../css/light-grey.scss',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the ID of the theme currently defined in the config. file
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function GetCurrentThemeId()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$sThemeId = MetaModel::GetConfig()->Get('backoffice_default_theme');
|
||||||
|
}
|
||||||
|
catch(CoreException $oCompileException)
|
||||||
|
{
|
||||||
|
// Fallback on our default theme in case the config. is not available yet
|
||||||
|
$aDefaultTheme = ThemeHandler::GetDefaultThemeInformation();
|
||||||
|
$sThemeId = $aDefaultTheme['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sThemeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the absolute path of the compiled theme folder.
|
||||||
|
*
|
||||||
|
* @param string $sThemeId
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function GetCompiledThemeFolderAbsolutePath($sThemeId)
|
||||||
|
{
|
||||||
|
return APPROOT.'env-'.utils::GetCurrentEnvironment().'/branding/themes/'.$sThemeId.'/';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the absolute URL for the current theme CSS file
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public static function GetCurrentThemeUrl()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Try to compile theme defined in the configuration
|
||||||
|
$sThemeId = static::GetCurrentThemeId();
|
||||||
|
static::CompileTheme($sThemeId);
|
||||||
|
}
|
||||||
|
catch(CoreException $oCompileException)
|
||||||
|
{
|
||||||
|
// Fallback on our default theme (should always be compilable) in case the previous theme doesn't exists
|
||||||
|
$aDefaultTheme = ThemeHandler::GetDefaultThemeInformation();
|
||||||
|
$sThemeId = $aDefaultTheme['name'];
|
||||||
|
$sDefaultThemeDirPath = static::GetCompiledThemeFolderAbsolutePath($sThemeId);
|
||||||
|
|
||||||
|
// Create our theme dir if it doesn't exist (XML theme node removed, renamed etc..)
|
||||||
|
if(!is_dir($sDefaultThemeDirPath))
|
||||||
|
{
|
||||||
|
SetupUtils::builddir($sDefaultThemeDirPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
static::CompileTheme($sThemeId, $aDefaultTheme['parameters']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return absolute url to theme compiled css
|
||||||
|
return utils::GetAbsoluteUrlModulesRoot().'/branding/themes/'.$sThemeId.'/main.css';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compile the $sThemeId theme
|
||||||
|
*
|
||||||
|
* @param string $sThemeId
|
||||||
|
* @param array|null $aThemeParameters Parameters (variables, imports, stylesheets) for the theme, if not passed, will be retrieved from compiled DM
|
||||||
|
* @param array|null $aImportsPaths Paths where imports can be found. Must end with '/'
|
||||||
|
* @param string|null $sWorkingPath Path of the folder used during compilation. Must end with a '/'
|
||||||
|
*
|
||||||
|
* @throws \CoreException
|
||||||
|
*/
|
||||||
|
public static function CompileTheme($sThemeId, $aThemeParameters = null, $aImportsPaths = null, $sWorkingPath = null)
|
||||||
|
{
|
||||||
|
// Default working path
|
||||||
|
if($sWorkingPath === null)
|
||||||
|
{
|
||||||
|
$sWorkingPath = APPROOT.'env-'.utils::GetCurrentEnvironment().'/';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default import paths (env-*)
|
||||||
|
if($aImportsPaths === null)
|
||||||
|
{
|
||||||
|
$aImportsPaths = array(
|
||||||
|
APPROOT.'env-'.utils::GetCurrentEnvironment().'/',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: We do NOT check that the folder exists!
|
||||||
|
$sThemeFolderPath = $sWorkingPath.'/branding/themes/'.$sThemeId.'/';
|
||||||
|
$sThemeCssPath = $sThemeFolderPath.'main.css';
|
||||||
|
|
||||||
|
// Save parameters if passed... (typically during DM compilation)
|
||||||
|
if(is_array($aThemeParameters))
|
||||||
|
{
|
||||||
|
file_put_contents($sThemeFolderPath.'/theme-parameters.json', json_encode($aThemeParameters));
|
||||||
|
}
|
||||||
|
// ... Otherwise, retrieve them from compiled DM (typically when switching current theme in the config. file)
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$aThemeParameters = json_decode(@file_get_contents($sThemeFolderPath.'theme-parameters.json'), true);
|
||||||
|
if ($aThemeParameters === null)
|
||||||
|
{
|
||||||
|
throw new CoreException('Could not load "'.$sThemeId.'" theme parameters from file, check that it has been compiled correctly');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$sTmpThemeScssContent = '';
|
||||||
|
$iStyleLastModified = 0;
|
||||||
|
clearstatcache();
|
||||||
|
// Loading files to import and stylesheet to compile, also getting most recent modification time on overall files
|
||||||
|
foreach ($aThemeParameters['imports'] as $sImport)
|
||||||
|
{
|
||||||
|
$sTmpThemeScssContent .= '@import "'.$sImport.'";'."\n";
|
||||||
|
|
||||||
|
$iImportLastModified = @filemtime($sWorkingPath.$sImport);
|
||||||
|
$iStyleLastModified = $iStyleLastModified < $iImportLastModified ? $iImportLastModified : $iStyleLastModified;
|
||||||
|
}
|
||||||
|
foreach ($aThemeParameters['stylesheets'] as $sStylesheet)
|
||||||
|
{
|
||||||
|
$sTmpThemeScssContent .= '@import "'.$sStylesheet.'";'."\n";
|
||||||
|
|
||||||
|
$iStylesheetLastModified = @filemtime($sWorkingPath.$sStylesheet);
|
||||||
|
$iStyleLastModified = $iStyleLastModified < $iStylesheetLastModified ? $iStylesheetLastModified : $iStyleLastModified;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Checking if our compiled css is outdated
|
||||||
|
if (!file_exists($sThemeCssPath) || (is_writable($sThemeFolderPath) && (@filemtime($sThemeCssPath) < $iStyleLastModified)))
|
||||||
|
{
|
||||||
|
$sTmpThemeCssContent = utils::CompileCSSFromSASS($sTmpThemeScssContent, $aImportsPaths, $aThemeParameters['variables']);
|
||||||
|
file_put_contents($sThemeCssPath, $sTmpThemeCssContent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ class privUITransactionSession
|
|||||||
// Strictly speaking, the two lines below should be grouped together
|
// Strictly speaking, the two lines below should be grouped together
|
||||||
// by a critical section
|
// by a critical section
|
||||||
// sem_acquire($rSemIdentified);
|
// sem_acquire($rSemIdentified);
|
||||||
$id = str_replace(array('.', ' '), '', microtime()); //1 + count($_SESSION['transactions']);
|
$id = static::GetUserPrefix() . str_replace(array('.', ' '), '', microtime()); //1 + count($_SESSION['transactions']);
|
||||||
$_SESSION['transactions'][$id] = true;
|
$_SESSION['transactions'][$id] = true;
|
||||||
// sem_release($rSemIdentified);
|
// sem_release($rSemIdentified);
|
||||||
|
|
||||||
@@ -174,6 +174,17 @@ class privUITransactionSession
|
|||||||
// sem_release($rSemIdentified);
|
// sem_release($rSemIdentified);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a string to prefix transaction ID with info from the current user.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected static function GetUserPrefix()
|
||||||
|
{
|
||||||
|
$sPrefix = 'u'.UserRights::GetUserId();
|
||||||
|
return $sPrefix.'-';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -184,9 +195,8 @@ class privUITransactionSession
|
|||||||
class privUITransactionFile
|
class privUITransactionFile
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Create a new transaction id, store it in the session and return its id
|
* @return int The new transaction identifier
|
||||||
* @param void
|
* @throws \Exception
|
||||||
* @return int The identifier of the new transaction
|
|
||||||
*/
|
*/
|
||||||
public static function GetNewTransactionId()
|
public static function GetNewTransactionId()
|
||||||
{
|
{
|
||||||
@@ -196,7 +206,9 @@ class privUITransactionFile
|
|||||||
{
|
{
|
||||||
throw new Exception('The directory "'.APPROOT.'data" must be writable to the application.');
|
throw new Exception('The directory "'.APPROOT.'data" must be writable to the application.');
|
||||||
}
|
}
|
||||||
if (!@mkdir(APPROOT.'data/transactions'))
|
// condition avoids race condition N°2345
|
||||||
|
// See https://github.com/kalessil/phpinspectionsea/blob/master/docs/probable-bugs.md#mkdir-race-condition
|
||||||
|
if (!mkdir($concurrentDirectory = APPROOT.'data/transactions') && !is_dir($concurrentDirectory))
|
||||||
{
|
{
|
||||||
throw new Exception('Failed to create the directory "'.APPROOT.'data/transactions". Ajust the rights on the parent directory or let an administrator create the transactions directory and give the web sever enough rights to write into it.');
|
throw new Exception('Failed to create the directory "'.APPROOT.'data/transactions". Ajust the rights on the parent directory or let an administrator create the transactions directory and give the web sever enough rights to write into it.');
|
||||||
}
|
}
|
||||||
@@ -206,7 +218,7 @@ class privUITransactionFile
|
|||||||
throw new Exception('The directory "'.APPROOT.'data/transactions" must be writable to the application.');
|
throw new Exception('The directory "'.APPROOT.'data/transactions" must be writable to the application.');
|
||||||
}
|
}
|
||||||
self::CleanupOldTransactions();
|
self::CleanupOldTransactions();
|
||||||
$id = basename(tempnam(APPROOT.'data/transactions', self::GetUserPrefix()));
|
$id = basename(tempnam(APPROOT.'data/transactions', static::GetUserPrefix()));
|
||||||
self::Info('GetNewTransactionId: Created transaction: '.$id);
|
self::Info('GetNewTransactionId: Created transaction: '.$id);
|
||||||
|
|
||||||
return (string)$id;
|
return (string)$id;
|
||||||
@@ -310,6 +322,11 @@ class privUITransactionFile
|
|||||||
return $aResult;
|
return $aResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a prefix based on the user login instead of its ID for a better usage in tempnam()
|
||||||
|
*
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
protected static function GetUserPrefix()
|
protected static function GetUserPrefix()
|
||||||
{
|
{
|
||||||
$sPrefix = substr(UserRights::GetUser(), 0, 10);
|
$sPrefix = substr(UserRights::GetUser(), 0, 10);
|
||||||
|
|||||||
140
application/twigextension.class.inc.php
Normal file
140
application/twigextension.class.inc.php
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Combodo\iTop;
|
||||||
|
|
||||||
|
use AttributeDateTime;
|
||||||
|
use Dict;
|
||||||
|
use Exception;
|
||||||
|
use MetaModel;
|
||||||
|
use Twig_Environment;
|
||||||
|
use Twig_SimpleFilter;
|
||||||
|
use Twig_SimpleFunction;
|
||||||
|
use utils;
|
||||||
|
|
||||||
|
class TwigExtension
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Registers Twig extensions such as filters or functions.
|
||||||
|
* It allows us to access some stuff directly in twig.
|
||||||
|
*
|
||||||
|
* @param \Twig_Environment $oTwigEnv
|
||||||
|
*/
|
||||||
|
public static function RegisterTwigExtensions(Twig_Environment &$oTwigEnv)
|
||||||
|
{
|
||||||
|
// Filter to translate a string via the Dict::S function
|
||||||
|
// Usage in twig: {{ 'String:ToTranslate'|dict_s }}
|
||||||
|
$oTwigEnv->addFilter(new Twig_SimpleFilter('dict_s',
|
||||||
|
function ($sStringCode, $sDefault = null, $bUserLanguageOnly = false) {
|
||||||
|
return Dict::S($sStringCode, $sDefault, $bUserLanguageOnly);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
// Filter to format a string via the Dict::Format function
|
||||||
|
// Usage in twig: {{ 'String:ToTranslate'|dict_format() }}
|
||||||
|
$oTwigEnv->addFilter(new Twig_SimpleFilter('dict_format',
|
||||||
|
function ($sStringCode, $sParam01 = null, $sParam02 = null, $sParam03 = null, $sParam04 = null) {
|
||||||
|
return Dict::Format($sStringCode, $sParam01, $sParam02, $sParam03, $sParam04);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
// Filter to format output
|
||||||
|
// example a DateTime is converted to user format
|
||||||
|
// Usage in twig: {{ 'String:ToFormat'|output_format }}
|
||||||
|
$oTwigEnv->addFilter(new Twig_SimpleFilter('date_format',
|
||||||
|
function ($sDate) {
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (preg_match('@^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d$@', trim($sDate)))
|
||||||
|
{
|
||||||
|
return AttributeDateTime::GetFormat()->Format($sDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception $e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
return $sDate;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Filter to format output
|
||||||
|
// example a DateTime is converted to user format
|
||||||
|
// Usage in twig: {{ 'String:ToFormat'|output_format }}
|
||||||
|
$oTwigEnv->addFilter(new Twig_SimpleFilter('size_format',
|
||||||
|
function ($sSize) {
|
||||||
|
return utils::BytesToFriendlyFormat($sSize);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
// Filter to enable base64 encode/decode
|
||||||
|
// Usage in twig: {{ 'String to encode'|base64_encode }}
|
||||||
|
$oTwigEnv->addFilter(new Twig_SimpleFilter('base64_encode', 'base64_encode'));
|
||||||
|
$oTwigEnv->addFilter(new Twig_SimpleFilter('base64_decode', 'base64_decode'));
|
||||||
|
|
||||||
|
// Filter to enable json decode (encode already exists)
|
||||||
|
// Usage in twig: {{ aSomeArray|json_decode }}
|
||||||
|
$oTwigEnv->addFilter(new Twig_SimpleFilter('json_decode', function ($sJsonString, $bAssoc = false) {
|
||||||
|
return json_decode($sJsonString, $bAssoc);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
// Filter to add itopversion to an url
|
||||||
|
$oTwigEnv->addFilter(new Twig_SimpleFilter('add_itop_version', function ($sUrl) {
|
||||||
|
if (strpos($sUrl, '?') === false)
|
||||||
|
{
|
||||||
|
$sUrl = $sUrl."?itopversion=".ITOP_VERSION;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sUrl = $sUrl."&itopversion=".ITOP_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sUrl;
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Filter to add a module's version to an url
|
||||||
|
$oTwigEnv->addFilter(new Twig_SimpleFilter('add_module_version', function ($sUrl, $sModuleName) {
|
||||||
|
$sModuleVersion = utils::GetCompiledModuleVersion($sModuleName);
|
||||||
|
|
||||||
|
if (strpos($sUrl, '?') === false)
|
||||||
|
{
|
||||||
|
$sUrl = $sUrl."?moduleversion=".$sModuleVersion;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sUrl = $sUrl."&moduleversion=".$sModuleVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sUrl;
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Function to check our current environment
|
||||||
|
// Usage in twig: {% if is_development_environment() %}
|
||||||
|
$oTwigEnv->addFunction(new Twig_SimpleFunction('is_development_environment', function()
|
||||||
|
{
|
||||||
|
return utils::IsDevelopmentEnvironment();
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Function to get configuration parameter
|
||||||
|
// Usage in twig: {{ get_config_parameter('foo') }}
|
||||||
|
$oTwigEnv->addFunction(new Twig_SimpleFunction('get_config_parameter', function($sParamName)
|
||||||
|
{
|
||||||
|
$oConfig = MetaModel::GetConfig();
|
||||||
|
return $oConfig->Get($sParamName);
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Function to get the URL of a static page in a module
|
||||||
|
// Usage in twig: {{ get_static_page_module_url('itop-my-module', 'path-to-my-page') }}
|
||||||
|
$oTwigEnv->addFunction(new Twig_SimpleFunction('get_static_page_module_url', function($sModuleName, $sPage)
|
||||||
|
{
|
||||||
|
return utils::GetAbsoluteUrlModulesRoot().$sModuleName.'/'.$sPage;
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Function to get the URL of a php page in a module
|
||||||
|
// Usage in twig: {{ get_page_module_url('itop-my-module', 'path-to-my-my-page.php') }}
|
||||||
|
$oTwigEnv->addFunction(new Twig_SimpleFunction('get_page_module_url', function($sModuleName, $sPage)
|
||||||
|
{
|
||||||
|
return utils::GetAbsoluteUrlModulePage($sModuleName, $sPage);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,23 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2017 Combodo SARL
|
/**
|
||||||
//
|
* Copyright (C) 2013-2020 Combodo SARL
|
||||||
// This file is part of iTop.
|
*
|
||||||
//
|
* This file is part of iTop.
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
*
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
// (at your option) any later version.
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
//
|
* (at your option) any later version.
|
||||||
// iTop is distributed in the hope that it will be useful,
|
*
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* iTop is distributed in the hope that it will be useful,
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// GNU Affero General Public License for more details.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
//
|
* GNU Affero General Public License for more details.
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
*
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once(APPROOT.'/application/webpage.class.inc.php');
|
||||||
|
require_once(APPROOT.'/application/displayblock.class.inc.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class UIExtKeyWidget
|
* Class UIExtKeyWidget
|
||||||
* UI wdiget for displaying and editing external keys when
|
* UI widget for displaying and editing external keys when
|
||||||
* A simple drop-down list is not enough...
|
* A simple drop-down list is not enough...
|
||||||
*
|
*
|
||||||
* The layout is the following
|
* The layout is the following
|
||||||
@@ -54,13 +59,7 @@
|
|||||||
* | | +--------+ +-----+ | |
|
* | | +--------+ +-----+ | |
|
||||||
* | +--------------------------------------------+ |
|
* | +--------------------------------------------+ |
|
||||||
* +------------------------------------------------+
|
* +------------------------------------------------+
|
||||||
* @copyright Copyright (C) 2010-2017 Combodo SARL
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(APPROOT.'/application/webpage.class.inc.php');
|
|
||||||
require_once(APPROOT.'/application/displayblock.class.inc.php');
|
|
||||||
|
|
||||||
class UIExtKeyWidget
|
class UIExtKeyWidget
|
||||||
{
|
{
|
||||||
const ENUM_OUTPUT_FORMAT_CSV = 'csv';
|
const ENUM_OUTPUT_FORMAT_CSV = 'csv';
|
||||||
@@ -208,6 +207,14 @@ class UIExtKeyWidget
|
|||||||
{
|
{
|
||||||
// When there is only once choice, select it by default
|
// When there is only once choice, select it by default
|
||||||
$sSelected = 'selected';
|
$sSelected = 'selected';
|
||||||
|
if($value != $key)
|
||||||
|
{
|
||||||
|
$oPage->add_ready_script(
|
||||||
|
<<<EOF
|
||||||
|
$('#$this->iId').attr('data-validate','dependencies');
|
||||||
|
EOF
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -265,8 +272,8 @@ EOF
|
|||||||
$iMinChars = isset($aArgs['iMinChars']) ? $aArgs['iMinChars'] : 3; //@@@ $this->oAttDef->GetMinAutoCompleteChars();
|
$iMinChars = isset($aArgs['iMinChars']) ? $aArgs['iMinChars'] : 3; //@@@ $this->oAttDef->GetMinAutoCompleteChars();
|
||||||
|
|
||||||
// the input for the auto-complete
|
// the input for the auto-complete
|
||||||
$sHTMLValue .= "<input class=\"field_autocomplete\" type=\"text\" id=\"label_$this->iId\" value=\"$sDisplayValue\"/>";
|
$sHTMLValue .= "<input id=\"label_$this->iId\" value=\"$sDisplayValue\"/>";
|
||||||
$sHTMLValue .= "<span class=\"field_input_btn\"><img id=\"mini_search_{$this->iId}\" style=\"border:0;vertical-align:middle;cursor:pointer;\" src=\"../images/mini_search.gif?t=".utils::GetCacheBusterTimestamp()."\" onClick=\"oACWidget_{$this->iId}.Search();\"/></span>";
|
$sHTMLValue .= "<span class=\"field_input_btn\"><div class=\"mini_button\" id=\"mini_search_{$this->iId}\" onClick=\"oACWidget_{$this->iId}.Search();\"><i class=\"fas fa-search\"></i></div></span>";
|
||||||
|
|
||||||
// another hidden input to store & pass the object's Id
|
// another hidden input to store & pass the object's Id
|
||||||
$sHTMLValue .= "<input type=\"hidden\" id=\"$this->iId\" name=\"{$sAttrFieldPrefix}{$sFieldName}\" value=\"".htmlentities($value, ENT_QUOTES, 'UTF-8')."\" />\n";
|
$sHTMLValue .= "<input type=\"hidden\" id=\"$this->iId\" name=\"{$sAttrFieldPrefix}{$sFieldName}\" value=\"".htmlentities($value, ENT_QUOTES, 'UTF-8')."\" />\n";
|
||||||
@@ -274,23 +281,58 @@ EOF
|
|||||||
$JSSearchMode = $this->bSearchMode ? 'true' : 'false';
|
$JSSearchMode = $this->bSearchMode ? 'true' : 'false';
|
||||||
// Scripts to start the autocomplete and bind some events to it
|
// Scripts to start the autocomplete and bind some events to it
|
||||||
$oPage->add_ready_script(
|
$oPage->add_ready_script(
|
||||||
<<<EOF
|
<<<JS
|
||||||
oACWidget_{$this->iId} = new ExtKeyWidget('{$this->iId}', '{$this->sTargetClass}', '$sFilter', '$sTitle', false, $sWizHelper, '{$this->sAttCode}', $sJSSearchMode, $sJSDoSearch);
|
$('#label_$this->iId').autocomplete({
|
||||||
oACWidget_{$this->iId}.emptyHtml = "<div style=\"background: #fff; border:0; text-align:center; vertical-align:middle;\"><p>$sMessage</p></div>";
|
source: function( request, response ) {
|
||||||
$('#label_$this->iId').autocomplete(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', { scroll:true, minChars:{$iMinChars}, autoFill:false, matchContains:true, mustMatch: true, keyHolder:'#{$this->iId}', extraParams:{operation:'ac_extkey', sTargetClass:'{$this->sTargetClass}',sFilter:'$sFilter',bSearchMode:$JSSearchMode, json: function() { return $sWizHelperJSON; } }});
|
$.post( {
|
||||||
$('#label_$this->iId').keyup(function() { if ($(this).val() == '') { $('#$this->iId').val(''); } } ); // Useful for search forms: empty value in the "label", means no value, immediatly !
|
url: GetAbsoluteUrlAppRoot()+'pages/ajax.render.php',
|
||||||
$('#label_$this->iId').result( function(event, data, formatted) { OnAutoComplete('{$this->iId}', event, data, formatted); } );
|
dataType: "json",
|
||||||
$('#$this->iId').bind('update', function() { oACWidget_{$this->iId}.Update(); } );
|
data: {
|
||||||
|
q:request.term,
|
||||||
|
operation:'ac_extkey',
|
||||||
|
sTargetClass:'{$this->sTargetClass}',
|
||||||
|
sFilter:'$sFilter',
|
||||||
|
bSearchMode:$JSSearchMode,
|
||||||
|
sOutputFormat:'json',
|
||||||
|
json: function() { return $sWizHelperJSON; }
|
||||||
|
},
|
||||||
|
success: function( data ) {
|
||||||
|
response( data );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
},
|
||||||
|
autoFocus: true,
|
||||||
|
minLength:{$iMinChars},
|
||||||
|
select: function( event, ui ) {
|
||||||
|
$('#$this->iId').val( ui.item.value );
|
||||||
|
$('#label_$this->iId').val( ui.item.label );
|
||||||
|
$('#$this->iId').trigger('validate');
|
||||||
|
$('#$this->iId').trigger('extkeychange');
|
||||||
|
$('#$this->iId').trigger('change');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.autocomplete( "instance" )._renderItem = function( ul, item ) {
|
||||||
|
var term = this.term.replace("/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi", "\\$1");
|
||||||
|
var val = item.label.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
|
||||||
|
if (item.obsolete == 'yes'){
|
||||||
|
val = val + ' <b>old</b>';
|
||||||
|
}
|
||||||
|
return $( "<li>" )
|
||||||
|
.append( val )
|
||||||
|
.appendTo( ul );
|
||||||
|
};
|
||||||
|
|
||||||
if ($('#ac_dlg_{$this->iId}').length == 0)
|
if ($('#ac_dlg_{$this->iId}').length == 0)
|
||||||
{
|
{
|
||||||
$('body').append('<div id="ac_dlg_{$this->iId}"></div>');
|
$('body').append('<div id="ac_dlg_{$this->iId}"></div>');
|
||||||
}
|
}
|
||||||
EOF
|
JS
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($bExtensions && MetaModel::IsHierarchicalClass($this->sTargetClass) !== false)
|
if ($bExtensions && MetaModel::IsHierarchicalClass($this->sTargetClass) !== false)
|
||||||
{
|
{
|
||||||
$sHTMLValue .= "<span class=\"field_input_btn\"><img id=\"mini_tree_{$this->iId}\" style=\"border:0;vertical-align:middle;cursor:pointer;\" src=\"../images/mini_tree.gif?t=".utils::GetCacheBusterTimestamp()."\" onClick=\"oACWidget_{$this->iId}.HKDisplay();\"/></span>";
|
$sHTMLValue .= "<span class=\"field_input_btn\"><div class=\"mini_button\" id=\"mini_tree_{$this->iId}\" onClick=\"oACWidget_{$this->iId}.HKDisplay();\"><i class=\"fas fa-sitemap\"></i></div></span>";
|
||||||
$oPage->add_ready_script(
|
$oPage->add_ready_script(
|
||||||
<<<EOF
|
<<<EOF
|
||||||
if ($('#ac_tree_{$this->iId}').length == 0)
|
if ($('#ac_tree_{$this->iId}').length == 0)
|
||||||
@@ -304,7 +346,7 @@ EOF
|
|||||||
{
|
{
|
||||||
$sCallbackName = (MetaModel::IsAbstract($this->sTargetClass)) ? 'SelectObjectClass' : 'CreateObject';
|
$sCallbackName = (MetaModel::IsAbstract($this->sTargetClass)) ? 'SelectObjectClass' : 'CreateObject';
|
||||||
|
|
||||||
$sHTMLValue .= "<span class=\"field_input_btn\"><img id=\"mini_add_{$this->iId}\" style=\"border:0;vertical-align:middle;cursor:pointer;\" src=\"../images/mini_add.gif?t=".utils::GetCacheBusterTimestamp()."\" onClick=\"oACWidget_{$this->iId}.{$sCallbackName}();\"/></span>";
|
$sHTMLValue .= "<span class=\"field_input_btn\"><div class=\"mini_button\" id=\"mini_add_{$this->iId}\" onClick=\"oACWidget_{$this->iId}.{$sCallbackName}();\"><i class=\"fas fa-plus\"></i></div></span>";
|
||||||
$oPage->add_ready_script(
|
$oPage->add_ready_script(
|
||||||
<<<EOF
|
<<<EOF
|
||||||
if ($('#ajax_{$this->iId}').length == 0)
|
if ($('#ajax_{$this->iId}').length == 0)
|
||||||
@@ -332,7 +374,8 @@ EOF
|
|||||||
if ( ($oCurrObject != null) && ($this->sAttCode != ''))
|
if ( ($oCurrObject != null) && ($this->sAttCode != ''))
|
||||||
{
|
{
|
||||||
$oAttDef = MetaModel::GetAttributeDef(get_class($oCurrObject), $this->sAttCode);
|
$oAttDef = MetaModel::GetAttributeDef(get_class($oCurrObject), $this->sAttCode);
|
||||||
$aArgs = array('this' => $oCurrObject);
|
/** @var \DBObject $oCurrObject */
|
||||||
|
$aArgs = $oCurrObject->ToArgsForQuery();
|
||||||
$aParams = array('query_params' => $aArgs);
|
$aParams = array('query_params' => $aArgs);
|
||||||
$oSet = $oAttDef->GetAllowedValuesAsObjectSet($aArgs);
|
$oSet = $oAttDef->GetAllowedValuesAsObjectSet($aArgs);
|
||||||
$oFilter = $oSet->GetFilter();
|
$oFilter = $oSet->GetFilter();
|
||||||
@@ -402,7 +445,7 @@ EOF
|
|||||||
// Current extkey value, so we can display event if it is not available anymore (eg. archived).
|
// Current extkey value, so we can display event if it is not available anymore (eg. archived).
|
||||||
$iCurrentExtKeyId = (is_null($oObj)) ? 0 : $oObj->Get($this->sAttCode);
|
$iCurrentExtKeyId = (is_null($oObj)) ? 0 : $oObj->Get($this->sAttCode);
|
||||||
|
|
||||||
$oBlock = new DisplayBlock($oFilter, 'list', false, array('query_params' => array('this' => $oObj, 'current_extkey_id' => $iCurrentExtKeyId)));
|
$oBlock = new DisplayBlock($oFilter, 'list_search', false, array('query_params' => array('this' => $oObj, 'current_extkey_id' => $iCurrentExtKeyId)));
|
||||||
$oBlock->Display($oP, $this->iId.'_results', array('this' => $oObj, 'cssCount'=> '#count_'.$this->iId, 'menu' => false, 'selection_mode' => true, 'selection_type' => 'single', 'table_id' => 'select_'.$this->sAttCode)); // Don't display the 'Actions' menu on the results
|
$oBlock->Display($oP, $this->iId.'_results', array('this' => $oObj, 'cssCount'=> '#count_'.$this->iId, 'menu' => false, 'selection_mode' => true, 'selection_type' => 'single', 'table_id' => 'select_'.$this->sAttCode)); // Don't display the 'Actions' menu on the results
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -433,10 +476,12 @@ EOF
|
|||||||
$iMax = 150;
|
$iMax = 150;
|
||||||
$oValuesSet->SetLimit($iMax);
|
$oValuesSet->SetLimit($iMax);
|
||||||
$oValuesSet->SetSort(false);
|
$oValuesSet->SetSort(false);
|
||||||
|
$aOrder = array('friendlyname'=>true);
|
||||||
|
$oValuesSet->SetOrderBy($aOrder);
|
||||||
|
$oValuesSet->SetSort(true);
|
||||||
$oValuesSet->SetModifierProperty('UserRightsGetSelectFilter', 'bSearchMode', $this->bSearchMode);
|
$oValuesSet->SetModifierProperty('UserRightsGetSelectFilter', 'bSearchMode', $this->bSearchMode);
|
||||||
$oValuesSet->SetLimit($iMax);
|
$oValuesSet->SetLimit($iMax);
|
||||||
$aValuesContains = $oValuesSet->GetValues(array('this' => $oObj, 'current_extkey_id' => $iCurrentExtKeyId), $sContains, 'contains');
|
$aValuesContains = $oValuesSet->GetValues(array('this' => $oObj, 'current_extkey_id' => $iCurrentExtKeyId), $sContains, 'start_with');
|
||||||
asort($aValuesContains);
|
|
||||||
$aValues = array();
|
$aValues = array();
|
||||||
foreach($aValuesContains as $sKey => $sFriendlyName)
|
foreach($aValuesContains as $sKey => $sFriendlyName)
|
||||||
{
|
{
|
||||||
@@ -445,6 +490,24 @@ EOF
|
|||||||
$aValues[$sKey] = $sFriendlyName;
|
$aValues[$sKey] = $sFriendlyName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (sizeof($aValuesContains) < $iMax)
|
||||||
|
{
|
||||||
|
$aValuesContains = $oValuesSet->GetValues(array('this' => $oObj, 'current_extkey_id' => $iCurrentExtKeyId), $sContains,
|
||||||
|
'contains');
|
||||||
|
//asort($aValuesContains);
|
||||||
|
$iSize=sizeof($aValuesContains);
|
||||||
|
foreach($aValuesContains as $sKey => $sFriendlyName)
|
||||||
|
{
|
||||||
|
if (!isset($aValues[$sKey]))
|
||||||
|
{
|
||||||
|
$aValues[$sKey] = $sFriendlyName;
|
||||||
|
if (++$iSize >= $iMax)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch($sOutputFormat)
|
switch($sOutputFormat)
|
||||||
{
|
{
|
||||||
@@ -569,8 +632,21 @@ EOF
|
|||||||
$oNewObj->UpdateObjectFromArg('default');
|
$oNewObj->UpdateObjectFromArg('default');
|
||||||
|
|
||||||
$sDialogTitle = '';
|
$sDialogTitle = '';
|
||||||
$oPage->add('<div id="ac_create_'.$this->iId.'"><div class="wizContainer" style="vertical-align:top;"><div id="dcr_'.$this->iId.'">');
|
$sClassLabel = MetaModel::GetName($this->sTargetClass);
|
||||||
$oPage->add("<h1>".MetaModel::GetClassIcon($this->sTargetClass)." ".Dict::Format('UI:CreationTitle_Class', MetaModel::GetName($this->sTargetClass))."</h1>\n");
|
$sClassIcon = MetaModel::GetClassIcon($this->sTargetClass);
|
||||||
|
$sObjClass = get_class($oNewObj);
|
||||||
|
$sObjKey = $oNewObj->GetKey();
|
||||||
|
$sHeaderTitle = Dict::Format('UI:CreationTitle_Class', $sClassLabel);
|
||||||
|
$oPage->add(<<<HTML
|
||||||
|
<div id="ac_create_{$this->iId}">
|
||||||
|
<!-- Beginning of object-details -->
|
||||||
|
<div class="object-details" data-object-class="$sObjClass" data-object-id="$sObjKey" data-object-mode="create">
|
||||||
|
<!-- Beginning of wizContainer -->
|
||||||
|
<div class="wizContainer" style="vertical-align:top;">
|
||||||
|
<div id="dcr_{$this->iId}">
|
||||||
|
<h1>$sClassIcon $sHeaderTitle</h1>
|
||||||
|
HTML
|
||||||
|
);
|
||||||
$aFieldsFlags = array();
|
$aFieldsFlags = array();
|
||||||
$aFieldsComments = array();
|
$aFieldsComments = array();
|
||||||
foreach(MetaModel::ListAttributeDefs($this->sTargetClass) as $sAttCode => $oAttDef)
|
foreach(MetaModel::ListAttributeDefs($this->sTargetClass) as $sAttCode => $oAttDef)
|
||||||
@@ -582,7 +658,13 @@ EOF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmdbAbstractObject::DisplayCreationForm($oPage, $this->sTargetClass, $oNewObj, array(), array('formPrefix' => $this->iId, 'noRelations' => true, 'fieldsFlags' => $aFieldsFlags, 'fieldsComments' => $aFieldsComments));
|
cmdbAbstractObject::DisplayCreationForm($oPage, $this->sTargetClass, $oNewObj, array(), array('formPrefix' => $this->iId, 'noRelations' => true, 'fieldsFlags' => $aFieldsFlags, 'fieldsComments' => $aFieldsComments));
|
||||||
$oPage->add('</div></div></div>');
|
$oPage->add(<<<HTML
|
||||||
|
</div>
|
||||||
|
</div><!-- End of wizContainer -->
|
||||||
|
</div><!-- End of object-details -->
|
||||||
|
</div>
|
||||||
|
HTML
|
||||||
|
);
|
||||||
// $oPage->add_ready_script("\$('#ac_create_$this->iId').dialog({ width: $(window).width()*0.8, height: 'auto', autoOpen: false, modal: true, title: '$sDialogTitle'});\n");
|
// $oPage->add_ready_script("\$('#ac_create_$this->iId').dialog({ width: $(window).width()*0.8, height: 'auto', autoOpen: false, modal: true, title: '$sDialogTitle'});\n");
|
||||||
$oPage->add_ready_script("\$('#ac_create_$this->iId').dialog({ width: 'auto', height: 'auto', maxHeight: $(window).height() - 50, autoOpen: false, modal: true, title: '$sDialogTitle'});\n");
|
$oPage->add_ready_script("\$('#ac_create_$this->iId').dialog({ width: 'auto', height: 'auto', maxHeight: $(window).height() - 50, autoOpen: false, modal: true, title: '$sDialogTitle'});\n");
|
||||||
$oPage->add_ready_script("$('#dcr_{$this->iId} form').removeAttr('onsubmit');");
|
$oPage->add_ready_script("$('#dcr_{$this->iId} form').removeAttr('onsubmit');");
|
||||||
@@ -609,15 +691,22 @@ EOF
|
|||||||
$oSet->SetShowObsoleteData(utils::ShowObsoleteData());
|
$oSet->SetShowObsoleteData(utils::ShowObsoleteData());
|
||||||
|
|
||||||
$sHKAttCode = MetaModel::IsHierarchicalClass($this->sTargetClass);
|
$sHKAttCode = MetaModel::IsHierarchicalClass($this->sTargetClass);
|
||||||
$this->DumpTree($oPage, $oSet, $sHKAttCode, $currValue);
|
$bHasChildLeafs = $this->DumpTree($oPage, $oSet, $sHKAttCode, $currValue);
|
||||||
|
|
||||||
$oPage->add('</td></tr></table>');
|
$oPage->add('</td></tr></table>');
|
||||||
$oPage->add('</div>');
|
$oPage->add('</div>');
|
||||||
|
|
||||||
|
if ($bHasChildLeafs)
|
||||||
|
{
|
||||||
|
$oPage->add('<div class="treecontrol" id="treecontrolid"><a href="?#">'.Dict::S("UI:Treeview:CollapseAll").'</a> | <a href="?#">'.Dict::S("UI:Treeview:ExpandAll").'</a></div>');
|
||||||
|
}
|
||||||
|
|
||||||
$oPage->add("<input type=\"button\" id=\"btn_cancel_{$this->iId}\" value=\"".Dict::S('UI:Button:Cancel')."\" onClick=\"$('#dlg_tree_{$this->iId}').dialog('close');\"> ");
|
$oPage->add("<input type=\"button\" id=\"btn_cancel_{$this->iId}\" value=\"".Dict::S('UI:Button:Cancel')."\" onClick=\"$('#dlg_tree_{$this->iId}').dialog('close');\"> ");
|
||||||
$oPage->add("<input type=\"button\" id=\"btn_ok_{$this->iId}\" value=\"".Dict::S('UI:Button:Ok')."\" onClick=\"oACWidget_{$this->iId}.DoHKOk();\">");
|
$oPage->add("<input type=\"button\" id=\"btn_ok_{$this->iId}\" value=\"".Dict::S('UI:Button:Ok')."\" onClick=\"oACWidget_{$this->iId}.DoHKOk();\">");
|
||||||
|
|
||||||
$oPage->add('</div></div>');
|
$oPage->add('</div></div>');
|
||||||
$oPage->add_ready_script("\$('#tree_$this->iId ul').treeview();\n");
|
|
||||||
|
$oPage->add_ready_script("\$('#tree_$this->iId ul').treeview({ control: '#treecontrolid', persist: 'false'});\n");
|
||||||
$oPage->add_ready_script("\$('#dlg_tree_$this->iId').dialog({ width: 'auto', height: 'auto', autoOpen: true, modal: true, title: '$sDialogTitle', resizeStop: oACWidget_{$this->iId}.OnHKResize, close: oACWidget_{$this->iId}.OnHKClose });\n");
|
$oPage->add_ready_script("\$('#dlg_tree_$this->iId').dialog({ width: 'auto', height: 'auto', autoOpen: true, modal: true, title: '$sDialogTitle', resizeStop: oACWidget_{$this->iId}.OnHKResize, close: oACWidget_{$this->iId}.OnHKClose });\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -646,6 +735,18 @@ EOF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param WebPage $oP
|
||||||
|
* @param \DBObjectSet $oSet
|
||||||
|
* @param string $sParentAttCode
|
||||||
|
* @param string $currValue
|
||||||
|
*
|
||||||
|
* @return bool true if there are at least one child leaf, false if only roots nodes are present
|
||||||
|
* @throws \ArchivedObjectException
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \CoreUnexpectedValue
|
||||||
|
* @throws \MySQLException
|
||||||
|
*/
|
||||||
function DumpTree($oP, $oSet, $sParentAttCode, $currValue)
|
function DumpTree($oP, $oSet, $sParentAttCode, $currValue)
|
||||||
{
|
{
|
||||||
$aTree = array();
|
$aTree = array();
|
||||||
@@ -674,6 +775,9 @@ EOF
|
|||||||
{
|
{
|
||||||
$this->DumpNodes($oP, $iRootId, $aTree, $aNodes, $currValue);
|
$this->DumpNodes($oP, $iRootId, $aTree, $aNodes, $currValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$bHasOnlyRootNodes = (count($aTree) === 1);
|
||||||
|
return !$bHasOnlyRootNodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
function DumpNodes($oP, $iRootId, $aTree, $aNodes, $currValue)
|
function DumpNodes($oP, $iRootId, $aTree, $aNodes, $currValue)
|
||||||
@@ -701,7 +805,7 @@ EOF
|
|||||||
$sSelect = '<input id="input_'.$fUniqueId.'_'.$aNodes[$id]->GetKey().'" type="radio" value="'.$aNodes[$id]->GetKey().'" name="selectObject" '.$sChecked.'> ';
|
$sSelect = '<input id="input_'.$fUniqueId.'_'.$aNodes[$id]->GetKey().'" type="radio" value="'.$aNodes[$id]->GetKey().'" name="selectObject" '.$sChecked.'> ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$oP->add('<li>'.$sSelect.'<label for="input_'.$fUniqueId.'_'.$aNodes[$id]->GetKey().'">'.$aNodes[$id]->GetName().'</label>');
|
$oP->add('<li class="closed">'.$sSelect.'<label for="input_'.$fUniqueId.'_'.$aNodes[$id]->GetKey().'">'.$aNodes[$id]->GetName().'</label>');
|
||||||
$this->DumpNodes($oP, $id, $aTree, $aNodes, $currValue);
|
$this->DumpNodes($oP, $id, $aTree, $aNodes, $currValue);
|
||||||
$oP->add("</li>\n");
|
$oP->add("</li>\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class UIHTMLEditorWidget
|
|||||||
$sLanguage = strtolower(trim(UserRights::GetUserLanguage()));
|
$sLanguage = strtolower(trim(UserRights::GetUserLanguage()));
|
||||||
$aConfig['language'] = $sLanguage;
|
$aConfig['language'] = $sLanguage;
|
||||||
$aConfig['contentsLanguage'] = $sLanguage;
|
$aConfig['contentsLanguage'] = $sLanguage;
|
||||||
$aConfig['extraPlugins'] = 'disabler';
|
$aConfig['extraPlugins'] = 'disabler,codesnippet';
|
||||||
$sWidthSpec = addslashes(trim($this->m_oAttDef->GetWidth()));
|
$sWidthSpec = addslashes(trim($this->m_oAttDef->GetWidth()));
|
||||||
if ($sWidthSpec != '')
|
if ($sWidthSpec != '')
|
||||||
{
|
{
|
||||||
@@ -101,7 +101,7 @@ class UIHTMLEditorWidget
|
|||||||
$oPage->add_ready_script(
|
$oPage->add_ready_script(
|
||||||
<<<EOF
|
<<<EOF
|
||||||
$('#$iId').bind('update', function(evt){
|
$('#$iId').bind('update', function(evt){
|
||||||
BlockField('cke_$iId', $('#$iId').attr('disabled'));
|
BlockField('cke_$iId', $('#$iId').prop('disabled'));
|
||||||
//Delayed execution - ckeditor must be properly initialized before setting readonly
|
//Delayed execution - ckeditor must be properly initialized before setting readonly
|
||||||
var retryCount = 0;
|
var retryCount = 0;
|
||||||
var oMe = $('#$iId');
|
var oMe = $('#$iId');
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user