mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-12 20:12:43 +01:00
Compare commits
974 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
870c2a8f50 | ||
|
|
01aa901f93 | ||
|
|
96a74c4976 | ||
|
|
a69ba88857 | ||
|
|
b05be5e1df | ||
|
|
247c38923f | ||
|
|
2d55195982 | ||
|
|
5788438864 | ||
|
|
4f684df12f | ||
|
|
adbbf9e3b2 | ||
|
|
1f29c7758c | ||
|
|
07512d1dad | ||
|
|
3362a6b06d | ||
|
|
9666a96d8c | ||
|
|
1b59bcfadb | ||
|
|
347bf3e4d6 | ||
|
|
b3a2257638 | ||
|
|
24652ec722 | ||
|
|
b226894e36 | ||
|
|
3b0a4c9fa9 | ||
|
|
0928191fdd | ||
|
|
154a25f8cb | ||
|
|
6a88d31675 | ||
|
|
437a07ba3c | ||
|
|
f4555c4413 | ||
|
|
ed4006b51b | ||
|
|
bc33f7e1a7 | ||
|
|
3c1b5846c9 | ||
|
|
fe96d826ef | ||
|
|
df60ce695c | ||
|
|
3b5e07dca9 | ||
|
|
8927d1260a | ||
|
|
ee294917e1 | ||
|
|
53cf9f0bf1 | ||
|
|
f4efa58022 | ||
|
|
737dc7726e | ||
|
|
af095c0e11 | ||
|
|
453b289346 | ||
|
|
2bef534e60 | ||
|
|
c0161ccead | ||
|
|
1be67fee52 | ||
|
|
4a88509cdf | ||
|
|
a4b1700bae | ||
|
|
f5cb64afaa | ||
|
|
4841a8d2ce | ||
|
|
52a5d4ca0a | ||
|
|
cb0d39ff6e | ||
|
|
a5c51589d3 | ||
|
|
b4501511c8 | ||
|
|
e18c5b9d68 | ||
|
|
b940f2eae3 | ||
|
|
e6ff31abf1 | ||
|
|
d31bad82a1 | ||
|
|
bc0b0bebd3 | ||
|
|
031acacdab | ||
|
|
18725aec6b | ||
|
|
75c3456743 | ||
|
|
c0db33caf2 | ||
|
|
8159249209 | ||
|
|
9f76298e58 | ||
|
|
f1ecb023ff | ||
|
|
ce1243140f | ||
|
|
52c827c2bb | ||
|
|
c263fccb5f | ||
|
|
719de0aef3 | ||
|
|
4cc3be24d3 | ||
|
|
b1109f6803 | ||
|
|
fda1499eee | ||
|
|
4bb42de5d6 | ||
|
|
f31270df2a | ||
|
|
d50a938d12 | ||
|
|
478a8a4d52 | ||
|
|
fa135a216b | ||
|
|
79779b1d2f | ||
|
|
456adc1e95 | ||
|
|
06dc4f5426 | ||
|
|
467c772504 | ||
|
|
1bd6757e62 | ||
|
|
1c52426b90 | ||
|
|
bc18656fd5 | ||
|
|
c77c4efcb8 | ||
|
|
cada04442b | ||
|
|
4bd11f64d7 | ||
|
|
9c45f42e4f | ||
|
|
c9f743983a | ||
|
|
1497541129 | ||
|
|
878474f1d1 | ||
|
|
0afd5cc7e3 | ||
|
|
1aaa29ad9e | ||
|
|
4096b00bd5 | ||
|
|
dcc4334768 | ||
|
|
f137074a98 | ||
|
|
f8f31daa16 | ||
|
|
35528a5885 | ||
|
|
8853bfd51a | ||
|
|
ce0f46a483 | ||
|
|
9a8a07e85a | ||
|
|
26bcc944cf | ||
|
|
d2d9590019 | ||
|
|
fe4b1ff34d | ||
|
|
4e95aab6b5 | ||
|
|
4fb79ba8a1 | ||
|
|
a42593db0d | ||
|
|
cfc766ebbe | ||
|
|
51e4ce05c9 | ||
|
|
819c3fd08a | ||
|
|
4c6955017f | ||
|
|
de40214a09 | ||
|
|
491ecaccfe | ||
|
|
3b3f3fa29b | ||
|
|
efb9327896 | ||
|
|
223f0c2763 | ||
|
|
b85bfc40f4 | ||
|
|
cc78023a44 | ||
|
|
9b74628e29 | ||
|
|
0ef0d339b5 | ||
|
|
5bf5d23495 | ||
|
|
02588036c2 | ||
|
|
8e0d3911e6 | ||
|
|
3929ef0bfa | ||
|
|
c3b35d4da5 | ||
|
|
5e887e8850 | ||
|
|
61df34acd6 | ||
|
|
f5b11b78da | ||
|
|
d7758f9ae6 | ||
|
|
8434e6567f | ||
|
|
2c38bea2b0 | ||
|
|
096b59913d | ||
|
|
d38b9e6248 | ||
|
|
f256deb54b | ||
|
|
7fa3474ecd | ||
|
|
363b05d314 | ||
|
|
3fe6132c94 | ||
|
|
238f684576 | ||
|
|
e6ebf315ed | ||
|
|
70e4d1ccd0 | ||
|
|
a8a95cba75 | ||
|
|
1a015cd91e | ||
|
|
9b36b6e965 | ||
|
|
cbb9f5aa0c | ||
|
|
ef159f919e | ||
|
|
3e8c5651cd | ||
|
|
0a4f1ffc06 | ||
|
|
42a1cde41a | ||
|
|
324f9631d7 | ||
|
|
8073c0e1be | ||
|
|
b256c9aaba | ||
|
|
4897c9de7f | ||
|
|
2058d572d9 | ||
|
|
089fab828b | ||
|
|
fa05dc44ce | ||
|
|
5b9453e302 | ||
|
|
d81a2d060e | ||
|
|
8d9dc8c87d | ||
|
|
97aaff7395 | ||
|
|
7a1fa20959 | ||
|
|
2f36edef3b | ||
|
|
f7fe6c4f1a | ||
|
|
b9f4ddb021 | ||
|
|
6f4b2a8905 | ||
|
|
0e95f70b8d | ||
|
|
dd7189b1d0 | ||
|
|
cd21d385d6 | ||
|
|
86442aa7f0 | ||
|
|
39cd4fcb9e | ||
|
|
4272cfa7e4 | ||
|
|
db56e5c8ea | ||
|
|
0c573812e9 | ||
|
|
4cf6394f01 | ||
|
|
00ccb45bc4 | ||
|
|
8aa1d1165f | ||
|
|
5911d7d0c0 | ||
|
|
41e54529b0 | ||
|
|
f89aff96f7 | ||
|
|
54df3c2991 | ||
|
|
85bce8b71f | ||
|
|
9d9d890c97 | ||
|
|
f511e2e523 | ||
|
|
bd9bf8b5a8 | ||
|
|
5fd5eae3b1 | ||
|
|
6aa4d6a940 | ||
|
|
7997e927a0 | ||
|
|
9516f9bbd2 | ||
|
|
f7bd03fb75 | ||
|
|
ea60024712 | ||
|
|
edea44bccb | ||
|
|
09df62600e | ||
|
|
94eaf5d089 | ||
|
|
d04ac67ecd | ||
|
|
81b9286ea4 | ||
|
|
c648bd8c90 | ||
|
|
99a291f878 | ||
|
|
47f10cdc29 | ||
|
|
7eba8832e6 | ||
|
|
03340d6016 | ||
|
|
d288fe74a2 | ||
|
|
28d588fd40 | ||
|
|
9fc78cd1b6 | ||
|
|
34298f6c8c | ||
|
|
bbbba45fc1 | ||
|
|
bfb97edccf | ||
|
|
989c9b9548 | ||
|
|
82b7326c99 | ||
|
|
d2e6335e95 | ||
|
|
711f21e8a0 | ||
|
|
e1c343cedd | ||
|
|
51def8d31d | ||
|
|
bbb8b0f01f | ||
|
|
c115a76d4e | ||
|
|
63ab8d9f75 | ||
|
|
7848d77830 | ||
|
|
737a807456 | ||
|
|
e6a6426b5b | ||
|
|
f3dc94d334 | ||
|
|
e4f0c1a42b | ||
|
|
44d6803d12 | ||
|
|
f80e83b846 | ||
|
|
bdcd7b5ef3 | ||
|
|
17d1c279ab | ||
|
|
dd40aea380 | ||
|
|
f9ec70f1db | ||
|
|
83bc7b70a0 | ||
|
|
2cbede2ef8 | ||
|
|
729e6c4aba | ||
|
|
a2e865587f | ||
|
|
c6ab6cd57e | ||
|
|
837b2ff060 | ||
|
|
c7ee83b3b9 | ||
|
|
a404b80988 | ||
|
|
cbe15c7c71 | ||
|
|
278b07099c | ||
|
|
576e70c3ce | ||
|
|
5433aa8d2e | ||
|
|
b67fdb3e51 | ||
|
|
7f2a253625 | ||
|
|
ad60a50d4d | ||
|
|
08a976fd85 | ||
|
|
426f4305b0 | ||
|
|
db47ce3bb1 | ||
|
|
1b42078d1e | ||
|
|
736890b244 | ||
|
|
2664518bd3 | ||
|
|
c6f90d8361 | ||
|
|
cc732621ab | ||
|
|
04fed9526a | ||
|
|
9f4692e1c9 | ||
|
|
1fa3b63fdc | ||
|
|
af2889e982 | ||
|
|
4d925db3cd | ||
|
|
36d91f1c07 | ||
|
|
bcc260dc08 | ||
|
|
9507b89fec | ||
|
|
a52a218ae4 | ||
|
|
0409b8b9c5 | ||
|
|
f68cf0034a | ||
|
|
ba4e97f07b | ||
|
|
c2c3879032 | ||
|
|
c4529ed986 | ||
|
|
8b7eaf360e | ||
|
|
2f317f0f52 | ||
|
|
bd35af1360 | ||
|
|
351a7bd6bb | ||
|
|
fe6d59c090 | ||
|
|
d4e66426e7 | ||
|
|
88d81aa943 | ||
|
|
f24f4e012d | ||
|
|
60ea952b78 | ||
|
|
5354b54ec0 | ||
|
|
49feeee85e | ||
|
|
42d8591758 | ||
|
|
cf156e024d | ||
|
|
6b0c8f39d5 | ||
|
|
2c2e01d14c | ||
|
|
abc1d1dcb3 | ||
|
|
628189f57f | ||
|
|
748dcd0881 | ||
|
|
2d1d6f13c9 | ||
|
|
4f98ca37e2 | ||
|
|
a34eaa07ed | ||
|
|
20f2293c01 | ||
|
|
7869e45954 | ||
|
|
9af7eaf08c | ||
|
|
79ed9c7e37 | ||
|
|
eb8167bc57 | ||
|
|
df992477be | ||
|
|
79c55149b2 | ||
|
|
ac1077bfe3 | ||
|
|
a46c47c134 | ||
|
|
762e4ec8d1 | ||
|
|
77f982d1a8 | ||
|
|
7a7146c03d | ||
|
|
a34d760a88 | ||
|
|
e9eb22f8f0 | ||
|
|
e1a47ed0fb | ||
|
|
6388f6e62a | ||
|
|
e2605fbf64 | ||
|
|
90c24b3d95 | ||
|
|
0912b3b04f | ||
|
|
7e82f70c77 | ||
|
|
2dd81deb13 | ||
|
|
273ec857a3 | ||
|
|
ef564caf28 | ||
|
|
3ef6299c83 | ||
|
|
ec58ee940a | ||
|
|
2519278269 | ||
|
|
74881ae251 | ||
|
|
c218eaa6ed | ||
|
|
b7cb799af0 | ||
|
|
78bf506790 | ||
|
|
61b03b0c05 | ||
|
|
b31962f7e2 | ||
|
|
112220da86 | ||
|
|
1fafc1b6ad | ||
|
|
eb4e059683 | ||
|
|
b5ff688841 | ||
|
|
8805b8cac4 | ||
|
|
d01a99cd79 | ||
|
|
1866713082 | ||
|
|
9ecc88230f | ||
|
|
8ddd050a34 | ||
|
|
4c4b773de5 | ||
|
|
37a815af53 | ||
|
|
f60f34cdf8 | ||
|
|
4267f5f010 | ||
|
|
f08c9605db | ||
|
|
e41dfcbbb3 | ||
|
|
a0b6aa28a7 | ||
|
|
c273495261 | ||
|
|
220090813d | ||
|
|
e65ee097a5 | ||
|
|
92963af09f | ||
|
|
8ccdbf374b | ||
|
|
0300209b3d | ||
|
|
a5f51dc969 | ||
|
|
04b7fdd4c4 | ||
|
|
e3c44568a0 | ||
|
|
37f3fccc35 | ||
|
|
fedcec58a6 | ||
|
|
be95c92c45 | ||
|
|
810fd7e744 | ||
|
|
c6afa1a6cb | ||
|
|
29eedd2ac4 | ||
|
|
ead519811c | ||
|
|
5203652796 | ||
|
|
750ed5e91c | ||
|
|
425c23d28c | ||
|
|
900a91a0a2 | ||
|
|
ce06c12da6 | ||
|
|
b73bcd68a9 | ||
|
|
86833633ef | ||
|
|
21ac3b28ef | ||
|
|
6aee2db1d4 | ||
|
|
a6da3b189a | ||
|
|
65d6403fa3 | ||
|
|
62c1d500e8 | ||
|
|
ef090aa895 | ||
|
|
d9be3efa90 | ||
|
|
a4785adb3d | ||
|
|
3c22179183 | ||
|
|
a96d13d5aa | ||
|
|
f1868ee162 | ||
|
|
cfd4919829 | ||
|
|
30893bf676 | ||
|
|
28213b3129 | ||
|
|
c3ede4413d | ||
|
|
21eca275e9 | ||
|
|
127b9701ff | ||
|
|
ee7201fc61 | ||
|
|
c075e078e9 | ||
|
|
f9eb6b69f5 | ||
|
|
3d9b7ed7d3 | ||
|
|
6920b72cf4 | ||
|
|
9a9602f418 | ||
|
|
0960fcba2a | ||
|
|
9b46ed9c2d | ||
|
|
d055b1fb29 | ||
|
|
9411ac2144 | ||
|
|
eb2b35e3b1 | ||
|
|
ab5f9a0884 | ||
|
|
b4ece8d154 | ||
|
|
75e504ffbc | ||
|
|
3877f257b4 | ||
|
|
6f2d8b23b4 | ||
|
|
80326acb71 | ||
|
|
d9035eecda | ||
|
|
da6f1fbc9a | ||
|
|
4bb2b9f971 | ||
|
|
a0864dfb3f | ||
|
|
d3d534efee | ||
|
|
2e94f7dbd4 | ||
|
|
2c4b3bf6ad | ||
|
|
e8aaa51edc | ||
|
|
e48e1e27d5 | ||
|
|
c86b50e3fc | ||
|
|
42368b37e9 | ||
|
|
addefdf0cf | ||
|
|
59642d8d93 | ||
|
|
a26eecf0fd | ||
|
|
69449668a8 | ||
|
|
084d99f670 | ||
|
|
15c19b99c9 | ||
|
|
c418a6ff57 | ||
|
|
3aad5fd283 | ||
|
|
d04b1e57d2 | ||
|
|
f5c715c6a7 | ||
|
|
d8fecc1522 | ||
|
|
30a9da8fbf | ||
|
|
e6712300d5 | ||
|
|
c547362ae9 | ||
|
|
9ec4575c43 | ||
|
|
4962dd1a81 | ||
|
|
6337a987d8 | ||
|
|
7a500976d2 | ||
|
|
0e1744a6ec | ||
|
|
29a7a410c8 | ||
|
|
e9009ede87 | ||
|
|
7b16039084 | ||
|
|
acdab170a7 | ||
|
|
32b18d6bfd | ||
|
|
9cd7d381a6 | ||
|
|
e35b534ee2 | ||
|
|
682544ad45 | ||
|
|
53ffe42f92 | ||
|
|
c2a037842d | ||
|
|
552bebf564 | ||
|
|
ec93f50863 | ||
|
|
240c5bb311 | ||
|
|
c12a7e144a | ||
|
|
991f53db9e | ||
|
|
877fd00353 | ||
|
|
d420d035de | ||
|
|
115323dec8 | ||
|
|
ac6c57e90e | ||
|
|
9c4bb84460 | ||
|
|
5a58b8e721 | ||
|
|
b068fdc9b3 | ||
|
|
b8533e1853 | ||
|
|
753e5e535d | ||
|
|
99774022a5 | ||
|
|
c5ebc9b7bd | ||
|
|
f2f3e478d1 | ||
|
|
f10d9464a1 | ||
|
|
580d789a00 | ||
|
|
98d106e6b5 | ||
|
|
bca77bddb8 | ||
|
|
7ca9f0022a | ||
|
|
a602309e04 | ||
|
|
f51935a258 | ||
|
|
976399c2d9 | ||
|
|
cd6ed63768 | ||
|
|
348981a419 | ||
|
|
adf59f2599 | ||
|
|
d0323fa27d | ||
|
|
038f8d5dff | ||
|
|
bab49d66c5 | ||
|
|
230eee4ead | ||
|
|
ce9a1b3661 | ||
|
|
4feb9def4e | ||
|
|
dccde49388 | ||
|
|
a039a00277 | ||
|
|
d30a0ea066 | ||
|
|
ab6c74ae88 | ||
|
|
fbca98ec2a | ||
|
|
93f23fe452 | ||
|
|
67c2a48fc9 | ||
|
|
792ff4044e | ||
|
|
29ef86a245 | ||
|
|
d5add8aa49 | ||
|
|
d3b9a83055 | ||
|
|
f4b2269e2e | ||
|
|
0eee1ad18b | ||
|
|
d5e2f89edc | ||
|
|
67bcc242db | ||
|
|
8a55e2f6a4 | ||
|
|
5eb5033aba | ||
|
|
723c8278ce | ||
|
|
bbf83c7053 | ||
|
|
b8286ab8f3 | ||
|
|
7133c6529b | ||
|
|
e0a3756c6e | ||
|
|
c396a08cb2 | ||
|
|
0981c69515 | ||
|
|
1987ea2eb7 | ||
|
|
6a4ee18380 | ||
|
|
b3a2908b48 | ||
|
|
910f7e8564 | ||
|
|
7cf1a97673 | ||
|
|
cf57e7e88b | ||
|
|
8b4dcb1194 | ||
|
|
a186e16568 | ||
|
|
eaa31ed4a3 | ||
|
|
0e62008db6 | ||
|
|
aa096448be | ||
|
|
d9d0618eec | ||
|
|
39afafc585 | ||
|
|
b37b2ba76f | ||
|
|
c48b035a15 | ||
|
|
1d197e42bb | ||
|
|
b0c7b8750a | ||
|
|
a0b791a4a6 | ||
|
|
abefce7ae2 | ||
|
|
352bdaf9c4 | ||
|
|
87c16498ca | ||
|
|
35f3a4f441 | ||
|
|
111e3fcd32 | ||
|
|
d819d88718 | ||
|
|
278eea6fae | ||
|
|
fa22ebd893 | ||
|
|
793e77bc5f | ||
|
|
70a453a5c2 | ||
|
|
33c6d95b1c | ||
|
|
1e64870a9e | ||
|
|
94ed718782 | ||
|
|
40965b63b5 | ||
|
|
3391d3db05 | ||
|
|
9509929f5d | ||
|
|
63d4b5e3d8 | ||
|
|
f287d100a3 | ||
|
|
336d3ad8e5 | ||
|
|
9af212a542 | ||
|
|
e71631abe0 | ||
|
|
5d58a33f37 | ||
|
|
25ea797aed | ||
|
|
97eacefa6b | ||
|
|
f5fbbcfcb8 | ||
|
|
2c67c8b6ff | ||
|
|
d0fb08adf4 | ||
|
|
624493fb26 | ||
|
|
6eddee9a78 | ||
|
|
52138372ce | ||
|
|
a27538f582 | ||
|
|
385927fe06 | ||
|
|
a621032643 | ||
|
|
32646cb7f4 | ||
|
|
74b67eb6c6 | ||
|
|
231fc6ce70 | ||
|
|
1dfc091c9b | ||
|
|
df7fffcab3 | ||
|
|
b517e068ed | ||
|
|
8a330ecaa9 | ||
|
|
eef0d0bddb | ||
|
|
c1889afd7b | ||
|
|
644f365455 | ||
|
|
667890247c | ||
|
|
c727bbb530 | ||
|
|
79edf0fb15 | ||
|
|
c0f5e314e1 | ||
|
|
e125ab4783 | ||
|
|
a8cb076bbd | ||
|
|
691f76d1e0 | ||
|
|
4ea503f366 | ||
|
|
65c9bd7dcf | ||
|
|
16a0d1d7d5 | ||
|
|
bb40a43c5f | ||
|
|
e4a93da82e | ||
|
|
6de574bf5c | ||
|
|
2f773e9326 | ||
|
|
1594afdef7 | ||
|
|
ad154a368f | ||
|
|
171494ddfc | ||
|
|
21d8c40fc0 | ||
|
|
fd0338cb1c | ||
|
|
61c5a61623 | ||
|
|
bad8ee865d | ||
|
|
dcba3347d8 | ||
|
|
126dc77ef3 | ||
|
|
f64a07861d | ||
|
|
1ee3c5e5a0 | ||
|
|
1a81d7fc16 | ||
|
|
4cd82df73c | ||
|
|
1b24270a46 | ||
|
|
65e5899442 | ||
|
|
d17890f05b | ||
|
|
0be0c1a1c1 | ||
|
|
d29ebee2ac | ||
|
|
21ec7ce98f | ||
|
|
9f5ef68123 | ||
|
|
70660d778f | ||
|
|
e7e96f650a | ||
|
|
bd98d3e9ff | ||
|
|
892d9cc865 | ||
|
|
0295c43885 | ||
|
|
163e623964 | ||
|
|
7cde5adec8 | ||
|
|
650fa5ef1d | ||
|
|
27435508a3 | ||
|
|
a5cba3235e | ||
|
|
2c92e57fe7 | ||
|
|
dc58a90a48 | ||
|
|
966ac2cdbc | ||
|
|
385d98b3e0 | ||
|
|
c1b8197b8b | ||
|
|
d5004258db | ||
|
|
207a290edd | ||
|
|
54e087f8e5 | ||
|
|
7c9e6b1fb9 | ||
|
|
517e5e732c | ||
|
|
bc69a62af0 | ||
|
|
1495c9d3ce | ||
|
|
0982220397 | ||
|
|
89b558a1b1 | ||
|
|
30f1d4f18b | ||
|
|
8857aebb70 | ||
|
|
f14833f856 | ||
|
|
6c7bc18ae1 | ||
|
|
193faf6813 | ||
|
|
f8da618789 | ||
|
|
4479b1e662 | ||
|
|
50646e70a0 | ||
|
|
8d6d17c18d | ||
|
|
75d40e6b72 | ||
|
|
609b842e65 | ||
|
|
f7936d4378 | ||
|
|
9487a4f918 | ||
|
|
eca8735e22 | ||
|
|
09fdb887bb | ||
|
|
2335ea3067 | ||
|
|
05cfd3dc52 | ||
|
|
32aaab75b5 | ||
|
|
9ddc8dd93c | ||
|
|
0a88dc95a5 | ||
|
|
86362599c1 | ||
|
|
ca39809658 | ||
|
|
29dd8ade01 | ||
|
|
a7dcd9cccb | ||
|
|
e79f18a636 | ||
|
|
96a5479e9e | ||
|
|
75f853f2db | ||
|
|
7cee801622 | ||
|
|
6031f8437b | ||
|
|
d6da8fafc2 | ||
|
|
d4b49fac4a | ||
|
|
00b58c94c3 | ||
|
|
300fd7c1c4 | ||
|
|
70799e392f | ||
|
|
6cd3d7943d | ||
|
|
2e6af87823 | ||
|
|
42d9b384d4 | ||
|
|
9c6a1eac94 | ||
|
|
cbba014355 | ||
|
|
c5bb1856c2 | ||
|
|
956d1b025a | ||
|
|
b0e825c123 | ||
|
|
5989ee9cf0 | ||
|
|
040e9083da | ||
|
|
72a2a96063 | ||
|
|
ee75ffe823 | ||
|
|
a3e7151633 | ||
|
|
bd23133543 | ||
|
|
7249e3a4d1 | ||
|
|
26e09f85d2 | ||
|
|
5a2bcc47b6 | ||
|
|
382f279783 | ||
|
|
f0bf49f942 | ||
|
|
5821a87ac3 | ||
|
|
fb1e5b9dd5 | ||
|
|
5b35b2be30 | ||
|
|
659830b68a | ||
|
|
a9cb586f30 | ||
|
|
f3460eae48 | ||
|
|
b6561116a0 | ||
|
|
03ce503bd2 | ||
|
|
22dddb8e87 | ||
|
|
133bf3ffb8 | ||
|
|
1406715ce5 | ||
|
|
ba4f7323fe | ||
|
|
66d4960a79 | ||
|
|
8a57ac3caf | ||
|
|
cfc162a31d | ||
|
|
c4ad5e06f2 | ||
|
|
b44e35e8ef | ||
|
|
98fc9ffe14 | ||
|
|
4fef808efa | ||
|
|
1c81155a9a | ||
|
|
3258b00e16 | ||
|
|
cf6cbafa8c | ||
|
|
8474360271 | ||
|
|
6b812ccad3 | ||
|
|
594280e1df | ||
|
|
36873b9fe7 | ||
|
|
93fc018cd4 | ||
|
|
750c1c16db | ||
|
|
fdb63a6540 | ||
|
|
03c4f7219f | ||
|
|
37fcbc34b8 | ||
|
|
82806b00ab | ||
|
|
a174922733 | ||
|
|
94e93aea05 | ||
|
|
ff54b1cb5a | ||
|
|
3df149045d | ||
|
|
768846191b | ||
|
|
4ed77028e9 | ||
|
|
73a07ed669 | ||
|
|
c29a27d79d | ||
|
|
90a89d3468 | ||
|
|
fdc1cdd94c | ||
|
|
56e1412627 | ||
|
|
50e9b4c9da | ||
|
|
35aa10a28f | ||
|
|
7317e16737 | ||
|
|
5129454883 | ||
|
|
078c1dd489 | ||
|
|
3a887ab2fa | ||
|
|
00e61f875a | ||
|
|
f46ec55e0b | ||
|
|
0693fa9149 | ||
|
|
bc29102c18 | ||
|
|
07dedd3d2c | ||
|
|
8d5dd565a6 | ||
|
|
7259195caf | ||
|
|
3723ae025f | ||
|
|
2d971f3a05 | ||
|
|
c8ef530d52 | ||
|
|
0a2699f6cd | ||
|
|
ce8c70450c | ||
|
|
c454729f90 | ||
|
|
79353a6cbb | ||
|
|
98fc0033f5 | ||
|
|
8e0369440f | ||
|
|
54caae51e0 | ||
|
|
370785d515 | ||
|
|
483c137535 | ||
|
|
be14db7b73 | ||
|
|
c24fda189f | ||
|
|
bb5e4685cd | ||
|
|
8e23600ee0 | ||
|
|
31ce8f826b | ||
|
|
26a750ee0a | ||
|
|
2768d80b9b | ||
|
|
459ff72732 | ||
|
|
2a93168d48 | ||
|
|
1adda9817a | ||
|
|
095679845b | ||
|
|
7ad3a0601f | ||
|
|
dc988f7e37 | ||
|
|
3002fa120b | ||
|
|
137de338d2 | ||
|
|
ed6247b640 | ||
|
|
5c3caa3f31 | ||
|
|
22244a9d84 | ||
|
|
b133d9386e | ||
|
|
7213455fd3 | ||
|
|
ec45ca8abe | ||
|
|
477c81ae99 | ||
|
|
d10d5aed72 | ||
|
|
e407588231 | ||
|
|
65f2425902 | ||
|
|
28075f7cf8 | ||
|
|
5a6c6b0509 | ||
|
|
87bee3fb8c | ||
|
|
b0055c502e | ||
|
|
87e336eb79 | ||
|
|
cb9a93d97e | ||
|
|
9e638ccc12 | ||
|
|
285080fc74 | ||
|
|
8156fbfea3 | ||
|
|
cdf46276ac | ||
|
|
a15cb44096 | ||
|
|
191ed21a91 | ||
|
|
52b51b79ff | ||
|
|
214eac46ab | ||
|
|
c583102364 | ||
|
|
81adb15eb0 | ||
|
|
6ff1bbf2a5 | ||
|
|
c664ed7565 | ||
|
|
d7bd31c0ce | ||
|
|
85a08a9288 | ||
|
|
2ed6ae0799 | ||
|
|
601989f924 | ||
|
|
cbf1014ab9 | ||
|
|
bdcf1a3a62 | ||
|
|
ef4a1bef3b | ||
|
|
48bcc07bc6 | ||
|
|
c78b62112a | ||
|
|
e1d80df488 | ||
|
|
c5391bd8f4 | ||
|
|
96711686da | ||
|
|
97a81455b8 | ||
|
|
5bd834b7ac | ||
|
|
dd42f45d1a | ||
|
|
14f286053a | ||
|
|
1d13e51a5c | ||
|
|
2ae4f94eed | ||
|
|
f16b08fbdb | ||
|
|
d8e102a24c | ||
|
|
38156a84fc | ||
|
|
48e85e6690 | ||
|
|
3b9be97792 | ||
|
|
e1fc40d694 | ||
|
|
a8771d03bd | ||
|
|
049beb9bf8 | ||
|
|
522a012053 | ||
|
|
70471186ed | ||
|
|
5378c85c5d | ||
|
|
9c604536ca | ||
|
|
5f1796b39a | ||
|
|
fa45588c49 | ||
|
|
10444e588a | ||
|
|
d8b87ff6eb | ||
|
|
5ffdc44952 | ||
|
|
ab10f29db7 | ||
|
|
01a058b208 | ||
|
|
ad36de82a2 | ||
|
|
976686262d | ||
|
|
5bae4ffe4d | ||
|
|
fe4d567a82 | ||
|
|
9e7aeca447 | ||
|
|
2e8080b0e5 | ||
|
|
5b2cb4b063 | ||
|
|
a7223719a5 | ||
|
|
2f0ad0bf36 | ||
|
|
ce3171a722 | ||
|
|
b705dd8094 | ||
|
|
2b76ba7b4f | ||
|
|
3cf8c162bd | ||
|
|
6f85a989f0 | ||
|
|
426e18ea33 | ||
|
|
07c84df3dc | ||
|
|
2077c23c5e | ||
|
|
9ee6e6c170 | ||
|
|
715ce8b745 | ||
|
|
f7f64651c9 | ||
|
|
9320ea03ee | ||
|
|
ac1ae64ef8 | ||
|
|
97e11f7f5f | ||
|
|
0fdca9b183 | ||
|
|
34a554e64d | ||
|
|
ea12c39cba | ||
|
|
57fa0671e5 | ||
|
|
2bef2c6b87 | ||
|
|
52d9b7d6c4 | ||
|
|
15ba3757ab | ||
|
|
15207665d8 | ||
|
|
78d49e6713 | ||
|
|
8e3a567c03 | ||
|
|
b65b184405 | ||
|
|
c8545ff59d | ||
|
|
bb57fb3a93 | ||
|
|
efc96c8cf4 | ||
|
|
4d72f22b8a | ||
|
|
aa56a170c7 | ||
|
|
d96fa756c6 | ||
|
|
91c6940818 | ||
|
|
7ecf1ac082 | ||
|
|
f61c837b41 | ||
|
|
1c9129497f | ||
|
|
0903b4da87 | ||
|
|
aa10a32d4f | ||
|
|
a0b26ae7cd | ||
|
|
71442efa03 | ||
|
|
94dbde9cfd | ||
|
|
d1ec646b5f | ||
|
|
33de57bd6c | ||
|
|
8367e909c9 | ||
|
|
c19efebc76 | ||
|
|
6122ba335f | ||
|
|
c92be21524 | ||
|
|
a437398993 | ||
|
|
2cc95fda85 | ||
|
|
77afadcc1f | ||
|
|
3ede8e2937 | ||
|
|
330abe14fe | ||
|
|
05b949ed98 | ||
|
|
e0cf910f49 | ||
|
|
07ecee2429 | ||
|
|
f40ad6e90a | ||
|
|
5daa7d6a08 | ||
|
|
2df1ea2097 | ||
|
|
ab760df389 | ||
|
|
2db58f09bc | ||
|
|
4065a59024 | ||
|
|
23723289c2 | ||
|
|
bcf6d7a2aa | ||
|
|
9f1904e8d2 | ||
|
|
57e5599d82 | ||
|
|
7f10566d5e | ||
|
|
4dcf98b9f7 | ||
|
|
91b994b89c | ||
|
|
2d9801ffe3 | ||
|
|
75f1de8f8f | ||
|
|
55c0efae3f | ||
|
|
f166f15f7d | ||
|
|
db7a62f644 | ||
|
|
0c86f64565 | ||
|
|
17ff0972ab | ||
|
|
717297ef29 | ||
|
|
cb6c65183d | ||
|
|
7964f831e9 | ||
|
|
aaae1aad67 | ||
|
|
ce4dc610ed | ||
|
|
615a80835a | ||
|
|
9ab1f56f83 | ||
|
|
3c28480fda | ||
|
|
af8e086aac | ||
|
|
cb302fbb63 | ||
|
|
b6a056799c | ||
|
|
15a578e6ac | ||
|
|
c3ad0bc9e7 | ||
|
|
a0fc77cd76 | ||
|
|
284fb49f60 | ||
|
|
4c116e1577 | ||
|
|
700c0e3e73 | ||
|
|
042ef30a9f | ||
|
|
d59e3e5bc8 | ||
|
|
a2fb7884f9 | ||
|
|
c34dbebcc5 | ||
|
|
737407c953 | ||
|
|
d40081b0a8 | ||
|
|
bc10246974 | ||
|
|
02a7c27ec6 | ||
|
|
e34e8ddb9a | ||
|
|
aec7cdefde | ||
|
|
6996974376 | ||
|
|
9d24025496 | ||
|
|
5ec5369289 | ||
|
|
bb12b0c8b9 | ||
|
|
0140f5057d | ||
|
|
459101cb4f | ||
|
|
26a3ca0413 | ||
|
|
692e10ec94 | ||
|
|
d84a886e87 | ||
|
|
80f3bc6c1b | ||
|
|
2acfea2f0c | ||
|
|
38095cf8b8 | ||
|
|
af062aa5f6 | ||
|
|
9874d008aa | ||
|
|
1f129feed8 | ||
|
|
88da45d9dd | ||
|
|
a76eafa0d4 | ||
|
|
8c2a910a94 | ||
|
|
f7e8725406 | ||
|
|
52646ee9f5 | ||
|
|
e363e53516 | ||
|
|
6defdcd018 | ||
|
|
75ad2e82fd | ||
|
|
c2980f34c7 | ||
|
|
7117ec5a7c | ||
|
|
ab5d5a3e79 | ||
|
|
ffafad5d4a | ||
|
|
46afde019b | ||
|
|
6f5ed78d0a | ||
|
|
2b71c260d8 | ||
|
|
832284e710 | ||
|
|
aa068bd0a0 | ||
|
|
926462e218 | ||
|
|
ebe68c9075 | ||
|
|
b3720deda4 | ||
|
|
1a14c19cd2 | ||
|
|
f9426f30a9 | ||
|
|
05cf98fae8 | ||
|
|
6e5fd5eb58 | ||
|
|
8edebd56be | ||
|
|
a417b4eda9 | ||
|
|
acf09b805f | ||
|
|
1ef91d3a21 | ||
|
|
3867d1619e | ||
|
|
549f10c150 | ||
|
|
280ceef46b | ||
|
|
7e652b9f9f | ||
|
|
1527dfc7c1 | ||
|
|
36d9022c7d | ||
|
|
67272dddd3 | ||
|
|
52ab3dbba4 | ||
|
|
66a175e48d | ||
|
|
e24da32424 | ||
|
|
a13b720598 | ||
|
|
28769a13eb | ||
|
|
86971c7b86 | ||
|
|
daccab5a07 | ||
|
|
4d32d93ee2 | ||
|
|
abc9eb7bdc | ||
|
|
ec19dcc8f8 | ||
|
|
9051e411d0 | ||
|
|
382f9ce95d |
42
.github/CONTRIBUTING.md
vendored
42
.github/CONTRIBUTING.md
vendored
@@ -7,18 +7,18 @@ Bug reports and feature requests
|
||||
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.
|
||||
|
||||
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
|
||||
Default **language here is English**. So please prepare your contributions in English.
|
||||
Default **language here is english**. So please prepare your contributions in english.
|
||||
|
||||
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
|
||||
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
|
||||
3. Tell us the version you are using! (look at /htdocs/admin/system/dolibarr.php? and check if you are using the latest version)
|
||||
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging information whenever possible).
|
||||
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
|
||||
5. Delete unnecessary submissions.
|
||||
6. **Check your Message at Preview before sending.**
|
||||
|
||||
|
||||
|
||||
<a name="code"></a>Submit code
|
||||
<a name="code"></a>Code
|
||||
---------------------
|
||||
|
||||
### Basic workflow
|
||||
@@ -35,22 +35,20 @@ Default **language here is English**. So please prepare your contributions in En
|
||||
|
||||
Unless you're fixing a bug, all pull requests should be made against the *develop* branch.
|
||||
|
||||
If you're fixing a bug, it is preferred that you cook your fix and pull request it against an oldest version affected.
|
||||
If you're fixing a bug, it is preferred that you cook your fix and pull request it
|
||||
against the oldest version affected that's still supported.
|
||||
|
||||
We recommend to push it into N - 2 for N the latest version available, if not possible into version N - 1, and finally into develop.
|
||||
This is just a recommendation, currently, if you push a bug fix on a very old version, it is still merged and propagated into
|
||||
higher versions.
|
||||
We officially support versions N, N − 1 and N − 2 for N the latest version available.
|
||||
|
||||
The rule N - 2 is just a tip if you don't know which version to choose to get the best the best compromise between ease of correction
|
||||
and number of potential beneficiaries of the correction.
|
||||
Choose your base branch accordingly.
|
||||
|
||||
### General rules
|
||||
Please don't edit the ChangeLog file. This file is generated from all commit messages during release process by the project manager.
|
||||
Please don't edit the ChangeLog file. File will be generated from all commit messages during release process by the project manager.
|
||||
|
||||
### <a name="commits"></a>Commits
|
||||
Use clear commit messages with the following structure:
|
||||
|
||||
```plaintext
|
||||
```
|
||||
[KEYWORD] [ISSUENUM] DESC
|
||||
|
||||
LONGDESC
|
||||
@@ -68,13 +66,10 @@ where
|
||||
#### Keyword
|
||||
In uppercase if you want to have the log comment appears into the generated ChangeLog file.
|
||||
|
||||
The keyword can be omitted if your commit does not fit in any of the following categories:
|
||||
|
||||
The keyword can be ommitted if your commit does not fit in any of the following categories:
|
||||
- Fix/FIX: for a bug fix
|
||||
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
|
||||
- Close/CLOSE: for closing a referenced feature request
|
||||
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is preferred)
|
||||
- Perf/PERF: for a performance enhancement
|
||||
- Qual/QUAL: for quality code enhancement or re-engineering
|
||||
|
||||
#### Issuenum
|
||||
If your commit fixes a referenced bug or feature request.
|
||||
@@ -95,19 +90,19 @@ Feel free to express technical details, use cases or anything relevant to the cu
|
||||
|
||||
This section can span multiple lines.
|
||||
|
||||
If your PR is a change on interface, you must also paste a screenshot showing the new screen.
|
||||
Try to keep lines under 120 characters.
|
||||
|
||||
#### Examples
|
||||
<pre>
|
||||
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
|
||||
or
|
||||
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
|
||||
NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
|
||||
or
|
||||
NEW|New|QUAL|Qual|PERF|Perf Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
|
||||
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
|
||||
or
|
||||
Short description (when the commit is not introducing feature nor closing a bug)
|
||||
|
||||
Long description (Can span across multiple lines).
|
||||
Long description (Can span accross multiple lines).
|
||||
</pre>
|
||||
|
||||
### Pull Requests
|
||||
@@ -124,7 +119,7 @@ Also, some code changes need a prior approbation:
|
||||
|
||||
* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-jedi in your issue) to see if such a library can be accepted.
|
||||
|
||||
* if you add new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
|
||||
* if you add a new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
|
||||
|
||||
Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR (A label is added in such a case).
|
||||
|
||||
@@ -135,8 +130,7 @@ If your PR has errors reported by the Continuous Integration Platform, it means
|
||||
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
|
||||
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR.
|
||||
|
||||
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%.
|
||||
A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
|
||||
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%. A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
|
||||
|
||||
|
||||
### Resources
|
||||
@@ -150,7 +144,7 @@ All other translations are managed online at [Transifex](https://www.transifex.c
|
||||
|
||||
Translations done on transifex are available in the next major release.
|
||||
|
||||
Note: Sometimes, the source text (English) is modified. In such a case, the translation is reset. Transifex assume that if the original source
|
||||
Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
|
||||
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
|
||||
to retrieve all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.
|
||||
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -68,4 +68,4 @@ body:
|
||||
id: files
|
||||
attributes:
|
||||
label: Attached files
|
||||
description: Screenshots, screencasts, dolibarr.log, debugging information
|
||||
description: Screenshots, screencasts, dolibarr.log, debugging informations
|
||||
|
||||
11
.github/PULL_REQUEST_TEMPLATE.md
vendored
11
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,7 +1,7 @@
|
||||
# Instructions
|
||||
*This is a template to help you make good pull requests. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
|
||||
*Please:*
|
||||
- *only keep the "FIX", "CLOSE", "NEW", "PERF" or "QUAL" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
|
||||
- *only keep the "FIX", "CLOSE" or "NEW" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
|
||||
- *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)*
|
||||
- *replace the bracket enclosed texts with meaningful information*
|
||||
|
||||
@@ -16,12 +16,3 @@
|
||||
|
||||
# NEW|New [*Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# PERF|Perf #[*issue_number Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# QUAL|Qual #[*issue_number Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
3
.github/changed-lines-count-labeler.yml
vendored
Normal file
3
.github/changed-lines-count-labeler.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Add this tag for any changes for more than 1 line
|
||||
"Pending analysis of PR (maintenance team)":
|
||||
min: 1
|
||||
588
.github/logToCs.py
vendored
588
.github/logToCs.py
vendored
@@ -1,588 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# pylint: disable=invalid-name
|
||||
"""
|
||||
Convert a log to CheckStyle format.
|
||||
|
||||
Url: https://github.com/mdeweerd/LogToCheckStyle
|
||||
|
||||
The log can then be used for generating annotations in a github action.
|
||||
|
||||
Note: this script is very young and "quick and dirty".
|
||||
Patterns can be added to "PATTERNS" to match more messages.
|
||||
|
||||
# Examples
|
||||
|
||||
Assumes that logToCs.py is available as .github/logToCs.py.
|
||||
|
||||
## Example 1:
|
||||
|
||||
|
||||
```yaml
|
||||
- run: |
|
||||
pre-commit run -all-files | tee pre-commit.log
|
||||
.github/logToCs.py pre-commit.log pre-commit.xml
|
||||
- uses: staabm/annotate-pull-request-from-checkstyle-action@v1
|
||||
with:
|
||||
files: pre-commit.xml
|
||||
notices-as-warnings: true # optional
|
||||
```
|
||||
|
||||
## Example 2:
|
||||
|
||||
|
||||
```yaml
|
||||
- run: |
|
||||
pre-commit run --all-files | tee pre-commit.log
|
||||
- name: Add results to PR
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
.github/logToCs.py pre-commit.log | cs2pr
|
||||
```
|
||||
|
||||
Author(s):
|
||||
- https://github.com/mdeweerd
|
||||
|
||||
License: MIT License
|
||||
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import datetime as dt
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET # nosec
|
||||
|
||||
|
||||
def remove_prefix(string, prefix):
|
||||
"""
|
||||
Remove prefix from string
|
||||
|
||||
Provided for backward compatibility.
|
||||
"""
|
||||
if prefix and string.startswith(prefix):
|
||||
return string[len(prefix) :]
|
||||
return string
|
||||
|
||||
|
||||
def convert_notices_to_checkstyle(notices, root_path=None):
|
||||
"""
|
||||
Convert annotation list to CheckStyle xml string
|
||||
"""
|
||||
root = ET.Element("checkstyle")
|
||||
for fields in notices:
|
||||
add_error_entry(root, **fields, root_path=root_path)
|
||||
return ET.tostring(root, encoding="utf_8").decode("utf_8")
|
||||
|
||||
|
||||
def convert_lines_to_notices(lines):
|
||||
"""
|
||||
Convert provided message to CheckStyle format.
|
||||
"""
|
||||
notices = []
|
||||
for line in lines:
|
||||
fields = parse_message(line)
|
||||
if fields:
|
||||
notices.append(fields)
|
||||
return notices
|
||||
|
||||
|
||||
def convert_text_to_notices(text):
|
||||
"""
|
||||
Convert provided message to CheckStyle format.
|
||||
"""
|
||||
return parse_file(text)
|
||||
|
||||
|
||||
# Initial version for Checkrun from:
|
||||
# https://github.com/tayfun/flake8-your-pr/blob/50a175cde4dd26a656734c5b64ba1e5bb27151cb/src/main.py#L7C1-L123C36
|
||||
# MIT Licence
|
||||
class CheckRun:
|
||||
"""
|
||||
Represents the check run
|
||||
"""
|
||||
|
||||
GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN", None)
|
||||
GITHUB_EVENT_PATH = os.environ.get("GITHUB_EVENT_PATH", None)
|
||||
|
||||
URI = "https://api.github.com"
|
||||
API_VERSION = "2022-11-28"
|
||||
ACCEPT_HEADER_VALUE = "application/vnd.github+json"
|
||||
AUTH_HEADER_VALUE = f"Bearer {GITHUB_TOKEN}"
|
||||
# This is the max annotations Github API accepts in one go.
|
||||
MAX_ANNOTATIONS = 50
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Initialise Check Run object with information from checkrun
|
||||
"""
|
||||
self.read_event_file()
|
||||
self.read_meta_data()
|
||||
|
||||
def read_event_file(self):
|
||||
"""
|
||||
Read the event file to get the event information later.
|
||||
"""
|
||||
if self.GITHUB_EVENT_PATH is None:
|
||||
raise ValueError("Not running in github workflow")
|
||||
with open(self.GITHUB_EVENT_PATH, encoding="utf_8") as event_file:
|
||||
self.event = json.loads(event_file.read())
|
||||
|
||||
def read_meta_data(self):
|
||||
"""
|
||||
Get meta data from event information
|
||||
"""
|
||||
self.repo_full_name = self.event["repository"]["full_name"]
|
||||
pull_request = self.event.get("pull_request")
|
||||
print("%r", self.event)
|
||||
if pull_request:
|
||||
self.head_sha = pull_request["head"]["sha"]
|
||||
else:
|
||||
print("%r", self.event)
|
||||
check_suite = self.event.get("check_suite", None)
|
||||
if check_suite is not None:
|
||||
self.head_sha = check_suite["pull_requests"][0]["base"]["sha"]
|
||||
else:
|
||||
self.head_sha = None # Can't annotate?
|
||||
|
||||
def submit( # pylint: disable=too-many-arguments
|
||||
self,
|
||||
notices,
|
||||
title=None,
|
||||
summary=None,
|
||||
text=None,
|
||||
conclusion=None,
|
||||
):
|
||||
"""
|
||||
Submit annotations to github
|
||||
|
||||
See:
|
||||
https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28
|
||||
#update-a-check-run
|
||||
|
||||
:param conclusion: success, failure
|
||||
"""
|
||||
# pylint: disable=import-outside-toplevel
|
||||
import requests # Import here to not impose presence of module
|
||||
|
||||
if self.head_sha is None:
|
||||
return
|
||||
|
||||
output = {
|
||||
"annotations": notices[: CheckRun.MAX_ANNOTATIONS],
|
||||
}
|
||||
if title is not None:
|
||||
output["title"] = title
|
||||
if summary is not None:
|
||||
output["summary"] = summary
|
||||
if text is not None:
|
||||
output["text"] = text
|
||||
if conclusion is None:
|
||||
# action_required, cancelled, failure, neutral, success
|
||||
# skipped, stale, timed_out
|
||||
if bool(notices):
|
||||
conclusion = "failure"
|
||||
else:
|
||||
conclusion = "success"
|
||||
|
||||
payload = {
|
||||
"name": "log-to-pr-annotation",
|
||||
"head_sha": self.head_sha,
|
||||
"status": "completed", # queued, in_progress, completed
|
||||
"conclusion": conclusion,
|
||||
# "started_at": dt.datetime.now(dt.timezone.utc).isoformat(),
|
||||
"completed_at": dt.datetime.now(dt.timezone.utc).isoformat(),
|
||||
"output": output,
|
||||
}
|
||||
|
||||
# Create the check-run
|
||||
response = requests.post(
|
||||
f"{self.URI}/repos/{self.repo_full_name}/check-runs",
|
||||
headers={
|
||||
"Accept": self.ACCEPT_HEADER_VALUE,
|
||||
"Authorization": self.AUTH_HEADER_VALUE,
|
||||
"X-GitHub-Api-Version": self.API_VERSION,
|
||||
},
|
||||
json=payload,
|
||||
timeout=30,
|
||||
)
|
||||
print(response.content)
|
||||
response.raise_for_status()
|
||||
|
||||
|
||||
ANY_REGEX = r".*?"
|
||||
FILE_REGEX = r"\s*(?P<file_name>\S.*?)\s*?"
|
||||
FILEGROUP_REGEX = r"\s*(?P<file_group>\S.*?)\s*?"
|
||||
EOL_REGEX = r"[\r\n]"
|
||||
LINE_REGEX = r"\s*(?P<line>\d+?)\s*?"
|
||||
COLUMN_REGEX = r"\s*(?P<column>\d+?)\s*?"
|
||||
SEVERITY_REGEX = r"\s*(?P<severity>error|warning|notice|style|info)\s*?"
|
||||
MSG_REGEX = r"\s*(?P<message>.+?)\s*?"
|
||||
MULTILINE_MSG_REGEX = r"\s*(?P<message>(?:.|.[\r\n])+)"
|
||||
# cpplint confidence index
|
||||
CONFIDENCE_REGEX = r"\s*\[(?P<confidence>\d+)\]\s*?"
|
||||
|
||||
|
||||
# List of message patterns, add more specific patterns earlier in the list
|
||||
# Creating patterns by using constants makes them easier to define and read.
|
||||
PATTERNS = [
|
||||
# beautysh
|
||||
# File ftp.sh: error: "esac" before "case" in line 90.
|
||||
re.compile(
|
||||
f"^File {FILE_REGEX}:{SEVERITY_REGEX}:"
|
||||
f" {MSG_REGEX} in line {LINE_REGEX}.$"
|
||||
),
|
||||
# beautysh
|
||||
# File socks4echo.sh: error: indent/outdent mismatch: -2.
|
||||
re.compile(f"^File {FILE_REGEX}:{SEVERITY_REGEX}: {MSG_REGEX}$"),
|
||||
# yamllint
|
||||
# ##[group].pre-commit-config.yaml
|
||||
# ##[error]97:14 [trailing-spaces] trailing spaces
|
||||
# ##[endgroup]
|
||||
re.compile(rf"^##\[group\]{FILEGROUP_REGEX}$"), # Start file group
|
||||
re.compile(
|
||||
rf"^##\[{SEVERITY_REGEX}\]{LINE_REGEX}:{COLUMN_REGEX}{MSG_REGEX}$"
|
||||
), # Msg
|
||||
re.compile(r"^##(?P<file_endgroup>\[endgroup\])$"), # End file group
|
||||
# File socks4echo.sh: error: indent/outdent mismatch: -2.
|
||||
re.compile(f"^File {FILE_REGEX}:{SEVERITY_REGEX}: {MSG_REGEX}$"),
|
||||
# Emacs style
|
||||
# path/to/file:845:5: error - Expected 1 space after closing brace
|
||||
re.compile(
|
||||
rf"^{FILE_REGEX}:{LINE_REGEX}:{COLUMN_REGEX}:{SEVERITY_REGEX}"
|
||||
rf"-?\s{MSG_REGEX}$"
|
||||
),
|
||||
# ESLint (JavaScript Linter), RoboCop, shellcheck
|
||||
# path/to/file.js:10:2: Some linting issue
|
||||
# path/to/file.rb:10:5: Style/Indentation: Incorrect indentation detected
|
||||
# path/to/script.sh:10:1: SC2034: Some shell script issue
|
||||
re.compile(f"^{FILE_REGEX}:{LINE_REGEX}:{COLUMN_REGEX}: {MSG_REGEX}$"),
|
||||
# Cpplint default output:
|
||||
# '%s:%s: %s [%s] [%d]\n'
|
||||
# % (filename, linenum, message, category, confidence)
|
||||
re.compile(f"^{FILE_REGEX}:{LINE_REGEX}:{MSG_REGEX}{CONFIDENCE_REGEX}$"),
|
||||
# MSVC
|
||||
# file.cpp(10): error C1234: Some error message
|
||||
re.compile(
|
||||
f"^{FILE_REGEX}\\({LINE_REGEX}\\):{SEVERITY_REGEX}{MSG_REGEX}$"
|
||||
),
|
||||
# Java compiler
|
||||
# File.java:10: error: Some error message
|
||||
re.compile(f"^{FILE_REGEX}:{LINE_REGEX}:{SEVERITY_REGEX}:{MSG_REGEX}$"),
|
||||
# Python
|
||||
# File ".../logToCs.py", line 90 (note: code line follows)
|
||||
re.compile(f'^File "{FILE_REGEX}", line {LINE_REGEX}$'),
|
||||
# Pylint, others
|
||||
# path/to/file.py:10: [C0111] Missing docstring
|
||||
# others
|
||||
re.compile(f"^{FILE_REGEX}:{LINE_REGEX}: {MSG_REGEX}$"),
|
||||
# Shellcheck:
|
||||
# In script.sh line 76:
|
||||
re.compile(
|
||||
f"^In {FILE_REGEX} line {LINE_REGEX}:{EOL_REGEX}?"
|
||||
f"({MULTILINE_MSG_REGEX})?{EOL_REGEX}{EOL_REGEX}"
|
||||
),
|
||||
# eslint:
|
||||
# /path/to/filename
|
||||
# 14:5 error Unexpected trailing comma comma-dangle
|
||||
re.compile(
|
||||
f"^{FILE_REGEX}{EOL_REGEX}"
|
||||
rf"\s+{LINE_REGEX}:{COLUMN_REGEX}\s+{SEVERITY_REGEX}\s+{MSG_REGEX}$"
|
||||
),
|
||||
]
|
||||
|
||||
# Exceptionnaly some regexes match messages that are not error.
|
||||
# This pattern matches those exceptions
|
||||
EXCLUDE_MSG_PATTERN = re.compile(
|
||||
r"^("
|
||||
r"Placeholder pattern" # To remove on first message pattern
|
||||
r")"
|
||||
)
|
||||
|
||||
# Exceptionnaly some regexes match messages that are not error.
|
||||
# This pattern matches those exceptions
|
||||
EXCLUDE_FILE_PATTERN = re.compile(
|
||||
r"^("
|
||||
# Codespell: (appears as a file name):
|
||||
r"Used config files\b"
|
||||
r")"
|
||||
)
|
||||
|
||||
# Severities available in CodeSniffer report format
|
||||
SEVERITY_NOTICE = "notice"
|
||||
SEVERITY_WARNING = "warning"
|
||||
SEVERITY_ERROR = "error"
|
||||
|
||||
|
||||
def strip_ansi(text: str):
|
||||
"""
|
||||
Strip ANSI escape sequences from string (colors, etc)
|
||||
"""
|
||||
return re.sub(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])", "", text)
|
||||
|
||||
|
||||
def parse_file(text):
|
||||
"""
|
||||
Parse all messages in a file
|
||||
|
||||
Returns the fields in a dict.
|
||||
"""
|
||||
# pylint: disable=too-many-branches,too-many-statements
|
||||
# regex required to allow same group names
|
||||
try:
|
||||
import regex # pylint: disable=import-outside-toplevel
|
||||
except ImportError as exc:
|
||||
raise ImportError(
|
||||
"The 'parsefile' method requires 'python -m pip install regex'"
|
||||
) from exc
|
||||
|
||||
patterns = [pattern.pattern for pattern in PATTERNS]
|
||||
# patterns = [PATTERNS[0].pattern]
|
||||
|
||||
file_group = None # The file name for the group (if any)
|
||||
full_regex = "(?:(?:" + (")|(?:".join(patterns)) + "))"
|
||||
results = []
|
||||
|
||||
for fields in regex.finditer(
|
||||
full_regex, strip_ansi(text), regex.MULTILINE | regex.IGNORECASE
|
||||
):
|
||||
if not fields:
|
||||
continue
|
||||
result = fields.groupdict()
|
||||
|
||||
if len(result) == 0:
|
||||
continue
|
||||
|
||||
severity = result.get("severity", None)
|
||||
file_name = result.get("file_name", None)
|
||||
confidence = result.pop("confidence", None)
|
||||
new_file_group = result.pop("file_group", None)
|
||||
file_endgroup = result.pop("file_endgroup", None)
|
||||
message = result.get("message", None)
|
||||
|
||||
if new_file_group is not None:
|
||||
# Start of file_group, just store file
|
||||
file_group = new_file_group
|
||||
continue
|
||||
|
||||
if file_endgroup is not None:
|
||||
file_group = None
|
||||
continue
|
||||
|
||||
if file_name is None:
|
||||
if file_group is not None:
|
||||
file_name = file_group
|
||||
result["file_name"] = file_name
|
||||
else:
|
||||
# No filename, skip
|
||||
continue
|
||||
else:
|
||||
if EXCLUDE_FILE_PATTERN.search(file_name):
|
||||
# This file_name is excluded
|
||||
continue
|
||||
|
||||
if message is not None:
|
||||
if EXCLUDE_MSG_PATTERN.search(message):
|
||||
# This message is excluded
|
||||
continue
|
||||
|
||||
if confidence is not None:
|
||||
# Convert confidence level of cpplint
|
||||
# to warning, etc.
|
||||
confidence = int(confidence)
|
||||
|
||||
if confidence <= 1:
|
||||
severity = SEVERITY_NOTICE
|
||||
elif confidence >= 5:
|
||||
severity = SEVERITY_ERROR
|
||||
else:
|
||||
severity = SEVERITY_WARNING
|
||||
|
||||
if severity is None:
|
||||
severity = SEVERITY_ERROR
|
||||
else:
|
||||
severity = severity.lower()
|
||||
|
||||
if severity in ["info", "style"]:
|
||||
severity = SEVERITY_NOTICE
|
||||
|
||||
result["severity"] = severity
|
||||
|
||||
results.append(result)
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def parse_message(message):
|
||||
"""
|
||||
Parse message until it matches a pattern.
|
||||
|
||||
Returns the fields in a dict.
|
||||
"""
|
||||
for pattern in PATTERNS:
|
||||
fields = pattern.match(message, re.IGNORECASE)
|
||||
if not fields:
|
||||
continue
|
||||
result = fields.groupdict()
|
||||
if len(result) == 0:
|
||||
continue
|
||||
|
||||
if "confidence" in result:
|
||||
# Convert confidence level of cpplint
|
||||
# to warning, etc.
|
||||
confidence = int(result["confidence"])
|
||||
del result["confidence"]
|
||||
|
||||
if confidence <= 1:
|
||||
severity = SEVERITY_NOTICE
|
||||
elif confidence >= 5:
|
||||
severity = SEVERITY_ERROR
|
||||
else:
|
||||
severity = SEVERITY_WARNING
|
||||
result["severity"] = severity
|
||||
|
||||
if "severity" not in result:
|
||||
result["severity"] = SEVERITY_ERROR
|
||||
else:
|
||||
result["severity"] = result["severity"].lower()
|
||||
|
||||
if result["severity"] in ["info", "style"]:
|
||||
result["severity"] = SEVERITY_NOTICE
|
||||
|
||||
return result
|
||||
|
||||
# Nothing matched
|
||||
return None
|
||||
|
||||
|
||||
def add_error_entry( # pylint: disable=too-many-arguments
|
||||
root,
|
||||
severity,
|
||||
file_name,
|
||||
line=None,
|
||||
column=None,
|
||||
message=None,
|
||||
source=None,
|
||||
root_path=None,
|
||||
):
|
||||
"""
|
||||
Add error information to the CheckStyle output being created.
|
||||
"""
|
||||
file_element = find_or_create_file_element(
|
||||
root, file_name, root_path=root_path
|
||||
)
|
||||
error_element = ET.SubElement(file_element, "error")
|
||||
error_element.set("severity", severity)
|
||||
if line:
|
||||
error_element.set("line", line)
|
||||
if column:
|
||||
error_element.set("column", column)
|
||||
if message:
|
||||
error_element.set("message", message)
|
||||
if source:
|
||||
# To verify if this is a valid attribute
|
||||
error_element.set("source", source)
|
||||
|
||||
|
||||
def find_or_create_file_element(root, file_name: str, root_path=None):
|
||||
"""
|
||||
Find/create file element in XML document tree.
|
||||
"""
|
||||
|
||||
if root_path is not None:
|
||||
file_name = remove_prefix(file_name, root_path)
|
||||
for file_element in root.findall("file"):
|
||||
if file_element.get("name") == file_name:
|
||||
return file_element
|
||||
file_element = ET.SubElement(root, "file")
|
||||
file_element.set("name", file_name)
|
||||
return file_element
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Parse the script arguments and get the conversion done.
|
||||
"""
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Convert messages to Checkstyle XML format."
|
||||
)
|
||||
parser.add_argument(
|
||||
"input", help="Input file. Use '-' for stdin.", nargs="?", default="-"
|
||||
)
|
||||
parser.add_argument(
|
||||
"output",
|
||||
help="Output file. Use '-' for stdout.",
|
||||
nargs="?",
|
||||
default="-",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-i",
|
||||
"--in",
|
||||
dest="input_named",
|
||||
help="Input filename. Overrides positional input.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-o",
|
||||
"--out",
|
||||
dest="output_named",
|
||||
help="Output filename. Overrides positional output.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--root",
|
||||
metavar="ROOT_PATH",
|
||||
help="Root directory to remove from file paths."
|
||||
" Defaults to working directory.",
|
||||
default=os.getcwd(),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--github-annotate",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
help="Annotate when in Github workflow.",
|
||||
# Currently disabled,
|
||||
# Future: (os.environ.get("GITHUB_EVENT_PATH", None) is not None),
|
||||
default=False,
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.input == "-" and args.input_named:
|
||||
with open(
|
||||
args.input_named, encoding="utf_8", errors="surrogateescape"
|
||||
) as input_file:
|
||||
text = input_file.read()
|
||||
elif args.input != "-":
|
||||
with open(
|
||||
args.input, encoding="utf_8", errors="surrogateescape"
|
||||
) as input_file:
|
||||
text = input_file.read()
|
||||
else:
|
||||
text = sys.stdin.read()
|
||||
|
||||
root_path = os.path.join(args.root, "")
|
||||
|
||||
try:
|
||||
notices = convert_text_to_notices(text)
|
||||
except ImportError:
|
||||
notices = convert_lines_to_notices(re.split(r"[\r\n]+", text))
|
||||
|
||||
checkstyle_xml = convert_notices_to_checkstyle(
|
||||
notices, root_path=root_path
|
||||
)
|
||||
|
||||
if args.output == "-" and args.output_named:
|
||||
with open(args.output_named, "w", encoding="utf_8") as output_file:
|
||||
output_file.write(checkstyle_xml)
|
||||
elif args.output != "-":
|
||||
with open(args.output, "w", encoding="utf_8") as output_file:
|
||||
output_file.write(checkstyle_xml)
|
||||
else:
|
||||
print(checkstyle_xml)
|
||||
|
||||
if args.github_annotate:
|
||||
checkrun = CheckRun()
|
||||
checkrun.submit(notices)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
86
.github/scripts/get_changed_php.sh
vendored
Executable file
86
.github/scripts/get_changed_php.sh
vendored
Executable file
@@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# This script retrieves the list of changed PHP files for a pull request
|
||||
# using the GitHub API and sets two outputs:
|
||||
# - any_changed: "true" if at least one PHP file changed, "false" otherwise
|
||||
# - all_changed_files: space-separated list of changed PHP file paths
|
||||
#
|
||||
# Required environment variables:
|
||||
# GITHUB_TOKEN - GitHub token with repo access
|
||||
# GITHUB_REPOSITORY - "owner/repo"
|
||||
# GITHUB_EVENT_PATH - Path to the event JSON payload
|
||||
|
||||
# Verify required environment variables are set
|
||||
if [[ -z "${GITHUB_TOKEN:-}" ]]; then
|
||||
echo "GITHUB_TOKEN is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z "${GITHUB_REPOSITORY:-}" ]]; then
|
||||
echo "GITHUB_REPOSITORY is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z "${GITHUB_EVENT_PATH:-}" ]]; then
|
||||
echo "GITHUB_EVENT_PATH is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract the pull request number from the event payload
|
||||
pr_number=$(jq --raw-output '.pull_request.number' "$GITHUB_EVENT_PATH")
|
||||
if [[ "$pr_number" == "null" ]]; then
|
||||
echo "Not a pull request event"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Split repository into owner and repo name
|
||||
# Split repository into owner and repo name using Bash parameter expansion
|
||||
owner="${GITHUB_REPOSITORY%%/*}" # Extract text before the first '/'
|
||||
repo="${GITHUB_REPOSITORY##*/}" # Extract text after the last '/'
|
||||
|
||||
page=1
|
||||
per_page=100
|
||||
changed_php_files=()
|
||||
|
||||
# Loop through all pages to gather changed files
|
||||
while true; do
|
||||
response=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" \
|
||||
"https://api.github.com/repos/${owner}/${repo}/pulls/${pr_number}/files?per_page=${per_page}&page=${page}")
|
||||
|
||||
# Filter for files ending with .php and add them to the list
|
||||
mapfile -t files < <(echo "$response" | jq -r '.[] | select(.filename | test("\\.php$")) | .filename')
|
||||
changed_php_files+=("${files[@]}")
|
||||
|
||||
# Check if we have reached the last page (less than per_page results)
|
||||
count=$(echo "$response" | jq 'length')
|
||||
if (( count < per_page )); then
|
||||
break
|
||||
fi
|
||||
((page++))
|
||||
done
|
||||
|
||||
|
||||
# Build a space-separated string of changed PHP files
|
||||
# This does not cope with files that have spaces.
|
||||
# But such files do not exist in the project (at least not for the
|
||||
# files we are filtering).
|
||||
all_changed_files=$(IFS=" " ; echo "${changed_php_files[*]}")
|
||||
|
||||
|
||||
# Determine changed files flag
|
||||
if [ -z "$all_changed_files" ]; then
|
||||
any_changed="false"
|
||||
else
|
||||
any_changed="true"
|
||||
fi
|
||||
|
||||
# Set outputs for GitHub Actions if GITHUB_OUTPUT is available
|
||||
if [ -n "${GITHUB_OUTPUT:-}" ]; then
|
||||
echo "any_changed=${any_changed}" >> "$GITHUB_OUTPUT"
|
||||
echo "all_changed_files=${all_changed_files}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
# Otherwise, print the outputs
|
||||
echo "any_changed=${any_changed}"
|
||||
echo "all_changed_files=${all_changed_files}"
|
||||
fi
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
fetch-depth: 1
|
||||
#php-version: '7.1'
|
||||
- name: 'Qodana Scan'
|
||||
uses: JetBrains/qodana-action@v2023.2.1
|
||||
uses: JetBrains/qodana-action@v2023.1.5
|
||||
#with:
|
||||
# php-version: '7.1'
|
||||
env:
|
||||
@@ -2,9 +2,8 @@
|
||||
name: "Exakat analysis"
|
||||
|
||||
on:
|
||||
# execute once a month, the 1st
|
||||
schedule:
|
||||
- cron: "0 20 1 * *"
|
||||
- cron: "0 20 * * *"
|
||||
workflow_dispatch:
|
||||
branches:
|
||||
- develop
|
||||
@@ -16,13 +15,11 @@ jobs:
|
||||
exakat:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Exakat
|
||||
uses: docker://exakat/exakat-ga
|
||||
with:
|
||||
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
|
||||
ignore_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
|
||||
file_extensions: php
|
||||
project_reports: Perfile
|
||||
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
|
||||
ignore_dirs: '/htdocs/includes,/build,/dev,/doc,/scripts,/test'
|
||||
@@ -235,7 +235,7 @@ jobs:
|
||||
sudo cat /etc/apache2/sites-enabled/000-default.conf
|
||||
sudo service apache2 restart
|
||||
curl -I localhost
|
||||
- name: Check Apache availability
|
||||
- name: Chech Apache availability
|
||||
run: |
|
||||
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
|
||||
# Ensure we stop on error with set -e
|
||||
|
||||
@@ -190,7 +190,7 @@ jobs:
|
||||
sudo cat /etc/apache2/sites-enabled/000-default.conf
|
||||
sudo service apache2 restart
|
||||
curl -I localhost
|
||||
- name: Check Apache availability
|
||||
- name: Chech Apache availability
|
||||
run: |
|
||||
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
|
||||
# Ensure we stop on error with set -e
|
||||
|
||||
2
.github/workflows/phpcs.yml
vendored
2
.github/workflows/phpcs.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
phpcs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 50 # important!
|
||||
|
||||
|
||||
29
.github/workflows/phpcsfixer.yml.disabled
vendored
29
.github/workflows/phpcsfixer.yml.disabled
vendored
@@ -1,8 +1,6 @@
|
||||
name: GitHub CI PHPCS and PHPCBF
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
on: push
|
||||
#on:
|
||||
# push:
|
||||
# paths:
|
||||
@@ -13,7 +11,7 @@ jobs:
|
||||
# uses: ./.github/workflows/files_changed.yaml
|
||||
# with:
|
||||
# folder_path: .*
|
||||
|
||||
|
||||
linter_name:
|
||||
name: Run & fix PHP Code Sniffer
|
||||
runs-on: ubuntu-latest
|
||||
@@ -21,9 +19,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
# fetch-depth: 10
|
||||
fetch-depth: 10
|
||||
|
||||
- name: echo Get list of all changed files
|
||||
run: |
|
||||
@@ -43,21 +39,6 @@ jobs:
|
||||
phpcs_ref_name: ${{github.ref_name}}
|
||||
phpcs_github_event_name: ${{github.event_name}}
|
||||
phpcs_files: ${{ needs.filesChanged.outputs.all_changed_files }}
|
||||
|
||||
#- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
|
||||
# with:
|
||||
# commit_message: Fix PHPCS errors by GitHub PHPCSfixer action
|
||||
|
||||
- name: Commit changes
|
||||
uses: EndBug/add-and-commit@v9.1.3
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
|
||||
with:
|
||||
default_author: github_actions
|
||||
committer_name: GitHub Actions
|
||||
committer_email: actions@github.com
|
||||
#author_name: PHP CS fixer
|
||||
#author_email: eldy@destailleur.fr
|
||||
#committer_name: PHP CS fixer
|
||||
#committer_email: eldy@destailleur.fr
|
||||
message: 'PHP CS fixer github action'
|
||||
add: '*.php'
|
||||
|
||||
commit_message: Fix PHPCS errors by GitHub PHPCSfixer action
|
||||
|
||||
21
.github/workflows/pr-18-autolabel.yaml.disabled
vendored
Normal file
21
.github/workflows/pr-18-autolabel.yaml.disabled
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: "Set label for v18"
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
- "18.0"
|
||||
push:
|
||||
branches:
|
||||
- "18.0"
|
||||
|
||||
jobs:
|
||||
changed-lines-count-labeler:
|
||||
runs-on: ubuntu-latest
|
||||
name: An action for automatically labelling pull requests based on the changed lines count
|
||||
steps:
|
||||
- name: Set a label
|
||||
uses: vkirilichev/changed-lines-count-labeler@v0.2
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
configuration-path: .github/changed-lines-count-labeler.yml
|
||||
continue-on-error: true
|
||||
45
.github/workflows/pr-18.yaml.disabled
vendored
Normal file
45
.github/workflows/pr-18.yaml.disabled
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
# Action to prepare the github action
|
||||
# Go on Dolibarr - Settings - Developer settings - Enter a name + webhook to disable + Permissions (see app test) + Can install by any account
|
||||
# Click on generate the private keys
|
||||
# Click on Install application - choose user of the Organization
|
||||
# Go on Organisation - Secret and variables and create a secret PR18_SECRET_KEY and copy the content of received private key. Choose the repository access to "Repository Dolibarr".
|
||||
# Go on Organisation - Secret and variables and create a variable PR18_APP_ID and copy the ID of the previously create ID. Choose the repository access to "Repository Dolibarr".
|
||||
#
|
||||
|
||||
name: Set reviewer for v18
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
- "18.0"
|
||||
push:
|
||||
branches:
|
||||
- "18.0"
|
||||
|
||||
jobs:
|
||||
pr18:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
#env:
|
||||
# GH_TOKEN: ${{ github.token }}
|
||||
# GH_TOKENS: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Generate a token
|
||||
id: generate-token
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
app-id: ${{ vars.PR18_APP_ID }}
|
||||
private-key: ${{ secrets.PR18_SECRET_KEY }}
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Assign reviewer
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
url: ${{ github.event.pull_request.html_url }}
|
||||
run: |
|
||||
gh pr edit "$url" --add-reviewer rycks
|
||||
gh pr edit "$url" --add-reviewer lvessiller-opendsi
|
||||
|
||||
65
.github/workflows/pre-commit.yml
vendored
65
.github/workflows/pre-commit.yml
vendored
@@ -7,7 +7,6 @@ jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LOG_TO_CS: .github/logToCs.py
|
||||
RAW_LOG: pre-commit.log
|
||||
CS_XML: pre-commit.xml
|
||||
steps:
|
||||
@@ -15,18 +14,18 @@ jobs:
|
||||
run: sudo apt-get update && sudo apt-get install cppcheck
|
||||
if: false
|
||||
|
||||
# Checkout git sources to analyze
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# The next uses the git API because there is no clone yet.
|
||||
# This is faster for a big repo.
|
||||
- name: Get all changed php files (if PR)
|
||||
id: changed-php
|
||||
uses: tj-actions/changed-files@v42
|
||||
if: github.event_name == 'pull_request'
|
||||
with:
|
||||
files: |
|
||||
**.php
|
||||
if: env.gh_event == 'pull_request'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./.github/scripts/get_changed_php.sh
|
||||
|
||||
# Checkout git sources to analyze
|
||||
- uses: actions/checkout@v4
|
||||
# Action setup-python needs a requirements.txt or pyproject.toml
|
||||
# This ensures one of them exists.
|
||||
- name: Create requirements.txt if no requirements.txt or pyproject.toml
|
||||
@@ -37,12 +36,27 @@ jobs:
|
||||
with:
|
||||
cache: pip
|
||||
python-version: "3.11"
|
||||
- run: python -m pip install pre-commit regex
|
||||
- run: python -m pip install pre-commit
|
||||
# Restore previous cache of precommit
|
||||
- uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit/
|
||||
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
|
||||
- name: Extract PHP version
|
||||
id: extract-php-version
|
||||
run: |
|
||||
PHP_VERSION=$(sed -n 's/.*\$arrayphpmaxversionwarning\s*=\s*array\s*(\s*\([0-9]\+\)\s*,\s*\([0-9]\+\).*/\1.\2/p' htdocs/install/check.php)
|
||||
echo "PHP_VERSION=$PHP_VERSION" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup PHPCS
|
||||
uses: shivammathur/setup-php@v2
|
||||
# Install proper php version, and also install phpcs which may be needed
|
||||
with:
|
||||
php-version: ${{ env.PHP_VERSION }} # Version from check.php
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpcs
|
||||
|
||||
# Run all the precommit tools (defined into pre-commit-config.yaml).
|
||||
# We can force exclusion of some of them here.
|
||||
- name: Run pre-commit hooks
|
||||
@@ -63,24 +77,6 @@ jobs:
|
||||
# files: |
|
||||
# **.php
|
||||
|
||||
- name: Setup PHPCS
|
||||
uses: shivammathur/setup-php@v2
|
||||
# Install when we're going to run phpcs
|
||||
if: |
|
||||
steps.changed-php.outputs.any_changed == 'true'
|
||||
||
|
||||
(
|
||||
github.event_name == 'push'
|
||||
&& (
|
||||
github.event.ref == 'refs/heads/develop'
|
||||
|| endsWith(github.event.ref, '.0')
|
||||
)
|
||||
)
|
||||
with:
|
||||
php-version: 8.1
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpcs
|
||||
|
||||
- name: Run some pre-commit hooks on selected changed files only
|
||||
if: steps.changed-php.outputs.any_changed == 'true'
|
||||
env:
|
||||
@@ -102,19 +98,12 @@ jobs:
|
||||
pre-commit run --hook-stage manual -a php-cs-with-cache | tee -a ${RAW_LOG}
|
||||
ls -l ~/.cache/pre-commit/
|
||||
|
||||
# If error, we convert log in the checkstyle format
|
||||
- name: Convert Raw Log to CheckStyle format
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
python ${LOG_TO_CS} ${RAW_LOG} ${CS_XML}
|
||||
# Annotate the git sources with the log messages
|
||||
- name: Annotate Source Code with Messages
|
||||
uses: staabm/annotate-pull-request-from-checkstyle-action@v1
|
||||
- name: Convert Raw Log to Annotations
|
||||
uses: mdeweerd/logToCheckStyle@v2024.2.9
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
files: ${{ env.CS_XML }}
|
||||
notices-as-warnings: true # optional
|
||||
prepend-filename: true # optional
|
||||
in: ${{ env.RAW_LOG }}
|
||||
|
||||
# Save the precommit cache
|
||||
- uses: actions/cache/save@v4
|
||||
if: ${{ ! cancelled() }}
|
||||
|
||||
2
.github/workflows/stale-issues-safe.yml
vendored
2
.github/workflows/stale-issues-safe.yml
vendored
@@ -8,7 +8,7 @@ on:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {} # none
|
||||
permissions: {} # no restriction by default
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
28
.github/workflows/test.yaml
vendored
Normal file
28
.github/workflows/test.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Test github actions
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
push:
|
||||
|
||||
env:
|
||||
ENVGHT: ${{ secrets.GITHUB_TOKEN }}
|
||||
ENVGHU: ${{ github.token }}
|
||||
TEST_ACCESS_KEY: ${{ secrets.TEST_ACCESS_KEY }}
|
||||
TEST_VAR_REPO: ${{ vars.TEST_VAR_REPO }}
|
||||
ENVLOCAL: "varenvlocal"
|
||||
|
||||
jobs:
|
||||
testjob:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Log
|
||||
run: |
|
||||
echo "Run action by ${{ github.actor }}"
|
||||
echo "github.token=${{ github.token }}"
|
||||
echo "secrets.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
|
||||
echo "GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH"
|
||||
echo "repo-token: ${{secrets.GITHUB_TOKEN}}"
|
||||
echo "secret repository TEST_ACCESS_KEY: ${{secrets.TEST_ACCESS_KEY}}"
|
||||
echo "variable repository : ${{vars.TEST_VAR_REPO}}"
|
||||
echo "ENVLOCAL: ${{env.ENVLOCAL}}"
|
||||
13
.gitignore
vendored
13
.gitignore
vendored
@@ -59,12 +59,11 @@ package-lock.json
|
||||
doc/install.lock
|
||||
/.asciidoctorconfig.adoc
|
||||
|
||||
.idea
|
||||
# Qodana
|
||||
.idea/vcs.xml
|
||||
.idea/modules.xml
|
||||
.idea/workspace.xml
|
||||
.idea/inspectionProfiles/Project_Default.xml
|
||||
.idea/jsLinters/jshint.xml
|
||||
/composer.json
|
||||
/composer.lock
|
||||
|
||||
/build/phpstan/phpstan
|
||||
/build/phpstan/bootstrap_custom.php
|
||||
phpstan_custom.neon
|
||||
/.php-cs-fixer.cache
|
||||
/.php_cs.cache
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
<?php
|
||||
|
||||
/* PHP 7.0 */
|
||||
$finder = (new PhpCsFixer\Finder())
|
||||
->in(__DIR__)
|
||||
->exclude([
|
||||
'core/includes',
|
||||
'custom',
|
||||
'documents',
|
||||
'doctemplates',
|
||||
'vendor',
|
||||
'install/doctemplates',
|
||||
'htdocs/custom',
|
||||
'htdocs/includes',
|
||||
'htdocs/install/doctemplates',
|
||||
])
|
||||
->notPath('vendor');
|
||||
|
||||
|
||||
/* PHP 7.4+ */
|
||||
/*
|
||||
$finder = (new PhpCsFixer\Finder())
|
||||
->in(__DIR__)
|
||||
->exclude([
|
||||
'custom',
|
||||
'documents',
|
||||
'htdocs/custom',
|
||||
'htdocs/includes',
|
||||
])
|
||||
->notPath([
|
||||
'vendor',
|
||||
]);
|
||||
*/
|
||||
|
||||
return (new PhpCsFixer\Config())
|
||||
->setRules([
|
||||
// Apply PSR-12 as per https://wiki.dolibarr.org/index.php?title=Langages_et_normes#PHP:~:text=utiliser%20est%20le-,PSR%2D12,-(https%3A//www
|
||||
'@PSR12' => true, // Disabled for now to limit number of changes
|
||||
|
||||
// Minimum version Dolibarr v18.0.0
|
||||
// Compatibility with min 7.1 is announced with Dolibarr18.0 but
|
||||
// app is still working with 7.0 so no reason to abandon compatiblity with this target for the moment.
|
||||
// So we use target PHP70 for the moment.
|
||||
'@PHP70Migration' => true,
|
||||
//'@PHP71Migration' => true,
|
||||
// Avoid adding public to const (incompatible with PHP 7.0):
|
||||
'visibility_required' => ['elements'=>['property', 'method']],
|
||||
|
||||
//'strict_param' => true,
|
||||
//'array_syntax' => ['syntax' => 'short'],
|
||||
//'list_syntax' => false,
|
||||
//'visibility_required' => false,
|
||||
'array_syntax' => false,
|
||||
'ternary_to_null_coalescing' => false
|
||||
])
|
||||
->setFinder($finder)
|
||||
// TAB Indent violates PSR-12 "must" rule, but used in code
|
||||
// (See https://www.php-fig.org/psr/psr-12/#24-indenting )
|
||||
->setIndent("\t")
|
||||
// All files MUST use the Unix LF line ending only
|
||||
// https://www.php-fig.org/psr/psr-12/#22-files
|
||||
->setLineEnding("\n")
|
||||
;
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
|
||||
<!--
|
||||
Documentation:
|
||||
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset
|
||||
-->
|
||||
|
||||
<rule ref="dev/setup/codesniffer/ruleset.xml"/>
|
||||
|
||||
<arg value="p"/>
|
||||
<arg name="colors"/>
|
||||
<arg name="extensions" value="php,inc" />
|
||||
</ruleset>
|
||||
@@ -6,7 +6,7 @@ repos:
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: no-commit-to-branch
|
||||
args: [--branch, develop, --pattern, \d+.0]
|
||||
args: [--branch, develop, --pattern, \d+.0$]
|
||||
- id: check-yaml
|
||||
args: [--unsafe]
|
||||
- id: check-json
|
||||
@@ -81,6 +81,8 @@ repos:
|
||||
]
|
||||
pass_filenames: false # Run on all files
|
||||
- id: php-lint
|
||||
exclude:
|
||||
(?x)^(htdocs/includes/symfony/var-dumper/Tests/.*)$
|
||||
- id: php-stan
|
||||
stages: [manual]
|
||||
files: \.(php)$
|
||||
|
||||
236
.scrutinizer.yml
Normal file
236
.scrutinizer.yml
Normal file
@@ -0,0 +1,236 @@
|
||||
# .scrutinizer.yml
|
||||
#build:
|
||||
# - php-scrutinizer-run
|
||||
build:
|
||||
nodes:
|
||||
analysis:
|
||||
tests:
|
||||
override:
|
||||
- command: php-scrutinizer-run
|
||||
idle_timeout: 8000
|
||||
#- php-scrutinizer-run --sub-project-dir=htdocs/admin
|
||||
|
||||
imports:
|
||||
- php
|
||||
|
||||
filter:
|
||||
excluded_paths:
|
||||
- build/
|
||||
- dev/
|
||||
- doc/
|
||||
- documents/
|
||||
- node_modules/
|
||||
- test/
|
||||
- htdocs/custom/
|
||||
- htdocs/includes/
|
||||
- htdocs/install/doctemplates/
|
||||
#dependency_paths:
|
||||
# - htdocs/includes/
|
||||
paths:
|
||||
- htdocs/*
|
||||
- scripts/*
|
||||
|
||||
tools:
|
||||
# php_analyzer. Doc on https://scrutinizer-ci.com/docs/tools/php/php-analyzer/
|
||||
php_analyzer:
|
||||
enabled: true
|
||||
extensions:
|
||||
- php
|
||||
#dependency_paths:
|
||||
# - htdocs/includes/
|
||||
filter:
|
||||
excluded_paths:
|
||||
- build/
|
||||
- dev/
|
||||
- doc/
|
||||
- documents/
|
||||
- htdocs/custom/
|
||||
- htdocs/includes/
|
||||
- htdocs/install/doctemplates/
|
||||
- htdocs/core/class/lessc.class.php
|
||||
- node_modules/
|
||||
- test/
|
||||
paths:
|
||||
- htdocs/*
|
||||
- scripts/*
|
||||
config:
|
||||
parameter_reference_check:
|
||||
enabled: true
|
||||
checkstyle:
|
||||
enabled: false
|
||||
no_trailing_whitespace: true
|
||||
naming:
|
||||
enabled: true
|
||||
local_variable: ^[a-z][a-zA-Z0-9]*$
|
||||
abstract_class_name: ^Abstract|Factory$
|
||||
utility_class_name: Utils?$
|
||||
constant_name: ^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$
|
||||
property_name: ^[a-z][a-zA-Z0-9]*$
|
||||
method_name: ^(?:[a-z]|__)[a-zA-Z0-9]*$
|
||||
parameter_name: ^[a-z][a-zA-Z0-9]*$
|
||||
interface_name: ^[A-Z][a-zA-Z0-9]*Interface$
|
||||
type_name: ^[A-Z][a-zA-Z0-9]*$
|
||||
exception_name: ^[A-Z][a-zA-Z0-9]*Exception$
|
||||
isser_method_name: ^(?:is|has|should|may|supports)
|
||||
unreachable_code:
|
||||
enabled: true
|
||||
check_access_control:
|
||||
enabled: true
|
||||
typo_checks:
|
||||
enabled: true
|
||||
check_variables:
|
||||
enabled: true
|
||||
check_calls:
|
||||
enabled: true
|
||||
too_many_arguments: true
|
||||
missing_argument: true
|
||||
argument_type_checks: lenient # Allowed Values: "disabled", "lenient", "strict"
|
||||
suspicious_code:
|
||||
enabled: true
|
||||
overriding_parameter: false
|
||||
overriding_closure_use: true
|
||||
parameter_closure_use_conflict: true
|
||||
parameter_multiple_times: true
|
||||
non_existent_class_in_instanceof_check: true
|
||||
non_existent_class_in_catch_clause: true
|
||||
assignment_of_null_return: true
|
||||
non_commented_switch_fallthrough: true
|
||||
non_commented_empty_catch_block: true
|
||||
overriding_private_members: true
|
||||
use_statement_alias_conflict: true
|
||||
precedence_in_condition_assignment: true
|
||||
dead_assignments:
|
||||
enabled: true
|
||||
verify_php_doc_comments:
|
||||
enabled: false
|
||||
parameters: true
|
||||
return: true
|
||||
suggest_more_specific_types: true
|
||||
ask_for_return_if_not_inferrable: true
|
||||
ask_for_param_type_annotation: true
|
||||
loops_must_use_braces:
|
||||
enabled: true
|
||||
check_usage_context:
|
||||
enabled: true
|
||||
simplify_boolean_return:
|
||||
enabled: false
|
||||
phpunit_checks:
|
||||
enabled: false
|
||||
reflection_checks:
|
||||
enabled: true
|
||||
|
||||
# Checks Common Precedence Mistakes
|
||||
precedence_checks:
|
||||
enabled: true
|
||||
assignment_in_condition: true
|
||||
comparison_of_bit_result: true
|
||||
basic_semantic_checks:
|
||||
enabled: true
|
||||
# Disabled unused code. In most cases, we want to keep it.
|
||||
unused_code:
|
||||
enabled: false
|
||||
deprecation_checks:
|
||||
enabled: true
|
||||
useless_function_calls:
|
||||
enabled: true
|
||||
metrics_lack_of_cohesion_methods:
|
||||
enabled: true
|
||||
metrics_coupling:
|
||||
enabled: true
|
||||
stable_code:
|
||||
namespace_prefixes: []
|
||||
classes: []
|
||||
doctrine_parameter_binding:
|
||||
enabled: false
|
||||
doctrine_entity_manager_injection:
|
||||
enabled: false
|
||||
symfony_request_injection:
|
||||
enabled: false
|
||||
doc_comment_fixes:
|
||||
enabled: true
|
||||
reflection_fixes:
|
||||
enabled: false
|
||||
use_statement_fixes:
|
||||
enabled: true
|
||||
remove_unused: true
|
||||
# Whether you would like multiple imports in one USE statement to be preserved, e.g. ``use A, B;``.
|
||||
preserve_multiple: false
|
||||
# Whether you would like to preserve blank lines between use statements.
|
||||
preserve_blanklines: false
|
||||
order_alphabetically: false
|
||||
# To use specific config for a specific path, use path_configs: (see example on page https://scrutinizer-ci.com/docs/configuration/tool_config_structure)
|
||||
|
||||
# php_depend
|
||||
#php_pdepend:
|
||||
# enabled: false
|
||||
# configuration_file: null
|
||||
# suffixes:
|
||||
# - php
|
||||
# excluded_dirs: { }
|
||||
# filter:
|
||||
# excluded_paths:
|
||||
# - 'build/*'
|
||||
# - 'dev/*'
|
||||
# - 'doc/*'
|
||||
# - 'test/*'
|
||||
# - 'htdocs/includes/*'
|
||||
# paths: { }
|
||||
|
||||
# change tracking
|
||||
#php_changetracking:
|
||||
# enabled: false
|
||||
# bug_patterns:
|
||||
# - '\bfix(?:es|ed)?\b'
|
||||
# feature_patterns:
|
||||
# - '\badd(?:s|ed)?\b'
|
||||
# - '\bimplement(?:s|ed)?\b'
|
||||
# filter:
|
||||
# excluded_paths:
|
||||
# - 'build/*'
|
||||
# - 'dev/*'
|
||||
# - 'doc/*'
|
||||
# - 'documents/*'
|
||||
# - 'htdocs/includes/*'
|
||||
# - 'node_modules/*'
|
||||
# - 'test/*'
|
||||
# paths: { }
|
||||
|
||||
# Similar code detection
|
||||
#php_sim:
|
||||
# enabled: false
|
||||
# min_mass: 30
|
||||
# filter:
|
||||
# excluded_paths:
|
||||
# - 'build/*'
|
||||
# - 'dev/*'
|
||||
# - 'doc/*'
|
||||
# - 'documents/*'
|
||||
# - 'htdocs/includes/*'
|
||||
# - 'node_modules/*'
|
||||
# - 'test/*'
|
||||
# paths: { }
|
||||
|
||||
# Coding-Style / Bug Detection
|
||||
#js_hint:
|
||||
# enabled: false
|
||||
# use_native_config: true
|
||||
# extensions:
|
||||
# - js
|
||||
# filter:
|
||||
# excluded_paths:
|
||||
# - 'build/*'
|
||||
# - 'dev/*'
|
||||
# - 'doc/*'
|
||||
# - 'documents/*'
|
||||
# - 'htdocs/includes/*'
|
||||
# - 'node_modules/*'
|
||||
# - 'test/*'
|
||||
# paths: { }
|
||||
# config: { }
|
||||
# path_configs: { }
|
||||
|
||||
|
||||
before_commands: { }
|
||||
after_commands: { }
|
||||
artifacts: { }
|
||||
build_failure_conditions: { }
|
||||
14
.stickler.yml
Normal file
14
.stickler.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
linters:
|
||||
phpcs:
|
||||
standard: 'dev/setup/codesniffer/ruleset.xml'
|
||||
extensions: 'php'
|
||||
tab_width: 4
|
||||
fixer: true
|
||||
|
||||
fixers:
|
||||
enable: true
|
||||
|
||||
files:
|
||||
ignore:
|
||||
- 'htdocs/includes/*'
|
||||
111
.travis.yml
111
.travis.yml
@@ -2,13 +2,13 @@
|
||||
# from Dolibarr GitHub repository.
|
||||
# For syntax, see https://docs.travis-ci.com/user/languages/php/
|
||||
|
||||
# We use dist: bionic = 18.04, focal = 20.04
|
||||
# We use dist: focal = 20.04, jammy = 22.04
|
||||
os: linux
|
||||
dist: focal
|
||||
dist: jammy
|
||||
|
||||
language: generic
|
||||
|
||||
#scan_logs: false
|
||||
scan_logs: false
|
||||
|
||||
git:
|
||||
depth: 1
|
||||
@@ -21,7 +21,7 @@ services:
|
||||
|
||||
|
||||
addons:
|
||||
mariadb: '10.5'
|
||||
mariadb: '10.6'
|
||||
|
||||
|
||||
env:
|
||||
@@ -31,27 +31,25 @@ env:
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: '8.3'
|
||||
#allow_failures:
|
||||
#- php: nightly
|
||||
include:
|
||||
- stage: PHP min and max
|
||||
- stage: PHP 7.0-8.1
|
||||
if: type = push
|
||||
php: '7.1'
|
||||
env:
|
||||
- DB=postgresql
|
||||
- TRAVIS_PHP_VERSION=7.1
|
||||
- stage: PHP min and max
|
||||
- stage: PHP 7.0-8.1
|
||||
if: type = pull_request OR type = push
|
||||
php: '8.2'
|
||||
env:
|
||||
- DB=mysql
|
||||
- TRAVIS_PHP_VERSION=8.2
|
||||
- stage: PHP 8.3
|
||||
if: type = push AND branch = develop
|
||||
php: '8.3'
|
||||
php: '8.1'
|
||||
env:
|
||||
- DB=mysql
|
||||
- TRAVIS_PHP_VERSION=8.3
|
||||
- TRAVIS_PHP_VERSION=8.1
|
||||
#- stage: PHP Dev
|
||||
# if: type = push AND branch = developdisabled
|
||||
# php: '8.2'
|
||||
# env: DB=mysql
|
||||
|
||||
notifications:
|
||||
email:
|
||||
@@ -83,13 +81,7 @@ before_install:
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
|
||||
sudo apt install unzip apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
|
||||
sudo apt install unzip apache2 php8.2 php8.2-cli php8.2-curl php8.2-mysql php8.2-pgsql php8.2-gd php8.2-imap php8.2-intl php8.2-ldap php8.2-xml php8.2-mbstring php8.2-xml php8.2-zip libapache2-mod-php8.2
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.3' ]; then
|
||||
sudo apt install unzip apache2 php8.3 php8.3-cli php8.3-curl php8.3-mysql php8.3-pgsql php8.3-gd php8.3-imap php8.3-intl php8.3-ldap php8.3-xml php8.3-mbstring php8.3-xml php8.3-zip libapache2-mod-php8.3
|
||||
fi
|
||||
|
||||
|
||||
- |
|
||||
echo Install pgsql if run is for pgsql
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
@@ -114,15 +106,15 @@ before_install:
|
||||
|
||||
install:
|
||||
- |
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php7.0
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php7.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php8.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php8.2
|
||||
fi
|
||||
php -i | head -
|
||||
|
||||
- |
|
||||
@@ -133,10 +125,9 @@ install:
|
||||
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
||||
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
|
||||
sudo chmod -R a+rwx /usr/local/bin/composer
|
||||
|
||||
#sudo apt install composer
|
||||
composer -V
|
||||
composer -n config -g vendor-dir htdocs/includes
|
||||
sudo composer -n config -g vendor-dir htdocs/includes
|
||||
sudo chmod -R a+rwx /home/travis/.config/composer
|
||||
echo
|
||||
|
||||
- |
|
||||
@@ -159,7 +150,7 @@ install:
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
# phpunit 9 is required for php 8
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = '8.2' ] || [ "$TRAVIS_PHP_VERSION" = '8.3' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = '8.2' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
sudo composer self-update 2.4.4
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
@@ -206,8 +197,8 @@ before_script:
|
||||
phpcs -i | head -
|
||||
# Check PHP Vardump check version
|
||||
echo "PHP Vardump check version"
|
||||
which var_dump_check
|
||||
var_dump_check --version
|
||||
which var-dump-check
|
||||
var-dump-check --version
|
||||
# Check PHPUnit version
|
||||
echo "PHPUnit version"
|
||||
which phpunit
|
||||
@@ -268,9 +259,8 @@ before_script:
|
||||
|
||||
- |
|
||||
export CONF_FILE=htdocs/conf/conf.php
|
||||
echo "Setting up Dolibarr '$CONF_FILE'"
|
||||
echo "Setting up Dolibarr $CONF_FILE"
|
||||
echo '<?php' > $CONF_FILE
|
||||
echo 'error_reporting(E_ALL);' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
|
||||
@@ -335,54 +325,26 @@ script:
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking coding style (only for 1 version to not overload travis and avoid duplicate tests)"
|
||||
echo "Checking coding style (only for Pull Requests builds and 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking missing debug (only for 1 version to not overload travis and avoid duplicate tests)"
|
||||
echo "Checking missing debug"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
set +e
|
||||
@@ -394,7 +356,6 @@ script:
|
||||
# Ensure we catch errors
|
||||
set +e
|
||||
echo '<?php ' > $INSTALL_FORCED_FILE
|
||||
echo 'error_reporting(E_ALL);' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
|
||||
@@ -414,7 +375,6 @@ script:
|
||||
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
|
||||
#cat $INSTALL_FORCED_FILE
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Upgrading Dolibarr"
|
||||
@@ -480,22 +440,15 @@ script:
|
||||
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade17001800.log
|
||||
php upgrade2.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-2.log
|
||||
php step5.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-3.log
|
||||
php upgrade.php 18.0.0 19.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade18001900.log || cat $TRAVIS_BUILD_DIR/upgrade18001900.log
|
||||
php upgrade2.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-2.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-2.log
|
||||
php step5.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-3.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-3.log
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo Show some debug info like table content or log
|
||||
#show table content and log
|
||||
#echo '\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
cat $TRAVIS_BUILD_DIR/upgrade18001900.log
|
||||
echo
|
||||
#cat $TRAVIS_BUILD_DIR/upgrade500600.log
|
||||
|
||||
- |
|
||||
echo Result of migration scripts
|
||||
ls -alrt $TRAVIS_BUILD_DIR/
|
||||
|
||||
|
||||
echo Show content of last file
|
||||
cat $TRAVIS_BUILD_DIR/"$(ls -rt $TRAVIS_BUILD_DIR/ | tail -n1)"
|
||||
|
||||
@@ -514,7 +467,6 @@ script:
|
||||
echo
|
||||
#cat /tmp/dolibarr_install.log
|
||||
cat $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Unit testing"
|
||||
@@ -524,7 +476,6 @@ script:
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
set +e
|
||||
echo
|
||||
|
||||
after_script:
|
||||
- |
|
||||
|
||||
@@ -200,6 +200,12 @@ source_file = htdocs/langs/en_US/ldap.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:link]
|
||||
file_filter = htdocs/langs/<lang>/link.lang
|
||||
source_file = htdocs/langs/en_US/link.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:loan]
|
||||
file_filter = htdocs/langs/<lang>/loan.lang
|
||||
source_file = htdocs/langs/en_US/loan.lang
|
||||
|
||||
12
COPYRIGHT
12
COPYRIGHT
@@ -23,22 +23,20 @@ Licence of dependencies of third-party components used by Dolibarr (all compatib
|
||||
Component Version License GPL Compatible Usage
|
||||
-------------------------------------------------------------------------------------
|
||||
PHP libraries:
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation. Used by dynamic price only. TODO Replace with dol_eval ?
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php 3.0 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert
|
||||
MathPHP 2.8.1 MIT License Yes Modern math library for PHP (only few files)
|
||||
Mobiledetect 2.8.41 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.16 LGPL 2.1+ Yes Library to develop SOAP Web services. From https://github.com/f00b4r/nusoap/tree/v0.9.16
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
|
||||
ParseDown 1.7.4 MIT License Yes Markdown parser
|
||||
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
|
||||
PHPDebugBar 1.18.2 MIT License Yes Used only by the module "debugbar" for developers
|
||||
PHPSpreadSheet 1.12.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
PHP-Iban 4.1.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHP-Imap 2.7.2 MIT License Yes Library to use IMAP with OAuth
|
||||
PHPSpreadSheet 1.12.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 4.1.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
PrestaShop-WS-Lib 94feb5f OSL-3.0 No Library providing API client for Prestashop.
|
||||
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
|
||||
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet)
|
||||
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
|
||||
@@ -54,7 +52,7 @@ bacon, dasprid, swiss-qr-bill, kmukku, symfony/validator
|
||||
JS libraries:
|
||||
Ace 1.4.14 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
ChartJS 3.7.1 MIT License Yes JS library for graph
|
||||
CKEditor 4.22.1 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
CKEditor 4.18 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
jQuery 3.6.4 MIT License Yes JS library
|
||||
jQuery UI 1.13.2 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
|
||||
|
||||
786
ChangeLog
786
ChangeLog
@@ -2,257 +2,301 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 18.0.8 compared to 18.0.7 *****
|
||||
35 files changed, 647 insertions(+), 298 deletions(-)
|
||||
|
||||
***** ChangeLog for 19.0.0 compared to 18.0.0 *****
|
||||
FIX: #34746 - More complete fix for CVE-2024-40137
|
||||
FIX: Correct the calculation of the amount of the current period between the period provided (#35083)
|
||||
FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call (#34717)
|
||||
FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call
|
||||
FIX: missing quick edit for extrafields (baclport commit 4fc66c6) (#35160)
|
||||
FIX: Missing sentence part (#35144)
|
||||
FIX: set global mysoc and load langs in API access (#35041)
|
||||
FIX: set global mysoc and load langs in API access
|
||||
FIX: reset mysoc and langs only if entity of API has changed
|
||||
FIX: accountancy general ledger: bad handling of hook return (#34029)
|
||||
FIX: accountancy general ledger: bad handling of hook return
|
||||
FIX: accountancy balance: bad handling of hook return
|
||||
FIX: - Fix missing token for disable custom group category for compta report (page /htdocs/accountancy/admin/categories_list.php) (#35084)
|
||||
FIX: The combo of custom groups has disappeared (backport v19) (#35016)
|
||||
FIX: #34893 (#34897)
|
||||
FIX: #34893
|
||||
FIX: change error code to USERNOTALLOWEDTOCHANGEPASS
|
||||
FIX: asset: could not select invoice in disposal pop-in (#34725)
|
||||
FIX: 17.0 SQL syntax error and/or constraint error when calling Facture::update() after a clone (e.g. in a trigger) (#34778)
|
||||
FIX: 17.0: when you clone an invoice that was created from a template invoice, the clone should not be linked to the template invoice (#34777)
|
||||
FIX: pre-send mail mass action: keep __EMAIL__ substitution (#34522)
|
||||
FIX: pre-send mail mass action: keep __EMAIL__ substitution
|
||||
FIX: comment
|
||||
FIX: massaction email tpl: keep preset
|
||||
FIX: loop interrupt if an error occurs in sendEmailsRemindersOnInvoiceDueDate (#34657)
|
||||
FIX: #34654
|
||||
|
||||
For users:
|
||||
----------
|
||||
NEW: Compatibility with PHP 8.2
|
||||
NEW: Module Workstation (used to enhance the module BOM and Manufacturing Order) is now stable
|
||||
NEW: Add a confirmation popup when deleting extrafields
|
||||
NEW: Add type 'icon' type for extrafields
|
||||
NEW: Close #20930 Use ajax for state loading after country change
|
||||
NEW: #23331 Add support for parent projects (#24856)
|
||||
NEW: #22531 Expense report - Add two fields into export : Qty & Unit price (excl.) (#26309)
|
||||
NEW: #22626 date filter thirdparties contracts projects (#22707)
|
||||
NEW: #24085 Add the Project filter
|
||||
NEW: #25312 Support extrafields in selectForForms
|
||||
NEW: #26312 Manage intermediate BIC - SQL Part (#26325)
|
||||
NEW: Accountancy - Add quick navigation with keyboard shortcut on ledger (#26221)
|
||||
NEW: Accountancy - FEC/FEC2 format export with attachments (#26192)
|
||||
NEW: Accountancy - Option to choose length of lettering code
|
||||
NEW: Add a button to create a product or a service from an order or an invoice (#26173)
|
||||
NEW: Add a button to re-encrypt data of a dolcrypt extrafield password
|
||||
NEW: Add a CLI tool to regenerate all documents
|
||||
NEW: Add a goto url from smartphone search page
|
||||
NEW: Add all id prof checker on thirdparty for code compta customer and supplier
|
||||
NEW: add and list external contributors on ticket public interface
|
||||
NEW: Add a protection on purgeFiles
|
||||
NEW: Add a public page to list all open surveys
|
||||
NEW: Add chart of accounts PCG08-PYME-CAT for ES in catalan language
|
||||
NEW: add constant to check if qty shipped not greater than qty ordered
|
||||
NEW: Add context for the movement stock (role toconsume/toproduce) on mrp
|
||||
NEW: Add contract link on ticket
|
||||
NEW: Add culum Technical ID in list of details lines of an order (#26164)
|
||||
NEW: ADD: custom compute for exports
|
||||
NEW: Add custom Text on footer total (#26334)
|
||||
NEW: Add different picto for each type of extrafields (date, string, ...)
|
||||
NEW: Add edit line on MO (#26122)
|
||||
NEW: Added notification on closed intervention
|
||||
NEW: Added of a popup on validation instead of a database fielld to know if the user wants to include subwarehouse
|
||||
NEW: Added of the field "include_sub_warehouse" in the table "llx_inventory"
|
||||
NEW: Added total line to third-parties list (#26148)
|
||||
NEW: Added VAT free & VAT amounts on payment input
|
||||
NEW: Add ext payment system ID in the payment page with link to Stripe
|
||||
NEW: Add field TechnicalID in list of users
|
||||
NEW: Add filter on status of line of a dictionary
|
||||
NEW: Add get_substitutionarray_other() on shipping odt (#25080)
|
||||
NEW: add IdProfCheck on thirdparty for BE (xxxx.xxx.xxx)
|
||||
NEW: Add index on prelevement_demande
|
||||
NEW: Add invoice subtype in customer invoice (#26543) and template invoice (SQL part) (#26535)
|
||||
NEW: Add label to price level when changing price (#26240)
|
||||
NEW: Add modifications of template invoices into agenda
|
||||
NEW: Add more company informations (ProfId7 to 10) (#25266)
|
||||
NEW: Add more information to holiday mailings (#25461)
|
||||
NEW: Add more param on fetch() to prepare perf optimization
|
||||
NEW: Add more tables activated by module activation only
|
||||
NEW: Add new field into $fields array + Creation of the function getChildWarehouse()
|
||||
NEW: Add option for cancel consumed and produced lines (delete lines and rollback stocks) when delete or cancel an manufacturing order (#26254)
|
||||
NEW: Add option in PDF for purchase order and quotation to hide prices
|
||||
NEW: Add option TAKEPOS_HIDE_PRODUCT_PRICES to hide prices in TakePOS
|
||||
NEW: add order supplier submit notif
|
||||
NEW: add parent product column on list
|
||||
NEW: Add picto in product/service list in object lines (#25511)
|
||||
NEW: Add possibility to choose separator #21426
|
||||
NEW: Add preselected update keys attribute to import class and select it by default if filled
|
||||
NEW: add product barcode on stock exports
|
||||
NEW: Add recurring behaviour
|
||||
NEW: add recursive deletion option for child m os (#26102)
|
||||
NEW: Add refactoring user permission (#26162)
|
||||
NEW: add sorting of product price list by customer (#26483)
|
||||
NEW: Add tab Events/Agenda on recurring invoices
|
||||
NEW: Add the formEditObjectLine hook on commande card and invoice card
|
||||
NEW: Add the picto phone of thirdparty on the kanban view of projects
|
||||
NEW: Add the status of partnership to select partnership for emailing
|
||||
NEW: add Ticket tab on contract
|
||||
NEW: agenda per user use quarter hour split instead of half hour split
|
||||
NEW: Allow generation of delivery note through REST-API (#26226)
|
||||
NEW: Allow sync of currency rates with currency layer by default.
|
||||
NEW: Allow to have products not managed in stocks - SQL Part (#26190)
|
||||
NEW: Assign contact to a ticket message (#24735)
|
||||
NEW: Better protection against reserved words
|
||||
NEW: billing on shipment+reception. Can be done before or after delivery.
|
||||
NEW: can edit bomline workstation
|
||||
NEW: Can edit both the Test and Live stripe customer account on payment
|
||||
NEW: Can include product variants in list of products
|
||||
NEW: Can manage ODT documents for groups of users.
|
||||
NEW: Can modify the picto into modulebuilder
|
||||
NEW: Can restore product in stock when deleting the supplier invoice
|
||||
NEW: Can see the favicon file into setup of properties of a website
|
||||
NEW: Can switch product batch management to no management. (#21691)
|
||||
NEW: Can upload/delete ODT template for project and tasks
|
||||
NEW: chart of accounts ES PCG08-PYME-CAT in catalan language
|
||||
NEW: clone skill object (#26526)
|
||||
NEW: close notification for interventions
|
||||
NEW: column in table prelevement_lignes for fk_user (#26196)
|
||||
NEW: CONF allow modify ticket classification even if closed
|
||||
NEW: conf to display date entry stock exped and sort in date order (#22625)
|
||||
NEW: create a product from a free line in a document (#22324)
|
||||
NEW: customize position in complete_head_from_modules (#26406)
|
||||
NEW: Date d'entree en stock sur les exped au moment de la création
|
||||
NEW: Date field for shipment export (#25574)
|
||||
NEW: Date format dayhoursec is using year on 2 char on smartphones
|
||||
NEW: Default customer, category and product when enable TakePOS (#25031)
|
||||
NEW: do not add default value in list
|
||||
NEW: drop down for action button show a simple button if only 1 action
|
||||
NEW: Enhance github_commits_perversion to get more stats on git commits
|
||||
NEW: Enhance IPN to support payment_intent.succeeded for both card/ban
|
||||
NEW: extrafields password accepts 'dolcrypt' algorithm (reversible algo)
|
||||
NEW: Factorize a lot of code for numbering modules
|
||||
NEW: filter on from/to period rather than month/year (#26378)
|
||||
NEW: FontAwesome - Add possibility to select another version
|
||||
NEW: Form for add object's property on moduleBuilder
|
||||
NEW: Can generate SEPA files for salaries (#26541)
|
||||
NEW: massactions to delete projects
|
||||
NEW: Generic doc template for donations (#26338)
|
||||
NEW: Get list evaluation with skills details in user fiche (#26510)
|
||||
NEW: hidden conf to disable use of dns_get_record (which can become unresponsive) (#26339)
|
||||
NEW: improved resource data structure
|
||||
NEW: Include sub warehouse in inventory
|
||||
NEW: inventory without virtual products (kits)
|
||||
NEW: Invoice subtypes for customers and vendors (#26233)
|
||||
NEW: Invoice time from task, make task note better display in invoice line
|
||||
NEW: lazy load to substitute project variables (#26451)
|
||||
NEW: LDAP Active Directory UserAccountControl (#25507)
|
||||
NEW: Library including math and financial functions (#25035)
|
||||
NEW: Loan - Can upload a file with drag and drop
|
||||
NEW: Manage rate indirect. (#26449)
|
||||
NEW: memorize model name for pdf hooks
|
||||
NEW: Menu editor is reponsive
|
||||
NEW: Merge the "Create ..." buttons on contract into one.
|
||||
NEW: More accurate tooltip on what admin permissions are
|
||||
NEW: (#24834) new option for hide the footer (#25464)
|
||||
NEW: (#25044) new option for choose project visibility
|
||||
NEW: new option for hide the footer of tickets on the public interface
|
||||
NEW: no need to create invoice supplier object on supplier card for standalone credit note
|
||||
NEW: Option to show label, ref+label or only ref of product in TakePOS
|
||||
NEW: payment full amount detail tooltip
|
||||
NEW: possibility to deselect line when create a recurring invoice + missing to use fk_parent_line
|
||||
NEW: Project - List - use select2 multiselect for status
|
||||
NEW: Propagate invoice extrafields into template invoice (#26529)
|
||||
NEW: remove include_subwarehouse form llx_inventory database table
|
||||
NEW: resource improvements - data structure (#26285)
|
||||
NEW: Retrieve vat details from the Greek Ministry of Finance GSIS SOAP web service and autocomplete third party fields
|
||||
NEW: Right for stats orders (#24607)
|
||||
NEW: rights and check access to create portal accounts
|
||||
NEW: Row in list higher height (#26177)
|
||||
NEW: Save date of RUM creation when creating a Stripe SEPA mandate
|
||||
NEW: shipment can include service (for information and invoicing) (#26407)
|
||||
NEW: Show id of module on the tooltip module help page
|
||||
NEW: show VAT free amount on payment input close #26208 (#26209)
|
||||
NEW: start and end date for due date filter on invoice list
|
||||
NEW: Sub total in list (#26165)
|
||||
NEW: Suport html content for combo list of email recipient
|
||||
NEW: Website: Support of js into the Dolibarr server preview
|
||||
NEW: TakePOS - add constant to check qty asked is available (#24820)
|
||||
NEW: TakePOS - add constant to choose contact instead of customer (#24807)
|
||||
NEW: TakePOS - amount label with or without tax in free product (#24829)
|
||||
NEW: TakePOS compatibility with lots and serials
|
||||
NEW: TakePOS compatibility with lots and serials (#26426)
|
||||
NEW: Top menu support picto of modules that are font awesome picto.
|
||||
NEW: updating by adding massactions for delete projects in societe tab
|
||||
NEW: updating by adding tooltip for api section in Modulebuilder
|
||||
NEW: updating by adjust request Sql for Salary invoice (#26279)
|
||||
NEW: updating for display Help title when try to delete Don (issue #25314)
|
||||
NEW: Upgrade in module builder in menu section
|
||||
NEW: use account address in sepa mandate (#23642)
|
||||
NEW: VAT rate - Add entity
|
||||
NEW: When an user unset the batch management of products, transformation of each batch stock mouvement in global stock mouvement
|
||||
NEW: PDF Generation for each Human Resource Evaluations.
|
||||
***** ChangeLog for 18.0.7 compared to 18.0.6 *****
|
||||
138 files changed, 1622 insertions(+), 530 deletions(-)
|
||||
|
||||
SEC: #25512 applicative anti bruteforce - security on too many login attempts (#25520)
|
||||
SEC: Add action confirm_... as sensitive to need a CSRF token
|
||||
SEC: Disable not used PHP streams
|
||||
SEC: Add option MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY
|
||||
FIX: 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request cf. PR #29237
|
||||
FIX: 17.0 - collisions in cache for dol_getIdFromCode
|
||||
FIX: 17.0 - missing error handling for FactureRec::fetch in card-rec.php
|
||||
FIX: 17.0: warnings due to uninitialized variables + delete code that doesn't apply to recurring invoices (AFAIK, there is no recurring credit note feature)
|
||||
FIX: #21294 Stock import sql query
|
||||
FIX: #26250 fatal error on kit
|
||||
FIX: #32339 Delete a loan settlement is partial
|
||||
FIX: #33038 drag and drop files are not prefixed with object reference
|
||||
FIX: #33117 accountancy export Quadratus when doc ref is less than 10 char
|
||||
FIX: #33145 wrong label status buy on product tooltip
|
||||
FIX: accountancy export Quadratus when doc ref is less than 10 char
|
||||
FIX: bad dispatched quantities for batches on shipment card
|
||||
FIX: bank payment rejection on SEPA (backport commit 100a657) (#33838)
|
||||
FIX: calculate start date of cloned task from cloned project (#31799)
|
||||
FIX: can not delete files in task card
|
||||
FIX: close all services on contract will close all lines (#33466)
|
||||
FIX: compatibility with multicompany
|
||||
FIX: constant PAYMENTBYBANKTRANSFER_ADDDAYS was never saved (#33799)
|
||||
FIX: Count on supplier invoice list does not match count in DB (#33351)
|
||||
FIX: #CVE-2024-34051
|
||||
FIX: delete supplier order line when linked to customer order line
|
||||
FIX: delete supplier order when at least one line linked to customer order line
|
||||
FIX: display error when loan can't be deleted
|
||||
FIX: display full tree on shipment card when a kit contains a same component in other sub-kit
|
||||
FIX: Fix case when the value of a extrafields of the type 'boolean', 'select' or other have an option with a value equal to '0'.
|
||||
FIX: Fix return value of hook sendMail when hook return -1 who must be return false in sendfile() function
|
||||
FIX: GETPOST('private_message')
|
||||
FIX: in projet/element.php total_time is always back to 0
|
||||
FIX: invoice creation : use dol_include_once instead of require_once to allow external modules
|
||||
FIX: invoice creation : use dol_include_once instead of require_once to allow external modules.
|
||||
FIX: issue #28222 Edit date extrafield displayed on all on lines (#31914)
|
||||
FIX: Many status on invoice linked object block
|
||||
FIX: Multilangs : PDF lines description
|
||||
FIX: ODT substitution when many HTML tags in string
|
||||
FIX: old copy not needed in supplier order create method (#31733)
|
||||
FIX: PAIEMENT Wrong field displayed for DateChequeReceived (#33390)
|
||||
FIX: phpcs
|
||||
FIX: product variants copy: also copy multiprice variations
|
||||
FIX: qual
|
||||
FIX: removes traces of <<<HEAD conflicts following the postponement of branch 13 modifications (#32014)
|
||||
FIX: Replace compromised tj-actions/changed-files (#33481)
|
||||
FIX: selectcontact is loading all contacts if socid is empty and MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT is not set
|
||||
FIX: selectcontact is loading all contacts when update event
|
||||
FIX: select group and severity search fields on ticket list
|
||||
FIX: send email to assigned user on ticket create
|
||||
FIX: send mail to BCC when email formatted as Fullname <email> (#31983)
|
||||
FIX: Show true error when send notify email at validate expense report
|
||||
FIX: status ticket update for new message
|
||||
FIX: swiftmailer: correctly set errors-to header (#31826)
|
||||
FIX: TakePos barcode rule (#31857)
|
||||
FIX: There were many status indicator in the invoice linked object block (propal card)
|
||||
FIX(ticket): Notification email without public interface
|
||||
FIX: Update on a sold line of bank entries set the type to empty, now it's fixed #22539 (#31888)
|
||||
FIX: update status on create supplier order for trigger (#31642)
|
||||
FIX: use tax with code on supplier order line give tax code missing in supplier invoice (#32018)
|
||||
FIX: use vat with code on supplier order result code missing in supplier invoice
|
||||
FIX: warehouse list: broken status filter (#33667)
|
||||
FIX: warnings (#33423)
|
||||
FIX: wrong left margin (v18 to develop ?)
|
||||
FIX: wrong message on update shipment
|
||||
FIX: wrong update function parameter
|
||||
|
||||
|
||||
For developers or integrators:
|
||||
------------------------------
|
||||
***** ChangeLog for 18.0.6 compared to 18.0.5 *****
|
||||
FIX: 16.0 - parent company gets emptied when updating a third party from the card in edit mode (#28269)
|
||||
FIX: 16.0 - the e-mail templates configured in the notification module are not used if the recipient is a fixed e-mail address (#29407)
|
||||
FIX: 17.0: $num doesn't take trigger-modified newref into account, leading to inconsistencies if BILL_SUPPLIER_VALIDATE changes the invoice's ref (#28684)
|
||||
FIX: 17.0: fatal when updating recurring supplier invoice line with php8 ($remise_percent is '' instead of 0) (#31713)
|
||||
FIX: 17.0: supplier invoice template card: buyer and seller swapped in VAT-related function calls (probably a copy-paste from customer invoice templates) (#31446)
|
||||
FIX: #24265 regression cannot see all product on takepos (#28753)
|
||||
FIX: #25853 Thirdparty Massaction (#25868)
|
||||
FIX: #28205
|
||||
FIX: #28251 Fixing subpermission name on api_multicurrencies.class.php (#28252)
|
||||
FIX: #28369
|
||||
FIX: #28518 (#28520)
|
||||
FIX: #28978 FIX: #28976
|
||||
FIX: #29029 Impossible to delete an order line
|
||||
FIX: #29114 Missing contact term in intervention
|
||||
FIX: #29114 Translate contact term in intervention
|
||||
FIX: #29439 incomplete API return (#29796)
|
||||
FIX: #29496 filtering a record should not hide its child not filtered
|
||||
FIX: #30010 Use conf TICKET_MESSAGE_MAIL_INTRO instead of translation key (#30081)
|
||||
FIX: #30274 Add the include before executing dolibarr_set_const (#30320)
|
||||
FIX: #30467
|
||||
FIX: #30768 allocate the correct invoice_line_id to the element timespent (#30769)
|
||||
FIX: Accountancy export with file or not
|
||||
FIX: Accountancy - Generate entries of expense report with localtax (#30411)
|
||||
FIX: Accountancy - Not trunc id_import
|
||||
FIX: accounting FEC import (Issue #28306) (#29414)
|
||||
FIX: Add new hidden conf "DISABLE_QTY_OVERWRITTEN" (#28523)
|
||||
FIX: Add same security test when uploading files from API than from GUI (#31114)
|
||||
FIX: Amount of localtaxes in foreign currency was wrong on screen and PDF
|
||||
FIX: an error in a complex else condition
|
||||
FIX: ASSET: annual depreciation starting year (Again ;-)) #26084 (#30040)
|
||||
FIX: avoid error "Column 'entity' in where clause is ambiguous" (#28270)
|
||||
FIX: avoid from re-initializing array result on nested hook getEntity (#30626)
|
||||
FIX: avoid php warnings (#29247)
|
||||
FIX: avoid to delete "lock" and "unlock" files
|
||||
FIX: avoid Unknown column 'pfp.ref_fourn' (#28145)
|
||||
FIX: background color for enabled modules (#29378)
|
||||
FIX: Backport fix fatal error on price with some truncating setup
|
||||
FIX: Backport page inventory.php from v18 to fix pagination bugs causing data loss (#29688)
|
||||
FIX: back to page on error in contact card (#29627)
|
||||
FIX: Bad calculation of $nbtotalofrecord (#30183)
|
||||
FIX: box_actions.php still uses fk_user_done which no longer exists (#31190)
|
||||
FIX: can validate shipment without stock movement (#31780)
|
||||
FIX: Condition on newDateLimReglement
|
||||
FIX: Conflict with autoload (#30399)
|
||||
FIX: const WORKFLOW_RECEPTION_CLASSIFY_NEWD_INVOICE (#31601)
|
||||
FIX: contact/address title is always "New Contact/Address" even if the contact/address already exists (#29581)
|
||||
FIX: Display the date according to user language on substitutions (#29510)
|
||||
FIX: Display the real_PMP on inventory when its value is equal to 0 (#22291)
|
||||
FIX: Don't display column when it's out of date (#28271)
|
||||
FIX: email templates for expense report not visible
|
||||
FIX: Error mesg show untranslated extrafield name (#30227)
|
||||
FIX: Error message overwrote when a error occurs during update of product multilangs (#30841)
|
||||
FIX: Error When cloning fourn price no default value for tva_tx (#28368)
|
||||
FIX: executeHooks $object default value (#29647)
|
||||
FIX: expedition PDF models using units labels (#30358)
|
||||
FIX: Extrafield following between rec invoice and classic invoice (#31445)
|
||||
FIX: fatal error on loading pictures in attached documents of an event (#30553)
|
||||
FIX: fatal error Unsupported operand types when recording load payment
|
||||
FIX: Fix bug select columns and access to the public ticket list from the public ticket card (case when we have connected to another client before, the track id stocked in session overwrite the new track id from the public ticket card) (#31000)
|
||||
FIX: Fix create shipping with product who have negative stocks on warehouse but the negative stock transfer is allowed (#26217)
|
||||
FIX: Fix save directory for invoice ODT and multientities
|
||||
FIX: group by qty in product margin tab (#29853)
|
||||
FIX: Hierarchy Employee view do not filter on employee = 1 (#29496)
|
||||
FIX: if you call fetchLines several times, your $object->lines contains duplicates (#31167)
|
||||
FIX: If you have no stock of your product, an error is displayed when you delete the reception. (#31504)
|
||||
FIX: incorrect page numbering in PDF #29458 (#29476)
|
||||
FIX: inventoryDeletePermission id define twice
|
||||
FIX: issue on action set condition in particular when you set a deposi… (#31518)
|
||||
FIX: issue to get the right files exported in Quadratrus export.php (#30004)
|
||||
FIX: lang output for sales representative on PDF (#30469)
|
||||
FIX: late order search option (#30692) and propal (#30687)
|
||||
FIX: lettering (auto) for invoice deposit with company discount (#29633)
|
||||
FIX: made invalid code shape error more user friendly (#29498)
|
||||
FIX: Merge of thirdparties must also move uploaded files
|
||||
FIX: missing entity parameter for ajax_constantonoff
|
||||
FIX: missing hide "new" button where "product" or "service" module are disable
|
||||
FIX: mo cloning (#29686)
|
||||
FIX: modification date from label in accounting bookkeeping list (#30038)
|
||||
FIX: Move the trigger for delete order line before the SQL request
|
||||
FIX: multiple problems with multicompany
|
||||
FIX: mysql error during dump for enable sandbox M999999 (#31116)
|
||||
FIX: notification: error 500 in fixed emails due to a bad copy/paste (#29580)
|
||||
FIX: notification module: for supplier orders (any of the 3 triggers), user can choose an e-mail template in conf, but the conf is not used when sending the notification (#28216)
|
||||
FIX: Not qualified lines for reception (#29473)
|
||||
FIX: not redirect when error occurs on updating card (#29388)
|
||||
FIX: Not trancate the multicurrency rate shown on cards (even if the global MAIN_MAX_DECIMALS_SHOWN is set to 0) (#28211)
|
||||
FIX: on change ref for bank account attachment are lost (#30529)
|
||||
FIX: Option MAIN_DOC_USE_TIMING can be a string with date format
|
||||
FIX: orders to bill menu (#30179)
|
||||
FIX: Payment on customer invoice - Remove accountid in url if empty for apply default value (#28156)
|
||||
FIX: PDF Fatal error : Backport fix from #23972
|
||||
FIX: PDF Translations Extrafields
|
||||
FIX: permission on payment file of a tax
|
||||
FIX: php8: Fatal when empty $tmpvat is an empty string (no silent conversion to '0' when used in arithmetic operations) (#29451)
|
||||
FIX: PHP 8 warning on output of successful cronjob (#29922)
|
||||
FIX: PHP exception on getSpecialCode (#29646)
|
||||
FIX: php warning global conf (#29478)
|
||||
FIX: pos: invoice date incorrectly set because of timezome mismatches (reverts #36e91da) (#30184)
|
||||
FIX: public project form return an error if SOCIETE_EMAIL_UNIQUE (#29942)
|
||||
FIX: purge files cron: php warnings when rest module enabled (#30919)
|
||||
FIX: PUT /thirdparties/{id} and PUT /contacts/{id} should throw exception if update returns < 0 (#29596)
|
||||
FIX: Regression #29340
|
||||
FIX: Repair the replenishment list (#29336)
|
||||
FIX: REPLENISH MANY FOURN WHEN ORDER ALREADY CREATE (#29710)
|
||||
FIX: round capital societe (#29211)
|
||||
FIX: search and add extrafields to tasks when conf disabled (#29542)
|
||||
FIX: show preview pdf list expensereport (#31694)
|
||||
FIX: sometimes a string type instead integer is return, why ?
|
||||
FIX: Special code is now transmitted by args only in order supplier (#28546) (#28619)
|
||||
FIX: SQL syntax error in DDLUpdateField
|
||||
FIX: subscription must be editable when accounting isn't reconciled (#28469)
|
||||
FIX: substitutions THIRDPARTY_XXX are not available for actioncomm reminders (#31385)
|
||||
FIX: Supplier Order search on date valid (#30448)
|
||||
FIX: supplier price duplicate entry on update supplier product ref (#29290)
|
||||
FIX: syntax error
|
||||
FIX: TakePOS | Add product / Delete line of existing invoice
|
||||
FIX: Ticket new message notification sent twice
|
||||
FIX: transfer in accountancy for expense reports.
|
||||
FIX: Unsigned propal having signing date (#29825)
|
||||
FIX: Update asset.class.php
|
||||
FIX: update date_echeance of supplier invoices when we update invoice date in the past (#29886)
|
||||
FIX: use $conf->browser->os instead
|
||||
FIX: use price() to display qty on a product's stats tab to avoid showing too many decimals when rounding errors are possible (#31165)
|
||||
FIX: User List - Function is show in wrong column when module HRM enabled (#30186)
|
||||
fix: when invoice is created by WORKFLOW_ORDER_AUTOCREATE_INVOICE on ORDER_NEW, the invoice must have the default bank account of the thirdparty is it's empty on order (#29462)
|
||||
FIX: when qty is not an integer, apply price() (#31138)
|
||||
FIX: Wrong currency shown in TakePOS payment page
|
||||
FIX: wrong shortcut key for macintosh
|
||||
FIX: wrong sql request with product category filter
|
||||
FIX: wrong stock permission number
|
||||
|
||||
QUAL Reduce very seriously the technical debt (using PHPStan, Psalm and Rector)
|
||||
NEW Tool in dev/tools/rector to autofix code using style coding practice rules
|
||||
|
||||
PERF: Removed a useless fetch_thirdparty
|
||||
PERF: Perf avoid 2 useless fetch into the triggers of agenda.
|
||||
PERF: performance & code quality enhancements template sections
|
||||
|
||||
QUAL: Remove hardcoded code for OVH sms. Generic method is ok now.
|
||||
QUAL: Code fix using rector
|
||||
QUAL: Force subclass MINVERSION (#26314)
|
||||
QUAL: group all flag images into 1 sprite file. (#26459)
|
||||
QUAL: Move conf->global into getDolGlobal...
|
||||
QUAL: Refactor merging companies and fix #26272 with Reception objects (#26320)
|
||||
QUAL: Removed deprecated field remise, remise_percent, remise_absolute
|
||||
QUAL: Standardize code and look and feel for dictionaries
|
||||
QUAL: Standardize code. Renamed ID of user properties into ->user_xxx_id
|
||||
QUAL: Use dol_clone with parameter 2 for ->oldcopy
|
||||
QUAL: use switch case instead of if elseif statements for actions
|
||||
QUAL: Better respect of REST API RFC.
|
||||
|
||||
NEW: [Add hook in user bank page]
|
||||
NEW: #19501 Add two hooks in dolreceiptprinter.php (#26439)
|
||||
NEW: Accountancy - Add hooks on PrintFieldList for expensereportsjournal, purchasesjournal, sellsjournal
|
||||
NEW: add a $notrigger param to Product::updatePrice() method (#26404)
|
||||
NEW: Add a rule to fix empty($conf->global->...) into !getDolGlobal...
|
||||
NEW: Add column extraparams on societe_rib
|
||||
NEW: Add hook on selectLotDataList() function (#25368)
|
||||
NEW: add Hooks and prepare extrafields management for product invoices consumptions (#26280)
|
||||
NEW: Add hooks on import, step 5 - 6 (#24915)
|
||||
NEW: add hook tabContentCreateSupplierOrder (#26418)
|
||||
NEW: add hook tabContentViewSupplierInvoice (#26431)
|
||||
NEW: add new hook AfterImportInsert
|
||||
NEW: add new hook OrderCard (#26380)
|
||||
NEW: add new hook tabContentCreateOrder (#26408)
|
||||
NEW: Add phpunit for REST API of contacts
|
||||
NEW: Add triggers COMPANY_RIB_XXX already present in companybankaccount.class.php
|
||||
NEW: Add triggers on import success
|
||||
NEW: Add trigger when deleting a bank account line
|
||||
NEW: subproduct triggers in product class (#25142)
|
||||
NEW: ModuleBuilder: add section changeLog to Doc in MB
|
||||
NEW: ModuleBuilder: Add api url to documentation in ModuleBuilder
|
||||
NEW: ModuleBuilder: Checkin comments begin and end before each actions
|
||||
NEW: ModuleBuilder: edit properties in description tab for ModuleBuilder
|
||||
NEW: ModuleBuilder: remove dictionary in ModuleBuilder
|
||||
NEW: ModuleBuilder: add page for create dictionary
|
||||
NEW: ModuleBuilder: add badge for each tabs
|
||||
NEW: ModuleBuilder: for edit name of dictionnary and delete it in MB
|
||||
NEW: add barcode function to check if EAN13 is valid (
|
||||
|
||||
WARNING:
|
||||
--------
|
||||
|
||||
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* Recheck the setup of your module Workflow to see if you need to enable the new setting to have shipment set to billed automatically when
|
||||
an invoice from a shipment is validated (and if your process is to make invoice on shipment and not on order), because this setup has changed.
|
||||
* The hook changeHelpURL is replaced by llxHeader
|
||||
* The property ->brouillon has been removed from all classes. It was not reliable and was a duplicate of ->status == self::STATUS_DRAFT.
|
||||
* The duplicated and deprecated property ->date_livraison that was renamed into ->delivery_date has been completely removed.
|
||||
* The property ->user_close to store ID of closing user has been renamed into ->user_closing_id.
|
||||
* The property ->user_validation to store ID of user validating has been renamed into ->user_validation_id.
|
||||
* The property ->user_creation to store ID of user of creation has been renamed into ->user_creation_id.
|
||||
* The property ->user_modification to store ID of user of modification has been renamed into ->user_modification_id.
|
||||
* The private array ->status_short, ->statuts and ->status_long are now array ->labelStatusShort and ->labelStatus everywhere.
|
||||
* The duplicate property ->user_creat, ->date_creat, ->date_valid have been removed (use instead user_creation, date_creation, date_validation).
|
||||
* The method get_substitutionarray_shipment_lines() has been removed. Use the generic get_substitutionarray_lines() instead.
|
||||
* The method ProductcustomerPrice->fetch_all_log() has been renamed into camel case ->fetchAllLog()
|
||||
* It was possible to use a variable $soc or $right inside a PHP code condition of some extrafields properties, this is no more true (this 2 variables are no more global variables).
|
||||
* New hook files of modules actions_mymodule.class.php should now "extends CommonHookActions"
|
||||
* Endpoint for API /partnershipapi and /recruitment has been renamed into /partnerships and /recruitments to follow name conventions.
|
||||
* Hidden option ACCOUNTANCY_AUTOFIX_MISSING_LINK_TO_USER_ON_SALARY_BANK_PAYMENT has been renamed into ACCOUNTANCY_AUTOFIX_MISSING_LINK_TO_USER_ON_SALARY_BANK_PAYMENT
|
||||
* The delete() method of AdherentType, Contact, Delivery, MultiCurrency, CurrencyRate now need $user as first parameter.
|
||||
* A very high number of class properties (with old name in french) are now deprecated in favor of the property name in english.
|
||||
* The load of hook context productdao has been removed before calling loadvirtualstock. Modules must use the context of main parent page or 'all' for all cases.
|
||||
|
||||
***** ChangeLog for 18.0.5 compared to 18.0.4 *****
|
||||
FIX: 17.0: deprecated field should only be a fallback
|
||||
FIX: 17.0 - php8 warnings: test for $field existence before checking if it is null or empty
|
||||
FIX: #24185: v18: display of the merged pdf lists
|
||||
FIX: #26416 BOM_SUB_BOM blank page
|
||||
FIX: #27166
|
||||
FIX: #27262 Recurrent invoice - user to string conversion
|
||||
FIX: #27970 #26283 #27970
|
||||
FIX: Accountancy - Level 3 of binding not working on supplier side (#27462)
|
||||
FIX: Accounting files export - Use th instead of td on all title columns (#28003)
|
||||
FIX: add action update_extras to don card
|
||||
FIX: Adding hooks init
|
||||
FIX: Adding the $encode parameter to recursive _replaceHtmlWithOdtTag() utilisation
|
||||
FIX: add new hook context for mo production card (#28037)
|
||||
FIX: avoid from re-initializing result on nested hook getEntity (#27799)
|
||||
FIX: avoid sql error (issue #26342)
|
||||
FIX: bad accountancy code autoselection for supplier ventilation
|
||||
FIX: Bad visible status of proposal after reopen
|
||||
FIX: Barcode header cell not well displayed
|
||||
FIX: BarCode Header not well displayed
|
||||
FIX: Bar code verification should be done by entity because generation does (#28087)
|
||||
FIX: can edit reminders on past events
|
||||
FIX: check parameter socid before cloning a customer proposal (#28085)
|
||||
FIX: crabe PDF is generating in conf->entity instead of object->entity
|
||||
FIX: CVE-2024-23817 (#28089)
|
||||
FIX: disable pointer events on jQuery-UI tooltips to prevent a glitch (fast-blinking tooltip)
|
||||
FIX: Error on emailreminder not reported
|
||||
FIX: Fatal error converting object of class User to string (php8)
|
||||
FIX: filter by entity on contact is missing
|
||||
FIX: Fix supplier invoice security check
|
||||
FIX: format of color in manifest is wrong when using a custom color
|
||||
FIX: #GHSA-7947-48q7-cp5m
|
||||
FIX: HTML injection vulnerability in Dolibarr Application Home Page
|
||||
FIX: invoice add line save devise
|
||||
FIX: Keep a link to enable a 'always_enabled' module to solve pb.
|
||||
FIX: label
|
||||
FIX: line special_code never saved (#28051)
|
||||
FIX: link to print when there is a search on multiselect fields
|
||||
FIX: Menu Create of project no working on smartphone with no top menu.
|
||||
FIX: missing $search_sale var (backport from v19)
|
||||
FIX: Missing begin transaction when updating supplier recurring invoice
|
||||
FIX: missing entity filter for check if period exists
|
||||
FIX: more correctly parse the select part to be replaced in sql queries
|
||||
FIX: MouvementStock::origin is not an object
|
||||
FIX: notification information on intervention validated confirmation message (v17+)
|
||||
FIX: not load all contacts by default when creating an event
|
||||
FIX: port in Docker MailDev
|
||||
FIX: propal use devise changes
|
||||
FIX: public user photo not visible if $dolibarr_main_instance_unique_id
|
||||
FIX: remove DISTINCT (backport from v19)
|
||||
FIX: remove specific name from v19
|
||||
FIX: Retours PR
|
||||
FIX: Return a better error message when token is not valid
|
||||
FIX: search by ref & rowid in don list
|
||||
FIX: search by thirdparty in don list
|
||||
FIX: several names for one const THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT
|
||||
FIX: SQL concatenation error
|
||||
FIX: [TAKEPOS] display prices with or without taxes depending on setup (TAKEPOS_CHANGE_PRICE_HT)
|
||||
FIX: Ternary operator condition is always true/false
|
||||
FIX: too long output
|
||||
FIX: Undefined property: Task::$fk_parent
|
||||
FIX: uniformization to use "intervention"
|
||||
FIX: Update loan.class.php (#27971)
|
||||
FIX: update price extrafield on propal card
|
||||
FIX: user filter in per user view of event list (#28049)
|
||||
FIX: use the currency for propal signature page
|
||||
|
||||
***** ChangeLog for 18.0.4 compared to 18.0.3 *****
|
||||
FIX: $this->newref already exists and could have been modified by trigger but we still use a local variable for the filesystem-based renaming
|
||||
@@ -444,8 +488,8 @@ FIX: when adding new times on a survey, all hours would be erased.
|
||||
|
||||
***** ChangeLog for 18.0.0 compared to 17.0.0 *****
|
||||
|
||||
For users:
|
||||
----------
|
||||
For uses:
|
||||
---------
|
||||
|
||||
NEW: PHP 8.2 compatibility (not yet complete).
|
||||
NEW: Module Workstations Management upgraded to stable status.
|
||||
@@ -458,56 +502,66 @@ NEW: Accountancy - Manage intra-community VAT on supplier invoices - FPC22
|
||||
NEW: Accountancy - iSuiteExpert export model
|
||||
NEW: Accountancy - Quadratus export with attachments in accountancy export
|
||||
NEW: Accountancy - Can filter on a custom group of accounts. Perf or ledger list.
|
||||
NEW: Accountancy - Can select the export format during export of journals
|
||||
NEW: Accountancy - sort of column of custom group of account
|
||||
NEW: Can upload a file with drag and drop on purchase invoice, vats, salaries and social contributions
|
||||
NEW: Can upload a file with drag and drop on purchase invoice, vats, salaries and social contributions
|
||||
NEW: Authentication: #22740 add OpenID Connect impl
|
||||
NEW: Authentication: add experimental support for Google OAuth2 connexion
|
||||
NEW: Authentication: can now edit service name for OAuth token
|
||||
NEW: Add a public virtual card page for each user
|
||||
NEW: Add a status on supplier price ref (WIP to close a supplier ref)
|
||||
NEW: add bookmarks in selectable landing pages for users
|
||||
NEW: Add column ext_payment_site into societe_rib to allow multiple payment mode
|
||||
NEW: add convertion of images to webp for a single image in website media editor
|
||||
NEW: Add CRC for currency symbol before amount
|
||||
NEW: add customer code to invoices listing
|
||||
NEW: Add filter on nb of generation done in list of recurring invoices
|
||||
NEW: Add filters and sort on product unit column
|
||||
NEW: Add link to edit VAT list from error message of missing VAT
|
||||
NEW: add margins in paiement/card.php
|
||||
NEW: Add mass action delete on VAT
|
||||
NEW: Add origin info when create a product batch when created from a movement stock
|
||||
NEW: Add possibility to choose format #21426
|
||||
NEW: Add SQL contraint on product_stock table to allow only exsting product and warehouse #23543
|
||||
NEW: Add STRIPE_DEBUG, a way to log Stripe IPN
|
||||
NEW: An external module can modify the quick search fields
|
||||
NEW: Bank: Bank name no more mandatory on creation. Can be generated if empty.
|
||||
NEW: Bank: Add fields zip, town, country for owner of a bank account
|
||||
NEW: Auto activate some modules on install (Export/Import/Wysiwyg editor)
|
||||
NEW: Autofill email form with the email template with status "Default" on
|
||||
NEW: Bank name no more mandatory on creation. Can be generated if empty.
|
||||
NEW: Bank: Add fields zip, town, country for owner of a bank account
|
||||
NEW: batch referential objets
|
||||
NEW: Can add the add now link on date into addfieldvalue()
|
||||
NEW: Can add an array of several links in date selector
|
||||
NEW: Can bin accounting line for a given month
|
||||
NEW: Can edit account on miscellaneous payment (if not transfered)
|
||||
NEW: Can edit inline the VAT number from supplier tab
|
||||
NEW: Can fill date of salary payment with date of start of salary
|
||||
NEW: Can go back to draft on shipment when stock change not on validate
|
||||
NEW: Can modify bank account of sepa payment (if file not sent yet)
|
||||
NEW: Customers: add date due and labels into customer comm card
|
||||
NEW: Can select the export format during export of journals
|
||||
NEW: Can set a checkbox in formconfirm by clicking on the label
|
||||
NEW: Can set flag default value on email templates
|
||||
NEW: Can set the page "List of opportunities" as landing page
|
||||
NEW: Can show the SQL request used on emailing selection
|
||||
NEW: Can show the sql request used on emailing selection
|
||||
NEW: can stay on edit field when errors occurs
|
||||
NEW: comment in api_mymodule for seperate methods
|
||||
NEW: constant PROPALE_ADDON_NOTE_PUBLIC_DEFAULT
|
||||
NEW: create email substitution variable for intervention signature URL
|
||||
NEW: Contacts: presend mass action in contact list
|
||||
NEW: Contacts: hook printFieldListFrom in contact list
|
||||
NEW: Customers: add date due and labels into customer comm card
|
||||
NEW: Debug the custom CSS feature to avoid a directory search/scan at
|
||||
NEW: dev name
|
||||
NEW: Disable bad reputation product price
|
||||
NEW: Email: autofill email form with the email template with status "Default" on
|
||||
NEW: dolExplodeIntoArray can accept regex
|
||||
NEW: dol_sort_array can sort on alphabetical order even if val is num
|
||||
NEW: element time integration code + SQL
|
||||
NEW: Email: don't have closed contact proposed as receiver for the mails
|
||||
NEW: Email: can set flag default value on email templates
|
||||
NEW: Email-Collector: add field reply-to in email collector as possible filter
|
||||
NEW: Email-Collector: substitute date now in email collector
|
||||
NEW: Email-Collector: operation type in email collector to load or create contact
|
||||
NEW: Email-Collector: easier setup - can also use ! for negative search
|
||||
NEW: Email-Templates: show module into list of email templates
|
||||
NEW: Events: can add any contact on events if global MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT is set at 1
|
||||
NEW: Events: list with color
|
||||
NEW: Events: remove default percentage for event creation url
|
||||
NEW: expend/collapse list of social networks
|
||||
NEW: Filter on amount and qty on list of service's contracts
|
||||
NEW: formconfirm can support field with format datetime
|
||||
NEW: getCommonSubstitutionArray to have more substitute keys
|
||||
NEW: GeoIP: Can test a geoip conversion from the geoip setup page
|
||||
NEW: GUI: add a CSS editor into the admin GUI
|
||||
NEW: GUI: add dropdown button actions (example on Create button on project)
|
||||
@@ -518,17 +572,16 @@ NEW: GUI: can set background style with MAIN_LOGIN_BACKGROUND_STYLE
|
||||
NEW: Help: Tooltip to explain how to add a photo on a product
|
||||
NEW: Help: Possibility to link to German pages in help
|
||||
NEW: helper functions for dates + small demo case
|
||||
NEW: HR - Salary: can fill date of salary payment with date of start of salary
|
||||
NEW: hook printFieldListFrom in contact list
|
||||
NEW: HR - Salary: can modify the date of payment of a salary (if not reconciled)
|
||||
NEW: HR - Salary: date for salary payment includes the hour/min
|
||||
NEW: HR - Salary: adding button Send Email on the salary file
|
||||
NEW: Import: filter on entity in import
|
||||
NEW: Import: map table to element for get entity in import
|
||||
NEW: inc.php: handle parameters from argv
|
||||
NEW: Installation: Auto activate some modules on install (Export/Import/Wysiwyg editor)
|
||||
NEW: Invoice: show category of operations
|
||||
NEW: Invoice: add customer code to invoices listing
|
||||
NEW: Invoice - show category of operations
|
||||
NEW: Keep a link between user created from recruitment and application
|
||||
NEW: List product in orders
|
||||
NEW: Mass Actions: Better responsive for mass actions
|
||||
NEW: Members: add numbering modules for members
|
||||
NEW: Members: add widget box_members_by_tags.php
|
||||
@@ -542,75 +595,75 @@ NEW: No overwrite of optionals during put() contact
|
||||
NEW: Notifications: add Customer Order delivered (ORDER_NEW) in module Notification
|
||||
NEW: Notifications: for Sign or Refused Propal from Online Page
|
||||
NEW: Now we can edit amount on VAT and salaries clone action
|
||||
NEW: only get opened contact from liste_contact function, to not have access to closed contact as mail receiver
|
||||
NEW: Option: MAIN_SECURITY_MAXFILESIZE_DOWNLOADED #yogosha10660
|
||||
NEW: only get open contact from liste_contact function, to not have access to closed contact as mail receiver
|
||||
NEW: Option to manage deposit slips for more payment modes (not only
|
||||
NEW: Option to show column for field and line selection on the left
|
||||
NEW: Orders: add sub total in order list det
|
||||
NEW: Orders: list product in orders
|
||||
NEW: Orders export: allow to export field 'shipment method'
|
||||
NEW: payment default values when supplier order created from reception
|
||||
NEW: Payment: manage contracts
|
||||
NEW: Payment: sepaStripe now creates the payment mode with type pm_ using new API
|
||||
NEW: Payment: add partial payment reason "withholding tax"
|
||||
NEW: Payment: Can edit account on miscellaneous payment (if not transfered)
|
||||
NEW: Payment : manage contracts
|
||||
NEW: presend mass action in contact list
|
||||
NEW: Print PDF: category of operation for crabe PDF model
|
||||
NEW: Print PDF: Name and date to print on PDF Sign
|
||||
NEW: Print PDF: Use the more recent PDF templates for documents by default on a fresh install
|
||||
NEW: Print PDF: Option PDF_SHOW_PHONE_AFTER_USER_CONTACT to show phone after specific assigned contact on PDF
|
||||
NEW: Print PDF: Option PDF_SHOW_EMAIL_AFTER_USER_CONTACT to show email after specific assigned contact on PDF
|
||||
NEW: product images on popup are cached
|
||||
NEW: Products: Add origin info when create a product batch when created from a movement stock
|
||||
NEW: Products: Add statistics by amount on statistics of products.
|
||||
NEW: Products: Add SQL contraint on product_stock table to allow only existing product and warehouse #23543
|
||||
NEW: Proposals: filter for Signed+Billed in proposals
|
||||
NEW: Proposals: can modify margin rates in offers like VAT rates
|
||||
NEW: Proposals: option filter for NoSalesRepresentativeAffected in proposals list
|
||||
NEW: Proposals: constant PROPALE_ADDON_NOTE_PUBLIC_DEFAULT
|
||||
NEW: Provide the oldcopy value when calling setValueFrom() function with a trigger key
|
||||
NEW: Reception: can receive more than qty ordered on reception
|
||||
NEW: referential objects of batch
|
||||
NEW: remove default percentage for event creation url
|
||||
NEW: remove keys whose table element is the same as element in map list
|
||||
NEW: repair script skip views
|
||||
NEW: search on time spent duration range
|
||||
NEW: Security: Save date to invalidate other session into user table
|
||||
NEW: Security: Invalidate all sessions of a user when password is modified.
|
||||
NEW: Service Contracts: Filter on amount and qty on list of service's contracts
|
||||
NEW: search on time spent duration range
|
||||
NEW: sepaStripe now creates the payment mode with type pm_ using new API
|
||||
NEW: set payment default values when supplier order created from reception
|
||||
NEW: set today start time at beginning
|
||||
NEW: Show counter of access of website in website list
|
||||
NEW: Show main currency in company info user tooltip
|
||||
NEW: Show module into list of emails templates
|
||||
NEW: Show picto into the combobox of widgets
|
||||
NEW: Show supplier invoice ref of direct debit transfer tab invoices
|
||||
NEW: Social Networks: expend/collapse list of social networks
|
||||
NEW: show supplier name in getNomUrl of supplier order
|
||||
NEW: sort of column of custom group of account
|
||||
NEW: Supplier Invoices: add ability of ODT support to supplier invoices
|
||||
NEW: Stock limit for alert and desired optimal stock by product and warehouse import
|
||||
NEW: Stock: Add warehouse create and modify triggers.
|
||||
NEW: Stock: Can select several warehouses into the view stock at date in past
|
||||
NEW: Stripe: add STRIPE_DEBUG, a way to log Stripe IPN
|
||||
NEW: Supplier Invoices: add ability of ODT support to supplier invoices
|
||||
NEW: Supplier Order: show supplier name in getNomUrl of supplier order
|
||||
NEW: Supplier Order: set payment default values when supplier order created from reception
|
||||
NEW: Supplier Price: Add a status on supplier price ref (WIP to close a supplier ref)
|
||||
NEW: Support different bank account for several direct debit payments
|
||||
NEW: Support multiselect in the warehouse selection combo box
|
||||
NEW: Option: MAIN_SECURITY_MAXFILESIZE_DOWNLOADED #yogosha10660
|
||||
NEW: Survey: Comment on survey is possible only after vote.
|
||||
NEW: tables: llx_element_time to store time spent on several elements (mo, ticket...)
|
||||
NEW: TakePOS: adapt category and product pictures sizes on TakePOS
|
||||
NEW: TakePOS: limit load products in TakePOS
|
||||
NEW: The batch for remind on due date can be setup for using validation date
|
||||
NEW: The refresh link for IMAP collector is always visible
|
||||
NEW: Third-Party: use an ajax component to switch prospection status on thirdparty list
|
||||
NEW: The refresh link for imap collector is always visible
|
||||
NEW: The upgrade process can be done by creating a file upgrade.unlock
|
||||
NEW: Tickets: --Send an email when ticket assigned--
|
||||
NEW: Tickets: Send a notification email when ticket assigned
|
||||
NEW: Tickets: set ticket status to answered if the client has answered from the public interface
|
||||
NEW: Tickets: added an option to display the progress of tickets on the public interface
|
||||
NEW: Tickets: add link to thirdparty tickets history
|
||||
NEW: Tickets: notify also the contributor affected to a ticket if a new message public is post (add global TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ALSO_CONTRIBUTOR)
|
||||
NEW: Upgrades: The upgrade process can be done by creating a file upgrade.unlock
|
||||
NEW: Use a cache file for external RSS in calendar
|
||||
NEW: Use by default the domain $dolibarr_main_url_root for SMTP HELO
|
||||
NEW: Users: add a public virtual card page for each user
|
||||
NEW: use more recent model by default
|
||||
NEW: VAT can be modified during add of line
|
||||
NEW: Website Module: Increment website counter on each page access in website module
|
||||
NEW: Website Module: Show counter of access of website in website list
|
||||
NEW: Widgets: Show picto into the combobox of widgets
|
||||
NEW: write all fields and their properties in asciidoc format
|
||||
NEW: Can add an array of several links in date selector
|
||||
NEW: Option PDF_SHOW_PHONE_AFTER_USER_CONTACT to show phone after specific assigned contact on PDF
|
||||
NEW: Option PDF_SHOW_EMAIL_AFTER_USER_CONTACT to show email after specific assigned contact on PDF
|
||||
NEW: Widgets: Implement MAIN_ACTIVATE_FILECACHE on birthday widget
|
||||
NEW: Widgets: Add widget "The next upcoming events"
|
||||
NEW: Widgets: Add widget of open opportunities
|
||||
NEW: use an ajax component to switch prospection status on thirdparty list
|
||||
NEW: Add partial payment reason "withholding tax"
|
||||
|
||||
|
||||
|
||||
@@ -620,41 +673,31 @@ For developers or integrators:
|
||||
NEW: Make it possible to select hours and minutes in form_confirm
|
||||
NEW: add triggers on mailing
|
||||
NEW: Add a trigger when create a shipping line batch and fix propagate missing errors
|
||||
NEW: add function for listing objects from directory
|
||||
NEW: add function for listiong objects from directory
|
||||
NEW: add helplist property to describe fields of objects
|
||||
NEW: API: Support contact in post() document API
|
||||
NEW: API: more APIs (update currency rate, upload of supplier documents, ...)
|
||||
NEW: Hooks: printFieldListFrom in contact list
|
||||
NEW: Hooks: add hook in loadLotStock() in html.formproduct.class.php file
|
||||
NEW: Hooks: add hook 'llxFooter'
|
||||
NEW: Hooks: add hook online sign
|
||||
NEW: Hooks: add sent info in the parameters provided to the hook sendMailAfter
|
||||
NEW: Libraries: Update libs parsedownto 1.7.4, phpspreadsheet lib to v1.12, ESCPOS v3.0, jquery, Stripe.
|
||||
NEW: add hook in loadLotStock() in html.formproduct.class.php file, add hook 'llxFooter', Add hook online sign
|
||||
NEW: Update lib parsedownto 1.7.4, phpspreadsheet lib to v1.12, ESCPOS v3.0, jquery, Stripe.
|
||||
NEW: Support contact in post() document API
|
||||
NEW: More APIs (update currency rate, upload of supplier documents, ...)
|
||||
NEW: ModuleBuilder: updating in modulbuilder on tab Menu when adding object
|
||||
NEW: ModuleBuilder: add/edit permissions
|
||||
NEW: ModuleBuilder: better generated documentation
|
||||
NEW: add sent info in the parameters provided to the hook sendMailAfter
|
||||
NEW: add setAsSelectUser into factory for generic setup page
|
||||
NEW: add option keepspace into dol_string_nospecialchar()
|
||||
NEW: dol_sort_array can sort on alphabetical order even if val is num
|
||||
NEW: dolExplodeIntoArray can accept regex
|
||||
NEW: element time integration code + SQL
|
||||
NEW: tables: llx_element_time to store time spent on several elements (mo, ticket...)
|
||||
NEW: Provide the oldcopy value when calling setValueFrom() function with a trigger key
|
||||
NEW: getCommonSubstitutionArray to have more substitute keys
|
||||
NEW: write all fields and their properties in asciidoc format
|
||||
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* Minimal PHP version is now PHP 7.1 instead of PHP 7.0
|
||||
* Sensitive datas like keys in setup pages, that need encyption (for example the API keys of users, the CRON security key, the keys into the Stripe module, or
|
||||
* Sensitive datas like keys in setup pages, that need encyption (for example the API keys of users, the CRON security key, the keys into the Stripe module, or
|
||||
external modules setup pages that store sensitive keys or password), are using the $dolibarr_main_instance_unique_id as part of the key for encryption. So,
|
||||
if you restore or duplicate the data from another instance dump, you must also update this parameter in ther conf.php file to allow decryption in the new instance, or
|
||||
if you restore or duplicate the data from another instance dump, you must also update this parameter in ther conf.php file to allow decryption in the new instance, or
|
||||
better, you must reenter the sensitive data into the setup pages of the new instance to resave them correctly.
|
||||
Note that to find all the parameters that are encrypted into the setup database, you can do a "SELECT * FROM llx_const WHERE value LIKE '%dolcrypt%';"
|
||||
Note that to find all the parameters that are encrypted into the setup database, you can do a "SELECT * FROM llx_const WHERE value LIKE '%dolcrypt%';"
|
||||
* The deprecated method "escapeunderscore()" of database handlers has been removed. You must use "escapeforlike()" instead.
|
||||
* The method "nb_expedition()" has been renamed into "countNbOfShipments()"
|
||||
* The method "nb_expedition()" has been renamed into "countNbOfShipments()"
|
||||
* Revert default type of hooks. Default is now 'addreplace' hooks (and exception become 'output' hooks, that become deprecated).
|
||||
* Deprecated property libelle removed from entrepot class.
|
||||
* The type 'text' in ->fields property does not accept html content anymore. Use the type 'html' for that.
|
||||
@@ -663,6 +706,117 @@ Note that to find all the parameters that are encrypted into the setup database,
|
||||
* The method getCheckOption() and deleteCPUser() of class Holiday has been removed (it was not used)
|
||||
|
||||
|
||||
***** ChangeLog for 17.0.4 compared to 17.0.3 *****
|
||||
FIX: $this->newref already exists and could have been modified by a trigger but we still use a local variable for the filesystem-based renaming
|
||||
FIX: 16.0 only, backport fix for SQL error on global search product
|
||||
FIX: 17.0: deprecated field should only be a fallback
|
||||
FIX: 17.0 PHP8: supplier invoice class:
|
||||
FIX: 17.0 - php8 warnings: test for $field existence before checking is_null
|
||||
FIX: #25399 (#26694)
|
||||
FIX: #25458 intervention localizations (backport v17) (#26757)
|
||||
FIX: #25580 install/step1.php - wrong command line argument used for $main_dir (#25581)
|
||||
FIX: #25919
|
||||
FIX: #25934 #25929
|
||||
FIX: #26100 - Ticket - On edit, list of closed project must be excluded (#26223)
|
||||
FIX: #26195 - Various payment - List of project excluded those assigned to third parties (#26222)
|
||||
FIX: #26735 FIX: #26994
|
||||
FIX: #27262 Recurrent invoice - user to string conversion
|
||||
FIX: Accountancy - Possibility to write in bookkeeping expense report operation with some line not bound (#26545)
|
||||
FIX: Accountancy - Update Quadra export format
|
||||
FIX: add action update_extras to don card
|
||||
FIX: add_customer_ref_on_linked_shipment (#26349)
|
||||
FIX: add display of an error when attempting to delete a committed transaction (#26573)
|
||||
FIX: Adding the $encode parameter to recursive _replaceHtmlWithOdtTag() utilisation
|
||||
FIX: add warning in the changelog
|
||||
FIX: avoid php8 warnings (#25596)
|
||||
FIX: avoid warning : Cannot use a scalar value as an array (#26437)
|
||||
FIX: Backport memory fix for fatal error when +100000 products
|
||||
FIX: backport SQL error on global search product
|
||||
FIX: bad accountancy code autoselection for supplier ventilation
|
||||
FIX: Bad calculation of localtax when price_base_type not defined.
|
||||
FIX: bad check return for sendfile
|
||||
FIX: bad from and to
|
||||
FIX: Bad value of accounting account shown in list. Edit fails.
|
||||
FIX: Barcode header cell not well displayed
|
||||
FIX: Bar code verification should be done by entity because generation does (#28087)
|
||||
FIX: # Bug Estimated Stock at date value in V14 (#26479)
|
||||
FIX: Can't access to rec supplier invoice card
|
||||
FIX: Can't delete a fourn commande row if a commande ligne is linked
|
||||
FIX: check tva_tx before comparing price_min_ttc (#25220)
|
||||
FIX: commande context (#26497)
|
||||
FIX: compare the result of the send mail file function
|
||||
FIX: could not delete a fourn commande row if a commande ligne is linked
|
||||
FIX: count cronjob list differs of lines shown nb
|
||||
FIX: crabe PDF is generating in conf->entity instead of object->entity
|
||||
FIX: creation of invoice from contract with discount lines
|
||||
FIX: CVE-2024-23817 (#28089)
|
||||
FIX: dir output path for ODT models on reception card
|
||||
FIX: disable pointer events on jQuery-UI tooltips to prevent a glitch (fast-blinking tooltip)
|
||||
FIX: Error handling for computed values on import (#24897)
|
||||
FIX: escape HTML tags in return value of getFullName() (#26735)
|
||||
FIX: export FEC
|
||||
FIX: Fatal error converting object of class User to string (php8)
|
||||
FIX: fatal error with bad definition of dictionaries
|
||||
FIX: filter by entity on contact is missing
|
||||
FIX: Fix supplier invoice security check
|
||||
FIX: HTML in ODT templates (#26181)
|
||||
FIX: include
|
||||
FIX: label
|
||||
FIX: line special_code never saved (#28051)
|
||||
FIX: link to create purchase order from sale order
|
||||
FIX: menu auguria
|
||||
FIX: message order in ticket public view is not coherent with tickets events tab
|
||||
FIX: Missing begin transaction when updating supplier recurring invoice
|
||||
FIX: missing contact_id for the trigger
|
||||
FIX: Missing error message on CommandeFourn creation
|
||||
FIX: missing fk_account situation invoice
|
||||
FIX: missing project entity filter (Issue #26243) (#26247)
|
||||
FIX: modification of complementary attributes in commercial proposals
|
||||
FIX: modification of complementary attributes in invoices (#26180)
|
||||
FIX: more correctly parse the select part to be replaced in sql queries
|
||||
FIX: not create/update extrafields for visibility 0,2 and 5
|
||||
FIX: notification information on intervention validated confirmation message (v17+)
|
||||
FIX: payment card: misleading message when delete button disabled
|
||||
FIX: payment : language is not propagated to following pages
|
||||
FIX: pdf cornas page head multicell width (backport v17)
|
||||
FIX: possible inconsistency between llx_ecm_files and file system when BILL_SUPPLIER_VALIDATES changes ref
|
||||
FIX: Prices visible on TakePOS KO with multiprices support
|
||||
FIX: product list accounting length
|
||||
FIX: propal list : warning if product module is not enabled (#25583)
|
||||
FIX: Propal's negative quantities
|
||||
FIX: Quick search Intervention redirect to wrong page
|
||||
FIX: reception odt dir output path
|
||||
FIX: regression on rounding stocks fields on product list
|
||||
FIX_reload_linked_objects_on_propal_closeas
|
||||
FIX: Return right content type
|
||||
FIX: right access on salary card and tabs
|
||||
FIX: rights paymentsc paiementcharge
|
||||
FIX: same broken feature as v18 (Multicompany)
|
||||
FIX: Save user modif id when changing a contact status
|
||||
FIX: search by ref & rowid in don list
|
||||
FIX: search by thirdparty in don list
|
||||
FIX: special_code update line keep old value. (#26819)
|
||||
FIX: SQL concatenation error
|
||||
FIX: SQL request parenthesis
|
||||
FIX: substitute project variables in invoice documents (#26445)
|
||||
FIX: Suppliers addlines never have VAT if buyprice for this supplier
|
||||
FIX: [TAKEPOS] display prices with or without taxes depending on setup (TAKEPOS_CHANGE_PRICE_HT)
|
||||
FIX: TakePOS receipt preview in admin #25648
|
||||
FIX: template invoice list extrafield filters (backport v17) (#26227)
|
||||
FIX: thirdparty object in proposal card is not loaded
|
||||
FIX: too long output
|
||||
FIX: translation button
|
||||
FIX: use event.key instead event.which to avoid keyboard difference
|
||||
FIX: Use of line->insert instead of line->create
|
||||
FIX: user creation when LDAP is configured (#26332)
|
||||
FIX: Use the wrong logo size on PDF
|
||||
FIX: v17: Param $notrigger in $societe->create() causes method to return true regardless of actual result of database functions (#26499)
|
||||
FIX: warning param $lineID getSpecialCode is negatif (#26826)
|
||||
FIX: warning php8.2 undefined_array_key (#26830)
|
||||
FIX: warning when Workboard Responses display non numeric strings
|
||||
FIX: Wrong backtopage given for the stocktransfer button from the stocktransfer list (#26271)
|
||||
FIX: wrong place of trigger delete
|
||||
|
||||
***** ChangeLog for 17.0.3 compared to 17.0.2 *****
|
||||
FIX: #20304 propaldates update
|
||||
FIX: #24508 Label not reported when creating a supplier invoice template (#25340)
|
||||
@@ -1056,7 +1210,7 @@ WARNING:
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* Minimal PHP version is now PHP 7.0 instead of PHP 5.6
|
||||
* Core has introduced a Universal Filter Syntax for seach criteria. Example: ((((field1:=:value1) OR (field2:in:1,2,3)) AND ...). In rare case, some filters
|
||||
could be provided by URL parameters. For such cases (societe/ajax/company.php), use of Universal Filter Syntax become mandatory.
|
||||
could be provided by URL parameters. For such cases (societe/ajax/company.php), use of Universal Filter Syntax become mandatory.
|
||||
* The signature of method getNomUrl() of class ProductFournisseur has been modified to match the signature of method Product->getNomUrl()
|
||||
* Trigger ORDER_SUPPLIER_DISPATCH is removed, use ORDER_SUPPLIER_RECEIVE and/or LINEORDER_SUPPLIER_DISPATCH instead.
|
||||
* All functions fetch_all() have been set to deprecated for naming consitency, use fetchAll() instead.
|
||||
@@ -1134,7 +1288,7 @@ FIX: #23019 Impossible to add task times to an existing draft invoice
|
||||
FIX: #23072
|
||||
FIX: #23075
|
||||
FIX: #23087
|
||||
FIX: #23115
|
||||
FIX: #23115
|
||||
FIX: #23116
|
||||
FIX: #23117
|
||||
FIX: #23281
|
||||
@@ -2686,7 +2840,7 @@ NEW: add quick dropdown menu in top right menu (experimental with MAIN_USE_TOP_M
|
||||
NEW: add region in export companies and contacts
|
||||
NEW: add rights on margin info on invoice list
|
||||
NEW: add search param for close date on order list
|
||||
NEW: add show preview for mail attachement on form mail
|
||||
NEW: add show preview for mail attachment on form mail
|
||||
NEW: add State/Province origin for products
|
||||
NEW: add the workflow interaction close intervention on closing ticket
|
||||
NEW: add tracking number in list and search_all items
|
||||
@@ -4071,7 +4225,7 @@ FIX: access to public interface when origin email has an alias.
|
||||
FIX: Alias name is not into the email recipient label.
|
||||
FIX: allow standalone credit note even if no invoice
|
||||
FIX: an admin can not access his own permissions after enabling advanced permissions
|
||||
FIX: Attachement of linked files on ticket when sending a message
|
||||
FIX: Attachment of linked files on ticket when sending a message
|
||||
FIX: avoid non numeric warning
|
||||
FIX: Bad currency var used in stripe for connect
|
||||
FIX: Bad list of ticket on public interface for ticket emailcollector
|
||||
@@ -4867,7 +5021,7 @@ NEW: hidden option to define an invoice template for each invoice type
|
||||
NEW: Highlight lines on lists when they are checked
|
||||
NEW: Notification module support expense report+holiday validation and approval
|
||||
NEW: On customer/supplier card, add simple tooltip to amount boxes
|
||||
NEW: Page to check if the operations/items created between two dates have attached item(s) and possibility to download all attachements
|
||||
NEW: Page to check if the operations/items created between two dates have attached item(s) and possibility to download all attachments
|
||||
NEW: possibility to add all rights of all modules in one time
|
||||
NEW: redirect if only one result on global search on card
|
||||
NEW: Permission to ignore price min
|
||||
@@ -6311,7 +6465,7 @@ NEW: No external check of version without explicit click in about page.
|
||||
NEW: ODT docs for USER USERGROUP CONTRACT and PRODUCT class
|
||||
NEW: odt usergroup
|
||||
NEW: On invoices generated by template, we save if invoice come from a source template.
|
||||
NEW: option to copy into attachement files of events, files send by mail (with auto event creation)
|
||||
NEW: option to copy into attachment files of events, files send by mail (with auto event creation)
|
||||
NEW: PDF with numbertoword
|
||||
NEW: Permit multiple file upload in linked documents
|
||||
NEW: PHP 7.1 compatibility
|
||||
|
||||
24
README-FR.md
24
README-FR.md
@@ -70,7 +70,7 @@ Note: *Le processus de migration peut être lancé manuellement et plusieurs foi
|
||||
|
||||
## CE QUI EST NOUVEAU
|
||||
|
||||
Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog).
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
## CE QUE DOLIBARR PEUT FAIRE
|
||||
|
||||
@@ -88,11 +88,11 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
|
||||
- Gestion de contrats de services
|
||||
- Gestion de stock et inventaires
|
||||
- Gestion des expéditions
|
||||
- Gestion des demandes de congés
|
||||
- Gestion des demandes de congès
|
||||
- Gestion des notes de frais
|
||||
- Gestion de recrutement
|
||||
- GED (Gestion Electronique de Documents)
|
||||
- E-Mailings de masse
|
||||
- EMailings de masse
|
||||
- Réalisation de sondages
|
||||
- Gestion d'adhérents
|
||||
- Point de vente/Caisse enregistreuse
|
||||
@@ -107,17 +107,17 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
|
||||
- Support des codes barres
|
||||
- Calcul des marges
|
||||
- Connectivité LDAP
|
||||
- Intégration de ClickToDial
|
||||
- Intégratn de ClickToDial
|
||||
- Intégration RSS
|
||||
- Intégration Skype
|
||||
- Intégration de système de paiements (PayPal, Stripe, Paybox...)
|
||||
- Intégation Skype
|
||||
- Intégration de système de paiements (Paypal, Stripe, Paybox...)
|
||||
- …
|
||||
|
||||
### Divers
|
||||
|
||||
- Multi-langue.
|
||||
- Multi-utilisateurs avec différents niveaux de permissions par module.
|
||||
- Multidevise.
|
||||
- Multi-devise.
|
||||
- Peux être multi-société par ajout du module externe multi-société.
|
||||
- Plusieurs thèmes visuels.
|
||||
- Application simple à utiliser.
|
||||
@@ -127,7 +127,7 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
|
||||
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
|
||||
- Support natif de nombreuses fonctions spécifiques aux pays comme:
|
||||
- La taxe espagnole TE et ISPF
|
||||
- La tax espagnole TE et ISPF
|
||||
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
|
||||
- La loi française Finance 2016 et logiciels de caisse
|
||||
- La double taxe canadienne
|
||||
@@ -139,7 +139,7 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
|
||||
|
||||
### Extension
|
||||
|
||||
Dolibarr peut aussi être étendu à volonté avec l'ajout de modules/applications externes développées par des développeurs tiers, disponible sur [DoliStore](https://www.dolistore.com).
|
||||
Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
|
||||
|
||||
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
|
||||
|
||||
@@ -168,15 +168,15 @@ Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/CO
|
||||
|
||||
## ACTUALITES ET RESEAUX SOCIAUX
|
||||
|
||||
Suivez le projet Dolibarr sur les réseaux francophones
|
||||
Suivez le projet Dolibarr project sur les réseaux francophones
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr.fr)
|
||||
- [X](https://www.twitter.com/dolibarr_france)
|
||||
- [Twitter](https://www.twitter.com/dolibarr_france)
|
||||
|
||||
ou sur les réseaux anglophones
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [X](https://www.twitter.com/dolibarr)
|
||||
- [Twitter](https://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
|
||||
49
README.md
49
README.md
@@ -9,7 +9,7 @@ Dolibarr ERP & CRM is a modern software package that helps manage your organizat
|
||||
|
||||
It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
|
||||
|
||||
You can freely use, study, modify or distribute it according to its license.
|
||||
You can freely use, study, modify or distribute it according to its licence.
|
||||
|
||||
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
|
||||
|
||||
@@ -47,9 +47,9 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
|
||||
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
|
||||
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommended if you know git as it makes it easier if you want to upgrade later):
|
||||
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later):
|
||||
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is the main version like 3.6, 9.0, ...)
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...)
|
||||
|
||||
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
|
||||
|
||||
@@ -57,7 +57,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
|
||||
- From your browser, go to the dolibarr "install/" page
|
||||
|
||||
The URL will depends on how your web setup was set up to point to your dolibarr installation. It may look like:
|
||||
The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
|
||||
|
||||
`http://localhost/dolibarr/htdocs/install/`
|
||||
|
||||
@@ -71,7 +71,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
|
||||
- Follow the installer instructions
|
||||
|
||||
### SaaS/Cloud setup
|
||||
### Saas/Cloud setup
|
||||
|
||||
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See [https://saas.dolibarr.org](https://saas.dolibarr.org)). However, this third solution is not free.
|
||||
|
||||
@@ -81,7 +81,7 @@ Dolibarr supports upgrading, usually without the need for any (commercial) suppo
|
||||
|
||||
- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
||||
- Check that your installed PHP version is supported by the new version [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
- Overwrite all old files from the 'dolibarr' directory with files provided into the new version's package.
|
||||
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
||||
- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
|
||||
If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
|
||||
|
||||
@@ -98,13 +98,13 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
Product Management
|
||||
|
||||
- Products and/or Services catalogue
|
||||
- Products and/or Services catalog
|
||||
- Stock / Warehouse management + Inventory
|
||||
- Barcodes
|
||||
- Batches / Lots / Serials
|
||||
- Product Variants
|
||||
- Bill of Materials (BOM)
|
||||
- Manufacturing Orders (MO)
|
||||
- Manufacturing Orders
|
||||
|
||||
Customer/Sales Management
|
||||
|
||||
@@ -114,8 +114,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Customer Orders management
|
||||
- Contracts/Subscription management
|
||||
- Interventions management
|
||||
- Ticket System (+ Knowledge management)
|
||||
- Partnership management
|
||||
- Ticket System
|
||||
- Shipping management
|
||||
- Customer Invoices/Credit notes and payment management
|
||||
- Point of Sale (POS)
|
||||
@@ -125,7 +124,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Suppliers/Vendors + Contacts
|
||||
- Supplier (price) requests
|
||||
- Purchase Orders management
|
||||
- Delivery/Reception
|
||||
- Delivery/Receiption
|
||||
- Supplier Invoices/credit notes and payment management
|
||||
- INCOTERMS
|
||||
|
||||
@@ -142,18 +141,16 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
Collaboration
|
||||
|
||||
- Shared calendar/agenda (with ical and vcal import/export for third-party tools integration)
|
||||
- Shared calendar/agenda (with ical and vcal import/export for third party tools integration)
|
||||
- Projects & Tasks management
|
||||
- Event organization
|
||||
- Ticket System
|
||||
- Surveys
|
||||
|
||||
HR - Human Resources Management
|
||||
HR
|
||||
|
||||
- Employee's leaves management
|
||||
- Expense reports
|
||||
- Recruitment management
|
||||
- Employee/staff management
|
||||
- Timesheets
|
||||
|
||||
### Other application/modules
|
||||
@@ -171,20 +168,20 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Payment platforms integration (PayPal, Stripe, Paybox...)
|
||||
- Email-Collector
|
||||
|
||||
(around 100 modules available by default, 1000+ addons at the official marketplace Dolistore.com)
|
||||
(around 100 modules available by default, 1000+ on the addon market place)
|
||||
|
||||
### Other general features
|
||||
|
||||
- Multi-Language Support (Localization in most major languages)
|
||||
- Multi-users and groups with finely-grained rights
|
||||
- Multi-Users and groups with finely grained rights
|
||||
- Multi-Currency
|
||||
- Multi-Company (by adding of an external module)
|
||||
- Very user-friendly and easy to use
|
||||
- Very user friendly and easy to use
|
||||
- Customizable dashboards
|
||||
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
|
||||
- APIs (REST, SOAP)
|
||||
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support a lot of country-specific features:
|
||||
- Support a lot of country specific features:
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
@@ -192,7 +189,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Argentina invoice numbering using A,B,C...
|
||||
- ZATCA e-invoicing QR-Code
|
||||
- Compatible with [European directives](https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- Compatible with data privacy rules (Europe GDPR, ...)
|
||||
- Compatible with data privacy rules (europe GDPR, ...)
|
||||
- ...
|
||||
- Flexible PDF & ODT generation for invoices, proposals, orders...
|
||||
- ...
|
||||
@@ -207,7 +204,7 @@ See exact requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequ
|
||||
|
||||
### Extending
|
||||
|
||||
Dolibarr can be extended with a lot of other external applications or modules from third-party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
|
||||
## WHAT DOLIBARR CAN'T DO YET
|
||||
|
||||
@@ -215,19 +212,19 @@ These are features that Dolibarr does **not** yet fully support:
|
||||
|
||||
- Tasks dependencies in projects
|
||||
- Payroll module
|
||||
- No native embedded Webmail, but you can send emails to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- No native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Administrator, user, developer and translator's documentation are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
## CONTRIBUTING
|
||||
|
||||
This project exists thanks to all the people who contribute.
|
||||
Please read the instructions on how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
Please read the instructions how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
|
||||
A View on Contributors:
|
||||
A view on Contributors:
|
||||
|
||||
[](https://github.com/Dolibarr/dolibarr/graphs/contributors)
|
||||
|
||||
@@ -242,7 +239,7 @@ See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) fil
|
||||
Follow Dolibarr project on:
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [X](https://x.com/dolibarr)
|
||||
- [Twitter](https://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [Reddit](https://www.reddit.com/r/Dolibarr_ERP_CRM/)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
|
||||
59
SECURITY.md
59
SECURITY.md
@@ -20,9 +20,9 @@ We believe that the future of software is online SaaS. This means software are m
|
||||
|
||||
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery.
|
||||
|
||||
Any type of denial-of-service attack is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
|
||||
Any type of denial of service attacks is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
|
||||
|
||||
We recommend to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
|
||||
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
|
||||
|
||||
### User Agent
|
||||
|
||||
@@ -30,7 +30,7 @@ If you try to find bug on Dolibarr, we recommend to append to your user-agent he
|
||||
|
||||
### Account access
|
||||
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put in your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
|
||||
|
||||
## Eligibility and Responsible Disclosure
|
||||
|
||||
@@ -38,7 +38,7 @@ We are happy to thank everyone who submits valid reports which help us improve t
|
||||
|
||||
You must be the first reporter of the vulnerability (duplicate reports are closed).
|
||||
|
||||
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommend to install software on your own platform.
|
||||
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform.
|
||||
|
||||
You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability.
|
||||
|
||||
@@ -48,31 +48,27 @@ Reports are processed around once a month.
|
||||
|
||||
ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid":
|
||||
|
||||
* The version to analyze must be the last version available in the "develop" branch. Reports on vulnerabilities already fixed (so already reported) in the develop branch will not be validated.
|
||||
* $dolibarr_main_prod must be set to 1 in conf.php
|
||||
* $dolibarr_nocsrfcheck must be kept to the value 0 in conf.php (this is the default value)
|
||||
* The version to analyze must be the last version available into "develop" branch or into last stable "vX.Y" released version.
|
||||
* $dolibarr_main_prod must be set to 1 into conf.php
|
||||
* $dolibarr_nocsrfcheck must be kept to the value 0 into conf.php (this is the default value)
|
||||
* $dolibarr_main_force_https must be set to something else than 0.
|
||||
* Some constant must be set in the backoffice menu Home - Setup - Other
|
||||
- MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3
|
||||
- MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1
|
||||
- MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1
|
||||
- MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 1
|
||||
CSRF attacks and HTML injections are accepted but double check this setup that is experimental setup that already fix a lot of case and soon enabled by default.
|
||||
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles in "experimental", "development" or external modules are not valid vulnerabilities).
|
||||
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3 into backoffice menu Home - Setup - Other (this protection should be set to 3 soon by default). CSRF attacks are accepted but
|
||||
double check that you have set MAIN_SECURITY_CSRF_WITH_TOKEN to value 3.
|
||||
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles into "experimental", "developement" or external modules are not valid vulnerabilities).
|
||||
* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer).
|
||||
* The web server setup must be done so that only the documents directory is in write mode. The root directory called htdocs must be read-only.
|
||||
* The modules DebugBar and ModuleBuilder must NOT be enabled. (by default, these modules are not enabled. They are developer tools)
|
||||
* Ability for a high-level user to edit web site pages in the CMS by including HTML or JavaScript is an expected feature. Vulnerabilities in the website module are validated only if HTML or JavaScript injection can be done by a non-allowed user.
|
||||
* Fail2ban rules for rate limit on the login page, forgotten password page, API calls and all public pages (/public/*) must be installed as recommended in the section "About - Admin tools - Section Access limits and mitigation".
|
||||
* Ability for a high level user to edit web site pages into the CMS by including HTML or Javascript is an expected feature. Vulnerabilities into the website module are validated only if HTML or Javascript injection can be done by a non allowed user.
|
||||
* Fail2ban rules for rate limit on the login page,password forgotten page, api calls and all public pages (/public/*) must be installed as recommendend into the section "About - Admin tools - Section Access limits and mitigation".
|
||||
|
||||
Scope is the web application (backoffice) and the APIs.
|
||||
Scope is the web application (back office) and the APIs.
|
||||
|
||||
## Examples of vulnerabilities that are Qualified for reporting.
|
||||
|
||||
* Remote code execution (RCE)
|
||||
* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA)
|
||||
* Code injections (JS, SQL, PHP). HTML are covered only for fields that are not description, notes or comments fields (where rich content is allowed on purpose).
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except in the module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except into module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
|
||||
* Cross-Site Requests Forgery (CSRF) with real security impact (when using GET URLs, CSRF are qualified only for creating, updating or deleting data from pages restricted to admin users)
|
||||
* Open redirect
|
||||
* Broken authentication & session management
|
||||
@@ -80,21 +76,24 @@ Scope is the web application (backoffice) and the APIs.
|
||||
* Cross-Origin Resource Sharing (CORS) with real security impact
|
||||
* Horizontal and vertical privilege escalation
|
||||
* "HTTP Host Header" XSS
|
||||
* Software version disclosure (for non-admin users only)
|
||||
* Stack traces or path disclosure (for non-admin users only)
|
||||
* Software version disclosure (for non admin users only)
|
||||
* Stack traces or path disclosure (for non admin users only)
|
||||
|
||||
## Examples of vulnerabilities that are Non-qualified for reporting.
|
||||
|
||||
* "Self" XSS
|
||||
* Clickjacking/UI redressing
|
||||
* Presence of autocomplete attribute on web forms
|
||||
* Logout and other instances of low-severity Cross-Site Request Forgery
|
||||
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
||||
* Reports on features on modules flagged as "deprecated", "experimental" or "development" if the module needs to be enabled for that (this is not the case on production).
|
||||
* Software or libraries versions, private IP disclosure, Stack traces or path disclosure when logged-in user is admin.
|
||||
* Any vulnerabilities due to a configuration different than the one defined in chapter "Scope for qualified vulnerabilities".
|
||||
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
|
||||
* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the recommended fail2ban rules were not installed.
|
||||
* SSL/TLS best practices
|
||||
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
|
||||
* Denial of Service attacks
|
||||
* Clickjacking/UI redressing
|
||||
* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device
|
||||
* Presence of autocomplete attribute on web forms
|
||||
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
|
||||
* Logout and other instances of low-severity Cross-Site Request Forgery
|
||||
* Missing security-related HTTP headers which do not lead directly to a vulnerability
|
||||
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
||||
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
|
||||
* Reports on features flagged as "experimental" or "development"
|
||||
* Software version or private IP disclosure when logged-in user is admin
|
||||
* Stack traces or path disclosure when logged-in user is admin
|
||||
* Any vulnerabilities due to a configuration different than the one defined into chapter "Scope for qualified vulnerabilities".
|
||||
* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the fail2ban recommended fail2ban rules were not installed.
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
<?php
|
||||
|
||||
$force_install_message = 'KeepDefaultValuesMamp';
|
||||
$force_install_main_data_root = '/Applications/MAMP/dolibarr_documents';
|
||||
$force_install_type = 'mysqli';
|
||||
$force_install_dbserver = 'localhost';
|
||||
$force_install_port = '8889';
|
||||
$force_install_database = 'dolibarr';
|
||||
$force_install_createdatabase = '1';
|
||||
$force_install_databaselogin = 'dolibarrmysql';
|
||||
$force_install_databasepass = 'root';
|
||||
$force_install_createuser = '1';
|
||||
$force_install_databaserootlogin = 'root';
|
||||
$force_install_databaserootpass = 'root';
|
||||
$force_install_dolibarrlogin = 'admin';
|
||||
$force_install_nophpinfo = '1';
|
||||
$force_install_lockinstall = '444';
|
||||
$force_install_message='KeepDefaultValuesMamp';
|
||||
$force_install_main_data_root='/Applications/MAMP/dolibarr_documents';
|
||||
$force_install_type='mysqli';
|
||||
$force_install_dbserver='localhost';
|
||||
$force_install_port='8889';
|
||||
$force_install_database='dolibarr';
|
||||
$force_install_createdatabase='1';
|
||||
$force_install_databaselogin='dolibarrmysql';
|
||||
$force_install_databasepass='root';
|
||||
$force_install_createuser='1';
|
||||
$force_install_databaserootlogin='root';
|
||||
$force_install_databaserootpass='root';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# How to use it ?
|
||||
|
||||
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the current workspace with Docker.
|
||||
This docker image is intended for development usage.
|
||||
This docker image is intended for developpement usage.
|
||||
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
||||
|
||||
Before build/run, define the variable HOST_USER_ID as following:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#-------------------------------------------------------------------#
|
||||
# Makefile to build UsedPort exe
|
||||
# Makefile
|
||||
#-------------------------------------------------------------------#
|
||||
# 1.0 Laurent Destailleur Creation
|
||||
#-------------------------------------------------------------------#
|
||||
|
||||
@@ -253,7 +253,6 @@ int main(int argc, char **argv)
|
||||
//----------------
|
||||
int noarg,curseurarg,help=0,invalide=0;
|
||||
char option;
|
||||
char *endptr;
|
||||
|
||||
for (noarg=1;noarg<argc;noarg++) {
|
||||
if (((argv[noarg][0])=='/') || ((argv[noarg][0])=='-')) {
|
||||
@@ -262,7 +261,7 @@ for (noarg=1;noarg<argc;noarg++) {
|
||||
if (strlen(argv[noarg]) < 3) { ++noarg; curseurarg=0; }
|
||||
switch (option) {
|
||||
case 's': strncpy(Host,argv[noarg]+curseurarg,sizeof(Host)); break;
|
||||
case 'p': Port=strtol(argv[noarg] + curseurarg, &endptr, 10); break; // Get port from "-p80" (curseurarg = 2) or "-p 80" (curseurarg = 0)
|
||||
case 'p': Port=atoi(argv[noarg]+curseurarg); break;
|
||||
case '?': help=-1;break; // Help
|
||||
case 'h': help=-1;break; // Help
|
||||
case 'v': help=-1;break; // Help
|
||||
@@ -271,20 +270,6 @@ for (noarg=1;noarg<argc;noarg++) {
|
||||
}
|
||||
}
|
||||
|
||||
// Check for conversion errors
|
||||
if (*endptr != '\0') {
|
||||
// Handle error: Invalid input format
|
||||
printf("Invalid port number format\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// Check for overflow
|
||||
if (Port < 0 || Port > INT_MAX) {
|
||||
// Handle error: Port number out of range
|
||||
printf("Port number out of range\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
help=!(Port > 0);
|
||||
|
||||
// Show usage
|
||||
|
||||
@@ -251,7 +251,7 @@ safe_mode_protected_env_vars = LD_LIBRARY_PATH
|
||||
; and below. This directive makes most sense if used in a per-directory
|
||||
; or per-virtualhost web server configuration file. This directive is
|
||||
; *NOT* affected by whether Safe Mode is turned On or Off.
|
||||
open_basedir = "WAMPROOT;C:\WINDOWS\TEMP"
|
||||
open_basedir = "WAMPROOT"
|
||||
|
||||
; This directive allows you to disable certain functions for security reasons.
|
||||
; It receives a comma-delimited list of function names. This directive is
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
* \brief This script create a xml checksum file
|
||||
*/
|
||||
|
||||
if (!defined('NOREQUIREDB')) {
|
||||
if (! defined('NOREQUIREDB')) {
|
||||
define('NOREQUIREDB', '1'); // Do not create database handler $db
|
||||
}
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path = dirname(__FILE__).'/';
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
@@ -44,9 +44,9 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
|
||||
* Main
|
||||
*/
|
||||
|
||||
$includecustom = 0;
|
||||
$includeconstants = array();
|
||||
$buildzip = 0;
|
||||
$includecustom=0;
|
||||
$includeconstants=array();
|
||||
$buildzip=0;
|
||||
|
||||
if (empty($argv[1])) {
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n";
|
||||
@@ -55,7 +55,7 @@ if (empty($argv[1])) {
|
||||
}
|
||||
|
||||
|
||||
$i = 0;
|
||||
$i=0;
|
||||
$result = array();
|
||||
while ($i < $argc) {
|
||||
if (!empty($argv[$i])) {
|
||||
@@ -71,10 +71,10 @@ while ($i < $argc) {
|
||||
$includeconstants[$i] = $result["includeconstant"];
|
||||
}
|
||||
if (!empty($result["buildzip"])) {
|
||||
$buildzip = 1;
|
||||
$buildzip=1;
|
||||
}
|
||||
if (preg_match('/includeconstant=/', strval($argv[$i]))) {
|
||||
$tmp = explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str()
|
||||
$tmp=explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str()
|
||||
if (count($tmp) != 3) {
|
||||
print "Error: Bad parameter includeconstant=".$result['includeconstant'] ."\n";
|
||||
exit -1;
|
||||
@@ -93,16 +93,16 @@ if (empty($release)) {
|
||||
$savrelease = $release;
|
||||
|
||||
// If release is auto, we take current version
|
||||
$tmpver = explode('-', $release, 2);
|
||||
$tmpver=explode('-', $release, 2);
|
||||
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') {
|
||||
$release = DOL_VERSION;
|
||||
$release=DOL_VERSION;
|
||||
if ($tmpver[1] && $tmpver[0] == 'auto') {
|
||||
$release .= '-'.$tmpver[1];
|
||||
$release.='-'.$tmpver[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($includecustom)) {
|
||||
$tmpverbis = explode('-', $release, 2);
|
||||
$tmpverbis=explode('-', $release, 2);
|
||||
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') {
|
||||
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
|
||||
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
@@ -110,7 +110,7 @@ if (empty($includecustom)) {
|
||||
exit -1;
|
||||
}
|
||||
} else {
|
||||
$tmpverter = explode('-', DOL_VERSION, 2);
|
||||
$tmpverter=explode('-', DOL_VERSION, 2);
|
||||
if ($tmpverter[0] != $tmpverbis[0]) {
|
||||
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
@@ -118,7 +118,7 @@ if (empty($includecustom)) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
|
||||
if (! preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
|
||||
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
@@ -137,13 +137,13 @@ foreach ($includeconstants as $countrycode => $tmp) {
|
||||
print "\n";
|
||||
|
||||
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
||||
$outputdir = dirname(dirname(__FILE__)).'/htdocs/install';
|
||||
$outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
|
||||
print 'Delete current files '.$outputdir.'/filelist*.xml*'."\n";
|
||||
dol_delete_file($outputdir.'/filelist*.xml*', 0, 1, 1);
|
||||
|
||||
$checksumconcat = array();
|
||||
$checksumconcat=array();
|
||||
|
||||
$outputfile = $outputdir.'/filelist-'.$release.'.xml';
|
||||
$outputfile=$outputdir.'/filelist-'.$release.'.xml';
|
||||
$fp = fopen($outputfile, 'w');
|
||||
if (empty($fp)) {
|
||||
print 'Failed to open file '.$outputfile."\n";
|
||||
@@ -156,8 +156,8 @@ fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now
|
||||
foreach ($includeconstants as $countrycode => $tmp) {
|
||||
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
|
||||
foreach ($tmp as $constname => $constvalue) {
|
||||
$valueforchecksum = (empty($constvalue) ? '0' : $constvalue);
|
||||
$checksumconcat[] = $valueforchecksum;
|
||||
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
|
||||
$checksumconcat[]=$valueforchecksum;
|
||||
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
|
||||
}
|
||||
fputs($fp, '</dolibarr_constants>'."\n");
|
||||
@@ -172,26 +172,26 @@ $files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom
|
||||
*/
|
||||
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
|
||||
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$regextoexclude = '('.($includecustom?'':'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
|
||||
$dir = '';
|
||||
$needtoclose = 0;
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
foreach ($files as $filetmp) {
|
||||
$file = $filetmp['fullname'];
|
||||
//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
if ($newdir != $dir) {
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose) {
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
}
|
||||
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose = 1;
|
||||
$needtoclose=1;
|
||||
}
|
||||
if (filetype($file) == "file") {
|
||||
$md5 = md5_file($file);
|
||||
$checksumconcat[] = $md5;
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
@@ -205,7 +205,7 @@ fputs($fp, md5(join(',', $checksumconcat))."\n");
|
||||
fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n");
|
||||
|
||||
|
||||
$checksumconcat = array();
|
||||
$checksumconcat=array();
|
||||
|
||||
fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
|
||||
|
||||
@@ -215,27 +215,27 @@ $iterator2 = new RecursiveIteratorIterator($dir_iterator2);
|
||||
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
|
||||
$files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
*/
|
||||
$regextoinclude = '\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoexclude = '(custom|documents|conf|install)$'; // Exclude dirs
|
||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoexclude='(custom|documents|conf|install)$'; // Exclude dirs
|
||||
$files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
$dir = '';
|
||||
$needtoclose = 0;
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
foreach ($files as $filetmp) {
|
||||
$file = $filetmp['fullname'];
|
||||
//$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
if ($newdir != $dir) {
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose) {
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
}
|
||||
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose = 1;
|
||||
$needtoclose=1;
|
||||
}
|
||||
if (filetype($file) == "file") {
|
||||
$md5 = md5_file($file);
|
||||
$checksumconcat[] = $md5;
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file build/makepack-dolibarr.pl
|
||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||
# \author (c)2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
# \author (c)2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
#
|
||||
# This is list of constant you can set to have generated packages moved into a specific dir:
|
||||
# This is list of constant you can set to have generated packages moved into a specific dir:
|
||||
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
|
||||
#DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'
|
||||
#DESTIMODULES='/media/HDDATA1_LD/Mes Sites/Web/Admin1/wwwroot/files/modules'
|
||||
@@ -18,10 +18,12 @@ use Term::ANSIColor;
|
||||
|
||||
# Change this to defined target for option 98 and 99
|
||||
$PROJECT="dolibarr";
|
||||
$PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
|
||||
$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/dolibarr_documents/website/www.dolibarr.org/files";
|
||||
|
||||
$PUBLISHBETARC="$ENV{'DESTIASSOLOGIN'}\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/dolibarr_documents/website/www.dolibarr.org/files";
|
||||
$PUBLISHSTABLE="$ENV{'DESTISFLOGIN'}\@frs.sourceforge.net:/home/frs/project/dolibarr";
|
||||
|
||||
# due to implicit origin on git commands, example
|
||||
# implicit origin, lionel upstream, eric dolibarr
|
||||
$GITREMOTENAME="$ENV{'GITREMOTENAME'}";
|
||||
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
%REQUIREMENTPUBLISH=(
|
||||
@@ -36,7 +38,7 @@ $PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/
|
||||
"RPM_FEDORA"=>"rpmbuild",
|
||||
"RPM_MANDRIVA"=>"rpmbuild",
|
||||
"RPM_OPENSUSE"=>"rpmbuild",
|
||||
"DEB"=>"dpkg dpatch",
|
||||
"DEB"=>"dpkg",
|
||||
"FLATPACK"=>"flatpack",
|
||||
"EXEDOLIWAMP"=>"ISCC.exe",
|
||||
"SNAPSHOT"=>"tar"
|
||||
@@ -98,6 +100,13 @@ if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if (! $ENV{"GITREMOTENAME"})
|
||||
{
|
||||
print "Error: environment variable GITREMOTENAME does not exist. You can set it to 'origin' or any other git remote name.\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
exit 1;
|
||||
}
|
||||
# Detect OS type
|
||||
# --------------
|
||||
if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='linux'; $CR=''; }
|
||||
@@ -129,7 +138,7 @@ if (! $TEMP || ! -d $TEMP) {
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
exit 2;
|
||||
}
|
||||
}
|
||||
$BUILDROOT="$TEMP/buildroot";
|
||||
|
||||
|
||||
@@ -172,7 +181,7 @@ $newbuild = $BUILD;
|
||||
$newbuild =~ s/(dev|alpha)/1/gi; # dev
|
||||
$newbuild =~ s/beta(.?)/2/gi; # beta (we want beta1, beta2, betax to be same package name)
|
||||
$newbuild =~ s/rc(.?)/3/gi; # rc (we want rc1, rc2, rcx to be same package name)
|
||||
if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale is same than rc.
|
||||
if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale is same than rc.
|
||||
# now newbuild is 0-1 or 0-4 for example. Note that for native package (see debian/source/format), we should not use a dash part but to get a better version management
|
||||
$build = $newbuild;
|
||||
$build =~ s/-.*$//g;
|
||||
@@ -190,8 +199,8 @@ for (0..@ARGV-1) {
|
||||
if ($ARGV[$_] =~ /^-*target=(\w+)/i) { $target=$1; $batch=1; }
|
||||
if ($ARGV[$_] =~ /^-*desti=(.+)/i) { $DESTI=$1; }
|
||||
if ($ARGV[$_] =~ /^-*prefix=(.+)/i) {
|
||||
$PREFIX=$1;
|
||||
$FILENAMESNAPSHOT.="-".$PREFIX;
|
||||
$PREFIX=$1;
|
||||
$FILENAMESNAPSHOT.="-".$PREFIX;
|
||||
}
|
||||
}
|
||||
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTIBETARC is defined
|
||||
@@ -210,7 +219,7 @@ print "Target directory (DESTI) : $DESTI\n";
|
||||
# Choose package targets
|
||||
#-----------------------
|
||||
if ($target) {
|
||||
if ($target eq "ALL") {
|
||||
if ($target eq "ALL") {
|
||||
foreach my $key (@LISTETARGET) {
|
||||
if ($key ne 'SNAPSHOT' && $key ne 'SF' && $key ne 'ASSO') { $CHOOSEDTARGET{$key}=1; }
|
||||
}
|
||||
@@ -236,10 +245,10 @@ else {
|
||||
printf(" %2d - %-14s (%s)\n",$cpt,"ASSO (publish)","Need ".$REQUIREMENTPUBLISH{"ASSO"});
|
||||
$cpt=99;
|
||||
printf(" %2d - %-14s (%s)\n",$cpt,"SF (publish)","Need ".$REQUIREMENTPUBLISH{"SF"});
|
||||
|
||||
|
||||
# Ask which target to build
|
||||
print "Choose one target number or several separated with space (0 - ".$cpt."): ";
|
||||
$NUM_SCRIPT=<STDIN>;
|
||||
$NUM_SCRIPT=<STDIN>;
|
||||
chomp($NUM_SCRIPT);
|
||||
if ($NUM_SCRIPT !~ /^[0-9\s]+$/)
|
||||
{
|
||||
@@ -286,11 +295,11 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
print "Error: You asked creation of several rpms. Because all rpm have same name, you must defined an environment variable DESTI to tell packager where it can create subdirs for each generated package.\n";
|
||||
exit;
|
||||
}
|
||||
$atleastonerpm=1;
|
||||
}
|
||||
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target}))
|
||||
$atleastonerpm=1;
|
||||
}
|
||||
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target}))
|
||||
{
|
||||
# Test
|
||||
# Test
|
||||
print "Test requirement for target $target: Search '$req'... ";
|
||||
$newreq=$req; $newparam='';
|
||||
if ($newreq eq 'zip') { $newparam.='-h'; }
|
||||
@@ -299,12 +308,12 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
print "Test command ".$cmd."... ";
|
||||
$ret=`$cmd`;
|
||||
$coderetour=$?; $coderetour2=$coderetour>>8;
|
||||
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/)) && $PROGPATH) {
|
||||
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/)) && $PROGPATH) {
|
||||
# Not found error, we try in PROGPATH
|
||||
$ret=`"$PROGPATH/$ALTERNATEPATH{$req}/$req\" 2>&1`;
|
||||
$coderetour=$?; $coderetour2=$coderetour>>8;
|
||||
$REQUIREMENTTARGET{$target}="$PROGPATH/$ALTERNATEPATH{$req}/$req";
|
||||
}
|
||||
}
|
||||
|
||||
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/))) {
|
||||
# Not found error
|
||||
@@ -333,7 +342,7 @@ $nbofpublishneedchangelog=0;
|
||||
foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
if ($target eq '-CHKSUM') { $nbofpublishneedchangelog++; }
|
||||
if ($CHOOSEDTARGET{$target} < 0) { next; }
|
||||
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP' && $target ne '-CHKSUM')
|
||||
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP' && $target ne '-CHKSUM')
|
||||
{
|
||||
$nboftargetneedbuildroot++;
|
||||
}
|
||||
@@ -369,12 +378,12 @@ if ($nboftargetok) {
|
||||
}
|
||||
if (! $BUILD || $BUILD eq '0-rc') # For a major version
|
||||
{
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
}
|
||||
else # For a maintenance release
|
||||
{
|
||||
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
}
|
||||
print "\n";
|
||||
if (! $ret)
|
||||
@@ -397,10 +406,10 @@ if ($nboftargetok) {
|
||||
print "Go to directory $SOURCE\n";
|
||||
$olddir=getcwd();
|
||||
chdir("$SOURCE");
|
||||
|
||||
|
||||
print "Clean $SOURCE/htdocs/includes/autoload.php\n";
|
||||
$ret=`rm -f $SOURCE/htdocs/includes/autoload.php`;
|
||||
|
||||
|
||||
$ret=`git ls-files . --exclude-standard --others`;
|
||||
if ($ret)
|
||||
{
|
||||
@@ -409,12 +418,16 @@ if ($nboftargetok) {
|
||||
print "Canceled.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
||||
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
||||
print $ret."\n";
|
||||
# Copy to final dir
|
||||
$NEWDESTI=$DESTI;
|
||||
if ( !-d "$NEWDESTI/signatures" ) {
|
||||
use File::Path qw( make_path );
|
||||
make_path "$NEWDESTI/signatures" or die "Failed to create path: $NEWDESTI/signatures";
|
||||
}
|
||||
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
|
||||
use File::Copy qw(copy);
|
||||
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
|
||||
@@ -427,32 +440,32 @@ if ($nboftargetok) {
|
||||
print "Go to directory $SOURCE\n";
|
||||
$olddir=getcwd();
|
||||
chdir("$SOURCE");
|
||||
|
||||
|
||||
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||
$ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`;
|
||||
if ($ret =~ /(already exists|existe déjà)/)
|
||||
{
|
||||
print "WARNING: Tag ".$MAJOR.'.'.$MINOR.'.'.$BUILD." already exists. Overwrite (y/N) ? ";
|
||||
$QUESTIONOVERWRITETAG=<STDIN>;
|
||||
$QUESTIONOVERWRITETAG=<STDIN>;
|
||||
chomp($QUESTIONOVERWRITETAG);
|
||||
if ($QUESTIONOVERWRITETAG =~ /(o|y)/)
|
||||
{
|
||||
print 'Run git tag -a -f -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
|
||||
print 'Run git push -f --tags'."\n";
|
||||
$ret=`git push -f --tags`;
|
||||
print 'Run git push $GITREMOTENAME -f --tags'."\n";
|
||||
$ret=`git push $GITREMOTENAME -f --tags`;
|
||||
#$ret=`git push -f origin "$MAJOR.$MINOR.$BUILD"`;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print 'Run git push --tags'."\n";
|
||||
$ret=`git push --tags`;
|
||||
print 'Run git push $GITREMOTENAME --tags'."\n";
|
||||
$ret=`git push $GITREMOTENAME --tags`;
|
||||
#$ret=`git push origin "$MAJOR.$MINOR.$BUILD"`;
|
||||
}
|
||||
chdir("$olddir");
|
||||
}
|
||||
|
||||
|
||||
# Update buildroot if required
|
||||
#-----------------------------
|
||||
if ($nboftargetneedbuildroot)
|
||||
@@ -462,7 +475,7 @@ if ($nboftargetok) {
|
||||
|
||||
print "Delete directory $BUILDROOT\n";
|
||||
$ret=`rm -fr "$BUILDROOT"`;
|
||||
|
||||
|
||||
mkdir "$BUILDROOT";
|
||||
mkdir "$BUILDROOT/$PROJECT";
|
||||
print "Copy $SOURCE into $BUILDROOT/$PROJECT\n";
|
||||
@@ -488,7 +501,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/phpstan.neon`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/README-*.md`;
|
||||
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/Doli*-*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.deb`;
|
||||
@@ -538,8 +551,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/security`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/spec`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/tools/php-cs-fixer/vendor`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/tools/rector/vendor`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/uml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/vagrant`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/xdebug`;
|
||||
@@ -557,20 +568,20 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot11.png`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot12.png`;
|
||||
|
||||
# Security to avoid to package data files
|
||||
# Security to avoid to package data files
|
||||
print "Remove documents dir\n";
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
|
||||
|
||||
|
||||
print "Remove subdir of custom dir\n";
|
||||
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
|
||||
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs but not files
|
||||
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\;\n";
|
||||
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs, even symbolic links, but not files
|
||||
|
||||
# Removed known external modules to avoid any error when packaging from env where external modules are tested
|
||||
# Removed known external modules to avoid any error when packaging from env where external modules are tested
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/abricot*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/accountingexport*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
|
||||
@@ -583,7 +594,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/forceproject*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/langs/*/README.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`;
|
||||
@@ -596,15 +606,15 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/common/fontawesome-5/svgs`;
|
||||
|
||||
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
|
||||
|
||||
# Removed files installed by the awful composer
|
||||
|
||||
# Removed files installed by the awful composer
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/bin`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
|
||||
@@ -630,33 +640,27 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/examples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/examples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/vendor`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/webmozart`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/autoload.php`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/bin`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/bin`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/bin`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/*/bin`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/*/*/bin`;
|
||||
}
|
||||
|
||||
# Build package for each target
|
||||
#------------------------------
|
||||
foreach my $target (sort keys %CHOOSEDTARGET)
|
||||
foreach my $target (sort keys %CHOOSEDTARGET)
|
||||
{
|
||||
if ($CHOOSEDTARGET{$target} < 0) { next; }
|
||||
if ($target eq '-CHKSUM') { next; }
|
||||
|
||||
|
||||
print "\nBuild package for target $target\n";
|
||||
|
||||
if ($target eq 'SNAPSHOT')
|
||||
if ($target eq 'SNAPSHOT')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
|
||||
@@ -680,13 +684,13 @@ if ($nboftargetok) {
|
||||
next;
|
||||
}
|
||||
|
||||
if ($target eq 'TGZ')
|
||||
if ($target eq 'TGZ')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
if ($NEWDESTI =~ /stable/)
|
||||
{
|
||||
mkdir($DESTI.'/standard');
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
}
|
||||
|
||||
print "Remove target $FILENAMETGZ.tgz...\n";
|
||||
@@ -700,7 +704,7 @@ if ($nboftargetok) {
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ/build/exe`;
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ/htdocs/includes/ckeditor/_source`; # We can't remove it with exclude file, we need it for some tarball packages
|
||||
|
||||
|
||||
print "Compress $FILENAMETGZ into $FILENAMETGZ.tgz...\n";
|
||||
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMETGZ.tgz\" $FILENAMETGZ";
|
||||
print "$cmd\n";
|
||||
@@ -712,14 +716,14 @@ if ($nboftargetok) {
|
||||
next;
|
||||
}
|
||||
|
||||
if ($target eq 'XZ')
|
||||
if ($target eq 'XZ')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
if ($NEWDESTI =~ /stable/)
|
||||
{
|
||||
mkdir($DESTI.'/standard');
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
}
|
||||
}
|
||||
|
||||
print "Remove target $FILENAMEXZ.xz...\n";
|
||||
unlink("$NEWDESTI/$FILENAMEXZ.xz");
|
||||
@@ -732,7 +736,7 @@ if ($nboftargetok) {
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMEXZ/build/exe`;
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMEXZ/htdocs/includes/ckeditor/_source`; # We can't remove it with exclude file, we need it for some tarball packages
|
||||
|
||||
|
||||
print "Compress $FILENAMEXZ into $FILENAMEXZ.xz...\n";
|
||||
|
||||
print "Go to directory $BUILDROOT\n";
|
||||
@@ -748,15 +752,15 @@ if ($nboftargetok) {
|
||||
$ret=`mv "$BUILDROOT/$FILENAMEXZ.xz" "$NEWDESTI/$FILENAMEXZ.xz"`;
|
||||
next;
|
||||
}
|
||||
|
||||
if ($target eq 'ZIP')
|
||||
|
||||
if ($target eq 'ZIP')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
if ($NEWDESTI =~ /stable/)
|
||||
{
|
||||
mkdir($DESTI.'/standard');
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
}
|
||||
}
|
||||
|
||||
print "Remove target $FILENAMEZIP.zip...\n";
|
||||
unlink("$NEWDESTI/$FILENAMEZIP.zip");
|
||||
@@ -779,14 +783,14 @@ if ($nboftargetok) {
|
||||
print $cmd."\n";
|
||||
$ret= `$cmd`;
|
||||
chdir("$olddir");
|
||||
|
||||
|
||||
# Move to final dir
|
||||
print "Move $FILENAMEZIP.zip to $NEWDESTI/$FILENAMEZIP.zip\n";
|
||||
$ret=`mv "$BUILDROOT/$FILENAMEZIP.zip" "$NEWDESTI/$FILENAMEZIP.zip"`;
|
||||
next;
|
||||
}
|
||||
|
||||
if ($target =~ /RPM/) # Linux only
|
||||
|
||||
if ($target =~ /RPM/) # Linux only
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
$subdir="package_rpm_generic";
|
||||
@@ -797,7 +801,7 @@ if ($nboftargetok) {
|
||||
{
|
||||
mkdir($DESTI.'/'.$subdir);
|
||||
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
|
||||
}
|
||||
}
|
||||
|
||||
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
|
||||
|
||||
@@ -810,7 +814,7 @@ if ($nboftargetok) {
|
||||
|
||||
print "Create directory $BUILDROOT/$FILENAMETGZ2\n";
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2`;
|
||||
|
||||
|
||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMETGZ2\n";
|
||||
$cmd="cp -pr '$BUILDROOT/$PROJECT' '$BUILDROOT/$FILENAMETGZ2'";
|
||||
$ret=`$cmd`;
|
||||
@@ -827,6 +831,7 @@ if ($nboftargetok) {
|
||||
print "Compress $FILENAMETGZ2 into $FILENAMETGZ2.tgz...\n";
|
||||
$ret=`tar --exclude-from "$SOURCE/build/tgz/tar_exclude.txt" --directory "$BUILDROOT" -czvf "$BUILDROOT/$FILENAMETGZ2.tgz" $FILENAMETGZ2`;
|
||||
|
||||
if (! -d $RPMDIR . '/SOURCES') { mkdir($RPMDIR . '/SOURCES'); }
|
||||
print "Move $BUILDROOT/$FILENAMETGZ2.tgz to $RPMDIR/SOURCES/$FILENAMETGZ2.tgz\n";
|
||||
$cmd="mv $BUILDROOT/$FILENAMETGZ2.tgz $RPMDIR/SOURCES/$FILENAMETGZ2.tgz";
|
||||
$ret=`$cmd`;
|
||||
@@ -836,7 +841,7 @@ if ($nboftargetok) {
|
||||
if ($target =~ /FEDO/i) { $BUILDFICSRC="${FILENAME}_fedora.spec"; }
|
||||
if ($target =~ /MAND/i) { $BUILDFICSRC="${FILENAME}_mandriva.spec"; }
|
||||
if ($target =~ /OPEN/i) { $BUILDFICSRC="${FILENAME}_opensuse.spec"; }
|
||||
|
||||
|
||||
use Date::Language;
|
||||
$lang=Date::Language->new('English');
|
||||
$datestring = $lang->time2str("%a %b %e %Y", time);
|
||||
@@ -854,7 +859,7 @@ if ($nboftargetok) {
|
||||
}
|
||||
close SPECFROM;
|
||||
close SPECTO;
|
||||
|
||||
|
||||
print "Copy patch file to $RPMDIR/SOURCES\n";
|
||||
$ret=`cp "$SOURCE/build/rpm/dolibarr-forrpm.patch" "$RPMDIR/SOURCES"`;
|
||||
$ret=`chmod 644 $RPMDIR/SOURCES/dolibarr-forrpm.patch`;
|
||||
@@ -876,14 +881,14 @@ if ($nboftargetok) {
|
||||
next;
|
||||
}
|
||||
|
||||
if ($target eq 'DEB')
|
||||
if ($target eq 'DEB')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
if ($NEWDESTI =~ /stable/)
|
||||
{
|
||||
mkdir($DESTI.'/package_debian-ubuntu');
|
||||
if (-d $DESTI.'/package_debian-ubuntu') { $NEWDESTI=$DESTI.'/package_debian-ubuntu'; }
|
||||
}
|
||||
}
|
||||
|
||||
$olddir=getcwd();
|
||||
|
||||
@@ -964,13 +969,18 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/select2/LICENSE`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mike42/escpos-php/LICENSE.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mobiledetect/mobiledetectlib/LICENSE.txt`;
|
||||
|
||||
|
||||
# Removed files we don't need (already removed)
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/.codeclimate.yml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/.pre-commit-config.yaml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/.vscode`;
|
||||
$ret=`find $BUILDROOT/$PROJECT.tmp/ -type f -name '.editorconfig' -exec rm {} \\;`;
|
||||
$ret=`find $BUILDROOT/$PROJECT.tmp/ -type f -name '.travis.yml' -exec rm {} \\;`;
|
||||
|
||||
# Rename upstream changelog to match debian rules
|
||||
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
|
||||
|
||||
|
||||
# Prepare source package (init debian dir)
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/debian\n";
|
||||
$ret=`mkdir "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
@@ -1008,7 +1018,7 @@ if ($nboftargetok) {
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postrm" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.templates" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/install.forced.php.install" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
|
||||
|
||||
# Set owners and permissions
|
||||
#print "Set owners on files/dir\n";
|
||||
#$ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`;
|
||||
@@ -1039,8 +1049,8 @@ if ($nboftargetok) {
|
||||
$ret=`$cmd`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
|
||||
|
||||
|
||||
|
||||
print "Rename directory $BUILDROOT/$PROJECT.tmp into $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
|
||||
$cmd="mv $BUILDROOT/$PROJECT.tmp $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
|
||||
$ret=`$cmd`;
|
||||
@@ -1048,14 +1058,14 @@ if ($nboftargetok) {
|
||||
|
||||
print "Go into directory $BUILDROOT\n";
|
||||
chdir("$BUILDROOT");
|
||||
|
||||
|
||||
# We need a tarball to be able to build "quilt" debian package (not required for native but we need patch so it is not a native)
|
||||
print "Compress $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build into $BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz...\n";
|
||||
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz\" $PROJECT-$MAJOR.$MINOR.$build";
|
||||
print $cmd."\n";
|
||||
$ret=`$cmd`;
|
||||
|
||||
# Creation of source package
|
||||
# Creation of source package
|
||||
print "Go into directory $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
|
||||
chdir("$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build");
|
||||
#$cmd="dpkg-source -b $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
|
||||
@@ -1074,12 +1084,12 @@ if ($nboftargetok) {
|
||||
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
|
||||
#$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; # xz file is generated when build/debian/sources/option
|
||||
#$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; # xz file is generated when build/debian/sources/option
|
||||
$ret=`mv $BUILDROOT/*.debian.tar.gz "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
if ($target eq 'EXEDOLIWAMP')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
@@ -1087,22 +1097,22 @@ if ($nboftargetok) {
|
||||
{
|
||||
mkdir($DESTI.'/package_windows');
|
||||
if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; }
|
||||
}
|
||||
}
|
||||
|
||||
print "Remove target $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe...\n";
|
||||
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
|
||||
|
||||
|
||||
if ($OS eq 'windows') {
|
||||
print "Check that ISCC.exe is in your PATH.\n";
|
||||
} else {
|
||||
print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
|
||||
}
|
||||
|
||||
|
||||
$SOURCEBACK=$SOURCE;
|
||||
$SOURCEBACK =~ s/\//\\/g;
|
||||
|
||||
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||
|
||||
|
||||
#$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
open(IN, '<' . $SOURCE."/build/exe/doliwamp/doliwamp.iss") or die $!;
|
||||
open(OUT, '>' . "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss") or die $!;
|
||||
@@ -1115,7 +1125,7 @@ if ($nboftargetok) {
|
||||
close(OUT);
|
||||
|
||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" on OS $OS\n";
|
||||
|
||||
|
||||
if ($OS eq 'windows') {
|
||||
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
} else {
|
||||
@@ -1129,26 +1139,26 @@ if ($nboftargetok) {
|
||||
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
||||
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
|
||||
|
||||
use File::Copy;
|
||||
|
||||
#$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||
$ret=move("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe", "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
||||
|
||||
|
||||
print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n";
|
||||
#$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
$ret=unlink("$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss");
|
||||
|
||||
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
# Publish package for each target
|
||||
#--------------------------------
|
||||
foreach my $target (sort keys %CHOOSEDPUBLISH)
|
||||
foreach my $target (sort keys %CHOOSEDPUBLISH)
|
||||
{
|
||||
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||
|
||||
|
||||
print "\nList of files to publish (BUILD=$BUILD)\n";
|
||||
%filestoscansf=(
|
||||
"$DESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml"=>'none', # none means it won't be published on SF
|
||||
@@ -1171,7 +1181,8 @@ if ($nboftargetok) {
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'package_debian-ubuntu',
|
||||
#"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
|
||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
|
||||
@@ -1206,26 +1217,26 @@ if ($nboftargetok) {
|
||||
print "\n";
|
||||
}
|
||||
|
||||
if ($target eq 'SF' || $target eq 'ASSO')
|
||||
if ($target eq 'SF' || $target eq 'ASSO')
|
||||
{
|
||||
print "\n";
|
||||
|
||||
|
||||
if ($target eq 'SF') { $PUBLISH = $PUBLISHSTABLE; }
|
||||
if ($target eq 'ASSO' && $BUILD =~ /[a-z]/i) { $PUBLISH = $PUBLISHBETARC.'/lastbuild'; }
|
||||
if ($target eq 'ASSO' && $BUILD =~ /^[0-9]+$/) { $PUBLISH = $PUBLISHBETARC.'/stable'; }
|
||||
|
||||
|
||||
$NEWPUBLISH=$PUBLISH;
|
||||
print "Publish to target $NEWPUBLISH. Click enter or CTRL+C...\n";
|
||||
|
||||
# Ask which target to build
|
||||
$NUM_SCRIPT=<STDIN>;
|
||||
$NUM_SCRIPT=<STDIN>;
|
||||
chomp($NUM_SCRIPT);
|
||||
|
||||
print "Create empty dir /tmp/emptydir. We need it to create target dir using rsync.\n";
|
||||
$ret=`mkdir -p "/tmp/emptydir/"`;
|
||||
|
||||
|
||||
%filestoscan=%filestoscansf;
|
||||
|
||||
|
||||
foreach my $file (sort keys %filestoscan)
|
||||
{
|
||||
$found=0;
|
||||
@@ -1235,30 +1246,30 @@ if ($nboftargetok) {
|
||||
if ($target eq 'SF') {
|
||||
if ($filestoscan{$file} eq 'none') {
|
||||
next;
|
||||
}
|
||||
}
|
||||
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
|
||||
}
|
||||
elsif ($target eq 'ASSO' and $NEWPUBLISH =~ /stable/) {
|
||||
$destFolder="$NEWPUBLISH/$filestoscanstableasso{$file}";
|
||||
}
|
||||
}
|
||||
elsif ($target eq 'ASSO' and $NEWPUBLISH !~ /stable/) {
|
||||
$destFolder="$NEWPUBLISH";
|
||||
}
|
||||
}
|
||||
else # No more used
|
||||
{
|
||||
$dirnameonly=$file;
|
||||
$dirnameonly =~ s/.*\/([^\/]+)\/[^\/]+$/$1/;
|
||||
$dirnameonly =~ s/.*\/([^\/]+)\/[^\/]+$/$1/;
|
||||
$filenameonly=$file;
|
||||
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
|
||||
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
|
||||
$destFolder="$NEWPUBLISH/$dirnameonly";
|
||||
}
|
||||
|
||||
print "\n";
|
||||
print "Publish file ".$file." to ".$destFolder."\n";
|
||||
|
||||
# mkdir
|
||||
# mkdir
|
||||
#my $ssh = Net::SSH::Perl->new("frs.sourceforge.net");
|
||||
#$ssh->login("$user","$pass");
|
||||
#$ssh->login("$user","$pass");
|
||||
#use String::ShellQuote qw( shell_quote );
|
||||
#$ssh->cmd('mkdir '.shell_quote($destFolder).' && exit');
|
||||
|
||||
@@ -1267,20 +1278,20 @@ if ($nboftargetok) {
|
||||
#$sftp->mkdir($destFolder)
|
||||
|
||||
#$command="ssh eldy,dolibarr\@frs.sourceforge.net mkdir -p \"$destFolder\"";
|
||||
#print "$command\n";
|
||||
#print "$command\n";
|
||||
#my $ret=`$command 2>&1`;
|
||||
|
||||
$command="rsync -s -e 'ssh' --recursive /tmp/emptydir/ \"".$destFolder."\"";
|
||||
print "$command\n";
|
||||
print "$command\n";
|
||||
my $ret=`$command 2>&1`;
|
||||
|
||||
$command="rsync -s -e 'ssh' \"$file\" \"".$destFolder."\"";
|
||||
print "$command\n";
|
||||
print "$command\n";
|
||||
my $ret2=`$command 2>&1`;
|
||||
print "$ret2\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print "\n----- Summary -----\n";
|
||||
|
||||
@@ -6,7 +6,7 @@ of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE versi
|
||||
***** Prerequisites For Linux *****
|
||||
|
||||
Prerequisites to build tgz, debian and rpm packages:
|
||||
> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli
|
||||
> apt-get install perl tar dpkg p7zip-full rpm zip php-cli debhelper po-debconf
|
||||
|
||||
Prerequisites to build autoexe DoliWamp package from Linux (solution seems broken since Ubuntu 20.04):
|
||||
> apt-get install wine q4wine
|
||||
@@ -14,11 +14,11 @@ Prerequisites to build autoexe DoliWamp package from Linux (solution seems broke
|
||||
> Install InnoSetup
|
||||
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
|
||||
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
|
||||
For example by running wampserver3.2.6_x64.exe (https://www.wampserver.com).
|
||||
For example by running wampserver3.2.6_x64.exe (https://www.wampserver.com).
|
||||
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
|
||||
> Add path to ISCC into PATH windows var:
|
||||
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
|
||||
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
|
||||
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
|
||||
open file build/exe/doliwamp.iss and click on button "Compile".
|
||||
The .exe file will be build into directory build.
|
||||
|
||||
@@ -31,8 +31,8 @@ Prerequisites to build autoexe DoliWamp package from Windows:
|
||||
> Install isetup-5.5.8.exe (https://www.jrsoftware.org)
|
||||
> Install WampServer-3.2.*-64.exe (Apache 2.4.51, PHP 7.3.33, MariaDB 10.6.5 for example. Version must match the values found into doliwamp.iss)
|
||||
> Install GIT for Windows (https://git-scm.com/ => You must choose option "Add Git bash profile", "Git commit as-is")
|
||||
> Install Dolibarr current version:
|
||||
git clone https://github.com/dolibarr/dolibarr or git clone --branch X.Y https://github.com/dolibarr/dolibarr
|
||||
> Install Dolibarr current version:
|
||||
git clone https://github.com/dolibarr/dolibarr or git clone --branch X.Y https://github.com/dolibarr/dolibarr
|
||||
|
||||
> Add the path of PHP (C:\wamp64\bin\php\php7.3.33) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows.
|
||||
|
||||
@@ -43,12 +43,11 @@ Prerequisites to build autoexe DoliWamp package from Windows:
|
||||
|
||||
|
||||
***** Actions to do a BETA *****
|
||||
|
||||
This files describe steps made by Dolibarr packaging team to make a
|
||||
This files describe steps made by Dolibarr packaging team to make a
|
||||
beta version of Dolibarr, step by step.
|
||||
|
||||
- Check all files are commited.
|
||||
- Update version/info in ChangeLog, for this you can:
|
||||
- Update version/info in ChangeLog, for this you can:
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
@@ -68,8 +67,7 @@ Recopy the content of the output file into the file ChangeLog.
|
||||
|
||||
|
||||
***** Actions to do a RELEASE *****
|
||||
|
||||
This files describe steps made by Dolibarr packaging team to make a
|
||||
This files describe steps made by Dolibarr packaging team to make a
|
||||
complete release of Dolibarr, step by step.
|
||||
|
||||
- Check all files are commited.
|
||||
@@ -86,9 +84,9 @@ Recopy the content of the output file into the file ChangeLog.
|
||||
|
||||
- Check content of built packages.
|
||||
|
||||
- Run makepack-dolibarr.pl again with option to publish files on
|
||||
- Run makepack-dolibarr.pl again with option to publish files on
|
||||
dolibarr foundation server (Dir /home/dolibarr/wwwroot/files/stable on www.dolibarr.org).
|
||||
- Run makepack-dolibarr.pl again with option to publish files on
|
||||
- Run makepack-dolibarr.pl again with option to publish files on
|
||||
sourceforge. This will also add official tag.
|
||||
- Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx"
|
||||
on server to point to new files (used by some web sites).
|
||||
|
||||
@@ -3,7 +3,9 @@ README (English)
|
||||
Building a Patch file
|
||||
##################################################
|
||||
|
||||
This directory contains tools to build a patch after a developer has made changes on files in its Dolibarr tree.
|
||||
The output patch file can then be submited on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch.
|
||||
|
||||
Using this tool is now deprecated. You must use git pull requests to submit contributions.
|
||||
This directory contains tools to build a patch
|
||||
after a developer has made changes on files in its
|
||||
Dolibarr tree.
|
||||
The output patch file can then be submited on Dolibarr
|
||||
dev mailing-list, with explanation on its goal, for
|
||||
inclusion in main branch.
|
||||
|
||||
@@ -1,22 +1,9 @@
|
||||
PHPStan (https://phpstan.org)
|
||||
-----------------------------
|
||||
PHPStan
|
||||
|
||||
https://phpstan.org
|
||||
|
||||
PHPStan requires PHP >= 7.1
|
||||
|
||||
Config File is: ./phpstan.neon
|
||||
Install: composer require --dev phpstan/phpstan
|
||||
|
||||
In dolibarr/build/phpstan
|
||||
mkdir phpstan
|
||||
cd phpstan
|
||||
composer require --dev phpstan/phpstan
|
||||
|
||||
Build report from CLI:
|
||||
In dolibarr/
|
||||
mv htdocs/custom /tmp/
|
||||
php build/phpstan/phpstan/vendor/bin/phpstan -v analyze -c ./phpstan.neon -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=table htdocs/commande/class
|
||||
php build/phpstan/phpstan/vendor/bin/phpstan -v analyze -c ./phpstan.neon -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=table htdocs/
|
||||
mv /tmp/custom htdocs
|
||||
|
||||
Build HTML report from Cron:
|
||||
Example of line to add into a cron to generate a HTML report:
|
||||
0 1 5 * * cd /home/dolibarr/preview.dolibarr.org/dolibarr; chmod -R u+w /home/dolibarr/preview.dolibarr.org/dolibarr; git pull; /home/dolibarr/phpstan/vendor/bin/phpstan -v analyze -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=github | awk ' BEGIN{ print "Date "strftime("%Y-%m-%d")"<br>" } { print $0"<br>" } END{ print NR } ' > /home/dolibarr/doxygen.dolibarr.org/phpstan/index.html
|
||||
Config File: phpstan.neon
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
<?php
|
||||
|
||||
// Defined some constants and load Dolibarr env to reduce PHPStan bootstrap that fails to load a lot of things.
|
||||
//define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
|
||||
//define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
|
||||
//define('DOL_URL_ROOT', '/');
|
||||
|
||||
// Load the main.inc.php file to have functions env defined
|
||||
if (!defined("NOLOGIN")) {
|
||||
define("NOLOGIN", '1');
|
||||
}
|
||||
if (!defined("NOHTTPSREDIRECT")) {
|
||||
define("NOHTTPSREDIRECT", '1');
|
||||
}
|
||||
if (! defined("NOLOGIN")) define("NOLOGIN", '1');
|
||||
if (! defined("NOHTTPSREDIRECT")) define("NOHTTPSREDIRECT", '1');
|
||||
global $conf, $langs, $user, $db;
|
||||
include_once __DIR__ . '/../../htdocs/main.inc.php';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// Take a look at conf.php.example file for an example of conf.php file
|
||||
// and explanations for all possibles parameters.
|
||||
|
||||
@@ -3,6 +3,13 @@
|
||||
.git
|
||||
.gitignore
|
||||
.scrutinizer.yml
|
||||
.travis.yml
|
||||
.vscode
|
||||
.idea
|
||||
.editorconfig
|
||||
.codeclimate.yml
|
||||
.pre-commit-config.yaml
|
||||
.mailmap
|
||||
Thumbs.db
|
||||
build/exe
|
||||
build/html
|
||||
|
||||
@@ -22,3 +22,9 @@ dolibarr*.deb
|
||||
dolibarr*.zip
|
||||
cvschangelogbuilder_dolibarr*
|
||||
dolibarr_install.log
|
||||
.travis.yml
|
||||
.vscode
|
||||
.idea
|
||||
.editorconfig
|
||||
.codeclimate.yml
|
||||
.pre-commit-config.yaml
|
||||
|
||||
1
dev/.gitignore
vendored
1
dev/.gitignore
vendored
@@ -1,2 +1 @@
|
||||
/spec
|
||||
/tools/rector/vendor/
|
||||
|
||||
@@ -18,7 +18,7 @@ With
|
||||
|
||||
|
||||
|
||||
CKEDITOR (4.22.1):
|
||||
CKEDITOR (4.6.2):
|
||||
-----------------
|
||||
* In ckeditor/ckeditor/contents.css
|
||||
Replace:
|
||||
@@ -26,12 +26,7 @@ Replace:
|
||||
With
|
||||
body { ... margin: 5px;
|
||||
|
||||
* In ckeditor/ckeditor/ckeditor.js
|
||||
Replace:
|
||||
d.items&&
|
||||
With
|
||||
d&&d.items&&
|
||||
|
||||
|
||||
|
||||
ESCPOS:
|
||||
-------
|
||||
@@ -41,59 +36,40 @@ With
|
||||
protected $connector;
|
||||
|
||||
|
||||
SABRE:
|
||||
------
|
||||
rm -fr ./htdocs/includes/sabre/sabre/bin;
|
||||
rm -fr ./htdocs/includes/sabre/sabre/*/bin;
|
||||
rm -fr ./htdocs/includes/sabre/sabre/*/*/bin;
|
||||
rm -fr ./htdocs/includes/sabre/sabre/*/*/*/bin;
|
||||
rm -fr ./htdocs/includes/sabre/sabre/*/*/*/*/bin;
|
||||
|
||||
|
||||
NUSOAP:
|
||||
-------
|
||||
* Line 1257 of file nusoap.php. Add:
|
||||
* In file nusoap.php, to avoid a warning,
|
||||
Replace
|
||||
if (isset($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
|
||||
By
|
||||
if (! is_array($this->methodreturn) && isset($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
|
||||
|
||||
libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only for libxml < 2.
|
||||
|
||||
|
||||
* Line 4346 of file nusoap.php
|
||||
* In file nusoap.php, to avoid a warning,
|
||||
Replace call to serialize_val with no bugged value
|
||||
|
||||
$rev = array();
|
||||
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
|
||||
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
|
||||
* In all files, replace constructor names into __construct. Replace also parent::constructor_name with parent::__construct
|
||||
|
||||
* Line 6566 of file nusoap.php, replace
|
||||
* Line 4222 of file nusoap.php
|
||||
|
||||
$rev = array();
|
||||
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
|
||||
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
|
||||
|
||||
if (count($attrs) > 0) {
|
||||
with
|
||||
if (is_array($attrs) && count($attrs) > 0) {
|
||||
|
||||
|
||||
|
||||
TCPDF:
|
||||
------
|
||||
* Modify in tcpdf.php: make TCPDF::_out public.
|
||||
(htdocs/core/lib/pdf.lib.php uses it as a public method)
|
||||
|
||||
Change:
|
||||
protected function _out($s)
|
||||
to
|
||||
public function _out($s)
|
||||
|
||||
Change in method's _out phpdoc:
|
||||
|
||||
* @protected
|
||||
to
|
||||
* @public
|
||||
|
||||
* Replace in tcpdf.php:
|
||||
|
||||
if (isset($this->imagekeys)) {
|
||||
foreach($this->imagekeys as $file) {
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
with
|
||||
|
||||
if (isset($this->imagekeys)) {
|
||||
foreach($this->imagekeys as $file) {
|
||||
// DOL CHANGE If we keep this, source image files are physically destroyed
|
||||
@@ -101,7 +77,8 @@ with
|
||||
}
|
||||
}
|
||||
|
||||
* Replace in tcpdf.php:
|
||||
* Replace in tcpdf.php
|
||||
|
||||
$preserve = array(
|
||||
'file_id',
|
||||
'internal_encoding',
|
||||
@@ -109,7 +86,9 @@ with
|
||||
'bufferlen',
|
||||
'buffer',
|
||||
'cached_files',
|
||||
|
||||
with
|
||||
|
||||
$preserve = array(
|
||||
'file_id',
|
||||
'internal_encoding',
|
||||
@@ -120,11 +99,14 @@ with
|
||||
// @CHANGE DOL
|
||||
'imagekeys',
|
||||
|
||||
* Replace in tcpdf.php:
|
||||
* Replace in tcpdf.php
|
||||
|
||||
if (!@TCPDF_STATIC::file_exists($file)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
with
|
||||
|
||||
if (!@TCPDF_STATIC::file_exists($file)) {
|
||||
// DOL CHANGE If we keep this, the image is not visible on pages after the first one.
|
||||
//var_dump($file.' '.(!@TCPDF_STATIC::file_exists($file)));
|
||||
@@ -134,10 +116,13 @@ with
|
||||
$file = $tfile;
|
||||
}
|
||||
}
|
||||
|
||||
* Replace in tcpdf.php:
|
||||
|
||||
* Replace in tcpdf.php
|
||||
|
||||
if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
|
||||
with
|
||||
|
||||
// @CHANGE LDR Add support for src="file://..." links
|
||||
if (strpos($imgsrc, 'file://') === 0) {
|
||||
$imgsrc = str_replace('file://', '/', $imgsrc);
|
||||
@@ -153,10 +138,12 @@ with
|
||||
}
|
||||
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace:
|
||||
if (strpos($filename, '://') === false) {
|
||||
|
||||
with
|
||||
|
||||
if (strpos($filename, '//') === 0) {
|
||||
// Share folder on a (windows) server
|
||||
// e.g.: "//[MyServerName]/[MySharedFolder]/"
|
||||
@@ -165,16 +152,11 @@ with
|
||||
}
|
||||
elseif (strpos($filename, '://') === false)
|
||||
|
||||
* To avoid to have QRcode changed because generated with a random mask, replace:
|
||||
* To avoid to have QRcode changed because generated with a random mask, replace
|
||||
define('QR_FIND_FROM_RANDOM', 2);
|
||||
with
|
||||
with:
|
||||
define('QR_FIND_FROM_RANDOM', false);
|
||||
|
||||
* Change line:
|
||||
imagesetpixel($imgalpha, $xpx, $ypx, $alpha);
|
||||
into
|
||||
imagesetpixel($imgalpha, $xpx, $ypx, (int) $alpha);
|
||||
|
||||
* Removed useless directories ("examples", "tools")
|
||||
|
||||
* Optionnaly, removed all fonts except
|
||||
@@ -202,23 +184,6 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
|
||||
return strval($number);
|
||||
}
|
||||
|
||||
* Add this at begin of tcpdf_autoconfig.php
|
||||
|
||||
// @CHANGE LDR DOCUMENT_ROOT fix for IIS Webserver
|
||||
if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
|
||||
if (isset($_SERVER['SCRIPT_FILENAME']) && isset($_SERVER['PHP_SELF'])) {
|
||||
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
|
||||
} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
|
||||
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
|
||||
} else {
|
||||
// define here your DOCUMENT_ROOT path if the previous fails (e.g. '/var/www')
|
||||
$_SERVER['DOCUMENT_ROOT'] = '/';
|
||||
}
|
||||
}
|
||||
$_SERVER['DOCUMENT_ROOT'] = str_replace('//', '/', $_SERVER['DOCUMENT_ROOT']);
|
||||
if (substr($_SERVER['DOCUMENT_ROOT'], -1) != '/') {
|
||||
$_SERVER['DOCUMENT_ROOT'] .= '/';
|
||||
}
|
||||
|
||||
|
||||
TCPDI:
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path = dirname(__FILE__).'/';
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Global variables
|
||||
$version = '1.7';
|
||||
$error = 0;
|
||||
$version='1.7';
|
||||
$error=0;
|
||||
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once $path."../../../htdocs/master.inc.php";
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
|
||||
@set_time_limit(0);
|
||||
|
||||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
@@ -74,20 +74,20 @@ $obj->note_public = 'A public comment';
|
||||
$obj->note_private = 'A private comment';
|
||||
$obj->cond_reglement_id = 1;
|
||||
|
||||
$line1 = new FactureLigne($db);
|
||||
$line1->tva_tx = 10.0;
|
||||
$line1->remise_percent = 0;
|
||||
$line1->qty = 1;
|
||||
$line1->total_ht = 100;
|
||||
$line1->total_tva = 10;
|
||||
$line1->total_ttc = 110;
|
||||
$obj->lines[] = $line1;
|
||||
$line1=new FactureLigne($db);
|
||||
$line1->tva_tx=10.0;
|
||||
$line1->remise_percent=0;
|
||||
$line1->qty=1;
|
||||
$line1->total_ht=100;
|
||||
$line1->total_tva=10;
|
||||
$line1->total_ttc=110;
|
||||
$obj->lines[]=$line1;
|
||||
|
||||
// Create invoice
|
||||
$idobject = $obj->create($user);
|
||||
$idobject=$obj->create($user);
|
||||
if ($idobject > 0) {
|
||||
// Change status to validated
|
||||
$result = $obj->validate($user);
|
||||
$result=$obj->validate($user);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
@@ -102,7 +102,7 @@ if ($idobject > 0) {
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (!$error) {
|
||||
if (! $error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path = dirname(__FILE__).'/';
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Global variables
|
||||
$version = '1.11';
|
||||
$error = 0;
|
||||
$version='1.11';
|
||||
$error=0;
|
||||
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once $path."../../../htdocs/master.inc.php";
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
|
||||
@set_time_limit(0);
|
||||
|
||||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
@@ -75,17 +75,17 @@ $com->note_private = 'A private comment';
|
||||
$com->source = 1;
|
||||
$com->remise_percent = 0;
|
||||
|
||||
$orderline1 = new OrderLine($db);
|
||||
$orderline1->tva_tx = 10.0;
|
||||
$orderline1->remise_percent = 0;
|
||||
$orderline1->qty = 1;
|
||||
$com->lines[] = $orderline1;
|
||||
$orderline1=new OrderLine($db);
|
||||
$orderline1->tva_tx=10.0;
|
||||
$orderline1->remise_percent=0;
|
||||
$orderline1->qty=1;
|
||||
$com->lines[]=$orderline1;
|
||||
|
||||
// Create order
|
||||
$idobject = $com->create($user);
|
||||
$idobject=$com->create($user);
|
||||
if ($idobject > 0) {
|
||||
// Change status to validated
|
||||
$result = $com->valid($user);
|
||||
$result=$com->valid($user);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
@@ -100,7 +100,7 @@ if ($idobject > 0) {
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (!$error) {
|
||||
if (! $error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path = dirname(__FILE__).'/';
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Global variables
|
||||
$version = '1.10';
|
||||
$error = 0;
|
||||
$version='1.10';
|
||||
$error=0;
|
||||
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once $path."../../../htdocs/master.inc.php";
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
|
||||
@set_time_limit(0);
|
||||
|
||||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ $db->begin();
|
||||
require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php";
|
||||
|
||||
// Create instance of object
|
||||
$myproduct = new Product($db);
|
||||
$myproduct=new Product($db);
|
||||
|
||||
// Definition of product instance properties
|
||||
$myproduct->ref = '1234';
|
||||
@@ -91,7 +91,7 @@ if ($idobject > 0) {
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (!$error) {
|
||||
if (! $error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path = dirname(__FILE__).'/';
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Global variables
|
||||
$version = '1.7';
|
||||
$error = 0;
|
||||
$version='1.7';
|
||||
$error=0;
|
||||
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once $path."../../../htdocs/master.inc.php";
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
|
||||
@set_time_limit(0);
|
||||
|
||||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
@@ -71,10 +71,10 @@ $obj->login = 'ABCDEF';
|
||||
$obj->nom = 'ABCDEF';
|
||||
|
||||
// Create user
|
||||
$idobject = $obj->create($user);
|
||||
$idobject=$obj->create($user);
|
||||
if ($idobject > 0) {
|
||||
// Change status to validated
|
||||
$result = $obj->setStatut(1);
|
||||
$result=$obj->setStatut(1);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
@@ -82,7 +82,7 @@ if ($idobject > 0) {
|
||||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
} elseif ($obj->error == 'ErrorLoginAlreadyExists') {
|
||||
print "User with login ".$obj->login." already exists\n";
|
||||
print "User with login ".$obj->login." already exists\n";
|
||||
} else {
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
@@ -91,7 +91,7 @@ if ($idobject > 0) {
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (!$error) {
|
||||
if (! $error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path = dirname(__FILE__).'/';
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Global variables
|
||||
$version = '1.7';
|
||||
$error = 0;
|
||||
$version='1.7';
|
||||
$error=0;
|
||||
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once $path."../../../htdocs/master.inc.php";
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
|
||||
@set_time_limit(0);
|
||||
|
||||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ $user->getrights();
|
||||
|
||||
|
||||
print "***** ".$script_file." (".$version.") *****\n";
|
||||
if (!isset($argv[1])) { // Check parameters
|
||||
if (! isset($argv[1])) { // Check parameters
|
||||
print "Usage: ".$script_file." id_thirdparty ...\n";
|
||||
exit;
|
||||
}
|
||||
@@ -72,9 +72,9 @@ require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php";
|
||||
|
||||
// Create contract object
|
||||
$obj = new Contrat($db);
|
||||
$obj->socid = $argv[1];
|
||||
$obj->socid=$argv[1];
|
||||
|
||||
$listofcontractsforcompany = $obj->getListOfContracts('all');
|
||||
$listofcontractsforcompany=$obj->getListOfContracts('all');
|
||||
|
||||
print $listofcontractsforcompany;
|
||||
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
{
|
||||
"id": "evt_123456789",
|
||||
"object": "event",
|
||||
"api_version": "2023-10-16",
|
||||
"created": 1702053463,
|
||||
"data": {
|
||||
"object": {
|
||||
"id": "pi_123456789",
|
||||
"object": "payment_intent",
|
||||
"amount": 60,
|
||||
"amount_capturable": 0,
|
||||
"amount_details": {
|
||||
"tip": {
|
||||
}
|
||||
},
|
||||
"amount_received": 0,
|
||||
"application": null,
|
||||
"application_fee_amount": null,
|
||||
"automatic_payment_methods": null,
|
||||
"canceled_at": null,
|
||||
"cancellation_reason": null,
|
||||
"capture_method": "automatic",
|
||||
"client_secret": "pi_123456789_secret_123456789",
|
||||
"confirmation_method": "automatic",
|
||||
"created": 1702053448,
|
||||
"currency": "eur",
|
||||
"customer": "cus_123456789",
|
||||
"description": "Stripe payment from makeStripeSepaRequest: DID=31262-INV=123-CUS=123 did=123 ref=FA2312-123",
|
||||
"invoice": null,
|
||||
"last_payment_error": {
|
||||
"code": "",
|
||||
"decline_code": "generic_decline",
|
||||
"message": "The transaction can't be processed because your customer's account information is missing or incorrect. Collect a new mandate and ask your customer to provide their name and address exactly as it appears on their bank account. After this, you can attempt the transaction again.",
|
||||
"payment_method": {
|
||||
"id": "pm_123456789",
|
||||
"object": "payment_method",
|
||||
"billing_details": {
|
||||
"address": {
|
||||
"city": null,
|
||||
"country": "FR",
|
||||
"line1": null,
|
||||
"line2": null,
|
||||
"postal_code": null,
|
||||
"state": null
|
||||
},
|
||||
"email": "email@example.com",
|
||||
"name": "Test example",
|
||||
"phone": null
|
||||
},
|
||||
"created": 1692688898,
|
||||
"customer": "cus_123456789",
|
||||
"livemode": false,
|
||||
"metadata": {
|
||||
"dol_version": "19.0.0-dev",
|
||||
"dol_thirdparty_id": "123",
|
||||
"ipaddress": "1.2.3.4",
|
||||
"dol_id": "123",
|
||||
"dol_type": "companypaymentmode",
|
||||
"dol_entity": "1"
|
||||
},
|
||||
"sepa_debit": {
|
||||
"bank_code": "123",
|
||||
"branch_code": "",
|
||||
"country": "AT",
|
||||
"fingerprint": "123456789",
|
||||
"generated_from": {
|
||||
"charge": null,
|
||||
"setup_attempt": null
|
||||
},
|
||||
"last4": "3202"
|
||||
},
|
||||
"type": "sepa_debit"
|
||||
},
|
||||
"type": "card_error"
|
||||
},
|
||||
"latest_charge": "py_123456789",
|
||||
"livemode": false,
|
||||
"metadata": {
|
||||
"dol_version": "19.0.0-beta",
|
||||
"dol_thirdparty_id": "123",
|
||||
"ipaddress": "1.2.3.4",
|
||||
"dol_id": "123",
|
||||
"dol_type": "facture",
|
||||
"dol_entity": "1"
|
||||
},
|
||||
"next_action": null,
|
||||
"on_behalf_of": null,
|
||||
"payment_method": null,
|
||||
"payment_method_configuration_details": null,
|
||||
"payment_method_options": {
|
||||
"card": {
|
||||
"installments": null,
|
||||
"mandate_options": null,
|
||||
"network": null,
|
||||
"request_three_d_secure": "automatic"
|
||||
},
|
||||
"sepa_debit": {
|
||||
}
|
||||
},
|
||||
"payment_method_types": [
|
||||
"card",
|
||||
"sepa_debit"
|
||||
],
|
||||
"processing": null,
|
||||
"receipt_email": null,
|
||||
"review": null,
|
||||
"setup_future_usage": null,
|
||||
"shipping": null,
|
||||
"source": null,
|
||||
"statement_descriptor": "DID=123-",
|
||||
"statement_descriptor_suffix": "DID=123-",
|
||||
"status": "requires_payment_method",
|
||||
"transfer_data": null,
|
||||
"transfer_group": null
|
||||
}
|
||||
},
|
||||
"livemode": false,
|
||||
"pending_webhooks": 1,
|
||||
"request": {
|
||||
"id": null,
|
||||
"idempotency_key": null
|
||||
},
|
||||
"type": "payment_intent.payment_failed"
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
README
|
||||
------
|
||||
|
||||
Scripts in this directory can be used to load massive data or purge data of a database instance.
|
||||
Scripts in this directory can be used to load or purge data of a database instance.
|
||||
WARNING: Some of this script may delete definitely data.
|
||||
|
||||
To init data for a demo, use instead the tool into dev/initdemo
|
||||
|
||||
@@ -45,9 +45,9 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
|
||||
* Parameters
|
||||
*/
|
||||
|
||||
define('GEN_NUMBER_FACTURE', $argv[1] ?? 1);
|
||||
define(GEN_NUMBER_FACTURE, 1);
|
||||
$year = 2016;
|
||||
$dates = array(mktime(12, 0, 0, 1, 3, $year),
|
||||
$dates = array (mktime(12, 0, 0, 1, 3, $year),
|
||||
mktime(12, 0, 0, 1, 9, $year),
|
||||
mktime(12, 0, 0, 2, 13, $year),
|
||||
mktime(12, 0, 0, 2, 23, $year),
|
||||
@@ -168,8 +168,7 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0) {
|
||||
|
||||
$result=$object->validate($fuser);
|
||||
if ($result) {
|
||||
print " OK with ref ".$object->ref."\n";
|
||||
;
|
||||
print " OK with ref ".$object->ref."\n";;
|
||||
} else {
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
|
||||
@@ -51,9 +51,9 @@ require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
|
||||
* Parametre
|
||||
*/
|
||||
|
||||
define('GEN_NUMBER_COMMANDE', $argv[1] ?? 10);
|
||||
define(GEN_NUMBER_COMMANDE, 10);
|
||||
$year = 2016;
|
||||
$dates = array(mktime(12, 0, 0, 1, 3, $year),
|
||||
$dates = array (mktime(12, 0, 0, 1, 3, $year),
|
||||
mktime(12, 0, 0, 1, 9, $year),
|
||||
mktime(12, 0, 0, 2, 13, $year),
|
||||
mktime(12, 0, 0, 2, 23, $year),
|
||||
|
||||
@@ -50,7 +50,7 @@ include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
* Parameters
|
||||
*/
|
||||
|
||||
define('GEN_NUMBER_PRODUIT', $argv[1] ?? 100);
|
||||
define(GEN_NUMBER_PRODUIT, 100000);
|
||||
|
||||
|
||||
$ret=$user->fetch('', 'admin');
|
||||
@@ -64,24 +64,18 @@ $user->getrights();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$productsid[$i] = $row[0];
|
||||
$i++;
|
||||
$row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++;
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$societesid[$i] = $row[0];
|
||||
$i++;
|
||||
$row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++;
|
||||
}
|
||||
} else {
|
||||
print "err";
|
||||
@@ -90,12 +84,9 @@ if ($resql) {
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$commandesid[$i] = $row[0];
|
||||
$i++;
|
||||
$row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++;
|
||||
}
|
||||
} else {
|
||||
print "err";
|
||||
@@ -108,7 +99,7 @@ for ($s = 0; $s < GEN_NUMBER_PRODUIT; $s++) {
|
||||
$produit = new Product($db);
|
||||
$produit->type = mt_rand(0, 1);
|
||||
$produit->status = 1;
|
||||
$produit->ref = ($produit->type ? 'S' : 'P').time().$s;
|
||||
$produit->ref = ($produit->type?'S':'P').time().$s;
|
||||
$produit->label = 'Label '.time().$s;
|
||||
$produit->description = 'Description '.time().$s;
|
||||
$produit->price = mt_rand(1, 999.99);
|
||||
|
||||
@@ -47,9 +47,9 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
|
||||
* Parameters
|
||||
*/
|
||||
|
||||
define('GEN_NUMBER_PROPAL', $argv[1] ?? 10);
|
||||
define(GEN_NUMBER_PROPAL, 10);
|
||||
$year = 2016;
|
||||
$dates = array(mktime(12, 0, 0, 1, 3, $year),
|
||||
$dates = array (mktime(12, 0, 0, 1, 3, $year),
|
||||
mktime(12, 0, 0, 1, 9, $year),
|
||||
mktime(12, 0, 0, 2, 13, $year),
|
||||
mktime(12, 0, 0, 2, 23, $year),
|
||||
@@ -152,8 +152,8 @@ $user->rights->propal->creer=1;
|
||||
$user->rights->propal->propal_advance->validate=1;
|
||||
|
||||
|
||||
if (getDolGlobalString('PROPALE_ADDON') && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/" . getDolGlobalString('PROPALE_ADDON').".php")) {
|
||||
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/" . getDolGlobalString('PROPALE_ADDON').".php";
|
||||
if (!empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) {
|
||||
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php";
|
||||
}
|
||||
|
||||
$i=0;
|
||||
|
||||
@@ -53,7 +53,7 @@ $listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Doroth
|
||||
* Parametre
|
||||
*/
|
||||
|
||||
define('GEN_NUMBER_SOCIETE', $argv[1] ?? 10);
|
||||
define(GEN_NUMBER_SOCIETE, 10);
|
||||
|
||||
|
||||
$ret=$user->fetch('', 'admin');
|
||||
@@ -67,8 +67,7 @@ $user->getrights();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$productsid[$i] = $row[0];
|
||||
@@ -79,8 +78,7 @@ if ($resql) {
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$societesid[$i] = $row[0];
|
||||
@@ -93,8 +91,7 @@ if ($resql) {
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$commandesid[$i] = $row[0];
|
||||
@@ -120,13 +117,12 @@ for ($s = 0; $s < GEN_NUMBER_SOCIETE; $s++) {
|
||||
$soc->country_id=1;
|
||||
$soc->country_code='FR';
|
||||
// Un client sur 3 a une remise de 5%
|
||||
$user_remise=mt_rand(1, 3);
|
||||
if ($user_remise==3) {
|
||||
$user_remise=mt_rand(1, 3); if ($user_remise==3) {
|
||||
$soc->remise_percent=5;
|
||||
}
|
||||
print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n";
|
||||
$soc->note_private = 'Company created by the script generate-societe.php';
|
||||
$socid = $soc->create($user);
|
||||
$socid = $soc->create();
|
||||
|
||||
if ($socid >= 0) {
|
||||
$rand = mt_rand(1, 4);
|
||||
|
||||
@@ -62,9 +62,9 @@ dol_syslog($script_file." launched with arg ".implode(',', $argv));
|
||||
$mode = $argv[1];
|
||||
$filepath = $argv[2];
|
||||
$filepatherr = $filepath.'.err';
|
||||
$defaultlang = empty($argv[3]) ? 'en_US' : $argv[3];
|
||||
$startlinenb = empty($argv[4]) ? 1 : $argv[4];
|
||||
$endlinenb = empty($argv[5]) ? 0 : $argv[5];
|
||||
$defaultlang = empty($argv[3])?'en_US':$argv[3];
|
||||
$startlinenb = empty($argv[4])?1:$argv[4];
|
||||
$endlinenb = empty($argv[5])?0:$argv[5];
|
||||
|
||||
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
|
||||
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n";
|
||||
|
||||
@@ -63,8 +63,8 @@ $mode = $argv[1];
|
||||
$filepath = $argv[2];
|
||||
$filepatherr = $filepath.'.err';
|
||||
//$defaultlang = empty($argv[3])?'en_US':$argv[3];
|
||||
$startlinenb = empty($argv[3]) ? 1 : $argv[3];
|
||||
$endlinenb = empty($argv[4]) ? 0 : $argv[4];
|
||||
$startlinenb = empty($argv[3])?1:$argv[3];
|
||||
$endlinenb = empty($argv[4])?0:$argv[4];
|
||||
|
||||
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
|
||||
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
|
||||
@@ -128,8 +128,8 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
$object->client = $fields[7];
|
||||
$object->fournisseur = $fields[8];
|
||||
|
||||
$object->name = $fields[13] ? trim($fields[13]) : $fields[0];
|
||||
$object->name_alias = $fields[0] != $fields[13] ? trim($fields[0]) : '';
|
||||
$object->name = $fields[13]?trim($fields[13]):$fields[0];
|
||||
$object->name_alias = $fields[0]!=$fields[13]?trim($fields[0]):'';
|
||||
|
||||
$object->address = trim($fields[14]);
|
||||
$object->zip = trim($fields[15]);
|
||||
|
||||
@@ -63,8 +63,8 @@ $mode = $argv[1];
|
||||
$filepath = $argv[2];
|
||||
$filepatherr = $filepath.'.err';
|
||||
//$defaultlang = empty($argv[3])?'en_US':$argv[3];
|
||||
$startlinenb = empty($argv[3]) ? 1 : $argv[3];
|
||||
$endlinenb = empty($argv[4]) ? 0 : $argv[4];
|
||||
$startlinenb = empty($argv[3])?1:$argv[3];
|
||||
$endlinenb = empty($argv[4])?0:$argv[4];
|
||||
|
||||
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
|
||||
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4655,6 +4655,75 @@ INSERT INTO `llx_menu` VALUES (19289,'all',1,'cashdesk','top','cashdesk',0,NULL,
|
||||
/*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `llx_milestone`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `llx_milestone`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `llx_milestone` (
|
||||
`rowid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`fk_element` int(11) NOT NULL,
|
||||
`elementtype` varchar(16) NOT NULL,
|
||||
`label` varchar(255) NOT NULL,
|
||||
`options` varchar(255) DEFAULT NULL,
|
||||
`priority` int(11) DEFAULT '0',
|
||||
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`fk_user_modif` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`rowid`),
|
||||
UNIQUE KEY `uk_milestone_fk_element` (`fk_element`,`elementtype`),
|
||||
KEY `idx_milestone_fk_user_modif` (`fk_user_modif`),
|
||||
CONSTRAINT `fk_milestone_fk_user_modif` FOREIGN KEY (`fk_user_modif`) REFERENCES `llx_user` (`rowid`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `llx_milestone`
|
||||
--
|
||||
|
||||
LOCK TABLES `llx_milestone` WRITE;
|
||||
/*!40000 ALTER TABLE `llx_milestone` DISABLE KEYS */;
|
||||
INSERT INTO `llx_milestone` VALUES (2,779,'facture','azerty',NULL,0,'2013-03-09 12:19:30',NULL),(3,780,'facture','fsdf',NULL,0,'2013-03-09 13:01:08',NULL),(4,781,'facture','hhh',NULL,0,'2013-03-09 14:06:37',NULL);
|
||||
/*!40000 ALTER TABLE `llx_milestone` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `llx_monitoring_probes`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `llx_monitoring_probes`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `llx_monitoring_probes` (
|
||||
`rowid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(64) NOT NULL,
|
||||
`groupname` varchar(64) DEFAULT NULL,
|
||||
`url` varchar(250) NOT NULL,
|
||||
`useproxy` int(11) DEFAULT '0',
|
||||
`checkkey` varchar(250) DEFAULT NULL,
|
||||
`maxval` int(11) DEFAULT NULL,
|
||||
`frequency` int(11) DEFAULT '60',
|
||||
`active` int(11) DEFAULT '1',
|
||||
`status` int(11) DEFAULT '0',
|
||||
`lastreset` datetime DEFAULT NULL,
|
||||
`oldesterrortext` text,
|
||||
`oldesterrordate` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`rowid`),
|
||||
UNIQUE KEY `uk_monitoring_probes` (`title`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `llx_monitoring_probes`
|
||||
--
|
||||
|
||||
LOCK TABLES `llx_monitoring_probes` WRITE;
|
||||
/*!40000 ALTER TABLE `llx_monitoring_probes` DISABLE KEYS */;
|
||||
INSERT INTO `llx_monitoring_probes` VALUES (1,'aaa',NULL,'http://www.chiensderace.com',0,'chiens',1000,10,1,1,'2011-04-20 23:46:41',NULL,NULL),(2,'ChatsDeRace',NULL,'http://www.chatsderace.com',0,'chats',1000,5,1,1,'2011-04-20 23:46:41',NULL,NULL);
|
||||
/*!40000 ALTER TABLE `llx_monitoring_probes` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `llx_notify`
|
||||
--
|
||||
|
||||
@@ -245,16 +245,6 @@ export list="
|
||||
--ignore-table=$base.llx_c_ticketsup_category
|
||||
--ignore-table=$base.llx_c_ticketsup_severity
|
||||
--ignore-table=$base.llx_c_ticketsup_type
|
||||
--ignore-table=$base.llx_cabinetmed_c_banques
|
||||
--ignore-table=$base.llx_cabinetmed_c_examconclusion
|
||||
--ignore-table=$base.llx_cabinetmed_cons_extrafields
|
||||
--ignore-table=$base.llx_cabinetmed_diaglec
|
||||
--ignore-table=$base.llx_cabinetmed_examaut
|
||||
--ignore-table=$base.llx_cabinetmed_exambio
|
||||
--ignore-table=$base.llx_cabinetmed_examenprescrit
|
||||
--ignore-table=$base.llx_cabinetmed_motifcons
|
||||
--ignore-table=$base.llx_cabinetmed_patient
|
||||
--ignore-table=$base.llx_cabinetmed_societe
|
||||
--ignore-table=$base.llx_congespayes
|
||||
--ignore-table=$base.llx_congespayes_config
|
||||
--ignore-table=$base.llx_congespayes_events
|
||||
@@ -338,8 +328,6 @@ export list="
|
||||
--ignore-table=$base.tmp_llx_accouting_account
|
||||
--ignore-table=$base.tmp_llx_product_batch
|
||||
--ignore-table=$base.tmp_llx_product_batch2
|
||||
--ignore-table=$base.tmp_tmp
|
||||
--ignore-table=$base.tmp_user
|
||||
"
|
||||
echo "mysqldump -P$port -u$admin -p***** $list $base > $mydir/$dumpfile"
|
||||
mysqldump -P$port -u$admin $passwd $list $base > $mydir/$dumpfile
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path = dirname(__FILE__).'/';
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
@@ -30,39 +30,39 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Global variables
|
||||
$error = 0;
|
||||
$error=0;
|
||||
|
||||
$sourceserver = isset($argv[1]) ? $argv[1] : ''; // user@server:/src/file
|
||||
$password = isset($argv[2]) ? $argv[2] : '';
|
||||
$dataserver = isset($argv[3]) ? $argv[3] : '';
|
||||
$database = isset($argv[4]) ? $argv[4] : '';
|
||||
$loginbase = isset($argv[5]) ? $argv[5] : '';
|
||||
$passwordbase = isset($argv[6]) ? $argv[6] : '';
|
||||
$sourceserver=isset($argv[1])?$argv[1]:''; // user@server:/src/file
|
||||
$password=isset($argv[2])?$argv[2]:'';
|
||||
$dataserver=isset($argv[3])?$argv[3]:'';
|
||||
$database=isset($argv[4])?$argv[4]:'';
|
||||
$loginbase=isset($argv[5])?$argv[5]:'';
|
||||
$passwordbase=isset($argv[6])?$argv[6]:'';
|
||||
|
||||
// Include Dolibarr environment
|
||||
$res = 0;
|
||||
if (!$res && file_exists($path."../../master.inc.php")) {
|
||||
$res = @include $path."../../master.inc.php";
|
||||
$res=0;
|
||||
if (! $res && file_exists($path."../../master.inc.php")) {
|
||||
$res=@include $path."../../master.inc.php";
|
||||
}
|
||||
if (!$res && file_exists($path."../../htdocs/master.inc.php")) {
|
||||
$res = @include $path."../../htdocs/master.inc.php";
|
||||
if (! $res && file_exists($path."../../htdocs/master.inc.php")) {
|
||||
$res=@include $path."../../htdocs/master.inc.php";
|
||||
}
|
||||
if (!$res && file_exists("../master.inc.php")) {
|
||||
$res = @include "../master.inc.php";
|
||||
if (! $res && file_exists("../master.inc.php")) {
|
||||
$res=@include "../master.inc.php";
|
||||
}
|
||||
if (!$res && file_exists("../../master.inc.php")) {
|
||||
$res = @include "../../master.inc.php";
|
||||
if (! $res && file_exists("../../master.inc.php")) {
|
||||
$res=@include "../../master.inc.php";
|
||||
}
|
||||
if (!$res && file_exists("../../../master.inc.php")) {
|
||||
$res = @include "../../../master.inc.php";
|
||||
if (! $res && file_exists("../../../master.inc.php")) {
|
||||
$res=@include "../../../master.inc.php";
|
||||
}
|
||||
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
|
||||
$res = @include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
|
||||
$res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
}
|
||||
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
|
||||
$res = @include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
|
||||
$res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
}
|
||||
if (!$res) {
|
||||
if (! $res) {
|
||||
die("Failed to include master.inc.php file\n");
|
||||
}
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
@@ -72,13 +72,13 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
* Main
|
||||
*/
|
||||
|
||||
$login = '';
|
||||
$server = '';
|
||||
$login='';
|
||||
$server='';
|
||||
if (preg_match('/^(.*)@(.*):(.*)$/', $sourceserver, $reg)) {
|
||||
$login = $reg[1];
|
||||
$server = $reg[2];
|
||||
$sourcefile = $reg[3];
|
||||
$targetfile = basename($sourcefile);
|
||||
$login=$reg[1];
|
||||
$server=$reg[2];
|
||||
$sourcefile=$reg[3];
|
||||
$targetfile=basename($sourcefile);
|
||||
}
|
||||
if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile) || empty($password) || empty($database) || empty($loginbase) || empty($passwordbase)) {
|
||||
print "Usage: $script_file login@server:/src/file.(sql|gz|bz2) passssh databaseserver databasename loginbase passbase\n";
|
||||
@@ -88,23 +88,22 @@ if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile
|
||||
}
|
||||
|
||||
|
||||
$targetdir = '/tmp';
|
||||
$targetdir='/tmp';
|
||||
print "Get dump file from server ".$server.", path ".$sourcefile.", connect with login ".$login." loaded into localhost\n";
|
||||
|
||||
$sftpconnectstring = $sourceserver;
|
||||
$sftpconnectstring=$sourceserver;
|
||||
print 'SFTP connect string : '.$sftpconnectstring."\n";
|
||||
//print 'SFTP password '.$password."\n";
|
||||
|
||||
|
||||
// SFTP connect
|
||||
if (!function_exists("ssh2_connect")) {
|
||||
dol_print_error('', 'ssh2_connect function does not exists');
|
||||
exit(1);
|
||||
if (! function_exists("ssh2_connect")) {
|
||||
dol_print_error('', 'ssh2_connect function does not exists'); exit(1);
|
||||
}
|
||||
|
||||
$connection = ssh2_connect($server, 22);
|
||||
if ($connection) {
|
||||
if (!@ssh2_auth_password($connection, $login, $password)) {
|
||||
if (! @ssh2_auth_password($connection, $login, $password)) {
|
||||
dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password), LOG_ERR);
|
||||
exit(-5);
|
||||
} else {
|
||||
@@ -122,16 +121,16 @@ if ($connection) {
|
||||
print 'Get file '.$sourcefile.' into '.$targetdir.$targetfile."\n";
|
||||
ssh2_scp_recv($connection, $sourcefile, $targetdir.$targetfile);
|
||||
|
||||
$fullcommand = "cat ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
|
||||
$fullcommand="cat ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
|
||||
if (preg_match('/\.bz2$/', $targetfile)) {
|
||||
$fullcommand = "bzip2 -c -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
|
||||
$fullcommand="bzip2 -c -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
|
||||
}
|
||||
if (preg_match('/\.gz$/', $targetfile)) {
|
||||
$fullcommand = "gzip -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
|
||||
$fullcommand="gzip -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
|
||||
}
|
||||
print "Load dump with ".$fullcommand."\n";
|
||||
$output = array();
|
||||
$return_var = 0;
|
||||
$output=array();
|
||||
$return_var=0;
|
||||
print strftime("%Y%m%d-%H%M%S").' '.$fullcommand."\n";
|
||||
exec($fullcommand, $output, $return_var);
|
||||
foreach ($output as $line) {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path = dirname(__FILE__).'/';
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
@@ -30,34 +30,34 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Global variables
|
||||
$error = 0;
|
||||
$error=0;
|
||||
|
||||
$confirm = isset($argv[1]) ? $argv[1] : '';
|
||||
$confirm=isset($argv[1])?$argv[1]:'';
|
||||
|
||||
// Include Dolibarr environment
|
||||
$res = 0;
|
||||
if (!$res && file_exists($path."../../master.inc.php")) {
|
||||
$res = @include $path."../../master.inc.php";
|
||||
$res=0;
|
||||
if (! $res && file_exists($path."../../master.inc.php")) {
|
||||
$res=@include $path."../../master.inc.php";
|
||||
}
|
||||
if (!$res && file_exists($path."../../htdocs/master.inc.php")) {
|
||||
$res = @include $path."../../htdocs/master.inc.php";
|
||||
if (! $res && file_exists($path."../../htdocs/master.inc.php")) {
|
||||
$res=@include $path."../../htdocs/master.inc.php";
|
||||
}
|
||||
if (!$res && file_exists("../master.inc.php")) {
|
||||
$res = @include "../master.inc.php";
|
||||
if (! $res && file_exists("../master.inc.php")) {
|
||||
$res=@include "../master.inc.php";
|
||||
}
|
||||
if (!$res && file_exists("../../master.inc.php")) {
|
||||
$res = @include "../../master.inc.php";
|
||||
if (! $res && file_exists("../../master.inc.php")) {
|
||||
$res=@include "../../master.inc.php";
|
||||
}
|
||||
if (!$res && file_exists("../../../master.inc.php")) {
|
||||
$res = @include "../../../master.inc.php";
|
||||
if (! $res && file_exists("../../../master.inc.php")) {
|
||||
$res=@include "../../../master.inc.php";
|
||||
}
|
||||
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
|
||||
$res = @include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
|
||||
$res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
}
|
||||
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
|
||||
$res = @include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
|
||||
$res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||
}
|
||||
if (!$res) {
|
||||
if (! $res) {
|
||||
die("Failed to include master.inc.php file\n");
|
||||
}
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
@@ -76,56 +76,56 @@ if (empty($confirm)) {
|
||||
}
|
||||
|
||||
|
||||
$tmp = dol_getdate(dol_now());
|
||||
$tmp=dol_getdate(dol_now());
|
||||
|
||||
|
||||
$tables = array(
|
||||
'propal' => array(0 => 'datep', 1 => 'fin_validite', 2 => 'date_valid', 3 => 'date_cloture'),
|
||||
'commande' => array(0 => 'date_commande', 1 => 'date_valid', 2 => 'date_cloture'),
|
||||
'facture' => array(0 => 'datec', 1 => 'datef', 2 => 'date_valid', 3 => 'date_lim_reglement'),
|
||||
'paiement' => array(0 => 'datep'),
|
||||
'bank' => array(0 => 'datev', 1 => 'dateo'),
|
||||
'commande_fournisseur' => array(0 => 'date_commande', 1 => 'date_valid', 3 => 'date_creation', 4 => 'date_approve', 5 => 'date_approve2', 6 => 'date_livraison'),
|
||||
'supplier_proposal' => array(0 => 'datec', 1 => 'date_valid', 2 => 'date_cloture'),
|
||||
'expensereport' => array(0 => 'date_debut', 1 => 'date_fin', 2 => 'date_create', 3 => 'date_valid', 4 => 'date_approve', 5 => 'date_refuse', 6 => 'date_cancel'),
|
||||
'holiday' => array(0 => 'date_debut', 1 => 'date_fin', 2 => 'date_create', 3 => 'date_valid', 5 => 'date_refuse', 6 => 'date_cancel'),
|
||||
'ticket' => array(0 => 'datec', 1 => 'date_read', 2 => 'date_close')
|
||||
$tables=array(
|
||||
'propal'=>array(0=>'datep', 1=>'fin_validite', 2=>'date_valid', 3=>'date_cloture'),
|
||||
'commande'=>array(0=>'date_commande', 1=>'date_valid', 2=>'date_cloture'),
|
||||
'facture'=>array(0=>'datec', 0=>'datef', 1=>'date_valid', 2=>'date_lim_reglement'),
|
||||
'paiement'=>array(0=>'datep'),
|
||||
'bank'=>array(0=>'datev', 1=>'dateo'),
|
||||
'commande_fournisseur'=>array(0=>'date_commande', 1=>'date_valid', 3=>'date_creation', 4=>'date_approve', 5=>'date_approve2', 6=>'date_livraison'),
|
||||
'supplier_proposal'=>array(0=>'datec', 1=>'date_valid', 2=>'date_cloture'),
|
||||
'expensereport'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 4=>'date_approve', 5=>'date_refuse', 6=>'date_cancel'),
|
||||
'holiday'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 5=>'date_refuse', 6=>'date_cancel'),
|
||||
'ticket'=>array(0=>'datec', 1=>'date_read', 2=>'date_close')
|
||||
);
|
||||
|
||||
$year = 2010;
|
||||
$currentyear = $tmp['year'];
|
||||
$year=2010;
|
||||
$currentyear=$tmp['year'];
|
||||
while ($year <= $currentyear) {
|
||||
//$year=2021;
|
||||
$delta1 = ($currentyear - $year);
|
||||
$delta2 = ($currentyear - $year - 1);
|
||||
$delta1=($currentyear - $year);
|
||||
$delta2=($currentyear - $year - 1);
|
||||
//$delta=-1;
|
||||
|
||||
if ($delta1) {
|
||||
foreach ($tables as $tablekey => $tableval) {
|
||||
print "Correct ".$tablekey." for year ".$year." and move them to current year ".$currentyear." ";
|
||||
$sql = "select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
|
||||
$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
|
||||
//$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." > NOW()";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$i=0;
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
$obj=$db->fetch_object($resql);
|
||||
if ($obj) {
|
||||
print ".";
|
||||
$sql2 = "UPDATE ".MAIN_DB_PREFIX.$tablekey." set ";
|
||||
$j = 0;
|
||||
$sql2="UPDATE ".MAIN_DB_PREFIX.$tablekey." set ";
|
||||
$j=0;
|
||||
foreach ($tableval as $field) {
|
||||
if ($j) {
|
||||
$sql2 .= ", ";
|
||||
$sql2.=", ";
|
||||
}
|
||||
$sql2 .= $field." = ".$db->ifsql("DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR) > NOW()", "DATE_ADD(".$field.", INTERVAL ".$delta2." YEAR)", "DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR)");
|
||||
$sql2.= $field." = ".$db->ifsql("DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR) > NOW()", "DATE_ADD(".$field.", INTERVAL ".$delta2." YEAR)", "DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR)");
|
||||
$j++;
|
||||
}
|
||||
$sql2 .= " WHERE rowid = ".$obj->rowid;
|
||||
$sql2.=" WHERE rowid = ".$obj->rowid;
|
||||
//print $sql2."\n";
|
||||
$resql2 = $db->query($sql2);
|
||||
if (!$resql2) {
|
||||
if (! $resql2) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
<arg name="tab-width" value="4"/>
|
||||
<arg name="extensions" value="php" />
|
||||
|
||||
<exclude-pattern type="relative">build/html</exclude-pattern>
|
||||
<exclude-pattern type="relative">build/aps</exclude-pattern>
|
||||
<exclude-pattern type="relative">dev/tools/test/namespacemig</exclude-pattern>
|
||||
<!-- <exclude-pattern type="relative">dev/initdata/dbf/includes</exclude-pattern> -->
|
||||
<exclude-pattern type="relative">documents</exclude-pattern>
|
||||
<exclude-pattern type="relative">htdocs/core/class/lessc.class.php</exclude-pattern>
|
||||
<exclude-pattern type="relative">htdocs/custom</exclude-pattern>
|
||||
<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
|
||||
<exclude-pattern type="relative">htdocs/install/doctemplates/websites</exclude-pattern>
|
||||
<exclude-pattern type="relative">htdocs/conf.php</exclude-pattern>
|
||||
<exclude-pattern type="relative">*/nltechno*</exclude-pattern>
|
||||
<exclude-pattern type="relative">source</exclude-pattern>
|
||||
<exclude-pattern type="relative">.git</exclude-pattern>
|
||||
<exclude-pattern type="relative">.cache</exclude-pattern>
|
||||
<!-- info: '*' is replaced with '.*', so better use '+' in some cases -->
|
||||
<!-- info: 'relative' paths are relative to the examined file, so not ok. -->
|
||||
<exclude-pattern>/build/(html|aps)/</exclude-pattern>
|
||||
<exclude-pattern>/dev/tools/test/namespacemig/</exclude-pattern>
|
||||
<!-- <exclude-pattern>dev/initdata/dbf/includes</exclude-pattern> -->
|
||||
<exclude-pattern>/documents/</exclude-pattern>
|
||||
<exclude-pattern>/htdocs/core/class/lessc\.class\.php</exclude-pattern>
|
||||
<exclude-pattern>/htdocs/(custom|includes)/</exclude-pattern>
|
||||
<exclude-pattern>/htdocs/install/doctemplates/websites</exclude-pattern>
|
||||
<exclude-pattern>/htdocs/([^/]+/)?conf\.php</exclude-pattern>
|
||||
<exclude-pattern>*/nltechno*</exclude-pattern>
|
||||
<exclude-pattern>/source/</exclude-pattern>
|
||||
<exclude-pattern>/\.git/</exclude-pattern>
|
||||
<exclude-pattern>/\.cache/</exclude-pattern>
|
||||
|
||||
<!-- List of all tests -->
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# fail2ban-client status web-accesslog-limit403
|
||||
#
|
||||
# To test rule file on a existing log file
|
||||
# fail2ban-regex /var/log/apache2/access.log /etc/fail2ban/filter.d/web-accesslog-limit403.conf --print-all-matched
|
||||
# fail2ban-regex /var/log/apache2/access.log /etc/fail2ban/filter.d/web-accesslog-limit403.conf
|
||||
|
||||
failregex = <HOST> - - .*HTTP/[0-9]+(.[0-9]+)?" 403
|
||||
ignoreregex =
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# fail2ban-client status web-dolibarr-limitpublic
|
||||
#
|
||||
# To test rule file on a existing log file
|
||||
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-limitpublic.conf --print-all-matched
|
||||
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-limitpublic.conf
|
||||
|
||||
failregex = ^ [A-Z\s]+ <HOST>\s+--- Access to .*/public/
|
||||
ignoreregex =
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# fail2ban-client status web-dolibarr-rulesbruteforce
|
||||
#
|
||||
# To test rule file on a existing log file
|
||||
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf --print-all-matched
|
||||
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf
|
||||
|
||||
failregex = ^ [A-Z\s]+ <HOST>\s+functions_.*::check_user_.* Authentication KO
|
||||
ignoreregex =
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# fail2ban-client status web-dolibarr-rulespassforgotten
|
||||
#
|
||||
# To test rule file on a existing log file
|
||||
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf --print-all-matched
|
||||
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf
|
||||
|
||||
failregex = ^ [A-Z\s]+ <HOST>\s+--- Access to .*/passwordforgotten.php - action=buildnewpassword
|
||||
ignoreregex =
|
||||
|
||||
@@ -3,10 +3,10 @@ QODANA TUTO
|
||||
This README explains how to use qodana to generate static analytics reports on the code
|
||||
|
||||
Install docker
|
||||
apt install docker
|
||||
|
||||
Install qodana into ~/.loca/bin/qodana
|
||||
curl -fsSL https://jb.gg/qodana-cli/install | bash
|
||||
|
||||
Install qodana
|
||||
|
||||
|
||||
To run inspection on CLI
|
||||
cd ~/git/dirtoscan
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
= Install SonarQube locally
|
||||
|
||||
Check you are using Install Java SDK 17
|
||||
java --version must show 61
|
||||
|
||||
To install java sdk 17 on ubuntu:
|
||||
sudo apt update
|
||||
sudo apt install -y openjdk-17-jdk
|
||||
|
||||
Unzip the sonar package into a directory
|
||||
|
||||
Edit the file conf/sonar.properties to modify port 9000 and 9001 (already used by Eclipse or xdebug) into 9080 and 9081
|
||||
|
||||
Launch sonar with
|
||||
bin/linux*/sonar.sh console
|
||||
@@ -1 +1 @@
|
||||
Files and tools of a skeleton to build a module were moved into htdocs/modulebuilder/template
|
||||
Files and tools were moved into htdocs/modulebuilder/template
|
||||
1
dev/tools/.gitignore
vendored
1
dev/tools/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/vendor/
|
||||
@@ -1,438 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/tools/apstats.php
|
||||
* \brief Script to report Advanced Statistics on a coding project
|
||||
*/
|
||||
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path = dirname(__FILE__) . '/';
|
||||
|
||||
// Test si mode batch
|
||||
$sapi_type = php_sapi_name();
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute " . $script_file . " from command line, you must use PHP for CLI mode.\n";
|
||||
exit();
|
||||
}
|
||||
|
||||
error_reporting(E_ALL & ~E_DEPRECATED);
|
||||
define('PRODUCT', "apstats");
|
||||
define('VERSION', "1.0");
|
||||
|
||||
$phpstanlevel = 2;
|
||||
|
||||
|
||||
print '***** '.constant('PRODUCT').' - '.constant('VERSION').' *****'."\n";
|
||||
if (empty($argv[1])) {
|
||||
print 'You must run this tool being into the root of the project.'."\n";
|
||||
print 'Usage: '.constant('PRODUCT').'.php pathto/outputfile.html [--dir-scc=pathtoscc] [--dir-phpstan=pathtophpstan]'."\n";
|
||||
print 'Example: '.constant('PRODUCT').'.php documents/apstats/index.html --dir-scc=/snap/bin --dir-phpstan=~/git/phpstan/htdocs/includes/bin';
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$outputpath = $argv[1];
|
||||
$outputdir = dirname($outputpath);
|
||||
$outputfile = basename($outputpath);
|
||||
|
||||
if (!is_dir($outputdir)) {
|
||||
print 'Error: dir '.$outputdir.' does not exists or is not writable'."\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$dirscc = '';
|
||||
$dirphpstan = '';
|
||||
|
||||
$i = 0;
|
||||
while ($i < $argc) {
|
||||
$reg = array();
|
||||
if (preg_match('/--dir-scc=(.*)$/', $argv[$i], $reg)) {
|
||||
$dirscc = $reg[1];
|
||||
}
|
||||
if (preg_match('/--dir-phpstan=(.*)$/', $argv[$i], $reg)) {
|
||||
$dirphpstan = $reg[1];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
$timestart = time();
|
||||
|
||||
// Count lines of code of Dolibarr itself
|
||||
/*
|
||||
$commandcheck = 'cloc . --exclude-dir=includes --exclude-dir=custom --ignore-whitespace --vcs=git';
|
||||
$resexec = shell_exec($commandcheck);
|
||||
$resexec = (int) (empty($resexec) ? 0 : trim($resexec));
|
||||
|
||||
|
||||
// Count lines of code of external dependencies
|
||||
$commandcheck = 'cloc htdocs/includes --ignore-whitespace --vcs=git';
|
||||
$resexec = shell_exec($commandcheck);
|
||||
$resexec = (int) (empty($resexec) ? 0 : trim($resexec));
|
||||
*/
|
||||
|
||||
// Count lines of code of application
|
||||
$commandcheck = ($dirscc ? $dirscc.'/' : '').'scc . --exclude-dir=htdocs/includes,htdocs/custom,htdocs/theme/common/fontawesome-5,htdocs/theme/common/octicons';
|
||||
print 'Execute SCC to count lines of code in project: '.$commandcheck."\n";
|
||||
$output_arrproj = array();
|
||||
$resexecproj = 0;
|
||||
exec($commandcheck, $output_arrproj, $resexecproj);
|
||||
|
||||
|
||||
// Count lines of code of dependencies
|
||||
$commandcheck = ($dirscc ? $dirscc.'/' : '').'scc htdocs/includes htdocs/theme/common/fontawesome-5 htdocs/theme/common/octicons';
|
||||
print 'Execute SCC to count lines of code in dependencies: '.$commandcheck."\n";
|
||||
$output_arrdep = array();
|
||||
$resexecdep = 0;
|
||||
exec($commandcheck, $output_arrdep, $resexecdep);
|
||||
|
||||
|
||||
// Get technical debt
|
||||
$commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --level='.$phpstanlevel.' -v analyze -a build/phpstan/bootstrap.php --memory-limit 5G --error-format=github';
|
||||
print 'Execute PHPStan to get the technical debt: '.$commandcheck."\n";
|
||||
$output_arrtd = array();
|
||||
$resexectd = 0;
|
||||
exec($commandcheck, $output_arrtd, $resexectd);
|
||||
|
||||
$arrayoflineofcode = array();
|
||||
$arraycocomo = array();
|
||||
$arrayofmetrics = array(
|
||||
'proj' => array('Bytes' => 0, 'Files' => 0, 'Lines' => 0, 'Blanks' => 0, 'Comments' => 0, 'Code' => 0, 'Complexity' => 0),
|
||||
'dep' => array('Bytes' => 0, 'Files' => 0, 'Lines' => 0, 'Blanks' => 0, 'Comments' => 0, 'Code' => 0, 'Complexity' => 0)
|
||||
);
|
||||
|
||||
// Analyse $output_arrproj
|
||||
foreach (array('proj', 'dep') as $source) {
|
||||
print 'Analyze SCC result for lines of code for '.$source."\n";
|
||||
if ($source == 'proj') {
|
||||
$output_arr = &$output_arrproj;
|
||||
} elseif ($source == 'dep') {
|
||||
$output_arr = &$output_arrdep;
|
||||
} else {
|
||||
print 'Bad value for $source';
|
||||
die();
|
||||
}
|
||||
|
||||
foreach ($output_arr as $line) {
|
||||
if (preg_match('/^(───|Language|Total)/', $line)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//print $line."<br>\n";
|
||||
|
||||
if (preg_match('/^Estimated Cost.*\$(.*)/i', $line, $reg)) {
|
||||
$arraycocomo[$source]['currency'] = preg_replace('/[^\d\.]/', '', str_replace(array(',', ' '), array('', ''), $reg[1]));
|
||||
}
|
||||
if (preg_match('/^Estimated Schedule Effort.*\s([\d\s,]+)/i', $line, $reg)) {
|
||||
$arraycocomo[$source]['effort'] = str_replace(array(',', ' '), array('.', ''), $reg[1]);
|
||||
}
|
||||
if (preg_match('/^Estimated People.*\s([\d\s,]+)/i', $line, $reg)) {
|
||||
$arraycocomo[$source]['people'] = str_replace(array(',', ' '), array('.', ''), $reg[1]);
|
||||
}
|
||||
if (preg_match('/^Processed\s(\d+)\s/i', $line, $reg)) {
|
||||
$arrayofmetrics[$source]['Bytes'] = $reg[1];
|
||||
}
|
||||
|
||||
if (preg_match('/^(.*)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)$/', $line, $reg)) {
|
||||
$arrayoflineofcode[$source][$reg[1]]['Files'] = $reg[2];
|
||||
$arrayoflineofcode[$source][$reg[1]]['Lines'] = $reg[3];
|
||||
$arrayoflineofcode[$source][$reg[1]]['Blanks'] = $reg[4];
|
||||
$arrayoflineofcode[$source][$reg[1]]['Comments'] = $reg[5];
|
||||
$arrayoflineofcode[$source][$reg[1]]['Code'] = $reg[6];
|
||||
$arrayoflineofcode[$source][$reg[1]]['Complexity'] = $reg[7];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($arrayoflineofcode[$source])) {
|
||||
foreach ($arrayoflineofcode[$source] as $key => $val) {
|
||||
$arrayofmetrics[$source]['Files'] += $val['Files'];
|
||||
$arrayofmetrics[$source]['Lines'] += $val['Lines'];
|
||||
$arrayofmetrics[$source]['Blanks'] += $val['Blanks'];
|
||||
$arrayofmetrics[$source]['Comments'] += $val['Comments'];
|
||||
$arrayofmetrics[$source]['Code'] += $val['Code'];
|
||||
$arrayofmetrics[$source]['Complexity'] += $val['Complexity'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$timeend = time();
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$html = '<html>'."\n";
|
||||
$html .= '<meta charset="utf-8">'."\n";
|
||||
$html .= '<meta http-equiv="refresh" content="300">'."\n";
|
||||
$html .= '<meta name="viewport" content="width=device-width, initial-scale=1.0">'."\n";
|
||||
$html .= '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" integrity="sha512-q3eWabyZPc1XTCmF+8/LuE1ozpg5xxn7iO89yfSOd5/oKvyqLngoNGsx8jq92Y8eXJ/IRxQbEC+FGSYxtk2oiw==" crossorigin="anonymous" referrerpolicy="no-referrer" />'."\n";
|
||||
$html .= '<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js" integrity="sha512-3gJwYpMe3QewGELv8k/BX9vcqhryRdzRMxVfq6ngyWXwo03GFEzjsUm8Q7RZcHPHksttq7/GFoxjCVUjkjvPdw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>'."\n";
|
||||
$html .= '
|
||||
<style>
|
||||
body {
|
||||
margin: 10px;
|
||||
margin-left: 50px;
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
header {
|
||||
text-align: center;
|
||||
}
|
||||
header, section.chapter {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th,td {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.left {
|
||||
text-align: left;
|
||||
}
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
.nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.opacitymedium {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.centpercent {
|
||||
width: 100%;
|
||||
}
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
.trgroup {
|
||||
background-color: #EEE;
|
||||
}
|
||||
.seedetail {
|
||||
color: #000088;
|
||||
cursor: pointer;
|
||||
}
|
||||
.box {
|
||||
padding: 20px;
|
||||
font-size: 1.2em;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
width: 200px;
|
||||
}
|
||||
.box.inline-box {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.back1 {
|
||||
background-color: #884466;
|
||||
color: #FFF;
|
||||
}
|
||||
.back2 {
|
||||
background-color: #664488;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
div.fiche>form>div.div-table-responsive {
|
||||
min-height: 392px;
|
||||
}
|
||||
div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min {
|
||||
overflow-x: auto;
|
||||
}
|
||||
.div-table-responsive {
|
||||
line-height: 120%;
|
||||
}
|
||||
.div-table-responsive, .div-table-responsive-no-min {
|
||||
overflow-x: auto;
|
||||
min-height: 0.01%;
|
||||
}
|
||||
|
||||
|
||||
/* Force values for small screen 767 */
|
||||
@media only screen and (max-width: 767px)
|
||||
{
|
||||
body {
|
||||
margin: 5px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>'."\n";
|
||||
|
||||
$html .= '<body>'."\n";
|
||||
|
||||
$html .= '<header>'."\n";
|
||||
$html .= '<h1>Advanced Project Statistics</h1>'."\n";
|
||||
$currentDate = date("Y-m-d H:i:s"); // Format: Year-Month-Day Hour:Minute:Second
|
||||
$html .= '<span class="opacitymedium">Generated on '.$currentDate.' in '.($timeend - $timestart).' seconds</span>'."\n";
|
||||
$html .= '</header>'."\n";
|
||||
|
||||
$html .= '<section class="chapter" id="linesofcode">'."\n";
|
||||
$html .= '<h2>Lines of code</h2>'."\n";
|
||||
|
||||
$html .= '<div class="div-table-responsive">'."\n";
|
||||
$html .= '<table class="centpercent">';
|
||||
$html .= '<tr class="loc">';
|
||||
$html .= '<th class="left">Language</th>';
|
||||
$html .= '<th class="right">Bytes</th>';
|
||||
$html .= '<th class="right">Files</th>';
|
||||
$html .= '<th class="right">Lines</th>';
|
||||
$html .= '<th class="right">Blanks</th>';
|
||||
$html .= '<th class="right">Comments</th>';
|
||||
$html .= '<th class="right">Code</th>';
|
||||
//$html .= '<td class="right">'.$val['Complexity'].'</td>';
|
||||
$html .= '</tr>';
|
||||
foreach (array('proj', 'dep') as $source) {
|
||||
$html .= '<tr class="trgroup" id="source'.$source.'">';
|
||||
if ($source == 'proj') {
|
||||
$html .= '<td>All files without dependencies';
|
||||
} elseif ($source == 'dep') {
|
||||
$html .= '<td>All files of dependencies only';
|
||||
}
|
||||
$html .= ' <span class="seedetail" data-source="'.$source.'">(See detail per file type...)</span>';
|
||||
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Bytes']).'</td>';
|
||||
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Files']).'</td>';
|
||||
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Lines']).'</td>';
|
||||
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Blanks']).'</td>';
|
||||
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Comments']).'</td>';
|
||||
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Code']).'</td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '</tr>';
|
||||
if (!empty($arrayoflineofcode[$source])) {
|
||||
foreach ($arrayoflineofcode[$source] as $key => $val) {
|
||||
$html .= '<tr class="loc hidden source'.$source.' language'.str_replace(' ', '', $key).'">';
|
||||
$html .= '<td>'.$key.'</td>';
|
||||
$html .= '<td class="right"></td>';
|
||||
$html .= '<td class="right nowrap">'.(empty($val['Files']) ? '' : formatNumber($val['Files'])).'</td>';
|
||||
$html .= '<td class="right nowrap">'.(empty($val['Lines']) ? '' : formatNumber($val['Lines'])).'</td>';
|
||||
$html .= '<td class="right nowrap">'.(empty($val['Blanks']) ? '' : formatNumber($val['Blanks'])).'</td>';
|
||||
$html .= '<td class="right nowrap">'.(empty($val['Comments']) ? '' : formatNumber($val['Comments'])).'</td>';
|
||||
$html .= '<td class="right nowrap">'.(empty($val['Code']) ? '' : formatNumber($val['Code'])).'</td>';
|
||||
//$html .= '<td class="right">'.(empty($val['Complexity']) ? '' : $val['Complexity']).'</td>';
|
||||
$html .= '<td class="nowrap">TODO graph here...</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$html .= '<tr class="trgroup">';
|
||||
$html .= '<td class="left">Total</td>';
|
||||
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Bytes'] + $arrayofmetrics['dep']['Bytes']).'</td>';
|
||||
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Files'] + $arrayofmetrics['dep']['Files']).'</td>';
|
||||
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Lines'] + $arrayofmetrics['dep']['Lines']).'</td>';
|
||||
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Blanks'] + $arrayofmetrics['dep']['Blanks']).'</td>';
|
||||
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Comments'] + $arrayofmetrics['dep']['Comments']).'</td>';
|
||||
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Code'] + $arrayofmetrics['dep']['Code']).'</td>';
|
||||
//$html .= '<td>'.$arrayofmetrics['Complexity'].'</td>';
|
||||
$html .= '<td></td>';
|
||||
$html .= '</tr>';
|
||||
$html .= '</table>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '</section>'."\n";
|
||||
|
||||
$html .= '<section class="chapter" id="projectvalue">'."\n";
|
||||
$html .= '<h2>Project value</h2><br>'."\n";
|
||||
$html .= '<div class="box inline-box back1">';
|
||||
$html .= 'COCOMO (Basic organic model) value:<br>';
|
||||
$html .= '<b>$'.formatNumber((empty($arraycocomo['proj']['currency']) ? 0 : $arraycocomo['proj']['currency']) + (empty($arraycocomo['dep']['currency']) ? 0 : $arraycocomo['dep']['currency']), 2).'</b>';
|
||||
$html .= '</div>';
|
||||
$html .= '<div class="box inline-box back2">';
|
||||
$html .= 'COCOMO (Basic organic model) effort<br>';
|
||||
$html .= '<b>'.formatNumber($arraycocomo['proj']['people'] * $arraycocomo['proj']['effort'] + $arraycocomo['dep']['people'] * $arraycocomo['dep']['effort']);
|
||||
$html .= ' monthes people</b><br>';
|
||||
$html .= '</section>'."\n";
|
||||
|
||||
$tmp = '';
|
||||
$nblines = 0;
|
||||
foreach ($output_arrtd as $line) {
|
||||
$reg = array();
|
||||
//print $line."\n";
|
||||
preg_match('/^::error file=(.*),line=(\d+),col=(\d+)::(.*)$/', $line, $reg);
|
||||
if (!empty($reg[1])) {
|
||||
$tmp .= '<tr><td>'.$reg[1].'</td><td>'.$reg[2].'</td><td>'.$reg[4].'</td></tr>'."\n";
|
||||
$nblines++;
|
||||
}
|
||||
}
|
||||
|
||||
$html .= '<section class="chapter" id="technicaldebt">'."\n";
|
||||
$html .= '<h2>Technical debt <span class="opacitymedium">(PHPStan level '.$phpstanlevel.' -> '.$nblines.' warnings)</span></h2><br>'."\n";
|
||||
$html .= '<div class="div-table-responsive">'."\n";
|
||||
$html .= '<table class="list_technical_debt">'."\n";
|
||||
$html .= '<tr><td>File</td><td>Line</td><td>Type</td></tr>'."\n";
|
||||
$html .= $tmp;
|
||||
$html .= '</table>';
|
||||
$html .= '</div>';
|
||||
$html .= '</section>'."\n";
|
||||
|
||||
$html .= '
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$( ".seedetail" ).on( "click", function() {
|
||||
var source = $(this).attr("data-source");
|
||||
console.log("Click on "+source);
|
||||
jQuery(".source"+source).toggle();
|
||||
} );
|
||||
});
|
||||
</script>
|
||||
';
|
||||
$html .= '</body>';
|
||||
$html .= '</html>';
|
||||
|
||||
$fh = fopen($outputpath, 'w');
|
||||
if ($fh) {
|
||||
fwrite($fh, $html);
|
||||
fclose($fh);
|
||||
|
||||
print 'Generation of output file '.$outputfile.' done.'."\n";
|
||||
} else {
|
||||
print 'Failed to open '.$outputfile.' for ouput.'."\n";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* function to format a number
|
||||
*
|
||||
* @param string|int $number Number to format
|
||||
* @param int $nbdec Number of decimal digits
|
||||
* @return string Formated string
|
||||
*/
|
||||
function formatNumber($number, $nbdec = 0)
|
||||
{
|
||||
return number_format($number, 0, '.', ' ');
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
// Conversion du PDF en image png si fichier png non existant
|
||||
// Save a stripe payment was done in realy life so later we will be able to force a commit on recorded payments
|
||||
// To make a Stripe SEPA payment request, we must have the payment mode source already saved into societe_rib and retreived with ->sepaStripe
|
||||
// If old value crypted in database is same than submited new value, it means we don't change it, so we don't update.
|
||||
//break; // No break for sortfield and sortorder so we can cumulate fields (is it realy usefull ?)
|
||||
$errmsg = 'Failed to retreive paymentintent or charge from id';
|
||||
$minifile = getImageFileNameForSize($fileinfo['basename'], '_mini'); // For new thumbs using same ext (in lower case howerver) than original
|
||||
@@ -36,19 +35,15 @@
|
||||
// remove invalid value, as it didnt match anything
|
||||
// we dont use the rank from orderline because we may have lines from several orders
|
||||
dol_syslog("makeStripeSepaRequest get stripe connet account", LOG_DEBUG);
|
||||
if (isset($this->oldcopy->array_options["options_".$key]) && $this->array_options["options_".$key] == $this->oldcopy->array_options["options_".$key]) { // If old value crypted in database is same than submited new value, it means we don't change it, so we don't update.
|
||||
print '<input type="hidden" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; // class is requied to be used by javascript callForResult();
|
||||
print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; // class is requied to be used by javascript callForResult();
|
||||
print 'jQuery("select[name=\''.$paramkey.'\']").focus();'."\n"; // Not really usefull, but we keep it in case of.
|
||||
$filles[$obj->fk_categorie_fille] = 1; // Set record for this child
|
||||
$i2++; // a criteria for 1 more field was added to string (we can add several citeria for the same field as it is a multiselect search criteria)
|
||||
$invoiceid = -1; // There is more than one invoice payed by this payment
|
||||
$line->pa_ht = $line->pa_ht; // we choosed to have buy/cost price always positive, so no revert of sign here
|
||||
$mesg .= '<br>Unkown Error, please refers to your administrator';
|
||||
$result = $adh->setPassword($user, $this->pass, (!getDolGlobalString('DATABASE_PWD_ENCRYPTED') ? 0 : 1), 1); // Cryptage non gere dans module adherent
|
||||
$result = $adh->setPassword($user, $this->pass, (empty($conf->global->DATABASE_PWD_ENCRYPTED) ? 0 : 1), 1); // Cryptage non gere dans module adherent
|
||||
$result = $line->insert(0, 1); // When creating credit note with same lines than source, we must ignore error if discount alreayd linked
|
||||
$s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297);
|
||||
$value = ((!empty($this->array_options) && array_key_exists("options_".$key.$keysuffix, $this->array_options)) ? $this->array_options["options_".$key.$keysuffix] : null); // Value may be cleaned or formated later
|
||||
$ways = $c->print_all_ways(' >> ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text
|
||||
'capture' => true, // Charge immediatly
|
||||
@@ -71,13 +66,10 @@
|
||||
// Show subproducts of product (not recommanded)
|
||||
// TODO Que faire si update echoue car on update avec un login deja existant pour un autre compte.
|
||||
// dont try to send email if no recipient
|
||||
// note: $cs->mandate contians ID of mandate on Stripe side
|
||||
// nous avons au moins une reponse
|
||||
// nous n'avons pas de reponse => n'existe pas
|
||||
//'visible'=>$fille->visible,
|
||||
break; // break for loop incase of error
|
||||
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - found old pass in database", LOG_WARNING);
|
||||
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - hash ".$cryptType." of pass is ok");
|
||||
hide: { delay: 50 }, /* If I enable effect:\'toggle\' here, a bug appears: the tooltip is shown when collpasing a new dir if it was shown before */
|
||||
if ($reg[1] == 'thi') { // Third-party
|
||||
if (empty($objMod->dictionaries) && !empty($objMod->dictionnaries)) {
|
||||
@@ -95,7 +87,6 @@
|
||||
$repid[$obj->id] = $label;
|
||||
$reponsesadd = str_split($obj->reponses);
|
||||
$s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297);
|
||||
$s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297);
|
||||
$serie[$i] .= 'd' . $i . '.push([' . $x . ', ' . $y . ']);' . "\n";
|
||||
$serie[$i] .= 'd' . $i . '.push({"label":"' . dol_escape_js($legends[$x]) . '", "data":' . $y . '});' . "\n";
|
||||
$sql .= " SET reponses = '".$db->escape($reponsesadd)."'";
|
||||
@@ -116,7 +107,6 @@
|
||||
// Label mouvement
|
||||
// Login is successfull with this method
|
||||
// Lot/serie
|
||||
// Message-ID=A, In-Reply-To=B, References=B and message can BE an answer but may be NOT (for example a transfer of an email rewriten)
|
||||
// Message-ID=A, In-Reply-To=B, References=B and message can BE an answer or NOT (a transfer rewriten)
|
||||
// Not a recongized record
|
||||
// Note: This suppose that "pass_indatabase_crypted" is a md5 (guaranted by the previous test if "(empty($conf->global->MAIN_SECURITY_HASH_ALGO))"
|
||||
@@ -163,9 +153,6 @@
|
||||
$heigth = $tmp[3];
|
||||
$info[$conf->global->LDAP_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
|
||||
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
|
||||
$info[getDolGlobalString('LDAP_FIELD_PASSWORD')] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
|
||||
$info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
|
||||
$objectoffield = $object; //For compatibily with the computed formula
|
||||
$optstart .= ' data-tvatx-formated="' . dol_escape_htmltag(price($objp->tva_tx, 0, $langs, 1, -1, 2)) . '"';
|
||||
$optstart .= ' data-tvatx-formated="'.dol_escape_htmltag(price($objp->tva_tx, 0, $langs, 1, -1, 2)).'"';
|
||||
$outprice_ht = price($objp->price); // formated for langage user because is inserted into input field
|
||||
@@ -180,7 +167,6 @@
|
||||
$this->user_closing = $cluser;
|
||||
$this->user_cloture = $cluser;
|
||||
$usertime = 0; // We dont modify date because we want to have date into memory datep and datef stored as GMT date. Compensation will be done during output.
|
||||
$valuetoshow = ucfirst($value); // Par defaut
|
||||
$ways = $c->print_all_ways(' >> ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text
|
||||
&& $obj->status != $tmpobject::STATUS_ABANDONED // Not abandonned
|
||||
'adress'=>$obj->adress,
|
||||
@@ -188,7 +174,6 @@
|
||||
'transparency'=>$object->transparency, // Force transparency on onwer from preoperty of event
|
||||
/* Remove selected id as soon as we type or delete a char (it means old selection is wrong). Use keyup/down instead of change to avoid loosing the product id. This is needed only for select of predefined product */
|
||||
/*case 'select': // Not required, we chosed value='0' for undefined values
|
||||
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again whith the caller
|
||||
// Batch number managment
|
||||
// Calculcate number of days consumed
|
||||
// Cas des factures liees par un autre objet (ex: commande)
|
||||
@@ -198,7 +183,6 @@
|
||||
// For exemple, we may have error: 'No such customer: cus_XXXXX; a similar object exists in live mode, but a test mode key was used to make this request.'
|
||||
// For full day events, date are also GMT but they wont but converted using tz during output
|
||||
// If translation exists, we use it, otherwise, we use tha had coded label
|
||||
// If we want to closed payed invoices
|
||||
// Line dates planed
|
||||
// Message-ID=A, In-Reply-To=B, References=B and message can BE an answer or NOT (a transfer rewriten)
|
||||
// Note: $obj->halfday is 0:Full days, 2:Sart afternoon end morning, -1:Start afternoon, 1:End morning
|
||||
@@ -207,10 +191,8 @@
|
||||
// On selectionne les groupes auquel fait parti le user
|
||||
// On verifie l'emplacement du modele
|
||||
// Onwer
|
||||
// Option to reload page to retrieve customer informations. Note, this clear other input
|
||||
// Produit non deja existant
|
||||
// Search submenu fot this mainmenu entry
|
||||
// Selection of all product stock mouvements that contains batchs
|
||||
// Si safe_mode on et command hors du parametre exec, on a un fichier out vide donc errormsg vide
|
||||
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
||||
// Strip off the beggining '<'
|
||||
@@ -231,7 +213,6 @@
|
||||
// at a time, and thats just stupid, so lets just hope this doesnt appear anywhere in the actual data
|
||||
// de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur).
|
||||
// if we have a PROJECTLEADER contact and we dont use it as recipient we store the contact object for later use
|
||||
// multiselect array convert html entities into options tags, even if we dont want this, so we encode them a second time
|
||||
// save curent cell padding
|
||||
//$sql .= " AND (status <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason
|
||||
//Esle it's separated key/value and coma list
|
||||
@@ -250,7 +231,6 @@
|
||||
error="Database $dbname NOT successfully droped. You have to do it manually."
|
||||
foreach ($cats as $fille) {
|
||||
if (!empty($childrens)) {
|
||||
if (!getDolGlobalString('PROJECT_DISABLE_UNLINK_FROM_OVERVIEW') || $user->admin) { // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true
|
||||
if (!isset($filles[$obj->fk_categorie_fille])) { // Only one record as child (a child has only on parent).
|
||||
if ($conf->file->mailing_limit_sendbyweb != '-1') { // MAILING_LIMIT_SENDBYWEB was set to -1 in database, but it is allowed ot increase it.
|
||||
if ($login && $login != '--bad-login-validity--') { // Login is successfull
|
||||
@@ -266,29 +246,20 @@
|
||||
jQuery("#mouvement").trigger("change");
|
||||
print "ERROR: Failed to include file '".$filephp."'. Try to edit and re-save page ith this ID.";
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
setEventMessages($langs->trans('Bad value for email, emai lwas not verified by Google'), null, 'errors');
|
||||
} else { // Pour les autres schémas, les membres sont listés sous forme de DN complets
|
||||
$newmenu->add("/compta/stats/comp.php?leftmenu=report","Transforme",2,$user->hasRight('compta', 'resultat', 'lire'));
|
||||
* Section Creditor (sepa Crediteurs bloc lines)
|
||||
* Section Debitor (sepa Debiteurs bloc lines)
|
||||
"confirm" => $confirmnow, // Do not confirm immediatly during creation of intent
|
||||
"confirm" => $confirmnow, // try to confirm immediatly after create (if conditions are ok)
|
||||
$ErrorLongMsg = "Session expired. Can't retreive PaymentType. Payment has not been validated.";
|
||||
$accountparent->account_number = $obj->account_number2; // Sotre an account number for output
|
||||
$action = 'transfert';
|
||||
$allways = $parent->get_all_ways();
|
||||
$bugbaseurl .= urlencode("## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…)\n");
|
||||
$childs[] = array_combine($keys, $values);
|
||||
$curent = getDolGlobalString($thisTypeConfName, getDolGlobalString('FACTURE_ADDON_PDF'));
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
$info[$conf->global->LDAP_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
|
||||
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
|
||||
$info[getDolGlobalString('LDAP_FIELD_PASSWORD')] = $this->pass; // this->pass = mot de passe non crypte
|
||||
$info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')] = $this->pass; // this->pass = mot de passe non crypte
|
||||
$initialY = $tab_top + 7;
|
||||
$invoicestatic->statut = $obj->fk_statut; // For backward comaptibility
|
||||
$jsListType .= (!empty($jsListType) ? ',' : '').'"'.$type.'":"'.$curent.'"';
|
||||
$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
||||
$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : '').'&search_status=99', $langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
||||
$object->actionmsg = dol_concatdesc($object->actionmsg, "\n".$langs->transnoentities("AttachedFiles").': '.$attachs);
|
||||
@@ -297,16 +268,13 @@
|
||||
$paramfortooltiptd .= ' title="' . ($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)) . '"'; // Attribut to put on td tag to store tooltip
|
||||
$paramfortooltiptd .= ' title="'.($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)).'"'; // Attribut to put on td tag to store tooltip
|
||||
$showfield = 1; // Par defaut
|
||||
$societe->note_private = "Default customer automaticaly created by Point Of Sale module activation. Can be used as the default generic customer in the Point Of Sale setup. Can also be edited or removed if you don't need a generic customer.";
|
||||
$tagdatabase = true; // We don't know what it was before, so now we consider we are version choosed.
|
||||
$this->category->childs[] = $this->_cleanObjectDatas($cat);
|
||||
$this->civility_id = $obj->civility_code; // Bad. Kept for backard compatibility
|
||||
$this->date_delivery = $this->db->jdate($obj->date_delivery); // Date planed
|
||||
$this->liste_array = $repid;
|
||||
$this->statut = self::STATUS_DRAFT; // dperecated
|
||||
$this->stringtoshow .= $serie[$i] . "\n";
|
||||
$this->stringtoshow .= $this->mirrorGraphValues ? '[' . -$serie[$i] . ',' . $serie[$i] . ']' : $serie[$i];
|
||||
$this->stringtoshow .= $this->mirrorGraphValues ? '[-' . $serie[$i] . ',' . $serie[$i] . ']' : $serie[$i];
|
||||
$this->stringtoshow .= ' data: [' . $serie[$i] . ']';
|
||||
$this->stringtoshow .= '<!-- Serie ' . $i . ' -->' . "\n";
|
||||
$tmp = array('id_users'=>$obj->id_users, 'nom'=>$obj->name, 'reponses'=>$obj->reponses);
|
||||
@@ -319,10 +287,8 @@
|
||||
/* Removed due to awful harcoded values
|
||||
/*case 'select': // Not required, we chosed value='0' for undefined values
|
||||
// $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher
|
||||
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again whith the caller
|
||||
// Add entry into bank accoun
|
||||
// Add field of attribut
|
||||
// Add link to the Direct Debit if invoice redused ('InvoiceRefused') in bank_url
|
||||
// Ajout de l'utilisateur dans le groupe
|
||||
// Batch number managment
|
||||
// By default, electronic transfert from bank to bank
|
||||
@@ -341,7 +307,6 @@
|
||||
// Fonctions de conversion non presente dans ce PHP
|
||||
// Get lines of sources alread delivered
|
||||
// Get next free nuber for the ref of bon
|
||||
// Get next free nunber for the ref of bon prelevement
|
||||
// If create form is coming from same page, it means that post was sent but an error occured
|
||||
// If not abandonned
|
||||
// If option "one bill per third" is set, and an invoice for this thirdparty was already created, we re-use it.
|
||||
@@ -358,12 +323,10 @@
|
||||
// No temp directory provided, so we are not able to support convertion of data:image into physical images.
|
||||
// On verifie l'emplacement du modele
|
||||
// Option to reload page to retrieve customer informations. Note, this clear other input
|
||||
// Or set status to "In porgress" if the client has answered and if the ticket has started
|
||||
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
|
||||
// Payment informations
|
||||
// Proprietes particulieres a facture de remplacement
|
||||
// Recursive call if there is childs to child
|
||||
// Retreive lines
|
||||
// See example with selectsearchbox.php. This case is reserverd for the selectesearchbox.php so we can
|
||||
// Seperate "Real Name" from eMail address
|
||||
// Should not happend. Entries are added
|
||||
@@ -373,13 +336,11 @@
|
||||
// Subscription informations
|
||||
// TODO : if base exists in unit dictionary table, remove this convertion exception and update convertion infos in database.
|
||||
// TODO Can we set it to submited ?
|
||||
// TODO Replace this with a checkbox for each payment mode: "Send request to XXX immediatly..."
|
||||
// TODO We can't, we dont' have full path of file, only last_main_doc and ->element, so we must first rebuild full path $destfull
|
||||
// This convert an embedd file with src="/viewimage.php?modulepart... into a cid link
|
||||
// This make 12 calls for each accountancy account (12 monthes M)
|
||||
// Validate immediatly the order
|
||||
// Warning, the function may add a LF so we are forced to trim to compare with old $out without having always a difference and an infinit loop.
|
||||
// We chack if file exists
|
||||
// We check if lines of invoice are not already transfered into accountancy
|
||||
// We dont want on all entities, we delete all and current
|
||||
// We must filter on assignement table
|
||||
@@ -408,10 +369,8 @@
|
||||
continue; // The field was not submited to be saved
|
||||
dol_syslog("The user login has a validity between [".$user->datestartvalidity." and ".$user->dateendvalidity."], curren date is ".dol_now());
|
||||
dol_syslog("functions_isallowed::check_user_api_key Authentication KO for '".$login."': The user login has a validity between [".$fuser->datestartvalidity." and ".$fuser->dateendvalidity."], curren date is ".dol_now());
|
||||
dol_syslog('Bad password, connexion refused (see a previous notice message for more info)', LOG_NOTICE);
|
||||
dol_syslog('Bad password, connexion refused', LOG_DEBUG);
|
||||
dol_syslog('Bad value for code, connexion refused');
|
||||
dol_syslog('Bad value for code, connexion refused', LOG_NOTICE);
|
||||
dol_syslog('Call fetch_barcode with barcode_type not defined and cant be guessed', LOG_WARNING);
|
||||
foreach ($allways as $way) {
|
||||
foreach ($legends as $val) { // Loop on each serie
|
||||
@@ -433,11 +392,7 @@
|
||||
print '<div class="inline-block marginrightonly">'; // Button include dynamic contant
|
||||
return $this->trigger(9, "an unexpected error occured");
|
||||
} // don't wast resourses if we don't need them...
|
||||
} elseif ($links[$key]['type'] == 'banktransfert') { // transfert between 1 local account and another local account
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
|
||||
* @param array $menu_array_before Table of menu entries to show before entries of menu handler. This param is deprectaed and must be provided to ''.
|
||||
* @param string $head Optionnal head lines
|
||||
* Ouput html header of a page. It calls also top_httphead()
|
||||
$action = ''; // Do not show form post if there was at least one successfull sent
|
||||
$action = 'transfert';
|
||||
$alreadyfound = array($id=>1); // We init array of found object to start of tree, so if we found it later (should not happened), we stop immediatly
|
||||
@@ -469,7 +424,6 @@
|
||||
$paramfortooltiptd = ($extracss ? ' class="' . $extracss . '"' : '') . ($extrastyle ? ' style="' . $extrastyle . '"' : ''); // Attribut to put on td text tag
|
||||
$paramfortooltiptd = ($extracss ? ' class="'.$extracss.'"' : '').($extrastyle ? ' style="'.$extrastyle.'"' : ''); // Attribut to put on td text tag
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit, 2, $outputlangs->transnoentities("Label Mouvement"), '', 'C');
|
||||
$pdf->MultiCell(190, 5, $outputlangs->transnoentities("Informations"), '', 'L');*/
|
||||
$pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position
|
||||
$result -= $amountToBreakdown; // And canceled substraction has been replaced by breakdown
|
||||
$result = $ldap->add($dn, $info, $user); // Wil fail if already exists
|
||||
@@ -490,9 +444,6 @@
|
||||
$sql = 'SELECT s.reponses';
|
||||
$sql2 .= " SET reponses = '".$db->escape($newcar)."'";
|
||||
$this->category->childs = array();
|
||||
$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STDEST", "Contact destinataire transfert de stocks", 1, NULL, 0)');
|
||||
$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STFROM", "Contact expéditeur transfert de stocks", 1, NULL, 0)');
|
||||
$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "internal", "STRESP", "Responsable du transfert de stocks", 1, NULL, 0)');
|
||||
$this->emetteur->country_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini
|
||||
$this->error = 'update_note was called on objet with property table_element not defined';
|
||||
$this->modelpdf = $modelpdf; // For bakward compatibility
|
||||
@@ -513,13 +464,11 @@
|
||||
'sr.type' => "Type ban is defaut",
|
||||
/* Disabled because bcc must remain by defintion not visible
|
||||
// $_POST contains fk_commandefourndet_X_Y where Y is num of product line and X is number of splitted line
|
||||
// $new_array_options will be used for direct update, so must contains formated data for the UPDATE.
|
||||
// $opt['filter[id]'] contais list of product id that are result of search
|
||||
// 1 - Association des utilisateurs du groupe LDAP au groupe Dolibarr
|
||||
// 2 - Suppression des utilisateurs du groupe Dolibarr qui ne sont plus dans le groupe LDAP
|
||||
// A redirect is added if API call successfull
|
||||
// Action according to choosed sending method
|
||||
// Action according to the choosed sending method
|
||||
// Add entry into bank accoun
|
||||
// Add personnal information
|
||||
// Adding <b> may convert the original string into a HTML string. Sowe have to first
|
||||
@@ -537,7 +486,6 @@
|
||||
// Chercher un contact existant avec cette adresse email
|
||||
// Color of earch arc
|
||||
// Defaut
|
||||
// Delivery date planed
|
||||
// Discard check of mandatory fiedls for other fields
|
||||
// Documents are stored above the web pages root to prevent being downloaded without authentification
|
||||
// Dont't use entity if you use rowid
|
||||
@@ -575,13 +523,11 @@
|
||||
// On verifie si aucun paiement n'a ete effectue
|
||||
// On verifie si la balise prefix est utilisee
|
||||
// On verifie si la facture a des paiements
|
||||
// Option to reload page to retrieve customer informations.
|
||||
// Option to reload page to retrieve customer informations. Note, this clear other input
|
||||
// Parameteres execution
|
||||
// Programm next run
|
||||
// Replace espacing \' by ''.
|
||||
// Replace protected special codes with matching number of _ as wild card caracter
|
||||
// Retained warranty : usualy use on construction industry
|
||||
// Select des informations du projet
|
||||
// Set default encryption to yes, generate a salt and set default encryption algorythm (but only if there is no user yet into database)
|
||||
// Show var initialized by include fo paypal lib at begin of this file
|
||||
@@ -616,7 +562,6 @@
|
||||
// add variables subtitutions ticket
|
||||
// count the orders to ship in theorical stock when some are already removed by invoice validation.
|
||||
// de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur).
|
||||
// employee informations
|
||||
// et on met la quantité de la ligne dans la limite du "budget" indiqué par dispatch.qty
|
||||
// if "frequency" is empty or = 0, the reccurence is disabled
|
||||
// mise a jour des reponses utilisateurs dans la base
|
||||
@@ -625,13 +570,10 @@
|
||||
// on verifie si l'objet est utilisé
|
||||
// only if socid not filled else it's allready done upper
|
||||
// procédure de remplacement de la table pour ajouter la contrainte
|
||||
// reload page to retrieve customer informations
|
||||
// reload page to retrieve supplier informations
|
||||
// save curent cell padding
|
||||
// si le curseur est un booleen on retourne la valeur 0
|
||||
// this conf is actually hidden, by default we use 10% for "be carefull or warning"
|
||||
//Add hook to filter on user (for exemple on usergroup define in custom modules)
|
||||
//Another call for easy debugg
|
||||
//Calcultate new task end date with difference between origin proj end date and origin task end date
|
||||
//Calcultate new task start date with difference between old proj start date and origin task start date
|
||||
//Calcultate new task start date with difference between origin proj start date and origin task start date
|
||||
@@ -643,11 +585,9 @@
|
||||
//XXX: Should be done just befor commit no ?
|
||||
//but the note is saved, so just add a notification will be enought
|
||||
//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement.
|
||||
//print $langs->trans("Desription").' : ';
|
||||
//print "connexion de type=".$conf->db->type." sur host=".$conf->db->host." port=".$conf->db->port." user=".$conf->db->user." name=".$conf->db->name;
|
||||
//si le sujet n'est pas celui qui a été effacé alors on concatene
|
||||
//si on voit une erreur, le fond de la case est rouge
|
||||
The selectForForms is called with parameter $objectfield defined, so tha app can retreive the filter inside the ajax component instead of being provided as parameters. The
|
||||
console.log("Load desciption into text area : "+description);
|
||||
continue; // We discard parametes starting with ?
|
||||
dol_print_error('', get_class($this)."::load_previous_next_ref was called on objet with property table_element not defined");
|
||||
@@ -703,8 +643,6 @@
|
||||
if ($value) { // If we have -1 here, pb is into insert, not into ouptut (fix insert instead of changing code here to compensate)
|
||||
if (empty($objimport->array_import_convertvalue[0][$tmpcode])) { // If source file does not need convertion
|
||||
jQuery("#mouvement").change(function() {
|
||||
let hours = hour.getHours().toString().padStart(2, "0"); // Formater pour obtenir deux chiffres
|
||||
let mins = hour.getMinutes().toString().padStart(2, "0"); // Formater pour obtenir deux chiffres
|
||||
preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthese on tente recherche de traduction
|
||||
print " - Error cant find payment mode for ".$condpayment."\n";
|
||||
print "Expedition inexistante ou acces refuse";
|
||||
@@ -713,8 +651,6 @@
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert">'.$langs->trans("TransferStock").'</a>';
|
||||
print '<a class="cursoradd" href="'.$urltocreate.'">'; // Explicit link, usefull for nojs interfaces
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . (GETPOSTISSET('assujtva_value') ? 'checked="checked"' : 'checked="checked"') . ' value="1">'; // Assujeti par defaut en creation
|
||||
print __METHOD__." module accouting must be enabled.\n";
|
||||
print __METHOD__." module accouting must be enabled.\n"; exit(-1);
|
||||
return -1; // Alternate souce not found
|
||||
return false; // Sould be 6
|
||||
@@ -736,7 +672,6 @@
|
||||
$action = ''; // Do not show form post if there was at least one successfull sent
|
||||
$action = 'transfert';
|
||||
$allways = $this->get_all_ways(); // Load array of categories
|
||||
$asciiDocTable = "[options=\"header\"]\n|===\n|Objet | URLs\n";
|
||||
$buyingprice = (GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value
|
||||
$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value
|
||||
$canbedeleted = $object->can_be_deleted(); // Renvoi vrai si compte sans mouvements
|
||||
@@ -757,7 +692,6 @@
|
||||
$keyval = substr($nvpstr, $intial, $keypos);
|
||||
$ldap = new Ldap(); // Les parametres sont passes et recuperes via $conf
|
||||
$localobject->date=dol_mktime(12, 0, 0, 1, 1, 1915); // we use year 1915 to be sure to not have existing invoice for this year (usefull only if numbering is {0000@1}
|
||||
$localobject->date_creation = dol_mktime(12, 0, 0, 1, 1, 1980); // we use year 1915 to be sure to not have existing invoice for this year (usefull only if numbering is {0000@1}
|
||||
$mail = 'bidon@unvalid.unvalid';
|
||||
$myclone = clone $object; // PHP clone is a shallow copy only, not a real clone, so properties of references will keep the reference (refering to the same target/variable)
|
||||
$nbofsubproducts = count($prodschild); // This include only first level of childs
|
||||
@@ -790,7 +724,6 @@
|
||||
$sql .= " AND mc.statut NOT IN (-1,0)"; // -1 erreur, 0 non envoye, 1 envoye avec succes
|
||||
$sql .= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test
|
||||
$sql .= " WHERE u.email <> ''"; // u.email IS NOT NULL est implicite dans ce test
|
||||
$sql .= " label = 'Annulation mouvement ID ".((int) $this->id)."',";
|
||||
$sql .= " tms = tms"; // La date de derniere modif doit changer sauf pour la mise a jour de date de derniere connexion
|
||||
$sql .= ", '".$this->db->escape($url)."'"; // dperecated
|
||||
$sql = "SELECT id_users, nom as name, id_sondage, reponses";
|
||||
@@ -828,7 +761,6 @@
|
||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||
$this->rights[$r][3] = 1; // La permission est-elle une permission par defaut
|
||||
$this->rights[1][1] = 'Lire ses notes de frais et deplacements et celles de sa hierarchy';
|
||||
$this->rights[1][3] = 0; // La permission est-elle une permission par defaut
|
||||
$this->rights[1][3] = 1; // La permission est-elle une permission par defaut
|
||||
$this->rights[2][3] = 0; // La permission est-elle une permission par defaut
|
||||
$this->rights[3][1] = 'Lire mouvements de stocks';
|
||||
@@ -841,7 +773,6 @@
|
||||
'filles' => array('name'=>'filles', 'type'=>'tns:FillesArray')
|
||||
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Validated', 2=>'Paid', 3=>'Abandonned')),
|
||||
'qty_regulated' => array('type'=>'double', 'label'=>'QtyDelta', 'visible'=>1, 'enabled'=>1, 'position'=>34, 'index'=>1, 'help'=>'Qty aadded or removed (filled once movements are validated)'),
|
||||
'type_mouvement' =>array('type'=>'smallint(6)', 'label'=>'Type mouvement', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
|
||||
/* Definition de la date limite */
|
||||
/* Liste des taches et role sur les projets ou taches */
|
||||
/* width: ...px; If I use with, there is trouble on size of flex boxes solved with min + (max that is a little bit higer than min) */
|
||||
@@ -890,11 +821,8 @@
|
||||
// Exclude unsubscribed email adresses
|
||||
// Files missings
|
||||
// First, we get the max value (reponse immediate car champ indexe)
|
||||
// For a string that is already HTML (contains HTML tags) but badly formated
|
||||
// For a string that is already HTML (contains HTML tags) with special tags but badly formated
|
||||
// For backward compatiblity, we detect file stored into an old path
|
||||
// For each file build select list with PDF extention
|
||||
// For exemple if element is project
|
||||
// For external user, no check is done on company because readability is managed by public status of project and assignement.
|
||||
// For external user, no check is done on company permission because readability is managed by public status of project and assignement.
|
||||
// Forced filter on socid is similar to forced filter on project. TODO Use project assignement to allow to not use filter on project
|
||||
@@ -903,7 +831,6 @@
|
||||
// How the date for data are formated (format used bu jsgantt)
|
||||
// How the date for data are formated (format used by dol_print_date)
|
||||
// If lib not found in language file, we get label from cache/databse
|
||||
// If on smartphone or optmized for small screen
|
||||
// If option choosed, we create invoice
|
||||
// If resultset not provided, we take the last used by connexion
|
||||
// If stock increment is done on reception (recommanded choice)
|
||||
@@ -917,7 +844,6 @@
|
||||
// Links beetween objects are stored in this table
|
||||
// Load extrafields if not allready done
|
||||
// Load extrafiels if not allready does
|
||||
// Load librairies to check BAN
|
||||
// Log the init of hook but only for hooks thare are declared to be managed
|
||||
// Loop on each line keword was found into file.
|
||||
// Mis a jour contact
|
||||
@@ -936,7 +862,6 @@
|
||||
// Option to reload page to retrieve customer informations.
|
||||
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
|
||||
// Ouput page under the Dolibarr top menu
|
||||
// Parameteres execution
|
||||
// Permet de commencer l'impression de l'etiquette desiree dans le cas ou la page a deja servie
|
||||
// Permettre l'exclusion de groupes
|
||||
// Permettre l'inclusion de groupes
|
||||
@@ -945,7 +870,6 @@
|
||||
// Refresh / Reload web site (for non javascript browers)
|
||||
// Remove '<' into remainging, so remove non closing html tags like '<abc' or '<<abc'. Note: '<123abc' is not a html tag (can be kept), but '<abc123' is (must be removed).
|
||||
// Remove fields not relevent to categories
|
||||
// Renaming can be done when we rename globaly a bank receipt but not when changing 1 line from one receipt into another one.
|
||||
// Replace protected special codes with matching number of _ as wild card caracter
|
||||
// Reset the substraction for this amount
|
||||
// Retained warranty : usualy use on construction industry
|
||||
@@ -969,10 +893,7 @@
|
||||
// TODO Remove hooks with type 'output' (exemple createFrom). All hooks must be converted into 'addreplace' hooks.
|
||||
// TODO Remove hooks with type 'output' (exemple getNomUrl). All hooks must be converted into 'addreplace' hooks.
|
||||
// Tableau des parametres complementaires du post
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML + MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY to test disabling of bad atrributes
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML only to test disabling of bad atrributes
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML to test disabling of bad atrributes
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY only to test disabling of bad atrributes
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES to test disabling of bad atrributes
|
||||
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
|
||||
// This improvment as provided by 'SirSir' to
|
||||
@@ -1006,11 +927,9 @@
|
||||
// reload page to retrieve customer informations
|
||||
// reload page to retrieve supplier informations
|
||||
// save curent cell padding
|
||||
// submited to nothing.
|
||||
// substract 1 because array start from 0
|
||||
// this conf is actually hidden, by default we use 10% for "be carefull or warning"
|
||||
// to allow mask usage for dir, we shoul introduce a new param "isdir" to 1 to complete newmask like this
|
||||
// variable submitted at all, so no way to make a difference between variable not submited and variable
|
||||
//$array_selected = array("s.rowid"=>1, "s.nom"=>2); // Mut be fields found into declaration of dataset
|
||||
//$signature_line = dol_hash($keyforsignature, '5'); // Not really usefull
|
||||
//Add hook to filter on user (for exemple on usergroup define in custom modules)
|
||||
@@ -1037,7 +956,6 @@
|
||||
console.log("Change montly amount echeance="+echeance+" idcap="+idcap+" capital="+capital);
|
||||
dol_syslog("The user login has a validity between [".$user->datestartvalidity." and ".$user->dateendvalidity."], curren date is ".dol_now());
|
||||
dol_syslog("Warning: Function form_constantes is calle with parameter strictw3c = 0, this is deprecated. Value must be 2 now.", LOG_DEBUG);
|
||||
dol_syslog("line.php update bank line to set the new bank receipt nuber", LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::getCustomerAccount Try to find the first system customer id for ".$site." of thirdparty id=".$id." (exemple: cus_.... for stripe)", LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::setCategoriesCommon Oject Id:".$this->id.' type_categ:'.$type_categ.' nb tag add:'.count($categories), LOG_DEBUG);
|
||||
foreach ($allways as $way) {
|
||||
@@ -1047,12 +965,9 @@
|
||||
http_response_code(202); // If we use 202, this is not really an error message, but this allow to ouput message on command line tools
|
||||
if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success.
|
||||
if (!empty($this->phone)) { // If a phone of thirdparty is defined, we add it ot mobile of contacts
|
||||
if (!getDolGlobalString('PDF_BANK_HIDE_NUMBER_SHOW_ONLY_BICIBAN')) { // Note that some countries still need bank number, BIC/IBAN not enougth for them
|
||||
if (!is_array($this->userassigned) && !empty($this->userassigned)) { // For backward compatibility when userassigned was an int instead fo array
|
||||
if ($lines[$i]->fk_parent == $parent || $level < 0) { // if $level = -1, we dont' use sublevel recursion, we show all lines
|
||||
if ($lines[$i]->fk_task_parent == $parent || $level < 0) { // if $level = -1, we dont' use sublevel recursion, we show all lines
|
||||
if ($objectfield) { // We must retreive the objectdesc from the field or extrafield
|
||||
if ($this->label == 'Annulation mouvement ID'.$this->id) {
|
||||
if ($user->hasRight('stock', 'mouvement', 'creer')) {
|
||||
if (GETPOST('import_name')) { // If we have submited a form, we take value used fot the update try
|
||||
if (dol_strlen($phone) == 10) {// fixe 6 chiffres +352_AA_BB_CC
|
||||
@@ -1078,12 +993,10 @@
|
||||
print 'This website or feature is currently temporarly not available or failed after a technical error.<br><br>This may be due to a maintenance operation. Current status of operation ('.dol_print_date(dol_now(), 'dayhourrfc').') are on next line...<br><br>'."\n";
|
||||
return $childs;
|
||||
return $objet->compteur;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Lable")), null, 'errors');
|
||||
unset($object->supplierprices); // Mut use another API to get them
|
||||
while ($i < $nblot) { // Loop on each serie
|
||||
} else // We decrease agressiveness
|
||||
} else { // If thirdparty unkown, output the waiting account
|
||||
} else { // We decrease agressiveness
|
||||
} else { // old method. deprecated because ot can't retrieve type
|
||||
} elseif (!empty($this->childtables)) { // If object has childs linked with a foreign key field, we check all child tables.
|
||||
} elseif (!empty($this->fk_element) && !empty($this->childtables)) { // If object has childs linked with a foreign key field, we check all child tables.
|
||||
@@ -1130,7 +1043,6 @@
|
||||
* @param int $socid Id ot third party or 0 for all or -1 for empty list
|
||||
* @param int $id Id du paiement dont il faut afficher les infos
|
||||
* @param mixed $gm 'gmt'=Input informations are GMT values, 'tzserver'=Local to server TZ
|
||||
* @param string $method Method of transmision to bank (0=Internet, 1=Api...)
|
||||
* @param string $method method of transmision to bank
|
||||
* @param string $method method of transmision to bank (0=Internet, 1=Api...)
|
||||
* @param string $dolibarr_main_db_pass Mot de passe user a creer
|
||||
@@ -1153,7 +1065,6 @@
|
||||
* @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple)
|
||||
* @return array Tableau info des attributs
|
||||
* @return int < 0 if KO (infinit loop), >= 0 if OK
|
||||
* @return int Return integer < 0 if KO (infinit loop), >= 0 if OK
|
||||
* @return array Tableau des informations des champs de la table
|
||||
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
|
||||
* @return int 0 en cas de succes
|
||||
@@ -1162,8 +1073,6 @@
|
||||
* Charge indicateurs this->nb pour le tableau de bord
|
||||
* Charge les informations d'ordre info dans l'objet commande
|
||||
* Charge les informations d'ordre info dans l'objet facture
|
||||
* Classify the reception as invoiced (used for exemple by trigger when WORKFLOW_RECEPTION_CLASSIFY_BILLED_INVOICE is on)
|
||||
* Classify the shipping as invoiced (used for exemple by trigger when WORKFLOW_SHIPPING_CLASSIFY_BILLED_INVOICE is on)
|
||||
* Connexion to server
|
||||
* Define properties fullpath, fullrelativename, fulllabel of a directory of array this->cats and all its childs.
|
||||
* For category id_categ and its childs available in this->cats, define property fullpath and fulllabel.
|
||||
@@ -1210,7 +1119,6 @@
|
||||
* Si le (pays vendeur = pays acheteur) alors la TVA par defaut=TVA du produit vendu. Fin de regle.
|
||||
* Sinon la TVA proposee par defaut=0. Fin de regle.
|
||||
* Si vendeur non assujeti a TVA, TVA par defaut=0. Fin de regle.
|
||||
* - string (categories ids seprated by comma)
|
||||
* - string (categories ids seprated by comma)
|
||||
* - string (categories ids seprated by comma)
|
||||
* All types can also return some values into an array ->results that will be finaly merged into this->resArray for caller.
|
||||
@@ -1397,7 +1305,6 @@
|
||||
* @param array $arrayofcriterias Array of available search criterias. Example: array($object->element => $object->fields, 'otherfamily' => otherarrayoffields, ...)
|
||||
* @param array $search_component_params Array of selected search criterias
|
||||
* @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ
|
||||
* @param int $fk_product_stock id product_stock for objet
|
||||
* @param int $disabledoutputofmessages Clear all messages stored into session without diplaying them
|
||||
* @param int $lineid Id of production line to filter childs
|
||||
* @param int $noescapecommand 1=Do not escape command. Warning: Using this parameter needs you alreay have sanitized the $command parameter. If not, it will lead to security vulnerability.
|
||||
@@ -1436,7 +1343,6 @@
|
||||
* @param array $info content informations of field
|
||||
* @param boolean $confirmnow false=default, true=try to confirm immediatly after create (if conditions are ok)
|
||||
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
|
||||
* @param int $fk_socpeople Id of thirdparty contact (if source = 'external') or id of user (if souce = 'internal') to link
|
||||
* @param int $fk_socpeople Id of thirdparty contact (if source = 'external') or id of user (if souce = 'internal') to link
|
||||
* @param int $default_font_size default siez of font
|
||||
* @param int $id id du paiement dont il faut afficher les infos
|
||||
@@ -1449,7 +1355,6 @@
|
||||
* @param int $disablestockchangeforsubproduct Disable stock change for sub-products of kit (usefull only if product is a subproduct)
|
||||
* @param int $nbmax Number maxium of photos (0=no maximum)
|
||||
* @param int $id Id of product to search childs of
|
||||
* @param string $extrafieldsobjectkey The key to use to store retreived data (commonly $object->table_element)
|
||||
* @param string $extrafieldsobjectkey The key to use to store retreived data (for example $object->table_element)
|
||||
* @param string $moreparam To add more parametes on html input tag
|
||||
* @param string $moreparam To add more parametes on html input tag
|
||||
@@ -1469,19 +1374,11 @@
|
||||
* @param int $month Specifig month - Can be empty
|
||||
* @param int $year Specifig year - Can be empty
|
||||
* @param int $_type Interger value representing Mail Transport Type
|
||||
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
|
||||
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
|
||||
* @param string $str Original string to encode and optionaly truncate
|
||||
* @param string $page Url of page to call if confirmation is OK. Can contains parameters (param 'action' and 'confirm' will be reformated)
|
||||
* @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of numeric value, or a select combo). Use '' to use same than $value
|
||||
* @param string $output_format (html/opton (for option html only)/array (to return options arrays
|
||||
* @param string $page Page name (website id must also be filled if this parameter is used). Exemple 'myaliaspage' or 'fr/myaliaspage'
|
||||
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
|
||||
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
|
||||
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
|
||||
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
|
||||
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
|
||||
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
|
||||
* @param string $_path Path to the sendmail execuable
|
||||
* @param string $key Authentification key
|
||||
* @param string $selected Id remise fixe pre-selectionnee
|
||||
@@ -1491,7 +1388,6 @@
|
||||
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
|
||||
* @return float|string Total amout of discount
|
||||
* @return int <0 if KO, number of equipments found if OK
|
||||
* @return int Return integer <0 if KO, number of equipments found if OK
|
||||
* @return string Javacript code to manage dependency
|
||||
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
|
||||
* @return array Array with inforation on table
|
||||
@@ -1510,20 +1406,15 @@
|
||||
* @var array Custom family informations
|
||||
* @var array Header informations. Usually created at runtime by loadBox().
|
||||
* @var array box dependancies
|
||||
* @var boolean $standard_conforming_string Set this to true if postgres accept only standard encoding of sting using '' and not \'
|
||||
* @var int Postion
|
||||
* @var int Date for cancelation
|
||||
* @var int ID for cancelation
|
||||
* @var int -1=Unkown duration
|
||||
* @var int Amount can be choosen by the visitor during subscription (0 or 1)
|
||||
* @var int Code modifiable si il est invalide
|
||||
* @var int Subsription required (0 or 1)
|
||||
* @var int availabilty ID
|
||||
* @var integer|string Date delivery planed
|
||||
* @var string The name of constant to use to scan ODT files (Exemple: 'COMMANDE_ADDON_PDF_ODT_PATH')
|
||||
* @var string Hash to identify ticket publically
|
||||
* @var string availabilty code
|
||||
* @var string availabilty label
|
||||
* @var string ref custome
|
||||
* Active Directory ne supporte pas les connexions anonymes
|
||||
* Attention ce module est utilise par defaut si aucun module n'a
|
||||
@@ -1543,7 +1434,6 @@
|
||||
* Exemple: { "socid": 2, "date": 1595196000, "type": 0, "lines": [{ "fk_product": 2, "qty": 1 }] }
|
||||
* Flag to 1 if we must clean ambiguous charaters for the autogeneration of password (List of ambiguous char is in $this->Ambi)
|
||||
* Function to know all custom groupd from an accounting account
|
||||
* Function to shwo the combo select to chose a type of field (varchar, int, email, ...)
|
||||
* Function used to return childs of Mo
|
||||
* If paid completelly, this->close_code will be null
|
||||
* Inserts all informations into database.
|
||||
@@ -1602,7 +1492,6 @@
|
||||
* Return connexion ID
|
||||
* Return direct childs id of a category into an array
|
||||
* Return list of auxilary accounts. Cumulate list from customers, suppliers and users.
|
||||
* Return list of categories having choosed type
|
||||
* Return list of product formated for output
|
||||
* Return the addtional SQL JOIN query for filtering a list by a category
|
||||
* Return the addtional SQL SELECT query for filtering a list by a category
|
||||
@@ -1620,7 +1509,6 @@
|
||||
* ete definit dans la configuration
|
||||
* or a COMMA delimted string, and inserts them into a highly
|
||||
* reload conf value from databases is an aliase of loadValueFromConf
|
||||
* reverse mouvement for object by updating infos
|
||||
* statique et publique. Le nombre de parametres est determine automatiquement.
|
||||
* the tagret is useful with hooks : that allow externals modules to add setup items on good place
|
||||
* the underlaying array is destroyed and reconstructed.
|
||||
@@ -1632,7 +1520,6 @@
|
||||
# Log directoves
|
||||
$IBS_RETOUR = "montant:M;ref:R;auto:A;trans:T"; // Format des parametres du get de validation en reponse (url a definir sous paybox)
|
||||
$alwaysuncheckedmodules = array('dav', 'dynamicprices', 'incoterm', 'loan', 'multicurrency', 'paybox', 'paypal', 'stripe', 'google', 'printing', 'scanner', 'skype', 'website'); // Module we dont want by default
|
||||
$alwaysuncheckedmodules = array('dav', 'dynamicprices', 'incoterm', 'loan', 'multicurrency', 'paybox', 'paypal', 'stripe', 'google', 'printing', 'scanner', 'socialnetworks', 'website'); // Module we dont want by default
|
||||
$amount = (is_numeric($amount) ? $amount : 0); // Check if amount is numeric, for example, an error occured when amount value = o (letter) instead 0 (number)
|
||||
$controle = $tableau[$report][10];
|
||||
$data = getDecodeValue($mege, $type);
|
||||
@@ -1643,8 +1530,6 @@
|
||||
$intial = 0;
|
||||
$ldaprecords = $ldap->getRecords('*', $conf->global->LDAP_MEMBER_DN, $conf->global->LDAP_KEY_MEMBERS, $required_fields, 'member'); // Fiter on 'member' filter param
|
||||
$ldaprecords = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, $required_fields, 'user'); // Fiter on 'user' filter param
|
||||
$ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_MEMBER_DN'), getDolGlobalString('LDAP_KEY_MEMBERS'), $required_fields, 'member'); // Fiter on 'member' filter param
|
||||
$ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_USER_DN'), getDolGlobalString('LDAP_KEY_USERS'), $required_fields, 'user'); // Fiter on 'user' filter param
|
||||
$mege = imap_fetchbody($mbox, $jk, $fpos);
|
||||
$mege = imap_fetchbody($mbox, $jk, $fpos, FT_UID);
|
||||
$object->status = $object->fk_statut; // for backwad compatibility
|
||||
@@ -1671,7 +1556,6 @@
|
||||
// Add format informations and link to download example
|
||||
// Affichage de la liste des projets de la semaine
|
||||
// Bit 1: 0 ligne normale - 1 si ligne de remise fixe
|
||||
// Build filter to diplay only concerned lines
|
||||
// By default use tls decied by PHP.
|
||||
// Cas des parametres TAX_MODE_SELL/BUY_SERVICE/PRODUCT
|
||||
// Chargement de la classe
|
||||
@@ -1737,11 +1621,9 @@
|
||||
// We open a list of transaction of a dedicated account and no page was set by defaut
|
||||
// When a dictionnary is commented
|
||||
// add properties and declare them in consturctor
|
||||
// buil format asciidoc for urls in table
|
||||
// but in some situations that is required (update legal informations for example)
|
||||
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
|
||||
// on transfert les données de l'un vers l'autre
|
||||
// rewrite dictionnary if
|
||||
// si le filtrage est parametre pour l'export ou pas
|
||||
// start and end date that change with time andd that may be different that the period of reference for price.
|
||||
// verify informations entred
|
||||
@@ -1792,7 +1674,6 @@
|
||||
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
|
||||
print '<select name="mouvement" id="mouvement" class="minwidth100 valignmiddle">';
|
||||
print '<tr><td colspan="2"><br>*** Force modules not found physicaly to be disabled (only modules adding js, css or hooks can be detected as removed physicaly)</td></tr>';
|
||||
print 'Failed to open '.$outputfile.' for ouput.'."\n";
|
||||
print 'Missing paramater s, c or a';
|
||||
print 'Sorry, it seems your internet connexion is off.<br>';
|
||||
print ajax_combobox("mouvement");
|
||||
@@ -1806,7 +1687,6 @@
|
||||
public $date_delivery; // Date delivery planed
|
||||
public $debug_api; // usefull if no dialog
|
||||
public $emetteur; // Objet societe qui emet
|
||||
public $fk_origin_stock; // rowid in llx_product_batch table (not usefull)
|
||||
public $graph; // Objet Graph (Artichow, Phplot...)
|
||||
public $infofiles; // Used to return informations by function getDocumentsLink
|
||||
public $lastsearch_values; // To store last saved search criterias for user
|
||||
@@ -1998,7 +1878,6 @@
|
||||
* \brief Onglet informations personnelles d'un contact
|
||||
* \brief Page fiche LDAP groupe
|
||||
* \brief Tab to manage contacts/adresses of proposal
|
||||
* @return boolean True if informations are valid, false otherwise
|
||||
* @return boolean True if informations are valid, false otherwise
|
||||
* @return string Formated string
|
||||
* @return string Return list fo image format
|
||||
@@ -2051,10 +1930,8 @@
|
||||
* @return string String with formated amounts ('19,6' or '19,6%' or '8.5% (NPR)' or '8.5% *' or '19,6 (CODEX)')
|
||||
* @return array|int Array with details of VATs (per rate), -1 if no accountancy module, -2 if not yet developped, -3 if error
|
||||
* @return array|int Array with details of VATs (per third parties), -1 if no accountancy module, -2 if not yet developped, -3 if error
|
||||
* Classe mere des modeles de numerotation des references de bon de livraison
|
||||
* Classe mere des modeles de numerotation des references de members
|
||||
* Classe mere des modeles de numerotation des references de projets
|
||||
* Classe mere des modeles de numerotation des tickets de caisse
|
||||
* Classe permettant la gestion des stats des expensereports et notes de frais
|
||||
* Delete files into database index using search criterias.
|
||||
* Get formated error messages to output (Used to show messages on html output).
|
||||
@@ -2119,7 +1996,6 @@
|
||||
* @param string $objectname name of object whant to remove
|
||||
* @retun boolean
|
||||
* @return array returns an associtive array containing the response from the server.
|
||||
* @return string Formated string
|
||||
* @return string A HTML table that conatins a list with open (unpaid) supplier invoices
|
||||
* @return string Formated value
|
||||
* @return array Array of mesures
|
||||
@@ -2142,7 +2018,6 @@
|
||||
* Correspondance des livraisons et des commandes clients dans la table llx_co_liv
|
||||
* Creation objet $langs (must be before all other code)
|
||||
* For action=add, use: $var = GETPOST('var'); // No GETPOSTISSET, so GETPOST always called and default value is retreived if not a form POST, and value of form is retreived if it is a form POST.
|
||||
* Generate Urls and add them to documentaion module
|
||||
* It is usefull to search for a particular key and displaying arrays.
|
||||
* Lattest modified orders
|
||||
* Les catégories filles, sous tableau dez la catégorie
|
||||
@@ -2197,17 +2072,14 @@
|
||||
$FULLTAG = GETPOST("fulltag", 'alpha'); // fulltag is tag with more informations
|
||||
$array = array(1=>'Value 1', 2=>'Value 2', 3=>'Value 3 ith a very long text. aze eazeae e ae aeae a e a ea ea ea e a e aea e ae aeaeaeaze.');
|
||||
$conf = new stdClass(); // instantiate $conf explicitely
|
||||
$html .= ' monthes people</b><br>';
|
||||
$permissiontoadd = $user->rights->stock->mouvement->creer;
|
||||
$permissiontodelete = $user->rights->stock->mouvement->creer; // There is no deletion permission for stock movement as we shoul dnever delete
|
||||
$permissiontodelete = $user->rights->stock->mouvement->creer; // There is no deletion permission for stock movement as we should never delete
|
||||
$permissiontoread = $user->rights->stock->mouvement->lire;
|
||||
$seledted = !getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY') ? array() : explode(',', getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY'));
|
||||
$seledted = empty($conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY) ? array() : explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY);
|
||||
$sql = "SELECT id_users, nom as name, id_sondage, reponses";
|
||||
$sql = 'SELECT nom as name, reponses';
|
||||
$tag = GETPOST('tag'); // To retreive the emailing, and recipient
|
||||
$tmpday = -date("w", dol_mktime(12, 0, 0, $month, 1, $year, 'gmt')) + 2; // date('w') is 0 fo sunday
|
||||
$usercancreate = $user->rights->stock->mouvement->creer;
|
||||
$usercancreate = (($user->rights->stock->mouvement->creer));
|
||||
$usercandelete = $user->rights->stock->mouvement->creer;
|
||||
@@ -2266,7 +2138,6 @@ $usercanread = (($user->rights->stock->mouvement->lire));
|
||||
/* Affichage de la liste des projets du mois */
|
||||
/* Badge style is based on boostrap framework */
|
||||
/* Force values on one colum for small screen */
|
||||
/* The buttonplus isgrowing on hover (dont know why). This is to avoid to have the cellegrowing too */
|
||||
/* To make a div popup, we must use a position aboluste inside a position relative */
|
||||
/* USING IMAGES FOR WEATHER INTEAD OF FONT AWESOME */
|
||||
/* Warning: setting this may make screen not beeing refreshed after a combo selection */
|
||||
@@ -2335,7 +2206,6 @@ $usercanread = (($user->rights->stock->mouvement->lire));
|
||||
// TODO ajouter regle pour restreindre acces paiement
|
||||
// Table to store complete informations (will replace all other table). Key is table name.
|
||||
// Test to check image can be publically viewed is done inside the viewimage.php wrapper.
|
||||
// The session_set_save_handler() at end of this fille will replace default session management.
|
||||
// This 2 lines are usefull only if we want to exclude some Urls from the explorer
|
||||
// This refresh list of dirs, not list of files (for preformance reason). List of files is refresh only if dir was not synchronized.
|
||||
// To disable a constant whithout javascript
|
||||
@@ -2344,11 +2214,9 @@ $usercanread = (($user->rights->stock->mouvement->lire));
|
||||
// We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable.
|
||||
// We must filter on assignement table
|
||||
// badge color ajustement for color blind
|
||||
// chek if salary pl
|
||||
// current rule: uptodate = the end date is in future or no subcription required
|
||||
// librarie core
|
||||
// librarie jobs
|
||||
// reverse mouvement of stock
|
||||
// status color ajustement for color blind
|
||||
//Activate Set adress in list
|
||||
//Another call for easy debugg
|
||||
@@ -2495,7 +2363,6 @@ NEW: Add SQL contraint on product_stock table to allow only exsting product and
|
||||
NEW: Add email in event history, for reminder email of expired subsription
|
||||
NEW: Add exemple of setup for multitail to render dolibarr log files
|
||||
NEW: Add hidden option MAIN_EMAIL_SUPPORT_ACK to restore Email ack checkbox (feature abandonned by mailers)
|
||||
NEW: Add more company informations (ProfId7 to 10) (#25266)
|
||||
NEW: Add option to disable globaly some notifications emails.
|
||||
NEW: Add option to display thirdparty adress in combolist
|
||||
NEW: Add ressource extrafields.
|
||||
@@ -2527,20 +2394,15 @@ NEW: Implement option SUPPLIER_ORDER_USE_DISPATCH_STATUS to add a status into ea
|
||||
NEW: Introduce position of records into dictionnary of type of contacts
|
||||
NEW: Introduce use of cache for thumbs images of users to save bandwith.
|
||||
NEW: Look and feel v11: Some setup pages are by default direclty in edit mode.
|
||||
NEW: Menu editor is reponsive
|
||||
NEW: Merge all boxes "related objects" into one. This save a lot of room on most card and avoid often horizontal scoll.
|
||||
NEW: ModuleBuilder - More feature that can be modifed after module generation
|
||||
NEW: ModuleBuilder: for edit name of dictionnary and delete it in MB
|
||||
NEW: On page to see/edit contact of an ojbect, the status of contact is visible (for both external and internal users).
|
||||
NEW: Page to check if the operations/items created between two dates have attached item(s) and possibility to download all attachements
|
||||
NEW: Payment: Can edit account on miscellaneous payment (if not transfered)
|
||||
NEW: Product stock and subproduct stock are independant
|
||||
NEW: Products: Add SQL contraint on product_stock table to allow only existing product and warehouse #23543
|
||||
NEW: Remove tooltip tipTip library replaced with standatd jquery tooltip
|
||||
NEW: Start to introduce search filters on dictionnaries for vat list.
|
||||
NEW: Support of deployement of metapackages
|
||||
NEW: When a new field to show into lists is selected, the form is automatically submited and field added.
|
||||
NEW: When an user unset the batch management of products, transformation of each batch stock mouvement in global stock mouvement
|
||||
NEW: X-Axis on graph are shown verticaly when there is a lot of values.
|
||||
NEW: add API shipment mode dictionnary
|
||||
NEW: add a prospect status for the contact with managment of custom icon
|
||||
@@ -2568,13 +2430,11 @@ Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test
|
||||
Store, search and retreive any article to keep your knowledge into a database. It can be used to manage a list of FAQ, or a database
|
||||
The keyword can be ommitted if your commit does not fit in any of the following categories:
|
||||
The output patch file can then be submited on Dolibarr
|
||||
The output patch file can then be submited on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch.
|
||||
This directory contains ruleset files to use to develop Dolibarr EPR & CRM.
|
||||
This directory contains several subdirectories with entries for informations on Dolibarr.<br>
|
||||
This docker image intended for developpement usage.
|
||||
This docker image is intended for developpement usage.
|
||||
This module provides a sheduled job that scan regularly one or several IMAP email boxes, with filtering rules, to automatically record data in your application, like
|
||||
Une ligne represente un element : data[$x]
|
||||
Upgrading to any other version or database system is abolutely required BEFORE trying to
|
||||
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
|
||||
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform.
|
||||
@@ -2587,7 +2447,6 @@ elseif ($year && $month && $day) $daytoparsegmt = dol_mktime(0, 0, 0, $month, $d
|
||||
function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localtax2_tx, $fk_pa, $paht)
|
||||
function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals = array(), $actioncode = '', $usergroupid = '', $excludetype = '', $resourceid = 0)
|
||||
if (!$user->hasRight('stock', 'mouvement', 'lire')) {
|
||||
if (!empty($conf->variants->eabled) && !getDolGlobalString('VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT')) { // Add test to exclude products that has variants
|
||||
if (!empty($conf->variants->eabled) && empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) { // Add test to exclude products that has variants
|
||||
if (!empty($contactname)) { // acces a partir du module de recherche
|
||||
if ($action == "transfert") {
|
||||
@@ -2603,4 +2462,3 @@ print '<div class="div-table-responsive-no-min">'; // You can use div-table-resp
|
||||
print_barre_liste($langs->trans("Sessions"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, ($num ? $num : ''), 'setup'); // Do not show numer (0) if no session found (it means we can't know)
|
||||
print_liste_field_titre("Prority", $_SERVER["PHP_SELF"], "t.priority", "", $param, '', $sortfield, $sortorder);
|
||||
session_start(); // To be able to keep info into session (used for not losing pass during navigation. pass must not transit through parmaeters)
|
||||
} // this are value submited after submit of action 'submitdateselect'
|
||||
|
||||
@@ -37,14 +37,14 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
exit();
|
||||
}
|
||||
|
||||
error_reporting(E_ALL & ~E_DEPRECATED);
|
||||
error_reporting(E_ALL & ~ E_DEPRECATED);
|
||||
define('PRODUCT', "pg2mysql");
|
||||
define('VERSION', "2.0");
|
||||
|
||||
// this is the default, it can be overridden here, or specified as the third parameter on the command line
|
||||
$config['engine'] = "InnoDB";
|
||||
|
||||
if (!($argv[1] && $argv[2])) {
|
||||
if (! ($argv[1] && $argv[2])) {
|
||||
echo "Usage: php pg2mysql_cli.php <inputfilename> <outputfilename> [engine]\n";
|
||||
exit();
|
||||
} else {
|
||||
@@ -141,7 +141,7 @@ function pg2mysql_large($infilename, $outfilename)
|
||||
echo "Filesize: " . formatsize($fs) . "\n";
|
||||
|
||||
while ($instr = fgets($infp)) {
|
||||
$linenum++;
|
||||
$linenum ++;
|
||||
$memusage = round(memory_get_usage(true) / 1024 / 1024);
|
||||
$len = strlen($instr);
|
||||
$pgsqlchunk[] = $instr;
|
||||
@@ -163,7 +163,7 @@ function pg2mysql_large($infilename, $outfilename)
|
||||
}
|
||||
|
||||
if (strlen($instr) > 3 && ($instr[$len - 3] == ")" && $instr[$len - 2] == ";" && $instr[$len - 1] == "\n") && $inquotes == false) {
|
||||
$chunkcount++;
|
||||
$chunkcount ++;
|
||||
|
||||
if ($linenum % 10000 == 0) {
|
||||
$currentpos = ftell($infp);
|
||||
@@ -246,7 +246,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
if (is_array($input)) {
|
||||
$lines = $input;
|
||||
} else {
|
||||
$lines = explode("\n", $input);
|
||||
$lines = split("\n", $input);
|
||||
}
|
||||
|
||||
if ($header) {
|
||||
@@ -302,7 +302,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
$output .= 'DROP TABLE IF EXISTS `' . $reg2[1] . '`;' . "\n";
|
||||
}
|
||||
$output .= $line;
|
||||
$linenumber++;
|
||||
$linenumber ++;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
$output .= $tbl_extra;
|
||||
$output .= $line;
|
||||
|
||||
$linenumber++;
|
||||
$linenumber ++;
|
||||
$tbl_extra = "";
|
||||
continue;
|
||||
}
|
||||
@@ -395,10 +395,10 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
if (strstr($line, " CONSTRAINT ")) {
|
||||
$line = "";
|
||||
// and if the previous output ended with a , remove the ,
|
||||
$lastchr = substr($output, -2, 1);
|
||||
$lastchr = substr($output, - 2, 1);
|
||||
// echo "lastchr=$lastchr";
|
||||
if ($lastchr == ",") {
|
||||
$output = substr($output, 0, -2) . "\n";
|
||||
$output = substr($output, 0, - 2) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,9 +408,9 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
if (substr($line, 0, 11) == "INSERT INTO") {
|
||||
$line = str_replace('public.', '', $line);
|
||||
|
||||
if (substr($line, -3, -1) == ");") {
|
||||
if (substr($line, - 3, - 1) == ");") {
|
||||
// we have a complete insert on one line
|
||||
list($before, $after) = explode(" VALUES ", $line, 2);
|
||||
list ($before, $after) = explode(" VALUES ", $line, 2);
|
||||
// we only replace the " with ` in what comes BEFORE the VALUES
|
||||
// (ie, field names, like INSERT INTO table ("bla","bla2") VALUES ('s:4:"test"','bladata2');
|
||||
// should convert to INSERT INTO table (`bla`,`bla2`) VALUES ('s:4:"test"','bladata2');
|
||||
@@ -424,13 +424,13 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
$after = str_replace(", E'", ", '", $after);
|
||||
|
||||
$output .= $before . " VALUES " . $after;
|
||||
$linenumber++;
|
||||
$linenumber ++;
|
||||
continue;
|
||||
} else {
|
||||
// this insert spans multiple lines, so keep dumping the lines until we reach a line
|
||||
// that ends with ");"
|
||||
|
||||
list($before, $after) = explode(" VALUES ", $line, 2);
|
||||
list ($before, $after) = explode(" VALUES ", $line, 2);
|
||||
// we only replace the " with ` in what comes BEFORE the VALUES
|
||||
// (ie, field names, like INSERT INTO table ("bla","bla2") VALUES ('s:4:"test"','bladata2');
|
||||
// should convert to INSERT INTO table (`bla`,`bla2`) VALUES ('s:4:"test"','bladata2');
|
||||
@@ -453,7 +453,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
|
||||
$output .= $before . " VALUES " . $after;
|
||||
do {
|
||||
$linenumber++;
|
||||
$linenumber ++;
|
||||
|
||||
// in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string')
|
||||
// ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character
|
||||
@@ -477,7 +477,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
}
|
||||
// echo "inquotes=$inquotes\n";
|
||||
}
|
||||
} while (substr($lines[$linenumber], -3, -1) != ");" || $inquotes);
|
||||
} while (substr($lines[$linenumber], - 3, - 1) != ");" || $inquotes);
|
||||
}
|
||||
}
|
||||
if (substr($line, 0, 16) == "ALTER TABLE ONLY") {
|
||||
@@ -486,14 +486,14 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
$line = str_replace("public.", "", $line);
|
||||
$pkey = $line;
|
||||
|
||||
$linenumber++;
|
||||
$linenumber ++;
|
||||
if (!empty($lines[$linenumber])) {
|
||||
$line = $lines[$linenumber];
|
||||
} else {
|
||||
$line = '';
|
||||
}
|
||||
|
||||
if (strstr($line, " PRIMARY KEY ") && substr($line, -3, -1) == ");") {
|
||||
if (strstr($line, " PRIMARY KEY ") && substr($line, - 3, - 1) == ");") {
|
||||
$reg2 = array();
|
||||
if (preg_match('/ALTER TABLE ([^\s]+)/', $pkey, $reg2)) {
|
||||
if (empty($arrayofprimaryalreadyintabledef[$reg2[1]])) {
|
||||
@@ -580,7 +580,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
}
|
||||
}
|
||||
|
||||
$linenumber++;
|
||||
$linenumber ++;
|
||||
}
|
||||
|
||||
return array('output' => $output,'outputatend' => $outputatend);
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
# Syntax
|
||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||
then
|
||||
echo "This script detect or clean files with CR+LF into files with LF only. All source files are included, including files into includes."
|
||||
echo "This script detect or clean files with CR+LF into files with LF only. All source files are included, also files into includes."
|
||||
echo "Usage: fixdosfiles.sh [list|fix]"
|
||||
fi
|
||||
|
||||
# To detec
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF
|
||||
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF
|
||||
# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep -v 'htdocs\/includes' | grep CRLF
|
||||
fi
|
||||
|
||||
# To convert
|
||||
if [ "x$1" = "xfix" ]
|
||||
then
|
||||
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF | awk -F':' '{ print $1 }' `
|
||||
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF | awk -F':' '{ print $1 }' `
|
||||
do
|
||||
echo "Fix file $fic"
|
||||
dos2unix "$fic"
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Count number of different contributors and number of commits for a given year.
|
||||
# Can be used for statistics (for example to generate the inforgraphy of the year)
|
||||
#
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
echo "Usage: $0 YEARSTART [YEAREND]"
|
||||
echo "Usage: $0 YEAR"
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -13,15 +12,10 @@ fi
|
||||
FROM=$1-01-01
|
||||
TO=$1-12-31
|
||||
|
||||
if [ "x$2" != "x" ]; then
|
||||
TO=$2-12-31
|
||||
fi
|
||||
|
||||
echo "--- Number of contributors for the year"
|
||||
echo "git log --since $FROM --before $TO | grep ^Author | awk -F'<' '{ print $1 }' | iconv -f UTF-8 -t ASCII//TRANSLIT | sort -u -f -i -b | wc -l"
|
||||
git log --since $FROM --before $TO | grep '^Author' | awk -F"<" '{ print $1 }' | iconv -f UTF-8 -t ASCII//TRANSLIT | sort -u -f -i -b | wc -l
|
||||
echo "Number of contributors for the year"
|
||||
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
|
||||
git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
|
||||
|
||||
|
||||
echo "--- Number of commit for the year"
|
||||
echo "git log --pretty='format:%cd' --date=format:'%Y' | sort | uniq -c | awk '{ if (\$2 >= '"$1"') { print \"Year: \"\$2\", commits: \"\$1 } }'"
|
||||
git log --pretty='format:%cd' --date=format:'%Y' | sort | uniq -c | awk '{ if ($2 >= '$1') { print "Year: "$2", commits: "$1 } }'
|
||||
echo "Number of commit for the year"
|
||||
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$1}' | grep "Year: $1"
|
||||
|
||||
@@ -3,47 +3,16 @@
|
||||
# Count number of commits per user and per versions (using date for version detection)
|
||||
#
|
||||
|
||||
Releases=("3.9" "4.0" "5.0" "6.0" "7.0" "8.0" "9.0" "10.0" "11.0" "12.0" "13.0" "14.0" "15.0" "16.0" "17.0" "18.0" "develop")
|
||||
let "counter = 0"
|
||||
Releases=("17.0" "18.0" "develop")
|
||||
Dates=("2023-02-01" "2023-08-31" "2050-01-01")
|
||||
let "counter = 1"
|
||||
|
||||
echo "Copy script into /tmp/github_commits_perversion.sh"
|
||||
cp $0 /tmp/github_commits_perversion.sh
|
||||
|
||||
echo "Delete /tmp/git"
|
||||
rm -fr /tmp/git
|
||||
echo "Create and go into /tmp/git"
|
||||
mkdir /tmp/git
|
||||
cd /tmp/git
|
||||
git clone https://github.com/Dolibarr/dolibarr.git
|
||||
|
||||
cd /tmp/git/dolibarr
|
||||
|
||||
firstline=1
|
||||
for i in "${Releases[@]}"
|
||||
do
|
||||
if [ $firstline -eq 1 ]; then
|
||||
firstline=0
|
||||
continue
|
||||
fi
|
||||
|
||||
#echo "=== Version $i (counter $counter):"
|
||||
echo "=== Version $i (counter $counter):"
|
||||
echo "Get common commit ID between origin/${Releases[counter]} and origin/${Releases[counter+1]}"
|
||||
echo "git merge-base origin/${Releases[counter]} origin/${Releases[counter+1]}"
|
||||
commitidcommon=`git merge-base origin/${Releases[counter]} origin/${Releases[counter+1]}`
|
||||
echo "Found commitid=$commitidcommon"
|
||||
|
||||
echo "Checkout into version $i"
|
||||
git checkout $i
|
||||
#git shortlog -s -n --after=YYYY-MM-DD --before=YYYY-MM-DD | tr '[:lower:]' '[:upper:]' > /tmp/github_commits_perversion.txt
|
||||
git shortlog -s -n $commitidcommon.. | tr '[:lower:]' '[:upper:]' > /tmp/github_commits_perversion.txt
|
||||
#cat /tmp/github_commits_perversion.txt
|
||||
echo "Total for version $i:"
|
||||
echo -n "- Nb of commits: "
|
||||
git log $commitidcommon.. --pretty=oneline | tr '[:lower:]' '[:upper:]' > /tmp/github_commits_perversion2.txt
|
||||
cat /tmp/github_commits_perversion2.txt | wc -l
|
||||
echo -n "- Nb of different authors: "
|
||||
awk ' { print $2 } ' < /tmp/github_commits_perversion.txt | sort -u | wc -l
|
||||
echo "=== $counter git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}"
|
||||
git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}
|
||||
echo -n "Total $i: "
|
||||
git log --pretty=oneline --after=${Dates[counter-1]} --before=${Dates[counter]} | wc -l
|
||||
echo "======================="
|
||||
echo
|
||||
let "counter +=1"
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Based of: https://gist.github.com/jaymzcd/342399 and https://github.com/buren/flag-sprite-maker
|
||||
|
||||
# uses imagemagick to stich together all images in a folder and
|
||||
# then writes a css file with the correct offsets along with a
|
||||
# test html page for verification that its all good
|
||||
|
||||
# Usage:
|
||||
# $ ./make_sprite.sh path class_name image_extension
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
name='output'; # output will be placed in a folder named this
|
||||
path="${1:-}" # Path to flag images
|
||||
classname=${2:-flag}"-sprite"
|
||||
ext="."${3:-png}; # the extension to iterate over for input files
|
||||
|
||||
css="$name/$classname.css";
|
||||
html="$name/test.html";
|
||||
|
||||
rm -fr $name;
|
||||
mkdir $name;
|
||||
touch $css $html;
|
||||
|
||||
echo "Generating sprite file...";
|
||||
convert $path*$ext -append $name/$classname$ext;
|
||||
echo "Sprite complete! - Creating css & test output...";
|
||||
|
||||
echo -e "<html>\n<head>\n\t<link rel=\"stylesheet\" href=\"`basename $css`\" />\n</head>\n<body>\n\t<h1>Sprite test page</h1>\n" >> $html
|
||||
|
||||
echo -e ".$classname {\n\tbackground:url('$classname$ext') no-repeat top left; display:inline-block;\n}" >> $css;
|
||||
counter=0;
|
||||
offset=0;
|
||||
for file in $path*$ext
|
||||
do
|
||||
width=`identify -format "%[fx:w]" "$file"`;
|
||||
height=`identify -format "%[fx:h]" "$file"`;
|
||||
idname=`basename "$file" $ext`;
|
||||
clean=${idname// /-}
|
||||
echo -e ".$classname.$clean {" >> $css;
|
||||
echo -e "\tbackground-position:0 -${offset}px;" >> $css;
|
||||
echo -e "\twidth: ${width}px;" >> $css;
|
||||
echo -e "\theight: ${height}px;\n}" >> $css;
|
||||
|
||||
echo -e "<div style=\"display:inline-block;width:100px;\"><div style=\"overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;\">$clean</div> <a href=\"#\" class=\"$classname $clean\"></a></div>\n" >> $html;
|
||||
|
||||
let offset+=$height;
|
||||
let counter+=1;
|
||||
echo -e "\t#$counter done";
|
||||
done
|
||||
|
||||
echo -e "<h2>Full sprite:</h2>\n<img src=\"$classname$ext\" />" >> $html;
|
||||
echo -e "</body>\n</html>" >> $html;
|
||||
|
||||
echo -e "\nComplete! - $counter sprites created, css written & test page output.";
|
||||
3
dev/tools/php-cs-fixer/.gitignore
vendored
3
dev/tools/php-cs-fixer/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
/vendor/
|
||||
/composer.json
|
||||
/composer.lock
|
||||
@@ -1,80 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Usage:
|
||||
# Optionally set COMPOSER_CMD to the command to use to run composer.
|
||||
# Optionally set COMPOSER_VENDOR_DIR to your vendor path for composer.
|
||||
#
|
||||
# Run php-cs-fixer by calling this script:
|
||||
# ./run-php-cs-fixer.sh check # Only checks (not available with PHP 7.0)
|
||||
# ./run-php-cs-fixer.sh fix # Fixes
|
||||
#
|
||||
# You can fix only a few files using
|
||||
# ./run-php-cs-fixer.sh fix htdocs/path/to/myfile.php
|
||||
#
|
||||
# You can run this from the root directory of dolibarr
|
||||
# dev/tools/run-php-cs-fixer.sh fix htdocs/path/to/myfile.php
|
||||
#
|
||||
# You can provide the environment variables on the CLI like this:
|
||||
# COMPOSER_CMD="php ~/composer.phar" COMPOSER_VENDOR_DIR="~/vendor" ./run-php-cs-fixer.sh
|
||||
#
|
||||
# or export them:
|
||||
# export COMPOSER_CMD="~/composer.phar"
|
||||
# export COMPOSER_VENDOR_DIR="~/vendor"
|
||||
# ./run-php-cs-fixer.sh
|
||||
#
|
||||
# Or some other method
|
||||
#
|
||||
|
||||
|
||||
MYDIR=$(dirname "$(realpath "$0")")
|
||||
export COMPOSER_VENDOR_DIR=${COMPOSER_VENDOR_DIR:=$MYDIR/vendor}
|
||||
COMPOSER_CMD=${COMPOSER_CMD:composer}
|
||||
MINPHPVERSION="7.0"
|
||||
|
||||
|
||||
echo "***** run-php-cs-fixer.sh *****"
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
echo "Syntax: run-php-cs-fixer.sh check|fix [path_from_root_project]"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Check composer is available
|
||||
#
|
||||
if [ ! -r "${COMPOSER_CMD}" ] ; then
|
||||
echo composer is not available or not in path. You can give the path of composer by setting COMPOSER_CMD=/pathto/composer
|
||||
echo Example: export COMPOSER_CMD="~/composer.phar"
|
||||
echo Example: export COMPOSER_CMD="/usr/local/bin/composer"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Install/update php-cs-fixer
|
||||
#
|
||||
echo Install php-cs-fixer
|
||||
PHP_CS_FIXER="${COMPOSER_VENDOR_DIR}/bin/php-cs-fixer"
|
||||
if [ ! -r "${PHP_CS_FIXER}" ] ; then
|
||||
[[ ! -e "${COMPOSER_VENDOR_DIR}" ]] && ${COMPOSER_CMD} install
|
||||
[[ -e "${COMPOSER_VENDOR_DIR}" ]] && ${COMPOSER_CMD} update
|
||||
php${MINPHPVERSION} ${COMPOSER_CMD} require --dev friendsofphp/php-cs-fixer
|
||||
echo
|
||||
fi
|
||||
|
||||
|
||||
# With PHP 7.0, php-cs-fixer is V2 (command check not supported)
|
||||
# With PHP 8.2, php-cs-fixer is V3
|
||||
|
||||
(
|
||||
echo cd "${MYDIR}/../../.."
|
||||
cd "${MYDIR}/../../.." || exit
|
||||
CMD=
|
||||
# If no argument, run check by default
|
||||
[[ "$1" == "" ]] && CMD=check
|
||||
# shellcheck disable=SC2086
|
||||
echo php${MINPHPVERSION} "${PHP_CS_FIXER}" $CMD "$@"
|
||||
php${MINPHPVERSION} "${PHP_CS_FIXER}" $CMD "$@"
|
||||
)
|
||||
2
dev/tools/rector/.gitignore
vendored
2
dev/tools/rector/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
/test.php
|
||||
/vendor
|
||||
@@ -1,28 +0,0 @@
|
||||
### Refactoring code with [rector](https://getrector.com)
|
||||
|
||||
|
||||
#### Installation
|
||||
|
||||
Run in this folder
|
||||
```shell
|
||||
cd dev/tools/rector
|
||||
```
|
||||
|
||||
Install rector with composer
|
||||
```shell
|
||||
composer install
|
||||
```
|
||||
|
||||
|
||||
#### Usage
|
||||
|
||||
##### To make changes (Add --dry-run for test mode only)
|
||||
```shell
|
||||
./vendor/bin/rector process --dry-run
|
||||
```
|
||||
|
||||
##### To make changes on a given directory
|
||||
|
||||
```shell
|
||||
./vendor/bin/rector process [--dry-run] [--clear-cache] ../../../htdocs/core/
|
||||
```
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "dolibarr/rector",
|
||||
"type": "project",
|
||||
"license": "GplV3",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Dev2a",
|
||||
"email": "contact@dev2a.pro"
|
||||
}
|
||||
],
|
||||
"require-dev": {
|
||||
"rector/rector": "^0.18.5"
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Dolibarr\\Rector\\": "./src"
|
||||
}
|
||||
}
|
||||
}
|
||||
137
dev/tools/rector/composer.lock
generated
137
dev/tools/rector/composer.lock
generated
@@ -1,137 +0,0 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f2998987cad52db5ab60d5ff0672ce05",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "1.10.38",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/5302bb402c57f00fb3c2c015bac86e0827e4b691",
|
||||
"reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2|^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpstan/phpstan-shim": "*"
|
||||
},
|
||||
"bin": [
|
||||
"phpstan",
|
||||
"phpstan.phar"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"keywords": [
|
||||
"dev",
|
||||
"static analysis"
|
||||
],
|
||||
"support": {
|
||||
"docs": "https://phpstan.org/user-guide/getting-started",
|
||||
"forum": "https://github.com/phpstan/phpstan/discussions",
|
||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||
"security": "https://github.com/phpstan/phpstan/security/policy",
|
||||
"source": "https://github.com/phpstan/phpstan-src"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/ondrejmirtes",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/phpstan",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-10-06T14:19:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "rector/rector",
|
||||
"version": "0.18.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rectorphp/rector.git",
|
||||
"reference": "2a3b82f317e431fc142d21f3303891a4e64c96eb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/rectorphp/rector/zipball/2a3b82f317e431fc142d21f3303891a4e64c96eb",
|
||||
"reference": "2a3b82f317e431fc142d21f3303891a4e64c96eb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2|^8.0",
|
||||
"phpstan/phpstan": "^1.10.35"
|
||||
},
|
||||
"conflict": {
|
||||
"rector/rector-doctrine": "*",
|
||||
"rector/rector-downgrade-php": "*",
|
||||
"rector/rector-phpunit": "*",
|
||||
"rector/rector-symfony": "*"
|
||||
},
|
||||
"bin": [
|
||||
"bin/rector"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "Instant Upgrade and Automated Refactoring of any PHP code",
|
||||
"keywords": [
|
||||
"automation",
|
||||
"dev",
|
||||
"migration",
|
||||
"refactoring"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/rectorphp/rector/issues",
|
||||
"source": "https://github.com/rectorphp/rector/tree/0.18.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/tomasvotruba",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-10-05T11:25:40+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.2.0"
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Core\ValueObject\PhpVersion;
|
||||
use Rector\Set\ValueObject\LevelSetList;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
$rectorConfig->phpVersion(PhpVersion::PHP_71);
|
||||
//$rectorConfig->indent(' ', 4);
|
||||
|
||||
// Traits seems not supported correctly by rector without declaring them as bootstrapFiles
|
||||
$arrayoftraitfiles = array(
|
||||
__DIR__ . '/../../../htdocs/core/class/commonincoterm.class.php',
|
||||
__DIR__ . '/../../../htdocs/core/class/commonpeople.class.php',
|
||||
__DIR__ . '/../../../htdocs/core/class/commonsocialnetworks.class.php'
|
||||
);
|
||||
$rectorConfig->bootstrapFiles($arrayoftraitfiles);
|
||||
|
||||
$rectorConfig->paths([
|
||||
__DIR__ . '/../../../htdocs/',
|
||||
__DIR__ . '/../../../scripts/',
|
||||
__DIR__ . '/../../../test/phpunit/',
|
||||
]);
|
||||
$rectorConfig->skip([
|
||||
'**/includes/**',
|
||||
'**/custom/**',
|
||||
'**/vendor/**',
|
||||
'**/rector/**', // Disable this line to test the "test.php" file.
|
||||
__DIR__ . '/../../../htdocs/custom/',
|
||||
__DIR__ . '/../../../htdocs/install/doctemplates/*'
|
||||
]);
|
||||
$rectorConfig->parallel(240);
|
||||
|
||||
|
||||
// Register rules
|
||||
|
||||
//$rectorConfig->rule(Rector\Php71\Rector\List_\ListToArrayDestructRector::class);
|
||||
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\CreateFunctionToAnonymousFunctionRector::class);
|
||||
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\GetClassOnNullRector::class);
|
||||
//$rectorConfig->rule(Rector\Php72\Rector\Assign\ListEachRector::class);
|
||||
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\ParseStrWithResultArgumentRector::class);
|
||||
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\StringifyDefineRector::class);
|
||||
|
||||
//$rectorConfig->rule(ReplaceEachAssignmentWithKeyCurrentRector::class);
|
||||
|
||||
$rectorConfig->rule(Rector\CodeQuality\Rector\FuncCall\FloatvalToTypeCastRector::class);
|
||||
$rectorConfig->rule(Rector\CodeQuality\Rector\FuncCall\BoolvalToTypeCastRector::class);
|
||||
$rectorConfig->rule(Rector\CodeQuality\Rector\NotEqual\CommonNotEqualRector::class);
|
||||
//$rectorconfig->rule(Rector\CodeQuality\Rector\If_\CompleteMissingIfElseBracketRector::class);
|
||||
$rectorConfig->rule(Rector\CodeQuality\Rector\For_\ForRepeatedCountToOwnVariableRector::class);
|
||||
|
||||
$rectorConfig->rule(Dolibarr\Rector\Renaming\GlobalToFunction::class);
|
||||
$rectorConfig->rule(Dolibarr\Rector\Renaming\UserRightsToFunction::class);
|
||||
$rectorConfig->rule(Dolibarr\Rector\Renaming\EmptyGlobalToFunction::class);
|
||||
|
||||
// Add all predefined rules to migrate to up to php 71
|
||||
// $rectorConfig->sets([
|
||||
// LevelSetList::UP_TO_PHP_71
|
||||
// ]);
|
||||
};
|
||||
@@ -1,216 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Dolibarr\Rector\Renaming;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr\ArrayDimFetch;
|
||||
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
|
||||
use PhpParser\Node\Expr\BinaryOp\Concat;
|
||||
use PhpParser\Node\Expr\BinaryOp\Equal;
|
||||
use PhpParser\Node\Expr\BooleanNot;
|
||||
use PhpParser\Node\Expr\Empty_;
|
||||
use PhpParser\Node\Expr\FuncCall;
|
||||
use PhpParser\Node\Expr\Isset_;
|
||||
use PhpParser\Node\Expr\PropertyFetch;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
use Rector\Core\NodeManipulator\BinaryOpManipulator;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Php71\ValueObject\TwoNodeMatch;
|
||||
use Symplify\RuleDocGenerator\Exception\PoorDocumentationException;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
use Rector\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector;
|
||||
|
||||
/**
|
||||
* Class with Rector custom rule to fix code
|
||||
*/
|
||||
class EmptyGlobalToFunction extends AbstractRector
|
||||
{
|
||||
/**
|
||||
* @var \Rector\Core\NodeManipulator\BinaryOpManipulator
|
||||
*/
|
||||
private $binaryOpManipulator;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param BinaryOpManipulator $binaryOpManipulator The $binaryOpManipulator
|
||||
*/
|
||||
public function __construct(BinaryOpManipulator $binaryOpManipulator)
|
||||
{
|
||||
$this->binaryOpManipulator = $binaryOpManipulator;
|
||||
}
|
||||
|
||||
/**
|
||||
* getRuleDefinition
|
||||
*
|
||||
* @return RuleDefinition
|
||||
* @throws PoorDocumentationException
|
||||
*/
|
||||
public function getRuleDefinition(): RuleDefinition
|
||||
{
|
||||
return new RuleDefinition(
|
||||
'Change $conf->global to getDolGlobal',
|
||||
[new CodeSample(
|
||||
'$conf->global->CONSTANT',
|
||||
'getDolGlobalInt(\'CONSTANT\')'
|
||||
)]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a node type from https://github.com/rectorphp/php-parser-nodes-docs/
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getNodeTypes(): array
|
||||
{
|
||||
return [Node\Expr\BooleanNot::class, Node\Expr\Empty_::class];
|
||||
}
|
||||
|
||||
/**
|
||||
* refactor
|
||||
*
|
||||
* @param Node $node A node
|
||||
* @return FuncCall|BooleanNot
|
||||
*/
|
||||
public function refactor(Node $node)
|
||||
{
|
||||
if ($node instanceof Node\Expr\BooleanNot) {
|
||||
if (!$node->expr instanceof Node\Expr\Empty_) {
|
||||
return null;
|
||||
}
|
||||
// node is !empty(...) so we set node to ...
|
||||
$newnode = $node->expr->expr;
|
||||
|
||||
$tmpglobal = $newnode->var;
|
||||
if (is_null($tmpglobal)) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->isName($tmpglobal, 'global')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$tmpconf = $tmpglobal->var;
|
||||
if (!$this->isName($tmpconf, 'conf')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$nameforconst = $this->getName($newnode);
|
||||
if (is_null($nameforconst)) {
|
||||
return null;
|
||||
}
|
||||
$constName = new String_($nameforconst);
|
||||
|
||||
// We found a node !empty(conf->global->XXX)
|
||||
return new FuncCall(
|
||||
new Name('getDolGlobalString'),
|
||||
[new Arg($constName)]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ($node instanceof Node\Expr\Empty_) {
|
||||
// node is empty(...) so we set node to ...
|
||||
$newnode = $node->expr;
|
||||
|
||||
$tmpglobal = $newnode->var;
|
||||
if (is_null($tmpglobal)) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->isName($tmpglobal, 'global')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$tmpconf = $tmpglobal->var;
|
||||
if (!$this->isName($tmpconf, 'conf')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$nameforconst = $this->getName($newnode);
|
||||
if (is_null($nameforconst)) {
|
||||
return null;
|
||||
}
|
||||
$constName = new String_($nameforconst);
|
||||
|
||||
return new BooleanNot(new FuncCall(
|
||||
new Name('getDolGlobalString'),
|
||||
[new Arg($constName)]
|
||||
));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nodes with check empty
|
||||
*
|
||||
* @param BooleanAnd $booleanAnd A BooleandAnd
|
||||
* @return TwoNodeMatch|null
|
||||
*/
|
||||
private function resolveTwoNodeMatch(BooleanAnd $booleanAnd): ?TwoNodeMatch
|
||||
{
|
||||
return $this->binaryOpManipulator->matchFirstAndSecondConditionNode(
|
||||
$booleanAnd,
|
||||
// $conf->global == $value
|
||||
function (Node $node): bool {
|
||||
if (!$node instanceof Equal) {
|
||||
return \false;
|
||||
}
|
||||
return $this->isGlobalVar($node->left);
|
||||
},
|
||||
// !empty(...) || isset(...)
|
||||
function (Node $node): bool {
|
||||
if ($node instanceof BooleanNot && $node->expr instanceof Empty_) {
|
||||
return $this->isGlobalVar($node->expr->expr);
|
||||
}
|
||||
if (!$node instanceof Isset_) {
|
||||
return $this->isGlobalVar($node);
|
||||
}
|
||||
return \true;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if node is a global access with format conf->global->XXX
|
||||
*
|
||||
* @param Node $node A node
|
||||
* @return bool Return true if noe is conf->global->XXX
|
||||
*/
|
||||
private function isGlobalVar($node)
|
||||
{
|
||||
if (!$node instanceof PropertyFetch) {
|
||||
return false;
|
||||
}
|
||||
if (!$this->isName($node->var, 'global')) {
|
||||
return false;
|
||||
}
|
||||
$global = $node->var;
|
||||
if (!$global instanceof PropertyFetch) {
|
||||
return false;
|
||||
}
|
||||
if (!$this->isName($global->var, 'conf')) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Node $node Node to be parsed
|
||||
* @return Node|void Return the name of the constant
|
||||
*/
|
||||
private function getConstName($node)
|
||||
{
|
||||
if ($node instanceof PropertyFetch && $node->name instanceof Node\Expr) {
|
||||
return $node->name;
|
||||
}
|
||||
$name = $this->getName($node);
|
||||
if (empty($name)) {
|
||||
return;
|
||||
}
|
||||
return new String_($name);
|
||||
}
|
||||
}
|
||||
@@ -1,391 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Dolibarr\Rector\Renaming;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr\ArrayDimFetch;
|
||||
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
|
||||
use PhpParser\Node\Expr\BinaryOp\Concat;
|
||||
use PhpParser\Node\Expr\BinaryOp\Equal;
|
||||
use PhpParser\Node\Expr\BooleanNot;
|
||||
use PhpParser\Node\Expr\Empty_;
|
||||
use PhpParser\Node\Expr\FuncCall;
|
||||
use PhpParser\Node\Expr\Isset_;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Expr\PropertyFetch;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
use Rector\Core\NodeManipulator\BinaryOpManipulator;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Php71\ValueObject\TwoNodeMatch;
|
||||
use Symplify\RuleDocGenerator\Exception\PoorDocumentationException;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
use PhpParser\Node\Expr\BinaryOp\NotEqual;
|
||||
use PhpParser\Node\Expr\BinaryOp\Greater;
|
||||
use PhpParser\Node\Expr\BinaryOp\GreaterOrEqual;
|
||||
use PhpParser\Node\Expr\BinaryOp\Smaller;
|
||||
use PhpParser\Node\Expr\BinaryOp\SmallerOrEqual;
|
||||
use PhpParser\Node\Expr\BinaryOp\NotIdentical;
|
||||
|
||||
/**
|
||||
* Class with Rector custom rule to fix code
|
||||
*/
|
||||
class GlobalToFunction extends AbstractRector
|
||||
{
|
||||
/**
|
||||
* @var \Rector\Core\NodeManipulator\BinaryOpManipulator
|
||||
*/
|
||||
private $binaryOpManipulator;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param BinaryOpManipulator $binaryOpManipulator The $binaryOpManipulator
|
||||
*/
|
||||
public function __construct(BinaryOpManipulator $binaryOpManipulator)
|
||||
{
|
||||
$this->binaryOpManipulator = $binaryOpManipulator;
|
||||
}
|
||||
|
||||
/**
|
||||
* getRuleDefinition
|
||||
*
|
||||
* @return RuleDefinition
|
||||
* @throws PoorDocumentationException
|
||||
*/
|
||||
public function getRuleDefinition(): RuleDefinition
|
||||
{
|
||||
return new RuleDefinition(
|
||||
'Change $conf->global to getDolGlobal in context (1) conf->global Operator Value or (2) function(conf->global...)',
|
||||
[new CodeSample(
|
||||
'$conf->global->CONSTANT',
|
||||
'getDolGlobalInt(\'CONSTANT\')'
|
||||
)]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a node type from https://github.com/rectorphp/php-parser-nodes-docs/
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getNodeTypes(): array
|
||||
{
|
||||
return [FuncCall::class, MethodCall::class, Equal::class, NotEqual::class, Greater::class, GreaterOrEqual::class, Smaller::class, SmallerOrEqual::class, NotIdentical::class, BooleanAnd::class, Concat::class, ArrayDimFetch::class];
|
||||
}
|
||||
|
||||
/**
|
||||
* refactor
|
||||
*
|
||||
* @param Node $node A node
|
||||
* @return FuncCall|Equal|Concat|ArrayDimFetch|void
|
||||
* return $node unchanged or void to do nothing
|
||||
*/
|
||||
public function refactor(Node $node)
|
||||
{
|
||||
if ($node instanceof Node\Expr\ArrayDimFetch) {
|
||||
if (!isset($node->dim)) {
|
||||
return;
|
||||
}
|
||||
if ($this->isGlobalVar($node->dim)) {
|
||||
$constName = $this->getConstName($node->dim);
|
||||
if (empty($constName)) {
|
||||
return;
|
||||
}
|
||||
$node->dim = new FuncCall(
|
||||
new Name('getDolGlobalString'),
|
||||
[new Arg($constName)]
|
||||
);
|
||||
}
|
||||
return $node;
|
||||
}
|
||||
|
||||
if ($node instanceof FuncCall) {
|
||||
$tmpfunctionname = $this->getName($node);
|
||||
// If function is ok. We must avoid a lot of cases like isset(), empty()
|
||||
if (in_array($tmpfunctionname, array('dol_escape_htmltag', 'dol_hash', 'make_substitutions', 'min', 'max', 'explode'))) {
|
||||
//print "tmpfunctionname=".$tmpfunctionname."\n";
|
||||
$args = $node->getArgs();
|
||||
$nbofparam = count($args);
|
||||
|
||||
if ($nbofparam >= 1) {
|
||||
$tmpargs = $args;
|
||||
foreach ($args as $key => $arg) { // only 1 element in this array
|
||||
//var_dump($key);
|
||||
//var_dump($arg->value);exit;
|
||||
if ($this->isGlobalVar($arg->value)) {
|
||||
$constName = $this->getConstName($arg->value);
|
||||
if (empty($constName)) {
|
||||
return;
|
||||
}
|
||||
$a = new FuncCall(new Name('getDolGlobalString'), [new Arg($constName)]);
|
||||
$tmpargs[$key] = new Arg($a);
|
||||
|
||||
$r = new FuncCall(new Name($tmpfunctionname), $tmpargs);
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $node;
|
||||
}
|
||||
|
||||
if ($node instanceof MethodCall) {
|
||||
$tmpmethodname = $this->getName($node->name);
|
||||
// If function is ok. We must avoid a lot of cases
|
||||
if (in_array($tmpmethodname, array('idate'))) {
|
||||
//print "tmpmethodname=".$tmpmethodname."\n";
|
||||
$expr = $node->var;
|
||||
$args = $node->getArgs();
|
||||
$nbofparam = count($args);
|
||||
|
||||
if ($nbofparam >= 1) {
|
||||
$tmpargs = $args;
|
||||
foreach ($args as $key => $arg) { // only 1 element in this array
|
||||
//var_dump($key);
|
||||
//var_dump($arg->value);exit;
|
||||
if ($this->isGlobalVar($arg->value)) {
|
||||
$constName = $this->getConstName($arg->value);
|
||||
if (empty($constName)) {
|
||||
return;
|
||||
}
|
||||
$a = new FuncCall(new Name('getDolGlobalString'), [new Arg($constName)]);
|
||||
$tmpargs[$key] = new Arg($a);
|
||||
|
||||
$r = new MethodCall($expr, $tmpmethodname, $tmpargs);
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $node;
|
||||
}
|
||||
|
||||
if ($node instanceof Concat) {
|
||||
if ($this->isGlobalVar($node->left)) {
|
||||
$constName = $this->getConstName($node->left);
|
||||
if (empty($constName)) {
|
||||
return;
|
||||
}
|
||||
$leftConcat = new FuncCall(
|
||||
new Name('getDolGlobalString'),
|
||||
[new Arg($constName)]
|
||||
);
|
||||
$rightConcat = $node->right;
|
||||
}
|
||||
if ($this->isGlobalVar($node->right)) {
|
||||
$constName = $this->getConstName($node->right);
|
||||
if (empty($constName)) {
|
||||
return;
|
||||
}
|
||||
$rightConcat = new FuncCall(
|
||||
new Name('getDolGlobalString'),
|
||||
[new Arg($constName)]
|
||||
);
|
||||
$leftConcat = $node->left;
|
||||
}
|
||||
if (!isset($leftConcat, $rightConcat)) {
|
||||
return;
|
||||
}
|
||||
return new Concat($leftConcat, $rightConcat);
|
||||
}
|
||||
|
||||
if ($node instanceof BooleanAnd) {
|
||||
$nodes = $this->resolveTwoNodeMatch($node);
|
||||
if (!isset($nodes)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/** @var Equal $node */
|
||||
$node = $nodes->getFirstExpr();
|
||||
}
|
||||
|
||||
// Now process all comparison like:
|
||||
// $conf->global->... Operator Value
|
||||
|
||||
$typeofcomparison = '';
|
||||
if ($node instanceof Equal) {
|
||||
$typeofcomparison = 'Equal';
|
||||
}
|
||||
if ($node instanceof NotEqual) {
|
||||
$typeofcomparison = 'NotEqual';
|
||||
}
|
||||
if ($node instanceof Greater) {
|
||||
$typeofcomparison = 'Greater';
|
||||
}
|
||||
if ($node instanceof GreaterOrEqual) {
|
||||
$typeofcomparison = 'GreaterOrEqual';
|
||||
}
|
||||
if ($node instanceof Smaller) {
|
||||
$typeofcomparison = 'Smaller';
|
||||
}
|
||||
if ($node instanceof SmallerOrEqual) {
|
||||
$typeofcomparison = 'SmallerOrEqual';
|
||||
}
|
||||
if ($node instanceof NotIdentical) {
|
||||
$typeofcomparison = 'NotIdentical';
|
||||
//var_dump($node->left);
|
||||
}
|
||||
if (empty($typeofcomparison)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$this->isGlobalVar($node->left)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Test the type after the comparison conf->global->xxx to know the name of function
|
||||
$typeright = $node->right->getType();
|
||||
switch ($typeright) {
|
||||
case 'Scalar_LNumber':
|
||||
$funcName = 'getDolGlobalInt';
|
||||
break;
|
||||
case 'Scalar_String':
|
||||
$funcName = 'getDolGlobalString';
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
$constName = $this->getConstName($node->left);
|
||||
if (empty($constName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($typeofcomparison == 'Equal') {
|
||||
return new Equal(
|
||||
new FuncCall(
|
||||
new Name($funcName),
|
||||
[new Arg($constName)]
|
||||
),
|
||||
$node->right
|
||||
);
|
||||
}
|
||||
if ($typeofcomparison == 'NotEqual') {
|
||||
return new NotEqual(
|
||||
new FuncCall(
|
||||
new Name($funcName),
|
||||
[new Arg($constName)]
|
||||
),
|
||||
$node->right
|
||||
);
|
||||
}
|
||||
if ($typeofcomparison == 'Greater') {
|
||||
return new Greater(
|
||||
new FuncCall(
|
||||
new Name($funcName),
|
||||
[new Arg($constName)]
|
||||
),
|
||||
$node->right
|
||||
);
|
||||
}
|
||||
if ($typeofcomparison == 'GreaterOrEqual') {
|
||||
return new GreaterOrEqual(
|
||||
new FuncCall(
|
||||
new Name($funcName),
|
||||
[new Arg($constName)]
|
||||
),
|
||||
$node->right
|
||||
);
|
||||
}
|
||||
if ($typeofcomparison == 'Smaller') {
|
||||
return new Smaller(
|
||||
new FuncCall(
|
||||
new Name($funcName),
|
||||
[new Arg($constName)]
|
||||
),
|
||||
$node->right
|
||||
);
|
||||
}
|
||||
if ($typeofcomparison == 'SmallerOrEqual') {
|
||||
return new SmallerOrEqual(
|
||||
new FuncCall(
|
||||
new Name($funcName),
|
||||
[new Arg($constName)]
|
||||
),
|
||||
$node->right
|
||||
);
|
||||
}
|
||||
if ($typeofcomparison == 'NotIdentical') {
|
||||
return new NotIdentical(
|
||||
new FuncCall(
|
||||
new Name($funcName),
|
||||
[new Arg($constName)]
|
||||
),
|
||||
$node->right
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nodes with check empty
|
||||
*
|
||||
* @param BooleanAnd $booleanAnd A BooleandAnd
|
||||
* @return TwoNodeMatch|null
|
||||
*/
|
||||
private function resolveTwoNodeMatch(BooleanAnd $booleanAnd): ?TwoNodeMatch
|
||||
{
|
||||
return $this->binaryOpManipulator->matchFirstAndSecondConditionNode(
|
||||
$booleanAnd,
|
||||
// Function to check if we are in the case $conf->global->... == $value
|
||||
function (Node $node): bool {
|
||||
if (!$node instanceof Equal) {
|
||||
return \false;
|
||||
}
|
||||
return $this->isGlobalVar($node->left);
|
||||
},
|
||||
// !empty(...) || isset(...)
|
||||
function (Node $node): bool {
|
||||
if ($node instanceof BooleanNot && $node->expr instanceof Empty_) {
|
||||
return $this->isGlobalVar($node->expr->expr);
|
||||
}
|
||||
if (!$node instanceof Isset_) {
|
||||
return $this->isGlobalVar($node);
|
||||
}
|
||||
return \true;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if node is a global access with format conf->global->XXX
|
||||
*
|
||||
* @param Node $node A node
|
||||
* @return bool Return true if node is conf->global->XXX
|
||||
*/
|
||||
private function isGlobalVar($node)
|
||||
{
|
||||
if (!$node instanceof PropertyFetch) {
|
||||
return false;
|
||||
}
|
||||
if (!$this->isName($node->var, 'global')) {
|
||||
return false;
|
||||
}
|
||||
$global = $node->var;
|
||||
if (!$global instanceof PropertyFetch) {
|
||||
return false;
|
||||
}
|
||||
if (!$this->isName($global->var, 'conf')) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Node $node Node to be parsed
|
||||
* @return Node|void Return the name of the constant
|
||||
*/
|
||||
private function getConstName($node)
|
||||
{
|
||||
if ($node instanceof PropertyFetch && $node->name instanceof Node\Expr) {
|
||||
return $node->name;
|
||||
}
|
||||
$name = $this->getName($node);
|
||||
if (empty($name)) {
|
||||
return;
|
||||
}
|
||||
return new String_($name);
|
||||
}
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Dolibarr\Rector\Renaming;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
use PhpParser\NodeTraverser;
|
||||
use Rector\Core\PhpParser\Node\NodeFactory;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
|
||||
/**
|
||||
* Class to refactor User rights
|
||||
*/
|
||||
class UserRightsToFunction extends AbstractRector
|
||||
{
|
||||
/**
|
||||
* @param \Rector\Core\PhpParser\Node\NodeFactory $nodeFactory node factory
|
||||
*/
|
||||
public function __construct(NodeFactory $nodeFactory)
|
||||
{
|
||||
$this->nodeFactory = $nodeFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Symplify\RuleDocGenerator\Exception\PoorDocumentationException
|
||||
* @return RuleDefinition
|
||||
*/
|
||||
public function getRuleDefinition(): RuleDefinition
|
||||
{
|
||||
return new RuleDefinition(
|
||||
'Change \$user->rights->module->permission to \$user->hasRight(\'module\', \'permission\')',
|
||||
[new CodeSample(
|
||||
'$user->rights->module->permission',
|
||||
'$user->hasRight(\'module\', \'permission\')'
|
||||
)]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a node type from https://github.com/rectorphp/php-parser-nodes-docs/
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getNodeTypes(): array
|
||||
{
|
||||
return [
|
||||
Node\Expr\Assign::class,
|
||||
Node\Expr\PropertyFetch::class,
|
||||
Node\Expr\BooleanNot::class,
|
||||
Node\Expr\Empty_::class,
|
||||
Node\Expr\Isset_::class,
|
||||
Node\Stmt\ClassMethod::class
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \PhpParser\Node $node node to be changed
|
||||
* @return \PhpParser\Node|\PhpParser\Node[]|\PhpParser\Node\Expr\MethodCall|void|null| int
|
||||
*/
|
||||
public function refactor(Node $node)
|
||||
{
|
||||
if ($node instanceof Node\Stmt\ClassMethod) {
|
||||
$excludeMethods = ['getrights', 'hasRight'];
|
||||
/** @var \PHPStan\Analyser\MutatingScope $scope */
|
||||
$scope = $node->getAttribute('scope');
|
||||
$class = $scope->getClassReflection();
|
||||
$classes = ['UserGroup', 'User'];
|
||||
if (isset($class) && in_array($class->getName(), $classes)) {
|
||||
if (in_array($this->getName($node), $excludeMethods)) {
|
||||
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($node instanceof Node\Expr\Assign) {
|
||||
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
|
||||
}
|
||||
$isInverse = false;
|
||||
if ($node instanceof Node\Expr\BooleanNot) {
|
||||
if (!$node->expr instanceof Node\Expr\Empty_) {
|
||||
return null;
|
||||
}
|
||||
$node = $node->expr->expr;
|
||||
}
|
||||
if ($node instanceof Node\Expr\Empty_) {
|
||||
$node = $node->expr;
|
||||
$isInverse = true;
|
||||
}
|
||||
if ($node instanceof Node\Expr\Isset_) {
|
||||
// Take first arg for isset (No code found with multiple isset).
|
||||
$node = $node->vars[0];
|
||||
}
|
||||
if (!$node instanceof Node\Expr\PropertyFetch) {
|
||||
return;
|
||||
}
|
||||
$data = $this->getRights($node);
|
||||
if (!isset($data)) {
|
||||
return;
|
||||
}
|
||||
$args = [new Arg($data['module']), new Arg($data['perm1'])];
|
||||
if (!empty($data['perm2'])) {
|
||||
$args[] = new Arg($data['perm2']);
|
||||
}
|
||||
$method = $this->nodeFactory->createMethodCall($data['user'], 'hasRight', $args);
|
||||
if ($isInverse) {
|
||||
return new Node\Expr\BooleanNot($method);
|
||||
}
|
||||
return $method;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \PhpParser\Node\Expr\PropertyFetch $node node
|
||||
* @return array|null
|
||||
*/
|
||||
private function getRights(Node\Expr\PropertyFetch $node)
|
||||
{
|
||||
$perm2 = '';
|
||||
if (!$node->var instanceof Node\Expr\PropertyFetch) {
|
||||
return null;
|
||||
}
|
||||
// Add a test to avoid rector error on html.formsetup.class.php
|
||||
if (!$node->name instanceof Node\Expr\Variable && is_null($this->getName($node))) {
|
||||
//var_dump($node);
|
||||
return null;
|
||||
//exit;
|
||||
}
|
||||
$perm1 = $node->name instanceof Node\Expr\Variable ? $node->name : new String_($this->getName($node));
|
||||
$moduleNode = $node->var;
|
||||
if (!$moduleNode instanceof Node\Expr\PropertyFetch) {
|
||||
return null;
|
||||
}
|
||||
if (!$moduleNode->var instanceof Node\Expr\PropertyFetch) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->isName($moduleNode->var, 'rights')) {
|
||||
$perm2 = $perm1;
|
||||
$perm1 = $moduleNode->name instanceof Node\Expr\Variable ? $moduleNode->name : new String_($this->getName($moduleNode));
|
||||
$moduleNode = $moduleNode->var;
|
||||
}
|
||||
$module = $moduleNode->name instanceof Node\Expr\Variable ? $moduleNode->name : new String_($this->getName($moduleNode));
|
||||
$rights = $moduleNode->var;
|
||||
if (!$this->isName($rights, 'rights') || !isset($perm1) || !isset($module)) {
|
||||
return null;
|
||||
}
|
||||
if (!$rights->var instanceof Node\Expr\Variable) {
|
||||
return null;
|
||||
}
|
||||
$user = $rights->var;
|
||||
return compact('user', 'module', 'perm1', 'perm2');
|
||||
}
|
||||
}
|
||||
146
dev/tools/spider.php
Normal file
146
dev/tools/spider.php
Normal file
@@ -0,0 +1,146 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/tools/spider.php
|
||||
* \brief Script to spider Dolibarr app.
|
||||
*
|
||||
* To use it:
|
||||
* - Disable module "bookmark"
|
||||
* - Exclude param optioncss, token, sortfield, sortorder
|
||||
*/
|
||||
|
||||
$crawledLinks=array();
|
||||
const MAX_DEPTH=2;
|
||||
|
||||
|
||||
/**
|
||||
* @param string $url URL
|
||||
* @param string $depth Depth
|
||||
* @return string String
|
||||
*/
|
||||
function followLink($url, $depth = 0)
|
||||
{
|
||||
global $crawledLinks;
|
||||
$crawling=array();
|
||||
if ($depth>MAX_DEPTH) {
|
||||
echo "<div style='color:red;'>The Crawler is giving up!</div>";
|
||||
return;
|
||||
}
|
||||
$options=array(
|
||||
'http'=>array(
|
||||
'method'=>"GET",
|
||||
'user-agent'=>"gfgBot/0.1\n"
|
||||
)
|
||||
);
|
||||
$context=stream_context_create($options);
|
||||
$doc=new DomDocument();
|
||||
@$doc->loadHTML(file_get_contents($url, false, $context));
|
||||
$links=$doc->getElementsByTagName('a');
|
||||
$pageTitle=getDocTitle($doc, $url);
|
||||
$metaData=getDocMetaData($doc);
|
||||
foreach ($links as $i) {
|
||||
$link=$i->getAttribute('href');
|
||||
if (ignoreLink($link)) continue;
|
||||
$link=convertLink($url, $link);
|
||||
if (!in_array($link, $crawledLinks)) {
|
||||
$crawledLinks[]=$link;
|
||||
$crawling[]=$link;
|
||||
insertIntoDatabase($link, $pageTitle, $metaData, $depth);
|
||||
}
|
||||
}
|
||||
foreach ($crawling as $crawlURL)
|
||||
followLink($crawlURL, $depth+1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $site Site
|
||||
* @param string $path Path
|
||||
* @return string String
|
||||
*/
|
||||
function convertLink($site, $path)
|
||||
{
|
||||
if (substr_compare($path, "//", 0, 2)==0)
|
||||
return parse_url($site)['scheme'].$path;
|
||||
elseif (substr_compare($path, "http://", 0, 7)==0
|
||||
or substr_compare($path, "https://", 0, 8)==0
|
||||
or substr_compare($path, "www.", 0, 4)==0
|
||||
)
|
||||
return $path;
|
||||
else return $site.'/'.$path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $url URL
|
||||
* @return boolean
|
||||
*/
|
||||
function ignoreLink($url)
|
||||
{
|
||||
return $url[0]=="#" or substr($url, 0, 11) == "javascript:";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $link URL
|
||||
* @param string $title Title
|
||||
* @param string $metaData Array
|
||||
* @param int $depth Depth
|
||||
* @return void
|
||||
*/
|
||||
function insertIntoDatabase($link, $title, &$metaData, $depth)
|
||||
{
|
||||
//global $crawledLinks;
|
||||
|
||||
echo "Inserting new record {URL= ".$link.", Title = '$title', Description = '".$metaData['description']."', Keywords = ' ".$metaData['keywords']."'}<br/><br/><br/>";
|
||||
|
||||
//²$crawledLinks[]=$link;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $doc Doc
|
||||
* @param string $url URL
|
||||
* @return string URL/Title
|
||||
*/
|
||||
function getDocTitle(&$doc, $url)
|
||||
{
|
||||
$titleNodes=$doc->getElementsByTagName('title');
|
||||
if (count($titleNodes)==0 or !isset($titleNodes[0]->nodeValue))
|
||||
return $url;
|
||||
$title=str_replace('', '\n', $titleNodes[0]->nodeValue);
|
||||
return (strlen($title)<1)?$url:$title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $doc Doc
|
||||
* @return array Array
|
||||
*/
|
||||
function getDocMetaData(&$doc)
|
||||
{
|
||||
$metaData=array();
|
||||
$metaNodes=$doc->getElementsByTagName('meta');
|
||||
foreach ($metaNodes as $node)
|
||||
$metaData[$node->getAttribute("name")] = $node->getAttribute("content");
|
||||
if (!isset($metaData['description']))
|
||||
$metaData['description']='No Description Available';
|
||||
if (!isset($metaData['keywords'])) $metaData['keywords']='';
|
||||
return array(
|
||||
'keywords'=>str_replace('', '\n', $metaData['keywords']),
|
||||
'description'=>str_replace('', '\n', $metaData['description'])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
followLink("http://localhost/dolibarr_dev/htdocs");
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
//============================================================+
|
||||
// File name : example_016.php
|
||||
// Begin : 2008-03-04
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This source file must be UTF-8 encoded
|
||||
/*
|
||||
$filename='filewithé';
|
||||
|
||||
@@ -74,6 +74,7 @@ class autoTranslator
|
||||
*/
|
||||
private function parseRefLangTranslationFiles()
|
||||
{
|
||||
|
||||
$files = $this->getTranslationFilesArray($this->_refLang);
|
||||
$counter = 1;
|
||||
foreach ($files as $file) {
|
||||
@@ -240,7 +241,7 @@ class autoTranslator
|
||||
if ($this->_outputpagecode == 'UTF-8') {
|
||||
$val=$this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2));
|
||||
} else {
|
||||
$val=mb_convert_encoding($this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2)), 'ISO-8859-1');
|
||||
$val=utf8_decode($this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +276,7 @@ class autoTranslator
|
||||
private function getLineValue($line)
|
||||
{
|
||||
$arraykey = explode('=', $line, 2);
|
||||
return trim(isset($arraykey[1]) ? $arraykey[1] : '');
|
||||
return trim(isset($arraykey[1])?$arraykey[1]:'');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -333,8 +334,8 @@ class autoTranslator
|
||||
//print "Url to translate: ".$url."\n";
|
||||
|
||||
if (! function_exists("curl_init")) {
|
||||
print "Error, your PHP does not support curl functions.\n";
|
||||
die();
|
||||
print "Error, your PHP does not support curl functions.\n";
|
||||
die();
|
||||
}
|
||||
|
||||
$ch = curl_init();
|
||||
|
||||
@@ -210,8 +210,7 @@ foreach ($dups as $string => $pages) {
|
||||
$inadmin=0;
|
||||
foreach ($pages as $file => $lines) {
|
||||
if ($file == 'main.lang') {
|
||||
$inmain=1;
|
||||
$inadmin=0;
|
||||
$inmain=1; $inadmin=0;
|
||||
}
|
||||
if ($file == 'admin.lang' && ! $inmain) {
|
||||
$inadmin=1;
|
||||
@@ -569,16 +568,16 @@ if ((!empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($ar
|
||||
if (empty($unused)) {
|
||||
print "No string not used found.\n";
|
||||
} else {
|
||||
$filetosave='/tmp/'.($argv[2] ? $argv[2] : "").'notused.lang';
|
||||
$filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang';
|
||||
print "Strings in en_US that are never used are saved into file ".$filetosave.":\n";
|
||||
file_put_contents($filetosave, implode("", $unused));
|
||||
print "To remove from original file, run command :\n";
|
||||
if (($argv[2] ? $argv[2] : "")) {
|
||||
print 'cd htdocs/langs/en_US; mv '.($argv[2] ? $argv[2] : "")." ".($argv[2] ? $argv[2] : "").".tmp; ";
|
||||
if (($argv[2]?$argv[2]:"")) {
|
||||
print 'cd htdocs/langs/en_US; mv '.($argv[2]?$argv[2]:"")." ".($argv[2]?$argv[2]:"").".tmp; ";
|
||||
}
|
||||
print "diff ".($argv[2] ? $argv[2] : "").".tmp ".$filetosave." | grep \< | cut -b 3- > ".($argv[2] ? $argv[2] : "");
|
||||
if (($argv[2] ? $argv[2] : "")) {
|
||||
print "; rm ".($argv[2] ? $argv[2] : "").".tmp;\n";
|
||||
print "diff ".($argv[2]?$argv[2]:"").".tmp ".$filetosave." | grep \< | cut -b 3- > ".($argv[2]?$argv[2]:"");
|
||||
if (($argv[2]?$argv[2]:"")) {
|
||||
print "; rm ".($argv[2]?$argv[2]:"").".tmp;\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,10 +58,10 @@ $rc = 0;
|
||||
|
||||
// Get and check arguments
|
||||
|
||||
$lPrimary = isset($argv[1]) ? $argv[1] : '';
|
||||
$lSecondary = isset($argv[2]) ? $argv[2] : '';
|
||||
$lPrimary = isset($argv[1])?$argv[1]:'';
|
||||
$lSecondary = isset($argv[2])?$argv[2]:'';
|
||||
$lEnglish = 'en_US';
|
||||
$filesToProcess = isset($argv[3]) ? $argv[3] : '';
|
||||
$filesToProcess = isset($argv[3])?$argv[3]:'';
|
||||
|
||||
if (empty($lPrimary) || empty($lSecondary) || empty($filesToProcess)) {
|
||||
$rc = 1;
|
||||
@@ -272,16 +272,7 @@ foreach ($filesToProcess as $fileToProcess) {
|
||||
|
||||
// key is redundant
|
||||
if (array_key_exists($key, $aPrimary)) {
|
||||
print "Key $key is redundant in file $lPrimaryFile (line: $cnt)";
|
||||
if (!empty($fileFirstFound[$key])) {
|
||||
print " - Already found into ".$fileFirstFound[$key];
|
||||
print " (line: ".$lineFirstFound[$key].").\n";
|
||||
} else {
|
||||
$fileFirstFound[$key] = $fileToProcess;
|
||||
$lineFirstFound[$key] = $cnt;
|
||||
|
||||
print " - Already found into main file.\n";
|
||||
}
|
||||
print "Key $key is redundant in file $lPrimaryFile (line: $cnt) - Already found into ".$fileFirstFound[$key]." (line: ".$lineFirstFound[$key].").\n";
|
||||
continue;
|
||||
} else {
|
||||
$fileFirstFound[$key] = $fileToProcess;
|
||||
@@ -317,7 +308,7 @@ foreach ($filesToProcess as $fileToProcess) {
|
||||
|| in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key)
|
||||
) {
|
||||
//print "Key $key differs (aSecondary=".$aSecondary[$key].", aPrimary=".$aPrimary[$key].", aEnglish=".$aEnglish[$key].") so we add it into new secondary language (line: $cnt).\n";
|
||||
fwrite($oh, $key."=".(empty($aSecondary[$key]) ? $aPrimary[$key] : $aSecondary[$key])."\n");
|
||||
fwrite($oh, $key."=".(empty($aSecondary[$key])?$aPrimary[$key]:$aSecondary[$key])."\n");
|
||||
}
|
||||
}
|
||||
if (! feof($handle)) {
|
||||
|
||||
1
htdocs/.gitignore
vendored
1
htdocs/.gitignore
vendored
@@ -24,4 +24,5 @@
|
||||
/abricot*
|
||||
/nomenclature*
|
||||
/of/
|
||||
/workstation/
|
||||
/oblyon*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -39,7 +39,7 @@ $id = GETPOST('id', 'int');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$massaction = GETPOST('massaction', 'aZ09');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'accountingaccountlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'accountingaccountlist'; // To manage different context of search
|
||||
$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
|
||||
|
||||
$search_account = GETPOST('search_account', 'alpha');
|
||||
@@ -49,7 +49,7 @@ $search_accountparent = GETPOST('search_accountparent', 'alpha');
|
||||
$search_pcgtype = GETPOST('search_pcgtype', 'alpha');
|
||||
$search_import_key = GETPOST('search_import_key', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
||||
@@ -66,7 +66,7 @@ if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||
}
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
@@ -111,8 +111,7 @@ $hookmanager->initHooks(array('accountancyadminaccount'));
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel', 'alpha')) {
|
||||
$action = 'list';
|
||||
$massaction = '';
|
||||
$action = 'list'; $massaction = '';
|
||||
}
|
||||
if (!GETPOST('confirmmassaction', 'alpha')) {
|
||||
$massaction = '';
|
||||
@@ -144,13 +143,10 @@ if (empty($reshook)) {
|
||||
$search_labelshort = "";
|
||||
$search_accountparent = "";
|
||||
$search_pcgtype = "";
|
||||
$search_import_key = "";
|
||||
$search_array_options = array();
|
||||
}
|
||||
if ((GETPOST('valid_change_chart', 'alpha') && GETPOST('chartofaccounts', 'int') > 0) // explicit click on button 'Change and load' with js on
|
||||
|| (GETPOST('chartofaccounts', 'int') > 0 && GETPOST('chartofaccounts', 'int') != getDolGlobalInt('CHARTOFACCOUNTS'))) { // a submit of form is done and chartofaccounts combo has been modified
|
||||
$error = 0;
|
||||
|
||||
if ($chartofaccounts > 0 && $permissiontoadd) {
|
||||
// Get language code for this $chartofaccounts
|
||||
$sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'c_country as c, '.MAIN_DB_PREFIX.'accounting_system as a';
|
||||
@@ -158,9 +154,7 @@ if (empty($reshook)) {
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj) {
|
||||
$country_code = $obj->code;
|
||||
}
|
||||
$country_code = $obj->code;
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
@@ -223,15 +217,14 @@ if (empty($reshook)) {
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration';
|
||||
|
||||
llxHeader('', $langs->trans("ListAccounts"), $help_url);
|
||||
llxHeader('', $langs->trans("ListAccounts"));
|
||||
|
||||
if ($action == 'delete') {
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1);
|
||||
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1);
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
@@ -240,24 +233,11 @@ $pcgver = getDolGlobalInt('CHARTOFACCOUNTS');
|
||||
$sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.account_number, aa.account_parent, aa.label, aa.labelshort, aa.fk_accounting_category,";
|
||||
$sql .= " aa.reconcilable, aa.active, aa.import_key,";
|
||||
$sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2";
|
||||
|
||||
// Add fields from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
$sql = preg_replace('/,\s*$/', '', $sql);
|
||||
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as aa";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = ".((int) $conf->entity);
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".((int) $conf->entity);
|
||||
|
||||
// Add table from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
|
||||
$sql .= " WHERE asy.rowid = ".((int) $pcgver);
|
||||
|
||||
//print $sql;
|
||||
if (strlen(trim($search_account))) {
|
||||
$lengthpaddingaccount = 0;
|
||||
if (getDolGlobalInt('ACCOUNTING_LENGTH_GACCOUNT') || getDolGlobalInt('ACCOUNTING_LENGTH_AACCOUNT')) {
|
||||
@@ -280,7 +260,7 @@ if (strlen(trim($search_account))) {
|
||||
$search_account_tmp_clean = $search_account_tmp;
|
||||
$search_account_clean = $search_account;
|
||||
$startchar = '%';
|
||||
if (substr($search_account_tmp, 0, 1) === '^') {
|
||||
if (strpos($search_account_tmp, '^') === 0) {
|
||||
$startchar = '';
|
||||
$search_account_tmp_clean = preg_replace('/^\^/', '', $search_account_tmp);
|
||||
$search_account_clean = preg_replace('/^\^/', '', $search_account);
|
||||
@@ -304,15 +284,6 @@ if (strlen(trim($search_accountparent)) && $search_accountparent != '-1') {
|
||||
if (strlen(trim($search_pcgtype))) {
|
||||
$sql .= natural_search("aa.pcg_type", $search_pcgtype);
|
||||
}
|
||||
if (strlen(trim($search_import_key))) {
|
||||
$sql .= natural_search("aa.import_key", $search_import_key);
|
||||
}
|
||||
|
||||
// Add where from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
//print $sql;
|
||||
|
||||
@@ -327,6 +298,16 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
|
||||
}
|
||||
}
|
||||
|
||||
// List of mass actions available
|
||||
if ($user->hasRight('accounting', 'chartofaccount')) {
|
||||
$arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
}
|
||||
if (in_array($massaction, array('presend', 'predelete', 'closed'))) {
|
||||
$arrayofmassactions = array();
|
||||
}
|
||||
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
|
||||
dol_syslog('accountancy/admin/account.php:: $sql='.$sql);
|
||||
@@ -335,8 +316,6 @@ $resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
|
||||
$param = '';
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
$param .= '&contextpage='.urlencode($contextpage);
|
||||
@@ -359,18 +338,13 @@ if ($resql) {
|
||||
if ($search_pcgtype) {
|
||||
$param .= '&search_pcgtype='.urlencode($search_pcgtype);
|
||||
}
|
||||
if ($search_import_key) {
|
||||
if ($optioncss != '') {
|
||||
$param .= '&search_import_key='.urlencode($search_import_key);
|
||||
}
|
||||
if ($optioncss != '') {
|
||||
$param .= '&optioncss='.urlencode($optioncss);
|
||||
}
|
||||
|
||||
// Add $param from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
$param .= $hookmanager->resPrint;
|
||||
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print '<!-- Add javascript to reload page when we click "Change plan" -->
|
||||
<script type="text/javascript">
|
||||
@@ -384,19 +358,7 @@ if ($resql) {
|
||||
</script>';
|
||||
}
|
||||
|
||||
// List of mass actions available
|
||||
if ($user->hasRight('accounting', 'chartofaccount')) {
|
||||
$arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
}
|
||||
if (in_array($massaction, array('presend', 'predelete', 'closed'))) {
|
||||
$arrayofmassactions = array();
|
||||
}
|
||||
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('Addanaccount'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/accountancy/admin/card.php?action=create', '', $permissiontoadd);
|
||||
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') {
|
||||
@@ -409,9 +371,9 @@ if ($resql) {
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'accounting_account', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans("New"), $langs->trans("Addanaccount"), 'fa fa-plus-circle', './card.php?action=create');
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'accounting_account', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
// Box to select active chart of account
|
||||
print $langs->trans("Selectchartofaccounts")." : ";
|
||||
@@ -429,11 +391,11 @@ if ($resql) {
|
||||
print '<option value="-1"> </option>';
|
||||
while ($i < $numbis) {
|
||||
$obj = $db->fetch_object($resqlchart);
|
||||
if ($obj) {
|
||||
print '<option value="'.$obj->rowid.'"';
|
||||
print ($pcgver == $obj->rowid) ? ' selected' : '';
|
||||
print '>'.$obj->pcg_version.' - '.$obj->label.' - ('.$obj->country_code.')</option>';
|
||||
}
|
||||
|
||||
print '<option value="'.$obj->rowid.'"';
|
||||
print ($pcgver == $obj->rowid) ? ' selected' : '';
|
||||
print '>'.$obj->pcg_version.' - '.$obj->label.' - ('.$obj->country_code.')</option>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
@@ -445,8 +407,8 @@ if ($resql) {
|
||||
|
||||
print '<br>';
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
$parameters = array('chartofaccounts' => $chartofaccounts, 'permissiontoadd' => $permissiontoadd, 'permissiontodelete' => $permissiontodelete);
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $accounting, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print '<br>';
|
||||
@@ -456,11 +418,6 @@ if ($resql) {
|
||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
$moreforfilter = '';
|
||||
if ($moreforfilter) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
$accountstatic = new AccountingAccount($db);
|
||||
$accountparent = new AccountingAccount($db);
|
||||
@@ -470,14 +427,12 @@ if ($resql) {
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
// Fields title search
|
||||
// --------------------------------------------------------------------
|
||||
// Line for search fields
|
||||
print '<tr class="liste_titre_filter">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre center maxwidthsearch">';
|
||||
$searchpicto = $form->showFilterButtons('left');
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
}
|
||||
@@ -503,17 +458,11 @@ if ($resql) {
|
||||
if (!empty($arrayfields['categories']['checked'])) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
// Import key
|
||||
if (!empty($arrayfields['aa.import_key']['checked'])) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat width75" name="search_import_key" value="'.$search_import_key.'"></td>';
|
||||
}
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
|
||||
print '<td class="liste_titre"> </td>';
|
||||
}
|
||||
@@ -523,77 +472,52 @@ if ($resql) {
|
||||
}
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre center maxwidthsearch">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
$totalarray = array();
|
||||
$totalarray['nbfield'] = 0;
|
||||
|
||||
// Fields title label
|
||||
// --------------------------------------------------------------------
|
||||
print '</tr>';
|
||||
print '<tr class="liste_titre">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch actioncolumn ');
|
||||
$totalarray['nbfield']++;
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
}
|
||||
if (!empty($arrayfields['aa.account_number']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['aa.account_number']['label'], $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['aa.label']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['aa.label']['label'], $_SERVER["PHP_SELF"], "aa.label", "", $param, '', $sortfield, $sortorder);
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['aa.labelshort']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['aa.labelshort']['label'], $_SERVER["PHP_SELF"], "aa.labelshort", "", $param, '', $sortfield, $sortorder);
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['aa.account_parent']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['aa.pcg_type']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type,aa.account_number', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.pcg_type']['help'], 1);
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['categories']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['categories']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '', $arrayfields['categories']['help'], 1);
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Hook fields
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
if (!empty($arrayfields['aa.import_key']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['aa.import_key']['label'], $_SERVER["PHP_SELF"], 'aa.import_key', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.import_key']['help'], 1);
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['aa.reconcilable']['label'], $_SERVER["PHP_SELF"], 'aa.reconcilable', '', $param, '', $sortfield, $sortorder);
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
if (!empty($arrayfields['aa.active']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder);
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
// Loop on record
|
||||
// --------------------------------------------------------------------
|
||||
$i = 0;
|
||||
while ($i < min($num, $limit)) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
@@ -707,11 +631,6 @@ if ($resql) {
|
||||
}
|
||||
}
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
// Import id
|
||||
if (!empty($arrayfields['aa.import_key']['checked'])) {
|
||||
print "<td>";
|
||||
@@ -722,8 +641,8 @@ if ($resql) {
|
||||
}
|
||||
}
|
||||
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
// Activated or not reconciliation on an accounting account
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
// Activated or not reconciliation on accounting account
|
||||
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
|
||||
print '<td class="center">';
|
||||
if (empty($obj->reconcilable)) {
|
||||
@@ -800,16 +719,9 @@ if ($resql) {
|
||||
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>'."\n";
|
||||
|
||||
print '</form>'."\n";
|
||||
print "</table>";
|
||||
print "</div>";
|
||||
print '</form>';
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user