mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 18:31:29 +01:00
Compare commits
505 Commits
3.8.0-beta
...
3.7.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
444fce0bd9 | ||
|
|
ad3bd2c339 | ||
|
|
7d336bd5d4 | ||
|
|
a9aab7545e | ||
|
|
04b390f21c | ||
|
|
13c85516ee | ||
|
|
7a6c7f10a6 | ||
|
|
0076512d5b | ||
|
|
1b23ede857 | ||
|
|
d9e089256e | ||
|
|
c9661ee20e | ||
|
|
b27e31b3ae | ||
|
|
2e7d88dffb | ||
|
|
1baf25de3c | ||
|
|
c2efee8a29 | ||
|
|
feb114625d | ||
|
|
c1b6630c16 | ||
|
|
ed16699de6 | ||
|
|
0814fa76f8 | ||
|
|
83263e242e | ||
|
|
9be246baa5 | ||
|
|
9fd56df03f | ||
|
|
9d63cb0156 | ||
|
|
535d3bc087 | ||
|
|
da637db162 | ||
|
|
6e30d5e516 | ||
|
|
6aeb18ed75 | ||
|
|
905f9d78ed | ||
|
|
947f718329 | ||
|
|
79992b4947 | ||
|
|
861376e461 | ||
|
|
801e2bca4b | ||
|
|
40f0d0c9f2 | ||
|
|
e008922919 | ||
|
|
5414cb6f12 | ||
|
|
a26a6c2449 | ||
|
|
c2b8be9aaf | ||
|
|
36dc8b1ce7 | ||
|
|
f2178f0369 | ||
|
|
d8360a2a01 | ||
|
|
cafe148f72 | ||
|
|
e4640ca4c3 | ||
|
|
0cad938e09 | ||
|
|
b46aec8e7e | ||
|
|
35ce670bf2 | ||
|
|
a234482d08 | ||
|
|
c004342976 | ||
|
|
cebb996120 | ||
|
|
f8e156ea30 | ||
|
|
f13df0f952 | ||
|
|
a2c8208541 | ||
|
|
06754068ff | ||
|
|
96bc2023f3 | ||
|
|
70b73f2d51 | ||
|
|
ebdaf7dfa6 | ||
|
|
c65babf3b5 | ||
|
|
96b6f0d8fb | ||
|
|
67462a81a8 | ||
|
|
b0b5e95c7f | ||
|
|
9334cf8fd1 | ||
|
|
6ed87f43de | ||
|
|
b1b2038d71 | ||
|
|
0df45f10c1 | ||
|
|
a136e90749 | ||
|
|
41cdb65521 | ||
|
|
ebf68ecbe0 | ||
|
|
c1c0fa88c2 | ||
|
|
b47dc8a394 | ||
|
|
61df71cc64 | ||
|
|
11042fe499 | ||
|
|
064fad136e | ||
|
|
0dc4130a17 | ||
|
|
056ab63680 | ||
|
|
480111c6b1 | ||
|
|
5c8731b197 | ||
|
|
aa7e74f4c8 | ||
|
|
7af4d91828 | ||
|
|
2a137cd126 | ||
|
|
3d6f1d911a | ||
|
|
21f7271e51 | ||
|
|
02e053acc6 | ||
|
|
e6ec797af8 | ||
|
|
7c1fc2fee1 | ||
|
|
198e2cdcfa | ||
|
|
c71d578931 | ||
|
|
cb7f29b332 | ||
|
|
dfbc2814e7 | ||
|
|
1978eebb69 | ||
|
|
4a88c9ea9f | ||
|
|
3fea57f83b | ||
|
|
4e9b339439 | ||
|
|
c0862762a5 | ||
|
|
a209d18649 | ||
|
|
b3ed99ddc1 | ||
|
|
00aa5aace7 | ||
|
|
d2b221cfd1 | ||
|
|
eb98bd1e78 | ||
|
|
7105fabb79 | ||
|
|
1694481df8 | ||
|
|
a7020506aa | ||
|
|
bd632cf2b0 | ||
|
|
b1122b55d4 | ||
|
|
e72f4cb063 | ||
|
|
ae87a270e4 | ||
|
|
2ce00b2956 | ||
|
|
208bf2545f | ||
|
|
37da315af6 | ||
|
|
9a2259c681 | ||
|
|
041fa8d3f3 | ||
|
|
8c0dffd24e | ||
|
|
973e42d10f | ||
|
|
91ce70a6e9 | ||
|
|
d64664f5a7 | ||
|
|
c04743aa84 | ||
|
|
9f27e2323f | ||
|
|
c77eaeaa77 | ||
|
|
07d24a9a05 | ||
|
|
07226d32ec | ||
|
|
4233d24f4b | ||
|
|
a627e32fca | ||
|
|
6c379029fa | ||
|
|
f615927d24 | ||
|
|
85a58f666a | ||
|
|
06f752b250 | ||
|
|
bad28c6d92 | ||
|
|
eac80d7db4 | ||
|
|
c7546dbad2 | ||
|
|
b3be7f65cd | ||
|
|
f65829ec42 | ||
|
|
52bd90f950 | ||
|
|
350345ecca | ||
|
|
722a133b31 | ||
|
|
d4aeb8b3bc | ||
|
|
04aba8ce96 | ||
|
|
9b8bb114cd | ||
|
|
c639e82062 | ||
|
|
e6ab6bdb8e | ||
|
|
7a0206adce | ||
|
|
0ce7cad48c | ||
|
|
7673a73a65 | ||
|
|
8377d6967a | ||
|
|
a6f0baefc1 | ||
|
|
0cab08b2f3 | ||
|
|
d69e76168f | ||
|
|
f0a3bca4c2 | ||
|
|
4a52d3c1b1 | ||
|
|
84a152dc2e | ||
|
|
01854b3259 | ||
|
|
728f469c1e | ||
|
|
3bbedf1795 | ||
|
|
b4c3804c91 | ||
|
|
f33157033c | ||
|
|
87a102f5c8 | ||
|
|
4d11205a01 | ||
|
|
600dbced7e | ||
|
|
8d829dca32 | ||
|
|
fe78996026 | ||
|
|
375e61de2e | ||
|
|
5777c16b72 | ||
|
|
fdf9617e42 | ||
|
|
d499fafdb9 | ||
|
|
60debe31c4 | ||
|
|
cbff03ca08 | ||
|
|
316b7453e4 | ||
|
|
80d2445540 | ||
|
|
ad82135879 | ||
|
|
75bcb7e53f | ||
|
|
f566b38296 | ||
|
|
fa088eb6cc | ||
|
|
b0cf9bd0be | ||
|
|
9b797c1831 | ||
|
|
e1ea2215a3 | ||
|
|
0543a31920 | ||
|
|
fb34f25701 | ||
|
|
69ac75bef8 | ||
|
|
337643e53e | ||
|
|
38ed83d05f | ||
|
|
c06c2d0464 | ||
|
|
64ff12c009 | ||
|
|
c46f9350a5 | ||
|
|
bd69830cbd | ||
|
|
29b8919a40 | ||
|
|
d192ed9676 | ||
|
|
6f4cfc86e8 | ||
|
|
9b85a70013 | ||
|
|
5d585fa04a | ||
|
|
f08d52b0e8 | ||
|
|
727db56576 | ||
|
|
0251728e28 | ||
|
|
84f5b72d2b | ||
|
|
87fad70f4a | ||
|
|
62dd936b08 | ||
|
|
9fa2afb44b | ||
|
|
4e4efc97f0 | ||
|
|
c76af687ed | ||
|
|
fd9f51df88 | ||
|
|
4e9a378f0d | ||
|
|
9f1fa7e212 | ||
|
|
252f00dfe7 | ||
|
|
3f8e9bd181 | ||
|
|
384c89dcef | ||
|
|
279e7028fb | ||
|
|
f9485bd25b | ||
|
|
b27989d5d4 | ||
|
|
c675f88dda | ||
|
|
e886c89e06 | ||
|
|
53c9cb38ef | ||
|
|
00f0aff6f0 | ||
|
|
0e343ae3b2 | ||
|
|
6cce2860c2 | ||
|
|
8f5d9597f8 | ||
|
|
c208fccf35 | ||
|
|
afbee44993 | ||
|
|
3fdd59bf0a | ||
|
|
41354ca00d | ||
|
|
d24f5538f9 | ||
|
|
f3ef9b868f | ||
|
|
bf262c2cae | ||
|
|
9dd4a23365 | ||
|
|
c9d8e041d5 | ||
|
|
78cb31e55f | ||
|
|
406b271275 | ||
|
|
e22fb3c538 | ||
|
|
fd29bb34be | ||
|
|
4201e8b032 | ||
|
|
076f2ed9d1 | ||
|
|
72c31c0fa9 | ||
|
|
4da8fb901b | ||
|
|
1907e5da54 | ||
|
|
34adc60d26 | ||
|
|
9c28894ec3 | ||
|
|
74fb718b77 | ||
|
|
a96b92a618 | ||
|
|
e209fb23a2 | ||
|
|
fecd213bb8 | ||
|
|
bb0de1dcad | ||
|
|
766b8535ae | ||
|
|
4f5e207f08 | ||
|
|
0b7305d21a | ||
|
|
453ed8a05e | ||
|
|
0f27edad5d | ||
|
|
6f128907fe | ||
|
|
1454d942ef | ||
|
|
2d35124c71 | ||
|
|
90b78702e5 | ||
|
|
c125ba0d66 | ||
|
|
f9973d13b4 | ||
|
|
8dd843ab8f | ||
|
|
8251807408 | ||
|
|
30ccd28d01 | ||
|
|
cb31ab3e2b | ||
|
|
3818bff86a | ||
|
|
e80f29c271 | ||
|
|
8fd9d2a7ce | ||
|
|
4e19500cce | ||
|
|
a0fb27bd80 | ||
|
|
0c3ebe63c2 | ||
|
|
86b1a9cbce | ||
|
|
a3032d5674 | ||
|
|
a83b3ae7e8 | ||
|
|
e1a92c8288 | ||
|
|
c6081f0fa2 | ||
|
|
c290840513 | ||
|
|
75a14e02d8 | ||
|
|
8bdfdc0127 | ||
|
|
249883dda2 | ||
|
|
a294700cef | ||
|
|
70df553814 | ||
|
|
8c1760fbcf | ||
|
|
d3f1a7d5b8 | ||
|
|
c13d2d202b | ||
|
|
1f44bb5947 | ||
|
|
355fcc78cf | ||
|
|
89b723b2a7 | ||
|
|
63a817c3a4 | ||
|
|
52cb9581ff | ||
|
|
e5ad14442a | ||
|
|
7505537a3e | ||
|
|
6c78b930d1 | ||
|
|
a4a72d64c0 | ||
|
|
b268ccf064 | ||
|
|
8076ea85ea | ||
|
|
ecf80249d1 | ||
|
|
0016f48fac | ||
|
|
2e3d25c055 | ||
|
|
1f25ccf0bf | ||
|
|
c7b7dff0ed | ||
|
|
846899dc06 | ||
|
|
54214cfddf | ||
|
|
7009c6b890 | ||
|
|
be9d5b030d | ||
|
|
b0f604da14 | ||
|
|
de741e41e5 | ||
|
|
bd38e2f0bd | ||
|
|
51a01921ba | ||
|
|
fed70b1376 | ||
|
|
ded6e7d6d9 | ||
|
|
2d5331b8f8 | ||
|
|
8bf093a7ce | ||
|
|
67b7162c59 | ||
|
|
86dd751f29 | ||
|
|
0955432de3 | ||
|
|
7a115c9366 | ||
|
|
bd21cf5d68 | ||
|
|
08565d46fe | ||
|
|
50184babb9 | ||
|
|
d64a87d980 | ||
|
|
001f1b4c31 | ||
|
|
7640abe6fc | ||
|
|
897686a752 | ||
|
|
6ea31d87f8 | ||
|
|
9efecbf52b | ||
|
|
e3d4b104e2 | ||
|
|
c024578ca1 | ||
|
|
1a08f65942 | ||
|
|
5ef3c517bc | ||
|
|
c4fa4fc931 | ||
|
|
fbf13ec2c7 | ||
|
|
216827b1d8 | ||
|
|
3134950dbe | ||
|
|
c4f9bde14d | ||
|
|
870882257d | ||
|
|
9ec349f410 | ||
|
|
2b6a481011 | ||
|
|
3b493ab0ed | ||
|
|
51d5bff15d | ||
|
|
8941431ee3 | ||
|
|
1a3d8b5ae4 | ||
|
|
cf38b17e88 | ||
|
|
fb70fbdc06 | ||
|
|
b953d2c466 | ||
|
|
c8f12dc5f2 | ||
|
|
a3d612a26a | ||
|
|
17b69e16d2 | ||
|
|
e2072999cf | ||
|
|
a7d1a35a56 | ||
|
|
0aba8a1bb1 | ||
|
|
6952084be3 | ||
|
|
aff134ab65 | ||
|
|
e9f631d2e3 | ||
|
|
db7defb7c3 | ||
|
|
2527ae263b | ||
|
|
edf05e8d94 | ||
|
|
feed3f714c | ||
|
|
7b7fc44b46 | ||
|
|
da8e71b2c5 | ||
|
|
1b409538a8 | ||
|
|
c3fb14855b | ||
|
|
8f32e8ace8 | ||
|
|
6e9bf70add | ||
|
|
2faa5d725e | ||
|
|
5ed3d80103 | ||
|
|
cacfe454a9 | ||
|
|
58988d3084 | ||
|
|
8d18507d5f | ||
|
|
343f4086bc | ||
|
|
b3a7b44046 | ||
|
|
fdf6c32fbc | ||
|
|
c73fe965d2 | ||
|
|
1595765ec8 | ||
|
|
af2d63d7e5 | ||
|
|
45aed1e0aa | ||
|
|
dc4b429a33 | ||
|
|
4b51fc80a6 | ||
|
|
a8c2dfd445 | ||
|
|
958321b64d | ||
|
|
16ee7b461c | ||
|
|
d3f004d407 | ||
|
|
e4a9ca8b45 | ||
|
|
5039db3ebf | ||
|
|
e146af3118 | ||
|
|
1d85529eda | ||
|
|
ebe4969723 | ||
|
|
02f4e9f5cb | ||
|
|
3108523ff2 | ||
|
|
7d18adebb1 | ||
|
|
b3f3cdda3a | ||
|
|
374f702ef0 | ||
|
|
e2797ddd40 | ||
|
|
202d12ffef | ||
|
|
9374b4f3e3 | ||
|
|
804aec3cbc | ||
|
|
5f70e94905 | ||
|
|
1c32dcf86f | ||
|
|
8a1c5450c2 | ||
|
|
2f6587b48e | ||
|
|
f3ef4fed93 | ||
|
|
7cb564586e | ||
|
|
2f921b6431 | ||
|
|
a24f29ba8b | ||
|
|
94ac0f5305 | ||
|
|
e725d44565 | ||
|
|
cccc543065 | ||
|
|
12b83fd3e8 | ||
|
|
63f62a1fa2 | ||
|
|
46a9381f0b | ||
|
|
e13515e59f | ||
|
|
62ad7d4d34 | ||
|
|
a1f74763da | ||
|
|
2cf9d9f583 | ||
|
|
2a67bd1f38 | ||
|
|
22b4bfd1a4 | ||
|
|
9e05cecc1a | ||
|
|
13dee1876a | ||
|
|
6adc3ba604 | ||
|
|
3b9c8a685b | ||
|
|
cc8eac67d9 | ||
|
|
cc49b39eb6 | ||
|
|
c2eb47f3a1 | ||
|
|
565b0861d9 | ||
|
|
bd4a31c45d | ||
|
|
c42e952ce9 | ||
|
|
a3b379476b | ||
|
|
aaa9d85d07 | ||
|
|
556d01ff8a | ||
|
|
517e9094da | ||
|
|
d78292b9af | ||
|
|
824da6d2b0 | ||
|
|
6676114501 | ||
|
|
e130af8033 | ||
|
|
c0412acdea | ||
|
|
6b2d7f7d19 | ||
|
|
96f1c25a73 | ||
|
|
a0fc119ce5 | ||
|
|
73c7ef5a88 | ||
|
|
fa26b284a9 | ||
|
|
9e35fd1bc3 | ||
|
|
646ad48bd0 | ||
|
|
428bd14b55 | ||
|
|
84be353e13 | ||
|
|
2bebb869fb | ||
|
|
f0ed7dac09 | ||
|
|
038f171d6c | ||
|
|
db54b6f596 | ||
|
|
c8ea72473e | ||
|
|
dafe0a37cf | ||
|
|
ad5612158a | ||
|
|
8fa35fcb7b | ||
|
|
14eee82a64 | ||
|
|
b64adcc065 | ||
|
|
f2313748c8 | ||
|
|
1be33e1dda | ||
|
|
5b0c216b42 | ||
|
|
8505e91469 | ||
|
|
2bb1945a2f | ||
|
|
fbc0b5b313 | ||
|
|
5c2059a79f | ||
|
|
2e2f99c351 | ||
|
|
739eaedecc | ||
|
|
4100026c71 | ||
|
|
8d7c1f8d4c | ||
|
|
3d6c5b09e8 | ||
|
|
538c8c072b | ||
|
|
d0b1652efd | ||
|
|
d422fac3fe | ||
|
|
9e1c1fd464 | ||
|
|
4649cf7210 | ||
|
|
b28c4df0d6 | ||
|
|
7185cfeb84 | ||
|
|
e9d1e6265d | ||
|
|
57f5c95894 | ||
|
|
7660d846e3 | ||
|
|
953a21b55e | ||
|
|
244d1839e4 | ||
|
|
1a61ab055f | ||
|
|
d7e9bccad6 | ||
|
|
01d1c89f11 | ||
|
|
bde4503abd | ||
|
|
5223934ff0 | ||
|
|
20bdfdb286 | ||
|
|
c1445a88e1 | ||
|
|
e2b5bc756a | ||
|
|
9e7cb70d63 | ||
|
|
aff3f03ae0 | ||
|
|
f0f4d83664 | ||
|
|
7965e5bcfb | ||
|
|
cba902c5ae | ||
|
|
36aebb5fc4 | ||
|
|
b6850e36c9 | ||
|
|
ec89f00103 | ||
|
|
8a36353385 | ||
|
|
7c23dd13e5 | ||
|
|
a9059247ca | ||
|
|
5d588714f0 | ||
|
|
3c77a5ca21 | ||
|
|
4628c15684 | ||
|
|
62d3314e38 | ||
|
|
e82f4c474b | ||
|
|
5d14d05ce1 | ||
|
|
4273c4aad9 | ||
|
|
4fb5af7442 | ||
|
|
e58957e603 | ||
|
|
c87328b362 | ||
|
|
ee643ed2a7 | ||
|
|
461b5f0882 | ||
|
|
e72c118274 | ||
|
|
582f9cd214 | ||
|
|
ac6619daef | ||
|
|
06962cb4e6 | ||
|
|
bd4d108217 | ||
|
|
05cb1f7ba7 | ||
|
|
cf857b712a | ||
|
|
96ce5ab617 | ||
|
|
ca44070bbe | ||
|
|
d0a1d2c3a5 |
@@ -1,16 +0,0 @@
|
||||
build
|
||||
build.xml
|
||||
ChangeLog
|
||||
composer.json
|
||||
CONTRIBUTING.md
|
||||
COPYING
|
||||
COPYRIGHT
|
||||
dev
|
||||
doc
|
||||
Dockerfile
|
||||
INSTALL
|
||||
README-FR.md
|
||||
README.md
|
||||
robots.txt
|
||||
scripts
|
||||
test
|
||||
@@ -1,17 +0,0 @@
|
||||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
[*.php]
|
||||
indent_style = tab
|
||||
[*.js]
|
||||
indent_style = tab
|
||||
[*.css]
|
||||
indent_style = tab
|
||||
[*.xml]
|
||||
indent_style = tab
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,7 +9,6 @@ default.properties
|
||||
.buildpath
|
||||
.gitmodules
|
||||
dolibarr_install.log
|
||||
upgrade.log
|
||||
doxygen_warnings.log
|
||||
/.project
|
||||
.DS_Store
|
||||
|
||||
91
.mailmap
91
.mailmap
@@ -1,91 +0,0 @@
|
||||
# This is mapping list between real user name/email and entry into sources files
|
||||
# If you don't want to have your real email appears here, just send a Pull Request to
|
||||
# replace the second field between <> with <secret>
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
Laurent Destailleur <eldy@destailleur.fr> eldy <eldy@destailleur.fr>
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ldestailleur@teclib.com>
|
||||
Laurent Destailleur <eldy@destailleur.fr> eldy10 <eldy10@master8.(none)>
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ephpcsdy@destailleur.fr>
|
||||
Regis Houssin <regis.houssin@capnetworks.com> Regis Houssin <regis@dolibarr.fr>
|
||||
Regis Houssin <regis.houssin@capnetworks.com> Régis Houssin <regishoussin@device5.home>
|
||||
Juanjo Menent <jmenent@2byte.es> simnandez <jmenent@2byte.es>
|
||||
Juanjo Menent <jmenent@2byte.es> Juanjo Menent <simnandez@gmail.com>
|
||||
Juanjo Menent <jmenent@2byte.es> Simnandez <jmenent@2byte.es>
|
||||
Juanjo Menent <jmenent@2byte.es> juanjo <juanjo@samsung>
|
||||
Juanjo Menent <jmenent@2byte.es> juanjo <juanjo@alienware>
|
||||
Marcos García de La Fuente <marcosgdf@gmail.com> Marcos García <marcosgdf@gmail.com>
|
||||
Marcos García de La Fuente <marcosgdf@gmail.com> Marcos García <marcosgdf@gmail.com>
|
||||
Florian Henry <florian.henry@open-concept.pro> fhenry <florian.henry@open-concept.pro>
|
||||
Florian Henry <florian.henry@open-concept.pro> Florian HENRY <florian.henry@open-concept.pro>
|
||||
Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry.mail@gmail.com>
|
||||
Florian Henry <florian.henry@open-concept.pro> Florian HENRY <florian.henry@open-conept.pro>
|
||||
Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry@open-concept.pro>
|
||||
Florian Henry <florian.henry@open-concept.pro> HENRY Florian <florian.henry@open-concept.pro>
|
||||
Alexandre Spangaro <alexandre.spangaro@gmail.com> aspangaro <alexandre.spangaro@gmail.com>
|
||||
Alexandre Spangaro <alexandre.spangaro@gmail.com> Spangaro Alexandre <alexandre.spangaro@gmail.com>
|
||||
Alexandre Spangaro <alexandre.spangaro@gmail.com> Alexandre SPANGARO <alexandre.spangaro@gmail.com>
|
||||
Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> Raphaël Doursenaud <rdoursenaud@free.fr>
|
||||
Philippe Grand <philippe.grand@atoo-net.com> Grand Philippe <contact@atoo-net.com>
|
||||
Philippe Grand <philippe.grand@atoo-net.com> Philippe GRAND <philippe.grand@atoo-net.com>
|
||||
Philippe Grand <philippe.grand@atoo-net.com> philippe grand <philippe.grand@atoo-net.com>
|
||||
Philippe Grand <philippe.grand@atoo-net.com> philippe <philippe.grand@atoo-net.com>
|
||||
Philippe Grand <philippe.grand@atoo-net.com> unknown <Philippe@grandoc.(none)>
|
||||
Philippe Grand <philippe.grand@atoo-net.com> philippe <philippe@PC-de-philippe>
|
||||
Philippe Grand <philippe.grand@atoo-net.com> Philippe Grand <contact@atoo-net.com>
|
||||
Jean-François Ferry <jfefe@aternatik.fr> jfefe <jfefe@aternatik.fr>
|
||||
Jean-François Ferry <jfefe@aternatik.fr> jfefe <jf.ferry@aternatik.fr>
|
||||
Jean-François Ferry <jfefe@aternatik.fr> JF FERRY <jfefe@aternatik.fr>
|
||||
Jean-François Ferry <jfefe@aternatik.fr> JF FERRY <meos@devmachine.(none)>
|
||||
Charles Benke <charles.fr@benke.fr> BENKE Charles <charles.fr@benke.fr>
|
||||
Charles Benke <charles.fr@benke.fr> BENKE Charlie <charles.fr@benke.fr>
|
||||
Charles Benke <charles.fr@benke.fr> defrance69 <charles.fr@benke.fr>
|
||||
Maxime Kohlhaas <mko@atm-consulting.fr> MAxime Kohlhaas <maxime@atm-consulting.fr>
|
||||
Frédéric France <frederic.france@free.fr> Frédéric FRANCE <frederic.france@free.fr>
|
||||
Frédéric France <frederic.france@free.fr> frederic34 <frederic.france@free.fr>
|
||||
Frédéric France <frederic.france@free.fr> FRANCE Frédéric <frederic.france@free.fr>
|
||||
Frédéric France <frederic.france@free.fr> frederic34 <fred@ubuntuserver.(none)>
|
||||
Cyrille de Lambert <cyrille.delambert@auguria.net> cdelambert <cdelambert>
|
||||
Cédric Gross <c.gross@kreiz-it.fr> KreizIT <KreizIT@users.noreply.github.com>
|
||||
Cédric Gross <c.gross@kreiz-it.fr> Cedric <c.gross@kreiz-it.fr>
|
||||
Cédric Gross <c.gross@kreiz-it.fr> Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
Jean Heimburger <jean@tiaris.info> jean <jean@tiaris.info>
|
||||
Jean Heimburger <jean@tiaris.info> tiaris <tiaris>
|
||||
Benoit Mortier <benoit.mortier@opensides.be> opensides <opensides>
|
||||
Eric Seigne <contact@ryxeo.com> erics <erics>
|
||||
Jean-Louis Bergamo <jl@bergamo.fr> jlb <jlb>
|
||||
Remco Gerbrands <remco@artoge.nl> r2gnl <r2gnl>
|
||||
Phf <phf@atm-consulting.fr> phf <phf@atm-consulting.fr>
|
||||
Yannick Warnier <ywarnier@beeznest.org> ywarnier <ywarnier>
|
||||
Jerome Warnier <jwarnier@beeznest.org> jwarnier <jwarnier>
|
||||
Franky Van Liedekerke <liedekef@telenet.be> liedekef <liedekef>
|
||||
Lalaina Rasamoelina <lalaina.rasamoelina@biblibre.com> lalaina rasamoelina <lalaina.rasamoelina@biblibre.com>
|
||||
Marc Ocebo <marc_ocebo> marc_ocebo <marc_ocebo>
|
||||
Unknown <secret> box7890 <box7890>
|
||||
Unknown <secret> beedauchon <beedauchon>
|
||||
Loic <secret> loic <loic>
|
||||
Christophe Combelle <ccomb>
|
||||
Unknown <secret> activdev <activdev>
|
||||
Unknown <secret> bouba <bouba>
|
||||
Unknown <secret> bcroq <bcroq>
|
||||
Unknown <secret> dutoit <dutoit>
|
||||
Unknown <secret> bureau2crea <bureau2crea>
|
||||
Unknown <secret> unknown <mne02@.modula71.local>
|
||||
Simon Tosser <secret> simontosser <simontosser>
|
||||
Unknown <secret> tipaul <tipaul>
|
||||
Raphaël Bertrand <secret> raphael_bertrand <raphael_bertrand>
|
||||
Claudio Aschieri <c.aschieri@19.coop> cla <c.aschieri@19.coop>
|
||||
Tommaso Basilici <t.basilici@19.coop> kaos <t.basilici@19.coop>
|
||||
Tommaso Basilici <t.basilici@19.coop> Tommaso Basilici <t.basilici@19.coop>
|
||||
Faust <faust@19.coop> faust <faust@19.coop>
|
||||
Ferran Marcet <secret> fmarcet <fmarcet@imedia>
|
||||
Geoffrey Girard <geoffre.girard@atm-consulting.fr> geoffrey.girard <geoffre.girard@atm-consulting.fr>
|
||||
Bernard Paquier <eshop.bpaquier@gmail.com> BadPixxel <eshop.bpaquier@gmail.com>
|
||||
Patrick Delcroix <delcroip@gmail.com> delcroix Patrick <delcroip@gmail.com>
|
||||
Damien Clochard <damien@dalibo.com> damien clochard <damien@dalibo.info>
|
||||
Damien Clochard <damien@dalibo.com> damien clochard <damien@dalibo.com>
|
||||
Grégory David <groolot@groolot.net> Grégory DAVID <groolot@groolot.net>
|
||||
Grégory David <groolot@groolot.net> Gregory DAVID <groolot@groolot.net>
|
||||
Baffir Abbes <bafbes@users.noreply.github.com> bafbes <bafbes@users.noreply.github.com>
|
||||
Kevin Guerrier <guerrier.k@gmail.com> GUERRIER Kevin <guerrier.k@gmail.com>
|
||||
Remy Younes <ryounes@gmail.com> remy <ryounes@gmail.com>
|
||||
Estephe Loridan <github@estephe.me> Estephe L. <github@estephe.me>
|
||||
@@ -5,13 +5,12 @@ imports:
|
||||
|
||||
filter:
|
||||
excluded_paths:
|
||||
- build/*
|
||||
- dev/*
|
||||
- doc/*
|
||||
- test/*
|
||||
paths:
|
||||
- htdocs/*
|
||||
- scripts/*
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
|
||||
tools:
|
||||
# php_analyzer. Doc on https://scrutinizer-ci.com/docs/tools/php/php-analyzer/
|
||||
@@ -19,18 +18,15 @@ tools:
|
||||
enabled: true
|
||||
extensions:
|
||||
- php
|
||||
dependency_paths:
|
||||
- htdocs/includes/
|
||||
dependency_paths: { }
|
||||
filter:
|
||||
excluded_paths:
|
||||
- build/*
|
||||
- dev/*
|
||||
- doc/*
|
||||
- test/*
|
||||
- htdocs/includes/*
|
||||
paths:
|
||||
- htdocs/
|
||||
- scripts/
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
config:
|
||||
parameter_reference_check:
|
||||
enabled: true
|
||||
|
||||
415
.travis.yml
415
.travis.yml
@@ -1,146 +1,303 @@
|
||||
# This script is used by Travis CI to run automatically Continuous test integration
|
||||
# from Dolibarr GitHub repository.
|
||||
# Command run is phpunit
|
||||
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
||||
|
||||
sudo: required
|
||||
|
||||
language: php
|
||||
|
||||
php:
|
||||
- '5.3'
|
||||
- '5.4'
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- nightly
|
||||
|
||||
addons:
|
||||
mariadb: '10.0'
|
||||
# FIXME: find a way to import a MySQL dump into PostgreSQL
|
||||
#postgresql: '9.3'
|
||||
apt:
|
||||
packages:
|
||||
# We need a webserver to test the webservices
|
||||
# Let's install Apache with.
|
||||
- apache2
|
||||
# mod_php is not supported by Travis. Add fcgi. We install FPM later on.
|
||||
- libapache2-mod-fastcgi
|
||||
|
||||
# Start on every boot
|
||||
services:
|
||||
- memcached
|
||||
|
||||
env:
|
||||
global:
|
||||
# Set to true for very verbose output
|
||||
- DEBUG=false
|
||||
matrix:
|
||||
# MariaDB overrides MySQL installation so it's not possible to test both yet
|
||||
#- DB=mysql
|
||||
- DB=mariadb
|
||||
# FIXME: find a way to import a MySQL dump into PostgreSQL
|
||||
#- DB=postgresql
|
||||
# TODO
|
||||
#- DB=sqlite
|
||||
# See https://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP
|
||||
#- WS=apache
|
||||
# See https://github.com/DracoBlue/travis-ci-nginx-php-fpm-test
|
||||
#- WS=nginx
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: '7.0'
|
||||
- php: nightly
|
||||
# FIXME
|
||||
#- env: DB=postgresql
|
||||
# TODO
|
||||
#- env: DB=sqlite
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never # [always|never|change] default: change
|
||||
on_failure: change # [always|never|change] default: always
|
||||
|
||||
addons:
|
||||
postgresql: "9.3"
|
||||
irc:
|
||||
channels:
|
||||
- "chat.freenode.net#dolibarr"
|
||||
on_success: change
|
||||
on_failure: always
|
||||
use_notice: true
|
||||
|
||||
services:
|
||||
- memcached # will start memcached
|
||||
before_install:
|
||||
- |
|
||||
echo "Disabling Xdebug for composer"
|
||||
export PHP_VERSION_NAME=$(phpenv version-name)
|
||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini
|
||||
phpenv config-rm xdebug.ini
|
||||
echo
|
||||
|
||||
# This will tell travis to run phpunit
|
||||
language: php
|
||||
php:
|
||||
# - "5.2" is not supported because pyrus to install PHP_Codesniffer is not available
|
||||
- 5.3
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: 7.0
|
||||
install:
|
||||
- |
|
||||
echo "Updating Composer"
|
||||
composer self-update
|
||||
echo
|
||||
|
||||
env:
|
||||
- DB=mysql
|
||||
# - DB=postgres
|
||||
- |
|
||||
echo "Installing Parallel Lint"
|
||||
composer -n require jakub-onderka/php-parallel-lint ^0
|
||||
composer -n require jakub-onderka/php-console-highlighter ^0
|
||||
echo
|
||||
|
||||
before_script:
|
||||
- echo Start travis
|
||||
- echo Current dir is `pwd`
|
||||
- echo Home dir is `echo ~`
|
||||
- export PHPV=`phpenv version-name`
|
||||
- echo PHP version $PHPV
|
||||
# - echo Update composer
|
||||
# - ~/.phpenv/versions/$(phpenv version-name)/bin/composer.phar self-update
|
||||
- echo PHPUnit version
|
||||
- which phpunit
|
||||
- phpunit --version
|
||||
- echo Install phpcs then show installed rules
|
||||
- pyrus install pear/PHP_CodeSniffer
|
||||
- phpenv rehash
|
||||
- which phpcs
|
||||
- phpcs --version
|
||||
- phpcs -i
|
||||
- echo Create dir $(pwd)/htdocs/documents
|
||||
- sudo mkdir -p $(pwd)/htdocs/documents/admin/temp;
|
||||
- sudo touch $(pwd)/htdocs/documents/dolibarr.log;
|
||||
- sudo chmod a+rwx /home; sudo chmod a+rwx /home/travis; sudo chmod -R a+rwx /home/travis/build;
|
||||
- sudo chmod -R a+rwx $(pwd);
|
||||
- sudo chown -R www-data:travis $(pwd)/htdocs/documents;
|
||||
- find $(pwd)/htdocs/documents -type d -exec ls -alt {} \;
|
||||
- echo Edit php.ini file
|
||||
- echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
# - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- sh -c "if [ '$PHPV' = '5.3' ]; then echo 'extension = apc.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi"
|
||||
- sh -c "if [ '$PHPV' = '5.4' ]; then echo 'extension = apc.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi"
|
||||
- sh -c "if [ '$PHPV' = '5.3' ]; then echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi"
|
||||
- sh -c "if [ '$PHPV' = '5.4' ]; then echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi"
|
||||
- cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- echo Mysql version
|
||||
# INSTALL MYSQL 5.6
|
||||
# (https://github.com/piwik/piwik/commit/20bd2e1c24e5d673dce3feb256204ad48c29f160)
|
||||
# TODO: Remove when mysql 5.6 is provided by travis.
|
||||
# Otherwise, our migrations will raise a syntax error.
|
||||
- "sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5"
|
||||
- "sudo apt-get autoremove"
|
||||
- "sudo apt-get install libaio1"
|
||||
- "wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/"
|
||||
- "sudo dpkg -i mysql-5.6.14.deb"
|
||||
- "sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server"
|
||||
- "sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/"
|
||||
- "sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf"
|
||||
- "sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf"
|
||||
- "sudo sed -i'' 's/basedir[^=]\\+=.*$/basedir = \\/opt\\/mysql\\/server-5.6/' /etc/mysql/my.cnf"
|
||||
- "sudo /etc/init.d/mysql.server start"
|
||||
- mysql --version
|
||||
- mysql -e "SELECT VERSION();"
|
||||
# /END MYSQL 5.6- mysql --version
|
||||
- echo Init database
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS myapp_test;' -U postgres; fi"
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE myapp_test;' -U postgres; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'DROP DATABASE IF EXISTS myapp_test;'; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS myapp_test;'; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -D myapp_test < $(pwd)/dev/initdata/mysqldump_dolibarr_3.5.0.sql; fi"
|
||||
- echo Create config file htdocs/conf/conf.php
|
||||
- echo '<?php ' > htdocs/conf/conf.php
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then echo '$'dolibarr_main_db_type=\'pgsql\'';' >> htdocs/conf/conf.php; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then echo '$'dolibarr_main_db_type=\'mysqli\'';' >> htdocs/conf/conf.php; fi"
|
||||
- echo '$'dolibarr_main_url_root=\'http://localhost/\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_document_root=\'$(pwd)/htdocs\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_data_root=\'$(pwd)/htdocs/documents\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_db_host=\'localhost\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_db_name=\'myapp_test\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_db_user=\'travis\'';' >> htdocs/conf/conf.php
|
||||
- echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> htdocs/conf/conf.php
|
||||
- echo '?>' >> htdocs/conf/conf.php
|
||||
- echo Show conf.php content
|
||||
- cat htdocs/conf/conf.php
|
||||
- echo Install apache server
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-pgsql php5-intl
|
||||
- sudo sed -i -e "s,/var/www,$(pwd)/htdocs,g" /etc/apache2/sites-available/default
|
||||
- echo Show default virtual host
|
||||
- sudo cat /etc/apache2/sites-available/default
|
||||
- sudo /etc/init.d/apache2 restart
|
||||
- wget http://localhost/
|
||||
- sudo cat /etc/apache2/envvars
|
||||
- sudo cat /var/log/apache2/error.log
|
||||
- cat index.html
|
||||
- |
|
||||
echo "Installing PHP Unit"
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
|
||||
composer -n require phpunit/phpunit ^4
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
composer -n require phpunit/phpunit ^5
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Installing PHP CodeSniffer"
|
||||
composer require squizlabs/php_codesniffer ^2
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Adding Composer binaries to the path"
|
||||
export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH"
|
||||
echo
|
||||
|
||||
script:
|
||||
- cd htdocs/install
|
||||
- date
|
||||
# - php upgrade.php 3.4.0 3.5.0 ignoredbversion > upgrade340350.log
|
||||
# - php upgrade2.php 3.4.0 3.5.0 ignoredbversion > upgrade340350-2.log
|
||||
- php upgrade.php 3.5.0 3.6.0 ignoredbversion > upgrade350360.log
|
||||
- php upgrade2.php 3.5.0 3.6.0 ignoredbversion > upgrade350360-2.log
|
||||
- php upgrade.php 3.6.0 3.7.0 ignoredbversion > upgrade360370.log
|
||||
- php upgrade2.php 3.6.0 3.7.0 ignoredbversion > upgrade360370-2.log
|
||||
- php upgrade.php 3.7.0 3.8.0 ignoredbversion > upgrade370380.log
|
||||
# - cat upgrade370380.log
|
||||
- php upgrade2.php 3.7.0 3.8.0 ignoredbversion > upgrade370380-2.log
|
||||
# - cat upgrade370380-2.log
|
||||
- cd ../..
|
||||
- date
|
||||
- phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
- date
|
||||
# - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php 2>&1
|
||||
- phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/htdocs/conf/conf.php,/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ . 2>&1
|
||||
- date
|
||||
before_script:
|
||||
- |
|
||||
echo Start travis
|
||||
echo Current dir is `pwd`
|
||||
echo Home dir is `echo ~`
|
||||
echo TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR
|
||||
|
||||
- |
|
||||
echo "Re-enabling Xdebug for PHP CodeSniffer and PHP Unit"
|
||||
phpenv config-add /tmp/xdebug.ini
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Setting up PHP"
|
||||
echo
|
||||
echo "Set timezone"
|
||||
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then
|
||||
echo
|
||||
echo "Enabling APC for PHP <= 5.4"
|
||||
# Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6!
|
||||
echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
echo
|
||||
echo "Enabling Memcached for PHP <= 5.4"
|
||||
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0 and nightly!
|
||||
echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
fi
|
||||
phpenv rehash
|
||||
echo
|
||||
|
||||
- |
|
||||
if [ "$DEBUG" = true ]; then
|
||||
# Check PHP
|
||||
php -i
|
||||
# Check PHP CodeSniffer installation
|
||||
which phpcs
|
||||
phpcs --version
|
||||
phpcs -i
|
||||
# Check PHPUnit installation
|
||||
which phpunit
|
||||
phpunit --version
|
||||
# Check MySQL
|
||||
mysql --version
|
||||
mysql -e "SELECT VERSION();"
|
||||
echo
|
||||
fi
|
||||
|
||||
- |
|
||||
echo "Setting up database"
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo "MySQL"
|
||||
mysql -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
|
||||
mysql -D travis < dev/initdata/mysqldump_dolibarr_3.5.0.sql
|
||||
fi
|
||||
# FIXME: find a way to import a MySQL dump into PostgreSQL
|
||||
#if [ "$DB" = 'postgresql' ]; then
|
||||
# pgsql travis < dev/initdata/mysqldump_dolibarr_3.5.0.sql
|
||||
#fi
|
||||
# TODO: SQLite
|
||||
echo
|
||||
|
||||
- |
|
||||
export CONF_FILE=htdocs/conf/conf.php
|
||||
echo "Setting up Dolibarr $CONF_FILE"
|
||||
echo '<?php ' > $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
|
||||
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
|
||||
fi
|
||||
# FIXME
|
||||
#if [ "$DB" = 'postgresql' ]; then
|
||||
# echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
|
||||
#fi
|
||||
# TODO: SQLite
|
||||
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
|
||||
cat $CONF_FILE
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Create documents directory and set permissions"
|
||||
# and admin/temp subdirectory needed for unit tests
|
||||
mkdir -p documents/admin/temp
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Setting up Apache + FPM"
|
||||
# enable php-fpm
|
||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
# Copy the included pool
|
||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf
|
||||
fi
|
||||
if [ "$DEBUG" = true ]; then
|
||||
cat ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf
|
||||
fi
|
||||
sudo a2enmod rewrite actions fastcgi alias
|
||||
echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
if [ "$DEBUG" = true ]; then
|
||||
cat ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
fi
|
||||
~/.phpenv/versions/$PHP_VERSION_NAME/sbin/php-fpm
|
||||
# configure apache virtual hosts
|
||||
sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/default
|
||||
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$TRAVIS_BUILD_DIR?g" --in-place /etc/apache2/sites-available/default
|
||||
if [ "$DEBUG" = true ]; then
|
||||
sudo cat /etc/apache2/sites-available/default
|
||||
fi
|
||||
sudo service apache2 restart
|
||||
echo
|
||||
|
||||
script:
|
||||
- |
|
||||
echo "Checking webserver availability"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
wget http://127.0.0.1
|
||||
if [ "$DEBUG" = true ]; then
|
||||
cat index.html
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking PHP syntax errors"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
parallel-lint --exclude htdocs/includes --blame .
|
||||
set +e
|
||||
echo
|
||||
|
||||
# TODO: dev/* checks
|
||||
|
||||
- |
|
||||
echo "Checking coding style"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/codesniffer/ruleset.xml --encoding=utf-8 .
|
||||
set +e
|
||||
echo
|
||||
|
||||
# TODO: Check Javascript (jshint?)
|
||||
|
||||
# TODO: Check CSS (csslint?)
|
||||
|
||||
# TODO: check SQL syntax (pgsanity?)
|
||||
|
||||
- |
|
||||
echo "Upgrading Dolibarr"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
cd htdocs/install
|
||||
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log
|
||||
php upgrade2.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360-2.log
|
||||
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log
|
||||
php upgrade2.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370-2.log
|
||||
cd -
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Unit testing"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
set +e
|
||||
echo
|
||||
|
||||
after_success:
|
||||
|
||||
after_failure:
|
||||
- |
|
||||
if [ "$DEBUG" = true ]; then
|
||||
echo "Debugging informations"
|
||||
# Upgrade log files
|
||||
cat *.log
|
||||
# Dolibarr log file
|
||||
cat documents/dolibarr.log
|
||||
# Apache log file
|
||||
sudo cat /var/log/apache2/error.log
|
||||
# MariaDB log file
|
||||
sudo cat /var/log/mysql/error.log
|
||||
# TODO: PostgreSQL log file
|
||||
echo
|
||||
fi
|
||||
|
||||
after_script:
|
||||
# - echo Output dolibarr log file; cat $(pwd)/htdocs/documents/dolibarr.log
|
||||
- echo Output apache log file; sudo cat /var/log/apache2/error.log
|
||||
- echo End travis
|
||||
|
||||
|
||||
18
.tx/config
18
.tx/config
@@ -146,12 +146,6 @@ source_file = htdocs/langs/en_US/holiday.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.incoterm]
|
||||
file_filter = htdocs/langs/<lang>/incoterm.lang
|
||||
source_file = htdocs/langs/en_US/incoterm.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.install]
|
||||
file_filter = htdocs/langs/<lang>/install.lang
|
||||
source_file = htdocs/langs/en_US/install.lang
|
||||
@@ -182,12 +176,6 @@ source_file = htdocs/langs/en_US/link.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.loan]
|
||||
file_filter = htdocs/langs/<lang>/loan.lang
|
||||
source_file = htdocs/langs/en_US/loan.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.mailmanspip]
|
||||
file_filter = htdocs/langs/<lang>/mailmanspip.lang
|
||||
source_file = htdocs/langs/en_US/mailmanspip.lang
|
||||
@@ -248,9 +236,9 @@ source_file = htdocs/langs/en_US/paypal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.printing]
|
||||
file_filter = htdocs/langs/<lang>/printing.lang
|
||||
source_file = htdocs/langs/en_US/printing.lang
|
||||
[dolibarr.printipp]
|
||||
file_filter = htdocs/langs/<lang>/printipp.lang
|
||||
source_file = htdocs/langs/en_US/printipp.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
How to contribute to Dolibarr
|
||||
=============================
|
||||
|
||||
Bug reports and feature requests
|
||||
--------------------------------
|
||||
|
||||
*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum).
|
||||
|
||||
**NEW**
|
||||
|
||||
Issues are now managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues).
|
||||
|
||||
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. Report with as much detail as possible ([Use screenshots or even screencasts whenever possible](https://help.github.com/articles/issue-attachments)).
|
||||
|
||||
We're still figuring out how to migrate old issues to GitHub. In the meantime, they are still available at [Doliforge](https://doliforge.org/projects/dolibarr).
|
||||
|
||||
<a name=code></a>Code
|
||||
---------------------
|
||||
|
||||
### Basic workflow
|
||||
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
|
||||
2. Clone your fork.
|
||||
3. Choose a branch(See the [Branches](#branches) section below).
|
||||
4. Commit and push your changes.
|
||||
5. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
|
||||
|
||||
### <a name=branches></a>Branches
|
||||
|
||||
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 the oldest version affected that's still supported.
|
||||
|
||||
We officially support versions N, N − 1 and N − 2 for N the latest version available.
|
||||
|
||||
Choose your base branch accordingly.
|
||||
|
||||
### General rules
|
||||
Please don't edit the ChangeLog file. A project manager will update it from your commit messages.
|
||||
|
||||
### Commits
|
||||
Use clear commit messages with the following structure:
|
||||
|
||||
<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)
|
||||
or
|
||||
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
|
||||
Short description (when the commit is not introducing feature nor closing a bug)
|
||||
|
||||
Long description (Can span accross multiple lines).
|
||||
</pre>
|
||||
|
||||
### Pull Requests
|
||||
When submitting a pull request, use same rule than Commits. With upper case keyword to appear into ChangeLog.
|
||||
|
||||
|
||||
### Resources
|
||||
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
||||
|
||||
Translations
|
||||
------------
|
||||
The source language (en_US) is maintained in the repository. See the [Code](#code) section above.
|
||||
|
||||
All other translations are managed online at [Transifex](https://www.transifex.com/projects/p/dolibarr).
|
||||
|
||||
Join an existing translation team or create your own and translate into the interface.
|
||||
|
||||
Your translations will be available in the next major release.
|
||||
|
||||
### Resources
|
||||
[Translator documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php).
|
||||
|
||||
*You need to create an account before being able to edit.*
|
||||
|
||||
24
COPYRIGHT
24
COPYRIGHT
@@ -12,26 +12,23 @@ Dolibarr uses some external libraries released under different licenses. This is
|
||||
Component Version License GPL Compatible Usage
|
||||
-------------------------------------------------------------------------------------
|
||||
PHP libraries:
|
||||
AdoDb-Date 0.33 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
AdoDb-Date 0.32 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
ChromePHP 4.3.3 Apache Software License 2.0 Yes Return server log to chrome browser console
|
||||
CKEditor 4.3.3 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
FPDI 1.5.2 Apache Software License 2.0 Yes PDF templates management
|
||||
FPDI 1.4.2 Apache Software License 2.0 Yes PDF templates management
|
||||
FPDF_TPL 1.2 Apache Software License 2.0 Yes PDF templates management
|
||||
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
|
||||
Mobiledetect 2.8.3 MIT License Yes Detect mobile devices browsers
|
||||
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
|
||||
odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files
|
||||
PHPExcel 1.8.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 1.4.6 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHPExcel 1.7.8 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
Restler 3.0 LGPL-3+ Yes Library to develop REST Web services
|
||||
TCPDF 6.2.6 LGPL-3+ Yes PDF generation
|
||||
TCPDF 6.0.093 LGPL-3+ Yes PDF generation
|
||||
|
||||
JS libraries:
|
||||
jQuery 1.11.3 MIT License Yes JS library
|
||||
jQuery UI 1.11.4 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery 1.8.2 MIT License Yes JS library
|
||||
jQuery UI 1.9.1 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery select2 3.5.2 GPL and Apache License Yes JS library plugin for sexier multiselect
|
||||
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
||||
jQuery blockUI 2.43 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
||||
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||
jQuery DataTables 1.9.4 BSD Yes JS library for tables output
|
||||
jQuery FileUpload 5.0.3 GPL and MIT License Yes JS library to upload files
|
||||
@@ -48,7 +45,6 @@ jQuery TableDnD 0.6 GPL and MIT License Yes
|
||||
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
|
||||
jQuery Tiptip 1.3 GPL and MIT License Yes JS library for tooltips
|
||||
jsGantt 1.2 BSD License Yes JS library (to build Gantt reports)
|
||||
JsTimezoneDetect 1.0.4 MIT Licence Yes JS library to detect user timezone
|
||||
|
||||
For licenses compatibility informations:
|
||||
http://www.fsf.org/licensing/licenses/index_html
|
||||
@@ -58,10 +54,7 @@ Copyright
|
||||
---------
|
||||
|
||||
Copyright (C) 2015
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Marcos García <marcosgdf@gmail.com>
|
||||
- Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
- Frederic France <frederic.france@free.fr>
|
||||
|
||||
Copyright (C) 2014
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
@@ -74,7 +67,6 @@ Copyright (C) 2014
|
||||
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||
- Juanjo Menent <jmenent@2byte.es>
|
||||
- Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
- Frederic France <frederic.france@free.fr>
|
||||
|
||||
Copyright (C) 2013
|
||||
- Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
|
||||
391
ChangeLog
391
ChangeLog
@@ -5,37 +5,82 @@ English Dolibarr ChangeLog
|
||||
WARNING: Do not try to make any Dolibarr upgrade if you are running Mysql version 5.5.40.
|
||||
Mysql version 5.5.40 has a very critical bug making your data beeing definitely lost.
|
||||
You may also experience troubles with Mysql 5.5.41 with error "Lost connection" during migration.
|
||||
Upgrading to any other version or any other database system is abolutely required BEFORE trying
|
||||
Upgrading to any other version or database system is abolutely required BEFORE trying to
|
||||
make a Dolibarr upgrade.
|
||||
|
||||
|
||||
***** ChangeLog for 3.8 compared to 3.7.* *****
|
||||
For users:
|
||||
FIX: #2519
|
||||
FIX: #2758 Product::update sets product note to "null" when $prod->note is null
|
||||
FIX: #2832: Fixed a problem with special characters in expense report PDF model
|
||||
FIX: #2856 : Wrong table design
|
||||
FIX: #2901
|
||||
***** ChangeLog for 3.7.4 compared to 3.7.3 *****
|
||||
FIX: #3694
|
||||
FIX: #4239
|
||||
FIX: #4291 Correctly filter external calendar GETPOSTs
|
||||
FIX: #4341
|
||||
FIX: #4414 Supplier invoices use FAC_FORCE_DATE_VALIDATION client invoices property
|
||||
FIX: #4440 Wrong price is filled by Product::fetch into multiprices arrays
|
||||
FIX: add missing global def for ttc column
|
||||
FIX: Contrat card don't consider user permissions to show active/unactive service button
|
||||
FIX: CVE CVE-2015-8685
|
||||
FIX: Email templates not compatible with Multicompany
|
||||
Fix: for avoid division by 0
|
||||
FIX: ISSUE #4506 : make working the PROPAL_CLONE_ON_CREATE_PAGE hidden constant
|
||||
FIX: $outputlangs is not defined (dolibarr 3.7, 3.8, 3.9)
|
||||
FIX: sql injection even when code is on several lines
|
||||
FIX: The third dashboard don't consider user permissions
|
||||
|
||||
***** ChangeLog for 3.7.3 compared to 3.7.2 *****
|
||||
FIX: #3734 Do not show empty links of deleted source objects in stock movement list
|
||||
FIX: #3890 Expected transactions bank account page, shows negative numbers
|
||||
FIX: #3928 Creating a Customer order and a Customer invoice from a project, does not inherit payment conditions and method of payment of customer card
|
||||
FIX: #3980 Search field in "product by supplier" list sends empty result 3.8 and 3.7
|
||||
FIX: #4081 Added missing translation
|
||||
FIX: #4097 Public holiday calculation
|
||||
FIX: #4242 Allow disabling dashes in documents
|
||||
FIX: #4243 sql injection
|
||||
FIX: Can use formated float number on old expense report module.
|
||||
FIX: Change object statut when closing shipment and remove erratic db commit
|
||||
FIX: Export with category contact extrafields
|
||||
FIX: NB task and percent progress in box project
|
||||
FIX: Not delete a product when have customer price
|
||||
FIX: Not deleting contrats on element_element table
|
||||
FIX: Not use localtaxes when invoice some orders
|
||||
FIX: Product link in project box
|
||||
FIX: Use "WHERE true" instead of "WHERE 1" #4132
|
||||
|
||||
***** ChangeLog for 3.7.2 compared to 3.7.1 *****
|
||||
FIX: #2957 : missing $langs object for trigger
|
||||
FIX: #2983 Load gravatar avatar images securely over HTTPS
|
||||
FIX: #2987: removed dead function moneyMeter()
|
||||
FIX: #3009: Better filtering to prevent SQL injection
|
||||
FIX: #3009: Better filtering to prevent SQL injection
|
||||
FIX: #3091 TotalHT amount in supplier order is bold unlike the rest of Dolibarr
|
||||
FIX: #3138 - Too much visible thing when access is denied on public pages
|
||||
FIX: #3173 Overlapping of shipment ref
|
||||
FIX: Adding 5 more choice link into survey module was not working with chrome
|
||||
FIX: #3262 Webservice getProductsForCategory()
|
||||
FIX: #3318
|
||||
FIX: [ #3460 ] Selected bank account was not saved when an error happened when trying to create a customer invoice
|
||||
FIX: #3530
|
||||
FIX: #3630 - Wrong balance report when module salaries and donation disabled
|
||||
FIX: #3679 Error when deleting a Localtax2 special payment
|
||||
FIX: #3707 Thirdparty bank account page table has a glitch
|
||||
FIX: #3724 Bug: Blank page after cloning proposal with changed client
|
||||
FIX: #3836 Unable to upload a document to an invoice under some circunstances
|
||||
FIX: #3841 creation of a task completed has not status set to finished by default
|
||||
FIX: Add a protection to not make release if ChangeLog was not generated.
|
||||
FIX: adjusted test for affecting supplier reference
|
||||
FIX: Admin fiche inter page do not take good action
|
||||
FIX: Avoid warning strict mode when hosting server do not have php5_curl installed
|
||||
FIX: bad calculation for stock value
|
||||
FIX: Bad link to login page into email for password renewal.
|
||||
FIX: Bad logo for status "Do not contact" of thirdparty.
|
||||
FIX: Bad variable usage
|
||||
FIX: Bad condition into invoice export request making reporting too many rows.
|
||||
FIX: bad stock valorisation
|
||||
FIX: Bad visualization of suppliers name on Incomes-Expenses mode
|
||||
FIX: Better management error into the color conversion functions
|
||||
FIX: [bug #1883] missing field in SQL installation
|
||||
FIX: Bug on order and supplier invoice numeration mask when use supplier code
|
||||
FIX: Bug on order and supplier invoice numeration mask when use supplier code
|
||||
FIX: button create payment hide if tax amount is less than 1
|
||||
FIX: can receive new batch product on supplier order
|
||||
FIX: can show print page after product save
|
||||
FIX: [ bug 1634 ] Error deleting a project when it had many linked objects
|
||||
FIX: [ bug 1925 ] "Link to order" option in supplier invoices is not working properly
|
||||
FIX: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask
|
||||
FIX: [ bug #3211 ] Error about sold to pay (Montant encours)
|
||||
FIX: [ bug #3321 ] Users with certain permissions were shown a "forbidden access" page even if they had the rights
|
||||
FIX: [ bug #3358 ] Tasks box does not work with PostgreSQL
|
||||
FIX: [ bug #3383 ] Company name is overlapped with company direction in PDF models
|
||||
FIX: [ bug #3426 ] Unable to create an invoice from a contract with extrafields
|
||||
FIX: [ bug #3431 ] Invoice bank account is not respected
|
||||
FIX: [ bug #3432 ] Spaces should be removed from IBAN when formatting it
|
||||
FIX: Can create Proposal on close thridparty #3526
|
||||
FIX: change order date on clone (as everywhere else)
|
||||
FIX: Close #2835 Customer prices of a product shows incorrect history order
|
||||
FIX: Close #2837 Product list table column header does not match column body
|
||||
FIX: Close bug #2855 Wrong translation key in localtax report page
|
||||
@@ -43,195 +88,52 @@ FIX: Close bug #2861 Undefined variable $res when migrating from 3.6.2 to 3.7.0
|
||||
FIX: Close bug #2891 Category hooks do not work
|
||||
FIX: Close bug #2900 Courtesy title is not stored in create thirdparty form
|
||||
FIX: Close bug #2976: "Report" tab is the current tab but it is not marked as selected by the UI
|
||||
FIX: Correct migration script
|
||||
FIX: create contact with extrafiel is null when it is require
|
||||
FIX: Description of contract line was not visible.
|
||||
FIX: Correct path of loan class
|
||||
FIX: Correct problem field with note - Add note_private & use wysiwyg editor
|
||||
FIX: Edit in place of "Outstanding Limit"
|
||||
FIX: Module Expense Report - Correct init
|
||||
FIX: Update licence to GPLv3
|
||||
FIX: contact country had wrong display if the country dont have translate
|
||||
FIX: Display country name instead of country id (display country id makes no sense on vcard files)
|
||||
FIX: display error on extrafields on ficheinter
|
||||
FIX: double db escape add too quote
|
||||
FIX: Email selector contact must not include inactive contact
|
||||
FIX: End log must use same level then start log.
|
||||
FIX: event for restricted user was restricted if company null
|
||||
FIX: event not linked to contact on creation
|
||||
FIX: error in SQL due to a previous fix
|
||||
FIX: event's data lost on user assign update
|
||||
FIX: Export of tags for contact and member
|
||||
FIX: extrafields required on thirdparty
|
||||
FIX: Force ref
|
||||
FIX: Function expects an int, not a boolean
|
||||
FIX: Function was expecting a boolean not a string
|
||||
FIX: hide category if it's not enable
|
||||
FIX: facturestat bad sql when customer view is limited
|
||||
FIX: if multicompany enabled, call to undifend method _setCookie instead of setCookie
|
||||
FIX: If supplier invoice block linked element is display after other block total HT amount is not reset to 0 and sum other block (like customer orders values)
|
||||
FIX: jdate returning -62169955200 on x64 machine
|
||||
FIX: Let ability to use IDPROF verifications even if new entry is "private"
|
||||
FIX: migration error
|
||||
FIX: moved built-in bug report system to GitHub Issues
|
||||
FIX: Moved code to where the variable is defined
|
||||
FIX: keep filter by category or by not enough stock if we switch page
|
||||
FIX: Line break display as a block
|
||||
FIX: load propal langs for availability traduction
|
||||
FIX: loss data also if update was cancel by error of ended state with no end date, try a generic patch
|
||||
FIX: Mass Mailing activity don't display all status
|
||||
FIX: Missing to set context into workflow actions, so triggers can't know we are creating an invoice from order or an order from a proposal.
|
||||
FIX: multientity warehouse management
|
||||
FIX: New adherent from, always redirect on entity
|
||||
FIX: No check warehouse is provided if module stock is not enabled.
|
||||
FIX: no need to remove file into mail form, the temp dir will be deleted after any sending
|
||||
FIX: no projet_task_time id from trigger TASK_TIMESPENT_CREATE
|
||||
FIX: Not showing task extrafields when creating from left menu
|
||||
FIX: only active customer should be return into new invoice creation select list
|
||||
FIX: Payed invoices are showed as canceled FIX: Bad date filter on customer order
|
||||
FIX: Ref/label of product on contract line was not visible, nor into page, nor into PDF.
|
||||
FIX: Removed concatenation on undeclared variable
|
||||
FIX: remove deprecated property 'libelle' on product object
|
||||
FIX: Removed HTML file preventing PHP service
|
||||
FIX: Removed undeclared variable
|
||||
FIX: Removed undeclared variables
|
||||
FIX: Removed unused variable
|
||||
FIX: Replaced deprecated call
|
||||
FIX: Replaced deprecated property
|
||||
FIX: WAP calculation
|
||||
FIX: Save of filters into export profiles failed.
|
||||
FIX: "script" balise with wrong syntax
|
||||
FIX: send mail, copy sendto don't read the list of contact
|
||||
FIX: top links menu have target attribute with wrong value
|
||||
FIX: supplier rights for orderToInvoice
|
||||
FIX: Syntax error in Debian Apache configuration
|
||||
FIX: The hours of date filter aren't correct
|
||||
FIX: tool export handle the type "select" extrafields and return the value instead of id
|
||||
FIX: total amount in tpl linked object are not reset
|
||||
FIX: Typo
|
||||
FIX; Unknown field 'sc.fk_soc' in field list
|
||||
FIX: update usergroup name
|
||||
FIX: Variable declared boolean
|
||||
FIX: Variable might not be traversable
|
||||
FIX: We did a test on a permission to export contract when permission did not exists.
|
||||
FIX: translate Jabberid on contact page with edit view
|
||||
FIX: translation for 1 word do not work if product/service module are disabled because the translation search in products.lang
|
||||
FIX: update2.php test res befre assign it
|
||||
FIX: When delete actioncomm also delete actioncomm_resources
|
||||
FIX: when fetch_optionnal_by_label in Extrafields with $this->db cannot work because this->db is never instanciated
|
||||
FIX: when mailing is deleted, the targets list was kept in database
|
||||
FIX: when multicompany was enabled, this function didn't check just on the good entity (problem when both company use same mask)
|
||||
FIX: When we add an user on event in create mode, we lose linked object
|
||||
FIX: When we automatically creta an order from a proposal with workflow module, if some extrafields of propal don't exist in order object, insertExtraFields() function tries to insert extrafields in unexistant column of commande_extrafields table.
|
||||
FIX: When we clone a propal, if it has a project which is not assigned to a third, it was not on new propal because fk_project was always set to empty string if new propal is for another third.
|
||||
FIX: when we create an agenda event with "Not applicable" status, it is automatically saved with "To do" status
|
||||
FIX: width multiselect
|
||||
FIX: Wrong type hinting
|
||||
FIX: XSS security using the onerror and missing escapement on type of member page.
|
||||
FIX: Missing visibility of static property
|
||||
NEW: Add a button to purge criteria in user list
|
||||
NEW: add all assigned users and all extrafields data in new event when we createFromClone
|
||||
NEW: Add a new component to select categories/tags from the main edit page of product. The dedicated tab is also removed.
|
||||
NEW: add an explorer for REST API consultation & documentation
|
||||
NEW: Add a search field and report on hrm area
|
||||
NEW: Add a tab document in donation card
|
||||
NEW: Add bank account owner in invoice/proposal/orders footer
|
||||
NEW: Add button to purge search criteria into list
|
||||
NEW: Add close date and user for projects.
|
||||
NEW: Add company information into category contact export
|
||||
NEW: Add current salary on list of payment
|
||||
NEW: add date value filter on account records list
|
||||
NEW: Add exemple of setup for multitail to render dolibarr log files
|
||||
NEW: Add filter on status on invoice list
|
||||
NEW: Add filter on task ref and task label into list of tasks
|
||||
NEW: Add filter on user contact or user task into task list
|
||||
NEW: Add function dolCopyDir to copy directory with recursive content.
|
||||
NEW: Add gender property managed on user card FIX: Better error messages when uploading photo of user when permission to write are not granted
|
||||
NEW: Add help tooltips on fields of dictionary edit pages. Fix: visible list of tasks are for opened project only.
|
||||
NEW: Add hidden option MAIN_MAILFORM_DISABLE_ENTERKEY to disable the key enter into the form to send email.
|
||||
NEW: add hook in send mail
|
||||
NEW: Add hooks on list of members to allow an external module to add more fields into list view.
|
||||
NEW: Add hooks to allow an external module to complete list of events into calendar views.
|
||||
NEW: Add opportunity amount on project card.
|
||||
NEW: Add option THEME_ELDY_DISABLE_IMAGE to disable images into menu eldy.
|
||||
NEW: add PDF icon on linked element into project
|
||||
NEW: add "productpricecard" hook and uniformize code
|
||||
NEW: Add ref and label of project into export
|
||||
NEW: add restler framework First step to build REST API into Dolibarr
|
||||
NEW: Add search box for supplier order search.
|
||||
NEW: Add status into filters of graph
|
||||
NEW: Add tab document on salaries payment
|
||||
NEW: A link to the bugtracker can be enabled in the GUI
|
||||
NEW: A module can add its entries into cron module.
|
||||
NEW: autofocus on product selection dropdown list or search field
|
||||
NEW: Backup and restore tool is easier to use
|
||||
NEW: Can add all user of a project as user of a task, in one step.
|
||||
NEW: Can add project search on left menu search area
|
||||
NEW: Can assign a task to yourself to have it appear on timesheet
|
||||
NEW: Can close a project that has draft status with no need to switch it to validate status before.
|
||||
NEW: Can edit Background color for Top menu and Background color for table title line (works only with theme menu eldy).
|
||||
NEW: Can edit email template using WYSIWYG editor
|
||||
NEW: Can edit internal label of invoice even when closed (this is a private information)
|
||||
NEW: Can edit list of prospect status for customers/prospects. Add a new entry into dictionary table to manage list fo status. Removed deprecated files.
|
||||
NEW: Can filter on contact status in prospect list. Removed deprecated menu entry.
|
||||
NEW: Can filter proposal on a tag of a product Enhance also the prototype test_arrays to include select form before table.
|
||||
NEW: Can filter proposal, orders or invoices with criteria "contain at least one product with following tag"
|
||||
NEW: Can install an external module from admin pages, if web server has permission for and if setup is ok for.
|
||||
NEW: Can search on customer order amount into customer order list.
|
||||
NEW: Can upload files on leave requests. Use more standard permissions.
|
||||
NEW: Can use a "|" to make a OR search on several different criterias into text filters of tables.
|
||||
NEW: Clean code into salary module, debug and add indexes NEW: Can filter on user list and salary payments on user with naural search.
|
||||
NEW: clone action on agenda events
|
||||
NEW: dev feature : replace conf filename with "conf" parameter on url by GET
|
||||
NEW: display linked object in edit mode when we create an event from an order, propal...
|
||||
NEW: Enhancement of module 'Notification by Email'. Show nb of notifications set. Can set several emails. Can set a threshold on amount for notifications. Add notification on supplier order validation.
|
||||
NEW: Enhance prototype, project list and proposal list with new hook to have an external module able to add more fields.
|
||||
NEW: Enhance the natural_search function so we can use it to search numeric fields with criteria with operator <>= inside (< 100, >= 1000)
|
||||
NEW: Enter amount for withdraws requests
|
||||
NEW: Feature request: A page to merge two thirdparties into one #2613
|
||||
NEW: Feature to build a merged pdf with all unpaid invoice can work for paid invoices.
|
||||
NEW: Filter "active" by default on user list. Fix label of permission of project module
|
||||
NEW: For a contract line, price is no more mandatory.
|
||||
NEW: Forms are using the tab look, even in creation mode.
|
||||
NEW: Hidden option THEME_ELDY_USE_HOVER is stable enough to become officialy visible into setup.
|
||||
NEW: If module salaries is on, you can set a hourly value for tome consumed by users. Each time a user enter its time consumed on a project, a calculation is done to provide the cost for human services. This value appears into the "Transversal view" of project.
|
||||
NEW: Implement option SUPPLIER_ORDER_USE_DISPATCH_STATUS to add a status into each dispathing line of supplier order to "verify" a reception is ok. Status of order can be set to "total/done" only if line is verified.
|
||||
NEW: Into the overview of projects, the name of thirdparty appears into combo lists of elements to link to project.
|
||||
NEW: Introduce function dolGetFirstLineOfText
|
||||
NEW: Introduce option SUPPLIER_ORDER_DOUBLE_APPROVAL to allow 2 approvals to make a supplier order approved. Activating this option introduce a new permission to the second level approval.
|
||||
NEW: Introduce TCPDI as replacement of FPDI.
|
||||
NEW: List of recent modified supplier product prices in Supplier card
|
||||
NEW: Module notification should details of emails into confirm box, not only number.
|
||||
NEW: On page to see/edit contact of an ojbect, the status of contact is visible (for both external and internal users).
|
||||
NEW: Product stock and subproduct stock are independant
|
||||
NEW: Propal merge product card PDF into azur
|
||||
NEW: Rename install etape to step
|
||||
NEW: Replace category edition page on members with new select2 component.
|
||||
NEW: script to build API class from existing class
|
||||
NEW: Show difference between timespent by everybody and time spent by user making timesheet into timesheet pages. NEW: Can enter start hours of task when creating timesheet
|
||||
NEW: Show last official stable version into system - update page.
|
||||
NEW: Show photo of logged user into login top right block. NEW: If no photo is available for user, we show a generic photo depending on gender
|
||||
NEW: [T1758] Merge bank card & account card
|
||||
NEW: [ task 1191 ] AJAX selector for projects
|
||||
NEW: [ task #851 ] Add a new field: Commercial name
|
||||
NEW: [ task #977 ] New option to manage product unit Migrated code from GPCSolutions/dolibarr:3.2-units branch and adapted for 3.8 with some improvements
|
||||
NEW: The line where mouse is over can be highlight with option THEME_ELDY_USE_HOVER (on by default)
|
||||
NEW: The notification module accept keyword __SUPERVISOR__ to send notification to supervisor of user.
|
||||
NEW: Thumbs for statistics on main page are fully clicable (not only link inside the thumb)
|
||||
NEW: Title of page project contains project ref and label
|
||||
NEW: update skeleton and class builder
|
||||
NEW: Use new select2 component for juridical status, country and state selection.
|
||||
NEW: Web service to create or update product can correct stock during creation/update.
|
||||
NEW: When creating order, proposal or invoice from thirdparty card, the project is asked during creation. A link to create project if it does not exists is also available. NEW: Uniformize form creation of proposal to add public and private notes during creation like done for order and invoice.
|
||||
NEW: When using transfer or correct stock from warehouse, after recording we go back to the warehouse page.
|
||||
NEW: Add Option to not change date on cloning project
|
||||
NEW: Add check list from table for extrafield type
|
||||
NEW: Use new combobox.
|
||||
NEW: Add hidden option MAXTABS_IN_CARD.
|
||||
NEW: A default label is suggested for stock correction and transfer instead of empty string.
|
||||
NEW: Add Weighted average price as default price for buying price for margin calculation. Add option MARGIN_PMP_AS_DEFAULT_BUY_PRICE to replace with first supplier price.
|
||||
NEW: Introduce option MAIN_HTML_TITLE to start to control format of html title content.
|
||||
NEW: Add extrafields on bank account cards.
|
||||
NEW: Added delay between mails in Newsletter module.
|
||||
NEW: [ task #1793 ] Create new permission to restrict commercial agent margin to logged user.
|
||||
NEW: Add experimental module ask supplier price to request supplier quotation.
|
||||
NEW: Add module batch management.
|
||||
|
||||
For translators:
|
||||
NEW: Update language files.
|
||||
NEW: When a translation is not available we always jump to en_US and only en_US.
|
||||
|
||||
For developers:
|
||||
NEW: Function yn can show a visual checkbox.
|
||||
NEW: Introduced select2 jquery plugin.
|
||||
NEW: Possibility to add javascript in main login page with "getLoginPageOptions" hook
|
||||
NEW: possibility to defined a tab for all entities in module descriptor
|
||||
|
||||
WARNING: Following changes may create regression for some external modules, but was necessary to make
|
||||
Dolibarr better:
|
||||
- Removed hoo supplierorderdao into supplier order creation. This is a business event, so we must use the
|
||||
trigger ORDER_SUPPLIER_CREATE instead.
|
||||
- Hooks 'printLeftBlock' and 'formConfirm' are now compliant with hook development rules. They are
|
||||
"addreplace" hooks, so you must return content with "->resprints='mycontent'" and not with "return 'mycontent'"
|
||||
- All fields "fk_societe" were renamed into "fk_soc".
|
||||
- Method select_PriceBaseType and load_PriceBaseType were merged into selectPriceBaseType.
|
||||
- The trigger USER_LOGIN* are deprecated. They are still working but you should prefer use the
|
||||
hook afterLogin or afterLoginFailed instead.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 3.7.2 compared to 3.7.1 *****
|
||||
FIX [ bug #2855 ] Wrong translation key in localtax report page
|
||||
FIX [ bug #1852 ] JS error when editing a customer order line
|
||||
FIX [ bug #2900 ] Courtesy title is not stored in create thirdparty form
|
||||
NEW: Created new ContratLigne::insert function
|
||||
|
||||
***** ChangeLog for 3.7.1 compared to 3.7.* *****
|
||||
FIX Bug in the new photo system
|
||||
@@ -256,11 +158,11 @@ FIX send mail, copy sendto don't read the list of contact
|
||||
FIX Properly escape untrusted data to prevent HTML injection.
|
||||
FIX send mail, copy sendto don't read the list of contact
|
||||
|
||||
Path to save photos of products was moved in 3.7.0 to match path of other attached files. If you had loose
|
||||
Path to save photos of products was moved in 3.7.0 to match path of other attached files. If you had loose
|
||||
your photo on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to
|
||||
restore old path.
|
||||
|
||||
WARNING:
|
||||
WARNING:
|
||||
|
||||
Do not try to make any Dolibarr upgrade if you are running Mysql version 5.5.40.
|
||||
Mysql version 5.5.40 has a very critical bug making your data beeing definitely lost.
|
||||
@@ -270,7 +172,7 @@ make a Dolibarr upgrade.
|
||||
|
||||
***** ChangeLog for 3.7 compared to 3.6.* *****
|
||||
For users:
|
||||
- New: Match other auth system: Login can be done entering login or user
|
||||
- New: Match other auth system: Login can be done entering login or user
|
||||
email (this open the road for SSO).
|
||||
- New: Agenda export by project #1967.
|
||||
- New: Increase length of thirdparty to 128 chars.
|
||||
@@ -291,14 +193,14 @@ For users:
|
||||
- New: Can filter on status on interventions.
|
||||
- New: Add help info of field type into dictionary of payment types.
|
||||
- New: Add proposals into referer page of thirdparty.
|
||||
- New: On contact list can set filter on both active and not active (no more exclusive select).
|
||||
- New: On contact list can set filter on both active and not active (no more exclusive select).
|
||||
- New: Intervention documents are now available in ECM module.
|
||||
- New: Can attach supplier order to a customer order.
|
||||
- New: Supervisor is now visible into user list.
|
||||
- New: Supervisor is now visible into user list.
|
||||
- New: Add user of creation and validation on invoice export.
|
||||
- New: Add info page about browser.
|
||||
- New: Enable feature developed for 3.6 we forgot to enabled: Adding prefix
|
||||
on uploaded file names.
|
||||
on uploaded file names.
|
||||
- New: No more dependency between contract and service module.
|
||||
- New: [ task #867 ] Remove ESAEB external module code from core.
|
||||
- New: Can create proposal from an intervention.
|
||||
@@ -329,7 +231,7 @@ For users:
|
||||
Use accesskey on form search.
|
||||
- New: Intervention documents are now available in ECM module.
|
||||
- New: Add attachments on user card + in ECM module.
|
||||
- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template.
|
||||
- New: Can add __PROJECT_REF__ and __THIRDPARTY_NAME__ into email topic or content template.
|
||||
- New: [ task #1204 ] add Numering contrat module free (like leopard in product module).
|
||||
- New: [ task #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice.
|
||||
- New: Enable supplier price log table.
|
||||
@@ -337,8 +239,8 @@ For users:
|
||||
- New: [ task #1218 ] Can drag and drop an event from calendar to change its day.
|
||||
- New: Optimize size of image static resources.
|
||||
- New: Add hourly and daily amount on user card. Add weekly working hours and salary on user card.
|
||||
- New: Content of predefined email come firstly from table llx_c_email_template, then translation key.
|
||||
- New: Add option MAIN_GENERATE_INVOICES_WITH_PICTURE to show picture
|
||||
- New: Content of predefined email come firstly from table llx_c_email_template, then translation key.
|
||||
- New: Add option MAIN_GENERATE_INVOICES_WITH_PICTURE to show picture
|
||||
onto PDF like MAIN_GENERATE_PROPOSALS_WITH_PICTURE dir for proposals.
|
||||
- New: Add more search field in list of cheque deposits.
|
||||
- New: Add feature to order to invoice on supplier part.
|
||||
@@ -373,7 +275,6 @@ For users:
|
||||
- Fix: [ bug #1535 ] Supplier invoice Extrafields are not shown
|
||||
- Fix: datepicker first day of week can be monday by setting into display setup
|
||||
- Fix: [ bug #575 ] GED doesn't works if there is "/" in a mask
|
||||
- Fix: [ task #1728 ] Deactivate RIB suggest in proposals / invoices / orders
|
||||
|
||||
For users, new experimental module (need to set feature level of instance to experimental to see them):
|
||||
- New: Module Accounting Expert to manage accountancy
|
||||
@@ -441,8 +342,8 @@ Dolibarr better:
|
||||
- Deprecated module "oscommerce" were removed.
|
||||
- Changed the way parameters are provided to scripts sync_xxx_ldap2dolibarr.php
|
||||
- Some field into database were renamed from "libelle" to "label".
|
||||
- Table llx_c_pays were renamed into llx_c_country.
|
||||
- Triggers *_BUILDDOC are removed. Building a doc is not a business event. For action after
|
||||
- Table llx_c_pays were renamed into llx_c_country.
|
||||
- Triggers *_BUILDDOC are removed. Building a doc is not a business event. For action after
|
||||
creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead.
|
||||
- A lot of pages named fiche.php were renamed into card.php
|
||||
- A lot of pages named liste.php were renamed into list.php
|
||||
@@ -451,6 +352,57 @@ Dolibarr better:
|
||||
- Replaced USER_UPDATE_SESSION trigger with an updateSession hook may break modules using it.
|
||||
|
||||
|
||||
***** ChangeLog for 3.6.6 compared to 3.6.5 *****
|
||||
FIX: #3734 Do not show empty links of deleted source objects in stock movement list
|
||||
FIX: #4081 Added missing translation
|
||||
FIX: #4097 Public holiday calculation
|
||||
FIX: #4242 Allow disabling dashes in documents
|
||||
FIX: #4243 sql injection
|
||||
FIX: Add a protection to not make release if ChangeLog was not generated. Prepare package 3.6.5
|
||||
FIX: export with category contact extrafields
|
||||
FIX: Not delete a product when have customer price
|
||||
FIX: Not deleting contrats on element_element table
|
||||
|
||||
***** ChangeLog for 3.6.5 compared to 3.6.4 *****
|
||||
FIX: #2957 : missing $langs object for trigger
|
||||
FIX: #2983 Load gravatar avatar images securely over HTTPS
|
||||
FIX: #3009: Better filtering to prevent SQL injection
|
||||
FIX: #3841 creation of a task completed has not status set to finished by default
|
||||
FIX: #3890 Expected transactions bank account page, shows negative numbers
|
||||
FIX: #3928 Creating a Customer order and a Customer invoice from a project, does not inherit payment conditions and method of payment of customer card
|
||||
FIX: bad calculation for stock value
|
||||
FIX: bad stock valo
|
||||
FIX: bad stock valorisation
|
||||
FIX: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask
|
||||
FIX: button create payment hide if tax amount is less than 1
|
||||
FIX: change object statut on close shipping and remove erratic db commit
|
||||
FIX: change order date on clone (as everywhere else)
|
||||
FIX: Close #2835 Customer prices of a product shows incorrect history order
|
||||
FIX: Close #2837 Product list table column header does not match column body
|
||||
FIX: Close bug #2861 Undefined variable $res when migrating from 3.6.2 to 3.7.0
|
||||
FIX: Close bug #2891 Category hooks do not work
|
||||
FIX: Close bug #2976: "Report" tab is the current tab but it is not marked as selected by the UI
|
||||
FIX: contact country had wrong display if the country dont have translate
|
||||
FIX: double db escape add too quote
|
||||
FIX: End log must use same level then start log.
|
||||
FIX: error in SQL due to a previous fix
|
||||
FIX: event for restricted user was restricted if company null
|
||||
FIX: facturestat bad sql when customer view is limited
|
||||
FIX: If supplier invoice block linked element is display after other block total HT amount is not reset to 0 and sum other block (like customer orders values)
|
||||
FIX: keep filter by category or by not enough stock if we switch page
|
||||
FIX: no need to remove file into mail form, the temp dir will be deleted after any sending
|
||||
FIX: no projet_task_time id from trigger TASK_TIMESPENT_CREATE
|
||||
FIX: pmp
|
||||
FIX: send mail, copy sendto don't read the list of contact
|
||||
FIX: The hours of date filter aren't correct
|
||||
FIX: tool export handle the type "select" extrafields and return the value instead of id
|
||||
FIX: top links menu have target attribute with wrong value
|
||||
FIX: total amount in tpl linked object are not reset
|
||||
FIX: when multicompany was enabled, this function didn't check just on the good entity (problem when both company use same mask)
|
||||
|
||||
***** ChangeLog for 3.6.4 compared to 3.6.3 *****
|
||||
- Fix: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask
|
||||
|
||||
***** ChangeLog for 3.6.3 compared to 3.6.2 *****
|
||||
- Fix: ref_ext was not saved when recording a customer order from web service
|
||||
- Fix: withdrawal create error if in the same month are deleted previus withdrawals.
|
||||
@@ -488,6 +440,11 @@ Dolibarr better:
|
||||
- Fix: [ bug #2542 ] Contracts store localtax preferences
|
||||
- Fix: Bad permission assignments for stock movements actions
|
||||
- Fix: [ bug #2891 ] Category hooks do not work
|
||||
- Fix: [ bug #2696 ] Adding complementary attribute fails if code is numerics
|
||||
- Fix: [ bug #3074 ] Accruals accounting use payment date instead of commitment date in turnover reports for salaries
|
||||
- Fix: Not showing product supplier reference when page break
|
||||
- Fix: [ bug #3341 ] Missing translation in /compta/paiement_charge.php
|
||||
- Fix: [ bug #3342 ] Taxes dictionary page does not accept localized decimals for localtax2 rate
|
||||
|
||||
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
||||
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
|
||||
@@ -598,7 +555,7 @@ For users:
|
||||
- Fix: Add actions events not implemented.
|
||||
- Fix: Price min of composition is not supplier price min by quantity.
|
||||
- Fix: [ bug #1356 ] Bank accountancy number is limited to 8 numbers.
|
||||
- Fix: [ bug #1439 ] impossible to remove a a translation (multilanguage-feature)
|
||||
- Fix: [ bug #1439 ] impossible to remove a a translation (multilanguage-feature)
|
||||
- New: If multilangue is enabled, mail (from propal, invoice, etc...) message is pre-defaulted in Customer language
|
||||
- Fix: [ bug #1459 ] _ADD_CONTACT and _DEL_CONTACT triggers do not intercept insertion when reported an error
|
||||
- Fix: [ bug #1478 ] BILL_PAYED trigger action does not intercept failure under some circumstances
|
||||
@@ -628,8 +585,8 @@ For developers:
|
||||
- New: A module can disable a standard ECM view.
|
||||
- New: Add multilang support into product webservice.
|
||||
- New: Add hooks on project card page.
|
||||
- New: Add call_trigger method on CommonObject class. So new trigger call within object is just :
|
||||
$result = $this->call_trigger($trigger_name, $user)
|
||||
- New: Add call_trigger method on CommonObject class. So new trigger call within object is just :
|
||||
$result = $this->call_trigger($trigger_name, $user)
|
||||
|
||||
WARNING: Following change may create regression for some external modules, but was necessary to make
|
||||
Dolibarr better:
|
||||
@@ -667,6 +624,14 @@ Fix: [ bug #2861 ] Undefined variable $res when migrating
|
||||
Fix: [ bug #2837 ] Product list table column header does not match column body
|
||||
Fix: [ bug #2835 ] Customer prices of a product shows incorrect history order
|
||||
Fix: [ bug #2814 ] JPEG photos are not displayed in Product photos page
|
||||
Fix: [ bug #2715 ] Statistics page has broken layout with long thirdparty names
|
||||
Fix: [ bug #2570 ] [Contacts] Page should not process if ID is invalid
|
||||
Fix: [ bug #3268 ] SQL error when accessing thirdparty log page without a socid parameter
|
||||
Fix: [ bug #3180 ] formObjectOptions hook when editing thirdparty card does not print result
|
||||
Fix: [ bug #1791 ] Margin menu not available if any Finance module is not enabled
|
||||
Fix: [ bug #3310 ] OrderLine::fetch, FactureLigne::fetch and PropaleLigne::fetch do not return anything
|
||||
Fix: [ bug #3206 ] PropaleLigne, OrderLine and FactureLigne given to triggers through update function does not contain all the information
|
||||
Fix: [ bug #3313 ] Error enabling module with PostgreSQL database
|
||||
|
||||
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
||||
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
||||
|
||||
14
Dockerfile
14
Dockerfile
@@ -1,14 +0,0 @@
|
||||
FROM php:5.6-apache
|
||||
|
||||
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||
&& docker-php-ext-install gd
|
||||
|
||||
RUN docker-php-ext-install mysqli
|
||||
|
||||
COPY htdocs/ /var/www/html/
|
||||
|
||||
RUN chown -hR www-data:www-data /var/www/html
|
||||
|
||||
EXPOSE 80
|
||||
229
README.md
229
README.md
@@ -1,166 +1,151 @@
|
||||
# DOLIBARR ERP & CRM
|
||||
|
||||
Dolibarr ERP & CRM is a modern software to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda, ...).
|
||||
|
||||
It's an Open Source software (wrote in PHP language) designed for small and medium companies, foundation and freelances.
|
||||
|
||||
You can freely use, study, modify or distribute it according to it's Free Software licence.
|
||||
|
||||
You can use it as a standalone application or as a web application to be able to access it from the Internet or a LAN.
|
||||
Dolibarr ERP & CRM is a modern software to manage your company or foundation activity (contacts, suppliers, invoices, orders, stocks, agenda, ...).It's an opensource software (wrote with PHP language) designed for small and medium companies, foundation and freelances. You can freely install, use and distribute it as a standalone application or as a web application to use it from every internet access and media.
|
||||
|
||||

|
||||
|
||||
|
||||
## LICENSE
|
||||
|
||||
Dolibarr is released 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 (GPL-3+).
|
||||
|
||||
See the [COPYING](COPYING) file for a full copy of the license.
|
||||
|
||||
Other licenses apply for some included dependencies. See [COPYRIGHT](COPYRIGHT) for a full list.
|
||||
|
||||
## INSTALLING
|
||||
## INSTALL
|
||||
|
||||
### Download
|
||||
If you have no technical knowledge, and you are looking for an autoinstaller to install Dolibarr ERP/CRM in few clicks, you must download DoliWamp (the all-in-one package of Dolibarr for Windows), DoliDeb (the all-in-one package of Dolibarr for Debian or Ubuntu) or DoliRpm (the all-in-one package of Dolibarr for Fedora, Redhat, Opensuse, Mandriva or Mageia).
|
||||
|
||||
Releases can be downloaded from [official website](http://www.dolibarr.org/).
|
||||
You can download this from the download area of [Official website] (<http://www.dolibarr.org/>)
|
||||
|
||||
### Simple setup
|
||||
If you already have installed a Web server and a Mysql database, you can install the standard version like this:
|
||||
|
||||
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in few clicks, you can use one of the packaged versions:
|
||||
- Uncompress the downloaded archive.
|
||||
|
||||
- DoliWamp for Windows
|
||||
- DoliDeb for Debian or Ubuntu
|
||||
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
|
||||
- Copy directory "dolibarr" and all its files inside your web server root, or copy directory anywhere and set up your web server to use "dolibarr/htdocs" as root for a new web server virtual host (second choice need to be server administrator).
|
||||
|
||||
- Create an empty file "htdocs/conf/conf.php" and set permissions for your web server user (write permissions will be removed once install is finished).
|
||||
|
||||
- From your browser, call the dolibarr "install/" page.
|
||||
|
||||
### Advanced setup
|
||||
Url depends on choice made on first step:
|
||||
|
||||
You can use a Web server and a supported database (MySQL recommended) to install the standard version.
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
or
|
||||
|
||||
- Uncompress the downloaded archive
|
||||
- Copy directory "dolibarr" and all its files inside your web server root, or copy directory anywhere and set up your web server to use "dolibarr/htdocs" as root for a new web server virtual host (second choice need to be server administrator)
|
||||
- Create an empty file "htdocs/conf/conf.php" and set permissions for your web server user (write permissions will be removed once install is finished)
|
||||
- From your browser, go to the dolibarr "install/" page
|
||||
http://localhost/dolibarr/install/
|
||||
or
|
||||
|
||||
The URL will depends on choices made in the first step:
|
||||
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
|
||||
or
|
||||
|
||||
http://localhost/dolibarr/install/
|
||||
|
||||
or
|
||||
|
||||
http://yourdolibarrvirtualhost/install/
|
||||
http://yourdolibarrvirtualhost/install/
|
||||
|
||||
- Follow the installer instructions
|
||||
- Follow instructions provided by installer...
|
||||
|
||||
## UPGRADING
|
||||
|
||||
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
||||
- If you're upgrading from version x.y.z to x.y.w (only third number differs), there is no need to run any migration process.
|
||||
- If you're upgrading from a beta version or from any version x.y.z to any other where x or y number differs, you must call the Dolibarr "install/" page in your browser (this should be done automatically at first dolibarr access) and follow the upgrade process.
|
||||
|
||||
*Note: migration process can safely be done multiple times.*
|
||||
## UPGRADE
|
||||
|
||||
## NEWS
|
||||
To upgrade Dolibarr from an old version to this one:
|
||||
|
||||
See the [ChangeLog](ChangeLog) file.
|
||||
- Overwrite all old files inside old 'dolibarr' directory by files provided into new version package.
|
||||
|
||||
- If you came from version x.y.z to x.y.w (only third number differ), there is no need to run any migrate process.
|
||||
|
||||
- If you came from a beta version or from any version x.y.z to any other where x or y number differs, you must call the Dolibarr "install/" page in your browser (this should be done automatically at first dolibarr access).
|
||||
|
||||
## FEATURES
|
||||
This URL should looks like:
|
||||
|
||||
### General features
|
||||
- Users and groups with finely grained rights
|
||||
- Localization in most major languages
|
||||
- Very user friendly and easy to use
|
||||
- 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)
|
||||
- Works with PHP 5.3+ and MySQL 4.1+ or PostgreSQL 8.1. (See requirements on the [Wiki](http://wiki.dolibarr.org/index.php/Prerequisite))
|
||||
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
|
||||
- An easy to understand, maintain and code interfaces with your own information system (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support for 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
|
||||
- Tunisian tax stamp
|
||||
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- ...
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
or
|
||||
|
||||
### Main modules
|
||||
http://localhost/dolibarr/install/
|
||||
or
|
||||
|
||||
- Customers, Prospects and/or Suppliers directory
|
||||
- Products and/or Services catalog
|
||||
- Bank accounts management
|
||||
- Customer and Supplier Orders management
|
||||
- Commercial proposals management
|
||||
- Contracts management
|
||||
- Invoices management
|
||||
- Projects management
|
||||
- Events management
|
||||
- Payments management
|
||||
- Standing orders management
|
||||
- Stock management
|
||||
- Shipping management
|
||||
- Interventions management
|
||||
http://yourdolibarrhost/install/
|
||||
|
||||
Then choose the "update" option according to your case.
|
||||
Note: Migrate process can be ran safely several times.
|
||||
|
||||
|
||||
|
||||
## WHAT'S NEW
|
||||
|
||||
See ChangeLog file found into package.
|
||||
|
||||
|
||||
|
||||
## WHAT DOLIBARR CAN DO
|
||||
|
||||
### Main modules/features:
|
||||
|
||||
- Customers, Prospects or Suppliers directory.
|
||||
- Products and services catalog.
|
||||
- Bank accounts management.
|
||||
- Orders management.
|
||||
- Commercial proposals management.
|
||||
- Contracts management.
|
||||
- Invoices management.
|
||||
- Payments management.
|
||||
- Standing orders management.
|
||||
- Stock management.
|
||||
- Shipping management.
|
||||
- PDF or ODT generation for invoice, proposals, orders...
|
||||
- Agenda with ical and vcal export for third party tools integration
|
||||
- Electronic Document Management (EDM)
|
||||
- Foundations members management
|
||||
- Employee's holidays management
|
||||
- Mass emailing
|
||||
- Surveys
|
||||
- Point of Sale
|
||||
- …
|
||||
- Agenda with ical,vcal export for third tools integration.
|
||||
- EDM (Electronic Document Management).
|
||||
- Foundations members management.
|
||||
- Employee's holidays management.
|
||||
- Mass Emailing.
|
||||
- Realize surveys.
|
||||
- Point of Sale.
|
||||
|
||||
### Other modules
|
||||
### Other modules:
|
||||
|
||||
- Bookmarks management
|
||||
- Donations management
|
||||
- Reporting
|
||||
- Data export/import
|
||||
- Thirdparties and/or products categories
|
||||
- Barcodes support
|
||||
- Margin calculations
|
||||
- LDAP connectivity
|
||||
- ClickToDial integration
|
||||
- RSS integration
|
||||
- Skype integration
|
||||
- Payment platforms integration (PayBox, PayPal)
|
||||
- …
|
||||
- Bookmarks management.
|
||||
- Donations management.
|
||||
- Reporting.
|
||||
- Data export/import.
|
||||
- Third parties or products categories.
|
||||
- LDAP connectivity.
|
||||
- ClickToDial integration.
|
||||
- RSS integration.
|
||||
- Can be extended with a lot of other external modules available onto DoliStore.com.
|
||||
|
||||
### Extending
|
||||
### Miscellaneous:
|
||||
|
||||
Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](http://www.dolistore.com).
|
||||
- Multi-user, with several permissions levels for each feature.
|
||||
- Very user friendly and easy to use.
|
||||
- Highly customizable: Enable only modules you need, 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).
|
||||
- Works with PHP 5.3+, MySql 4.1 or PostgreSQL 8.1.
|
||||
- Require PHP and Mysql or Postgresql (See exatc versions on http://wiki.dolibarr.org/index.php/Prerequisite).
|
||||
- Compatible with all Cloud solutions that match MySql, PHP or PostgreSQL prerequisites.
|
||||
- An easy to understand, maintain and code interfaces with your own system information (PHP with no heavy frameworks, trigger and hook architecture).
|
||||
- Support countries 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.
|
||||
Tunisian tax stamp.
|
||||
Compatible with European directives (2006/112/CE ... 2010/45/UE) (http://europa.eu/legislation_summaries/taxation/l31057_en.htm)
|
||||
...
|
||||
|
||||
## FUTURE
|
||||
|
||||
These are features that Dolibarr does **not** yet fully support:
|
||||
## WHAT DOLIBARR CAN'T DO YET (TODO LIST)
|
||||
|
||||
- Double-entry bookkeeping (only bank and treasury management)
|
||||
- Multiple currencies
|
||||
- Multiple companies
|
||||
If you want to manage several companies or foundations, you must install the software several times (on same server or not) or use the MultiCompany addon module that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas)
|
||||
- Tasks dependencies in projects
|
||||
- Payroll module
|
||||
- Webmail
|
||||
- Dolibarr can't do coffee (yet)
|
||||
This is features that Dolibarr does not support completely yet:
|
||||
|
||||
## DOCUMENTATION
|
||||
- No double party accountancy (only bank and treasury management).
|
||||
- Dolibarr manage one currency at once (mono-currency).
|
||||
- Dolibarr manage one master activity (mono-company). If you want to manage several companies or foundations, you must install several time the software (on same server or not). Another solution is to extend Dolibarr with the addon Module MultiCompany that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas).
|
||||
- Tasks on module project can't have dependencies between each other.
|
||||
- Dolibarr does not contains Payroll module.
|
||||
- Dolibarr does not include any Webmail.
|
||||
- Dolibarr can't do coffee (not yet).
|
||||
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](http://wiki.dolibarr.org).
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr is the work of many contributors over the years and uses some fine libraries.
|
||||
|
||||
See [COPYRIGHT](COPYRIGHT) file.
|
||||
|
||||
## SOCIAL NETWORKS
|
||||
|
||||
Follow Dolibarr project on:
|
||||
Follow Dolibarr project on
|
||||
|
||||
Facebook: <https://www.facebook.com/dolibarr>
|
||||
|
||||
Google+: <https://plus.google.com/+DolibarrOrg>
|
||||
|
||||
Twitter: <http://www.twitter.com/dolibarr>
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [Google+](https://plus.google.com/+DolibarrOrg)
|
||||
- [Twitter](http://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)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Script build for hudson CI -->
|
||||
<project name="dolibarr" default="hudson" basedir=".">
|
||||
fdfds
|
||||
<!-- Exclude/ignore paths -->
|
||||
<property name="ignorepaths" value="${basedir}/htdocs/conf,${basedir}/htdocs/core/filemanagerdol,${basedir}/htdocs/includes" />
|
||||
<property name="ignoreregexp" value="**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*" />
|
||||
|
||||
0
build/.gitignore
vendored
Executable file → Normal file
0
build/.gitignore
vendored
Executable file → Normal file
0
build/aps/APP-META-1.1.xml
Executable file → Normal file
0
build/aps/APP-META-1.1.xml
Executable file → Normal file
0
build/aps/APP-META-1.2.xml
Executable file → Normal file
0
build/aps/APP-META-1.2.xml
Executable file → Normal file
0
build/aps/README
Executable file → Normal file
0
build/aps/README
Executable file → Normal file
1
build/aps/install.forced.php.install
Executable file → Normal file
1
build/aps/install.forced.php.install
Executable file → Normal file
@@ -21,4 +21,3 @@ $force_install_databaserootpass='';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
?>
|
||||
@@ -38,15 +38,6 @@ filter-pristine-tar = True
|
||||
END
|
||||
|
||||
|
||||
# Complete .bashrc with DEBEMAIL and DEBFULLNAME
|
||||
Example:
|
||||
export DEBFULLNAME="Laurent Destailleur (eldy)"
|
||||
export DEBEMAIL=eldy@users.sourceforge.net
|
||||
Other example:
|
||||
export DEBFULLNAME="Laurent Destailleur"
|
||||
export DEBEMAIL="eldy@destailleur.fr"
|
||||
|
||||
|
||||
# To use Alioth.debian.org
|
||||
* Create an account login
|
||||
* Update your ~/.ssh/config file to add:
|
||||
@@ -110,38 +101,14 @@ http://packages.qa.debian.org/package.html
|
||||
http://bugs.debian.org/package
|
||||
|
||||
|
||||
##### Modify severity of a bug ticket
|
||||
|
||||
- Send this email to control@bugs.debian.org and wait 10 minutes
|
||||
|
||||
severity 123 xxx
|
||||
|
||||
|
||||
##### Update but tracker system
|
||||
|
||||
To set status of a bug to "pending"
|
||||
> bts --smtp-host=yoursmtpserver tag 999999 +pending
|
||||
|
||||
or replay to email 999999@bugs.debian.org + submitter of bug
|
||||
With a message starting with:
|
||||
|
||||
Control: tag -1 +pending
|
||||
Thanks. Fixed into git.
|
||||
|
||||
or replay to email control@bugs.debian.org
|
||||
With only message
|
||||
tag 729538 +pending
|
||||
|
||||
|
||||
|
||||
##### Testing a package into unstable env
|
||||
|
||||
Check you have a mysql server available from another interface than "localhost".
|
||||
Check you have a mysql server available from another interface than localhost
|
||||
Comment line in /etc/mysql/my.cnf if required and restart mysql
|
||||
#bind-address = 127.0.0.1
|
||||
|
||||
Create a chroot called "unstable-amd64-sbuild".
|
||||
Chroot env is stored into /srv/chroot directory.
|
||||
Create a chroot called "unstable-amd64-sbuild"
|
||||
> sudo sbuild-createchroot --keyring= unstable /srv/chroot/unstable http://ftp.uk.debian.org/debian
|
||||
|
||||
Pour lister les env chroot
|
||||
@@ -149,7 +116,6 @@ Pour lister les env chroot
|
||||
|
||||
Puis pour se connecter et préparer l'environnement
|
||||
> schroot -c name_of_chroot
|
||||
> cat /etc/debian_chroot to check which debian branch we are into
|
||||
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
|
||||
> apt-get install links mysql-client
|
||||
|
||||
@@ -163,10 +129,7 @@ Pour tester un package
|
||||
> dpkg -i dolibarr*.deb ou pour avoir des traces: dpkg -D77777 -i dolibarr*.deb
|
||||
> apt-get install -f
|
||||
|
||||
If there is a problem launching apache, because port is already used, change it into your chroot install with
|
||||
> vi /etc/apache2/ports.conf
|
||||
Then restart.
|
||||
Then you can call/test dolibarr with http://localhost:port/dolibarr/ (It can be also called from host).
|
||||
Puis http://localhost/dolibarr/ (cela peut etre appeler depuis le hote).
|
||||
|
||||
|
||||
|
||||
@@ -233,9 +196,26 @@ http://packages.qa.debian.org/t/tcpdf.html
|
||||
* Package will be into release when test will be moved as stable.
|
||||
|
||||
|
||||
|
||||
##### Update but tracker system
|
||||
To set status of a bug to pending
|
||||
> bts tag 999999 +pending
|
||||
|
||||
or replay to email 999999@bugs.debian.org + submitter of bug
|
||||
With a message starting with:
|
||||
Control: tag -1 +pending
|
||||
and then a text like:
|
||||
Thanks. Fixed into git.
|
||||
|
||||
or replay to email control@bugs.debian.org
|
||||
With only message
|
||||
tag 729538 +pending
|
||||
|
||||
|
||||
|
||||
##### Create/Maintain dolibarr package
|
||||
|
||||
To update dolibarr debian package when upstream version has changed
|
||||
To update dolibarr debian package
|
||||
|
||||
* You can git clone debian git repo
|
||||
> git clone git.debian.org:/git/collab-maint/dolibarr.git [dolibarr-debian]
|
||||
@@ -270,25 +250,15 @@ x.y.z+dfsgw
|
||||
|
||||
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
|
||||
|
||||
* Fix debian/* files used to build package.
|
||||
Add an entry into debian/changelog
|
||||
> dch -v x.y.z+dfsgw-v "My comment" will add entry.
|
||||
* Add an entry into debian/changelog
|
||||
> dch -v x.y.z+dfsg-w "My comment" will add entry.
|
||||
For example: dch -v x.y.z+dfsgw-1 "New upstream release." for a new version (x.y.z = version, w start from 1 and increaed for each new import)
|
||||
Then modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
||||
Then check/modify also the user/date signature:
|
||||
- Date must have format reported by "date -R"
|
||||
- Name and email must match value into debian/control file (Entry added here is used by next step).
|
||||
|
||||
|
||||
To update dolibarr debian package when only files into debian has changed
|
||||
|
||||
* Change files and commit.
|
||||
* Add a tag debian/x.y.z+dfsgw-2 (increase the last 1 into 2)
|
||||
|
||||
|
||||
Once files has been prepared, it's time to test:
|
||||
|
||||
* Try to build package
|
||||
* We try to build package
|
||||
> rm -fr ../build-area; git-buildpackage -us -uc
|
||||
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
|
||||
@@ -306,7 +276,6 @@ Note: If there was errors managed manually, you may need to make a git commit bu
|
||||
> git-buildpackage --git-tag-only --git-retag
|
||||
> git push --tags
|
||||
|
||||
|
||||
* Compilation is then done by a debian developer and sent
|
||||
> sbuild ...
|
||||
> dput ...
|
||||
@@ -319,17 +288,3 @@ http://packages.qa.debian.org
|
||||
|
||||
* Package will be into release when test will be moved as stable.
|
||||
|
||||
|
||||
##### Send an unblock request
|
||||
Use this to move from unstable to testing.
|
||||
reportbug -B debian
|
||||
Choose package "release.debian.org"
|
||||
Then "unblock"
|
||||
Then name of package "dolibarr"
|
||||
Fill message, for example:
|
||||
"Please unblock package dolibarr
|
||||
A security error CVE-2014-7137 was reported and is fixed into package 3.5.5.
|
||||
Note that package 3.5.5 was prepared before the CVE was reported and include other fixes, but they are all related to stability or security (other se$
|
||||
After discussion with ..., it appears that security holes are enough to request this unblock request."
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
|
||||
# Require all granted
|
||||
# </IfVersion>
|
||||
# <IfVersion < 2.3>
|
||||
# Order allow, deny
|
||||
# Order allow,deny
|
||||
# Allow from all
|
||||
# </IfVersion>
|
||||
#
|
||||
@@ -27,7 +27,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order allow, deny
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
|
||||
|
||||
2
build/debian/conf.php.install
Executable file → Normal file
2
build/debian/conf.php.install
Executable file → Normal file
@@ -226,5 +226,3 @@ $dolibarr_main_prod='0';
|
||||
# Default value: 0 (use database value if exist)
|
||||
# Examples:
|
||||
# $dolibarr_mailing_limit_sendbyweb='0';
|
||||
|
||||
?>
|
||||
|
||||
@@ -159,7 +159,7 @@ Comments:
|
||||
Those files are not shipped in the binary package as we
|
||||
configure Dolibarr to use Dejavu fonts from "fonts-dejavu-core".
|
||||
|
||||
Files: docs/images/*
|
||||
Files: doc/images/*
|
||||
Copyright: Laurent Destailleur
|
||||
License: CC-BY-SA-3.0
|
||||
You are free:
|
||||
@@ -176,7 +176,7 @@ License: CC-BY-SA-3.0
|
||||
.
|
||||
For more information, see http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
Files: htdocs/includes/fpdi/*
|
||||
Files: htdocs/includes/fpdfi/*
|
||||
Copyright: 2004-2011 Setasign - Jan Slabon
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it
|
||||
|
||||
0
build/debian/dolibarr.install
Executable file → Normal file
0
build/debian/dolibarr.install
Executable file → Normal file
0
build/debian/dolibarr.lintian-overrides
Executable file → Normal file
0
build/debian/dolibarr.lintian-overrides
Executable file → Normal file
0
build/debian/dolibarr.templates.futur
Executable file → Normal file
0
build/debian/dolibarr.templates.futur
Executable file → Normal file
2
build/debian/install.forced.php.install
Executable file → Normal file
2
build/debian/install.forced.php.install
Executable file → Normal file
@@ -42,5 +42,3 @@ $force_install_lockinstall='444';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
//$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf';
|
||||
|
||||
?>
|
||||
0
build/debian/po/POTFILES.in
Executable file → Normal file
0
build/debian/po/POTFILES.in
Executable file → Normal file
0
build/debian/po/fr.po
Executable file → Normal file
0
build/debian/po/fr.po
Executable file → Normal file
4
build/doxygen/doxygen_footer.html
Executable file → Normal file
4
build/doxygen/doxygen_footer.html
Executable file → Normal file
@@ -26,7 +26,7 @@ for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversio
|
||||
|
||||
|
||||
<!-- Google AdSense -->
|
||||
<div class="center">
|
||||
<center>
|
||||
<script type="text/javascript"><!--
|
||||
google_ad_client = "pub-1071905880519467";
|
||||
/* PUBBANDEAUDOLIBARR */
|
||||
@@ -36,7 +36,7 @@ google_ad_height = 60;
|
||||
//-->
|
||||
</script>
|
||||
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
|
||||
</div>
|
||||
</center>
|
||||
<!-- End google adsense -->
|
||||
<br>
|
||||
|
||||
|
||||
4
build/doxygen/doxygen_header.html
Executable file → Normal file
4
build/doxygen/doxygen_header.html
Executable file → Normal file
@@ -24,7 +24,7 @@ File added into doxygen generated documentation
|
||||
</div>
|
||||
|
||||
<div id="logodol">
|
||||
<div class="center">
|
||||
<center>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td><div id="projectname">$projectname</div> - <span id="projectnumber">$projectnumber</span></td>
|
||||
@@ -54,7 +54,7 @@ File added into doxygen generated documentation
|
||||
<!-- banner end --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</center>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
/* Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file build/generate_filecheck_xml.php
|
||||
* \ingroup dev
|
||||
* \brief This script create a xml checksum file
|
||||
*/
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
// Main
|
||||
parse_str($argv[1]);
|
||||
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
||||
$outputfile=dirname(__FILE__).'/../htdocs/install/filelist.xml';
|
||||
$fp = fopen($outputfile,'w');
|
||||
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
|
||||
fputs($fp, '<checksum_list>'."\n");
|
||||
fputs($fp, '<dolibarr_root_dir version="'.$release.'">'."\n");
|
||||
$dir_iterator = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
|
||||
$iterator = new RecursiveIteratorIterator($dir_iterator);
|
||||
// need to ignore document custom etc
|
||||
$files = new RegexIterator($iterator, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install|nltechno))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
foreach ($files as $file) {
|
||||
$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose)
|
||||
fputs($fp, '</dir>'."\n");
|
||||
fputs($fp, '<dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
}
|
||||
if (filetype($file)=="file") {
|
||||
fputs($fp, '<md5file name="'.basename($file).'">'.md5_file($file).'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
fputs($fp, '</dir>'."\n");
|
||||
fputs($fp, '</dolibarr_root_dir>'."\n");
|
||||
fputs($fp, '</checksum_list>'."\n");
|
||||
fclose($fp);
|
||||
|
||||
print "File ".$outputfile." generated\n";
|
||||
|
||||
exit(0);
|
||||
@@ -22,7 +22,8 @@ $PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
|
||||
$PUBLISHBETARC="ldestailleur\@asso.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
|
||||
|
||||
|
||||
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
%REQUIREMENTPUBLISH=(
|
||||
"SF"=>"git ssh rsync",
|
||||
"ASSO"=>"git ssh rsync"
|
||||
@@ -351,6 +352,28 @@ if ($nboftargetok) {
|
||||
print "Go to directory $SOURCE\n";
|
||||
$olddir=getcwd();
|
||||
chdir("$SOURCE");
|
||||
|
||||
# Test that the ChangeLog is ok
|
||||
$ret=`grep "ChangeLog for $MAJOR.$MINOR\.$BUILD" "$SOURCE/ChangeLog" 2>&1`;
|
||||
if (! $ret)
|
||||
{
|
||||
print "Error: The ChangeLogFile was not updated. Run the following command first:\n";
|
||||
if (! $BUILD)
|
||||
{
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n`.. --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';
|
||||
}
|
||||
else
|
||||
{
|
||||
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/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
}
|
||||
print "\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog'\n";
|
||||
}
|
||||
|
||||
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/)
|
||||
@@ -427,6 +450,7 @@ if ($nboftargetok) {
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/mssql`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ansible`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/dbmodel`;
|
||||
@@ -435,6 +459,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ldap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/licence`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/multitail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/phpcheckstyle`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/phpunit`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/security`;
|
||||
@@ -465,6 +490,7 @@ if ($nboftargetok) {
|
||||
|
||||
# Removed known external modules to avoid any error when packaging from env where external modules are tested
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom/*`; # For custom we want to keep dir
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`;
|
||||
@@ -473,15 +499,16 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/oscim*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/api/explorer`; # This is a dev tool
|
||||
$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`;
|
||||
@@ -495,17 +522,29 @@ if ($nboftargetok) {
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf`; # Source of this flash is not available
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/PHPExcel/Shared/PDF`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/PHPExcel/Shared/PCLZip`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
|
||||
$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/utils`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,15 +8,16 @@ 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. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --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"
|
||||
- Update version/info in ChangeLog.
|
||||
To generate a changelog of a major new version x.y.0, you can do "cd ~/git/dolibarr_x.y; git log `git rev-list --boundary x.y..origin/develop | grep ^- | cut -c2- | head -n 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"
|
||||
- Update version number with x.y.z-w in htdocs/filefunc.inc.php
|
||||
- Update version number with x.y.z-w in build/debian/changelog
|
||||
- Commit all changes.
|
||||
- Add a Tag (x.y.z-beta) and push it: git push --tags
|
||||
- Create a branch (x.y).
|
||||
|
||||
- Run makepack-dolibarr.pl to generate all packages.
|
||||
|
||||
- Create a branch (x.y), if version seems stable enough.
|
||||
|
||||
- Move build files into www.dolibarr.org web site
|
||||
(/home/dolibarr/wwwroot/files/lastbuild).
|
||||
|
||||
@@ -29,9 +30,10 @@ This files describe steps made by Dolibarr packaging team to make a
|
||||
complete release of Dolibarr, step by step.
|
||||
|
||||
- Check all files are commited.
|
||||
- Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --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"
|
||||
- Update version/info in ChangeLog.
|
||||
To generate a changelog of a major new version x.y.0, you can do "cd ~/git/dolibarr_x.y; git log `git rev-list --boundary x.y..origin/develop | grep ^- | cut -c2- | head -n 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"
|
||||
- Update version number with x.y.z in htdocs/filefunc.inc.php
|
||||
- Update version number with x.y.z in build/debian/changelog
|
||||
- Commit all changes.
|
||||
|
||||
- Run makepack-dolibarr.pl to generate all packages.
|
||||
|
||||
@@ -14,7 +14,7 @@ https://build.opensuse.org
|
||||
Packaging rules: http://en.opensuse.org/Portal:Packaging
|
||||
|
||||
Add attributes:
|
||||
OBS:Screenshots URL of screenshot http://www.dolibarr.org/images/dolibarr_screenshot1.png
|
||||
OBS:Screenshots URL of screenshot
|
||||
OBS:QualityCategory Development|Testing|Stable|Private
|
||||
OBS:Maintained 1
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file dolibarr.pl
|
||||
# \brief Dolibarr script install for Virtualmin Pro
|
||||
# \author (c)2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
# \author (c)2009-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -30,8 +30,7 @@ return "Regis Houssin";
|
||||
# script_dolibarr_versions()
|
||||
sub script_dolibarr_versions
|
||||
{
|
||||
# TODO Replace this with version of Dolibar we want to install
|
||||
return ( "x.y.z", "3.6.0");
|
||||
return ( "3.7.2", "3.6.3", "3.5.6" );
|
||||
}
|
||||
|
||||
sub script_dolibarr_category
|
||||
@@ -57,6 +56,26 @@ local ($d, $ver) = @_;
|
||||
return ("mysql", "postgres");
|
||||
}
|
||||
|
||||
# script_dolibarr_depends(&domain, version)
|
||||
sub script_dolibarr_depends
|
||||
{
|
||||
local ($d, $ver, $sinfo, $phpver) = @_;
|
||||
local @rv;
|
||||
|
||||
if ($ver >= 3.6) {
|
||||
# Check for PHP 5.3+
|
||||
local $phpv = &get_php_version($phpver || 5, $d);
|
||||
if (!$phpv) {
|
||||
push(@rv, "Could not work out exact PHP version");
|
||||
}
|
||||
elsif ($phpv < 5.3) {
|
||||
push(@rv, "Dolibarr requires PHP version 5.3 or later");
|
||||
}
|
||||
}
|
||||
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# script_dolibarr_params(&domain, version, &upgrade-info)
|
||||
# Returns HTML for table rows for options for installing dolibarr
|
||||
sub script_dolibarr_params
|
||||
@@ -78,8 +97,7 @@ else {
|
||||
$rv .= &ui_table_row("Database for Dolibarr tables",
|
||||
&ui_database_select("db", undef, \@dbs, $d, "dolibarr"));
|
||||
$rv .= &ui_table_row("Install sub-directory under <tt>$hdir</tt>",
|
||||
&ui_opt_textbox("dir", "dolibarr", 30,
|
||||
"At top level"));
|
||||
&ui_opt_textbox("dir", &substitute_scriptname_template("dolibarr", $d), 30, "At top level"));
|
||||
if ($d->{'ssl'} && $ver >= 3.0) {
|
||||
$rv .= &ui_table_row("Force https connection?",
|
||||
&ui_yesno_radio("forcehttps", 0));
|
||||
@@ -159,7 +177,8 @@ if ($opts->{'newdb'} && !$upgrade) {
|
||||
local ($dbtype, $dbname) = split(/_/, $opts->{'db'}, 2);
|
||||
local $dbuser = $dbtype eq "mysql" ? &mysql_user($d) : &postgres_user($d);
|
||||
local $dbpass = $dbtype eq "mysql" ? &mysql_pass($d) : &postgres_pass($d, 1);
|
||||
local $dbphptype = $dbtype eq "mysql" ? "mysqli" : "pgsql";
|
||||
local $dbphptype = $dbtype eq "mysql" && $version >= 3.6 ? "mysql" :
|
||||
$dbtype eq "mysql" ? "mysqli" : "pgsql";
|
||||
local $dbhost = &get_database_host($dbtype);
|
||||
local $dberr = &check_script_db_connection($dbtype, $dbname, $dbuser, $dbpass);
|
||||
return (0, "Database connection failed : $dberr") if ($dberr);
|
||||
@@ -201,12 +220,10 @@ if ($opts->{'path'} =~ /\w/) {
|
||||
if (!$upgrade) {
|
||||
local $cdef = "$opts->{'dir'}/conf/conf.php.example";
|
||||
&run_as_domain_user($d, "cp ".quotemeta($cdef)." ".quotemeta($cfile));
|
||||
&set_ownership_permissions(undef, undef, 0777, $cfiledir);
|
||||
&set_ownership_permissions(undef, undef, 0666, $cfile);
|
||||
&set_permissions_as_domain_user($d, 0777, $cfiledir);
|
||||
&set_permissions_as_domain_user($d, 0666, $cfile);
|
||||
&run_as_domain_user($d, "mkdir ".quotemeta($docdir));
|
||||
&set_ownership_permissions(undef, undef, 0777, $docdir);
|
||||
&run_as_domain_user($d, "mkdir ".quotemeta($altdir));
|
||||
&set_ownership_permissions(undef, undef, 0777, $altdir);
|
||||
&set_permissions_as_domain_user($d, 0777, $docdir);
|
||||
}
|
||||
else {
|
||||
# Preserve old config file, documents and custom directory
|
||||
@@ -242,7 +259,7 @@ if ($upgrade) {
|
||||
[ "versionfrom", $upgrade->{'version'} ],
|
||||
[ "versionto", $ver ],
|
||||
);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, "step5", $d, $opts);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, "etape5", $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Remove the installation directory.
|
||||
@@ -268,12 +285,12 @@ else {
|
||||
[ "usealternaterootdir", "1" ],
|
||||
[ "main_alt_dir_name", "custom" ],
|
||||
);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, "step1", $d, $opts);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, "etape1", $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Second page (Populate database)
|
||||
local @params = ( [ "action", "set" ] );
|
||||
local $err = &call_dolibarr_wizard_page(\@params, "step2", $d, $opts);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, "etape2", $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Third page (Add administrator account)
|
||||
@@ -282,15 +299,15 @@ else {
|
||||
[ "pass", $dompass ],
|
||||
[ "pass_verif", $dompass ],
|
||||
);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, "step5", $d, $opts);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, "etape5", $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Remove the installation directory and protect config file.
|
||||
local $dinstall = "$opts->{'dir'}/install";
|
||||
$dinstall =~ s/\/$//;
|
||||
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
|
||||
&set_ownership_permissions(undef, undef, 0644, $cfile);
|
||||
&set_ownership_permissions(undef, undef, 0755, $cfiledir);
|
||||
&set_permissions_as_domain_user($d, 0644, $cfile);
|
||||
&set_permissions_as_domain_user($d, 0755, $cfiledir);
|
||||
}
|
||||
|
||||
# Return a URL for the user
|
||||
@@ -309,6 +326,7 @@ local $ipage = $opts->{'path'}."/install/".$page.".php";
|
||||
local ($iout, $ierror);
|
||||
|
||||
&post_http_connection($d, $ipage, $params, \$iout, \$ierror);
|
||||
print STDERR $iout;
|
||||
|
||||
if ($ierror) {
|
||||
return $ierror;
|
||||
@@ -329,10 +347,10 @@ local $derr = &delete_script_install_directory($d, $opts);
|
||||
return (0, $derr) if ($derr);
|
||||
|
||||
# Remove all llx_ tables from the database
|
||||
# 3 times because of constraints
|
||||
&cleanup_script_database($d, $opts->{'db'}, "llx_");
|
||||
&cleanup_script_database($d, $opts->{'db'}, "llx_");
|
||||
&cleanup_script_database($d, $opts->{'db'}, "llx_");
|
||||
# 4 times because of constraints
|
||||
for(my $i=0; $i<4; $i++) {
|
||||
&cleanup_script_database($d, $opts->{'db'}, "llx_");
|
||||
}
|
||||
|
||||
# Take out the DB
|
||||
if ($opts->{'newdb'}) {
|
||||
|
||||
0
build/rpm/conf.php
Executable file → Normal file
0
build/rpm/conf.php
Executable file → Normal file
0
build/rpm/dolibarr-forrpm.patch
Executable file → Normal file
0
build/rpm/dolibarr-forrpm.patch
Executable file → Normal file
0
build/rpm/dolibarr.desktop
Executable file → Normal file
0
build/rpm/dolibarr.desktop
Executable file → Normal file
@@ -159,7 +159,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
@@ -173,10 +172,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
%_datadir/dolibarr/htdocs/externalsite
|
||||
%_datadir/dolibarr/htdocs/fichinter
|
||||
@@ -188,13 +185,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
|
||||
@@ -239,7 +239,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
@@ -253,10 +252,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
%_datadir/dolibarr/htdocs/externalsite
|
||||
%_datadir/dolibarr/htdocs/fichinter
|
||||
@@ -268,13 +265,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
|
||||
@@ -156,7 +156,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
@@ -170,10 +169,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
%_datadir/dolibarr/htdocs/externalsite
|
||||
%_datadir/dolibarr/htdocs/fichinter
|
||||
@@ -185,13 +182,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
|
||||
@@ -167,7 +167,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
@@ -181,10 +180,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
%_datadir/dolibarr/htdocs/externalsite
|
||||
%_datadir/dolibarr/htdocs/fichinter
|
||||
@@ -196,13 +193,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
|
||||
0
build/rpm/file_contexts.dolibarr
Executable file → Normal file
0
build/rpm/file_contexts.dolibarr
Executable file → Normal file
2
build/rpm/install.forced.php.fedora
Executable file → Normal file
2
build/rpm/install.forced.php.fedora
Executable file → Normal file
@@ -31,5 +31,3 @@ $force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf';
|
||||
|
||||
?>
|
||||
1
build/rpm/install.forced.php.generic
Executable file → Normal file
1
build/rpm/install.forced.php.generic
Executable file → Normal file
@@ -20,4 +20,3 @@ $force_install_lockinstall='444';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
// We don't force any external lib with generic package
|
||||
?>
|
||||
2
build/rpm/install.forced.php.mandriva
Executable file → Normal file
2
build/rpm/install.forced.php.mandriva
Executable file → Normal file
@@ -31,5 +31,3 @@ $force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/TTF/dejavu/DejaVuSans-Bold.ttf';
|
||||
|
||||
?>
|
||||
2
build/rpm/install.forced.php.opensuse
Executable file → Normal file
2
build/rpm/install.forced.php.opensuse
Executable file → Normal file
@@ -31,5 +31,3 @@ $force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf';
|
||||
|
||||
?>
|
||||
18
build/travis-ci/apache.conf
Normal file
18
build/travis-ci/apache.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
<VirtualHost *:80>
|
||||
DocumentRoot %TRAVIS_BUILD_DIR%/htdocs
|
||||
|
||||
<Directory "%TRAVIS_BUILD_DIR%/htdocs">
|
||||
Options FollowSymLinks MultiViews ExecCGI
|
||||
AllowOverride All
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
# Wire up Apache to use Travis CI's php-fpm.
|
||||
<IfModule mod_fastcgi.c>
|
||||
AddHandler php5-fcgi .php
|
||||
Action php5-fcgi /php5-fcgi
|
||||
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
||||
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
|
||||
</IfModule>
|
||||
</VirtualHost>
|
||||
@@ -6,27 +6,34 @@
|
||||
"homepage": "http://www.dolibarr.org",
|
||||
"license": "GPL-3.0+",
|
||||
"support": {
|
||||
"issues": "https://doliforge.org/projects/dolibarr",
|
||||
"issues": "https://github.com/Dolibarr/dolibarr/issues",
|
||||
"forum": "http://www.dolibarr.org/forum",
|
||||
"wiki": "http://wiki.dolibarr.org"
|
||||
"wiki": "http://wiki.dolibarr.org",
|
||||
"irc": "irc://chat.freenode.net/dolibarr",
|
||||
"source": "https://github.com/Dolibarr/dolibarr"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0",
|
||||
"ext-gd": "*",
|
||||
"ext-curl": "*",
|
||||
"restler/framework": "3.0.*"
|
||||
"ext-curl": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mysqli": "*",
|
||||
"ext-pgsql": "*",
|
||||
"ext-mssql": "*",
|
||||
"ext-pdo_sqlite": "*",
|
||||
"ext-imagick": "*",
|
||||
"ext-mcrypt": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-soap": "*",
|
||||
"ext-zip": "*",
|
||||
"ext-xml": "*"
|
||||
"ext-mysqlnd": "To use with MySQL or MariaDB",
|
||||
"ext-mysqli": "To use with MySQL or MariaDB",
|
||||
"ext-pgsql": "To use with PostgreSQL",
|
||||
"ext-mssql": "To use with MSSQL (experimental)",
|
||||
"ext-pdo_sqlite": "To use with SQLite (experimental)",
|
||||
"ext-gd": "Image manipulation (Required but maybe built-in PHP)",
|
||||
"ext-imagick": "Image manipulation (TCPDF)",
|
||||
"ext-mcrypt": "(Required but maybe built-in PHP)",
|
||||
"ext-openssl": "Secure connections (Emails, SOAP…)",
|
||||
"ext-mbstring": "Handle non UTF-8 databases",
|
||||
"ext-soap": "Native SOAP",
|
||||
"ext-zip": "ODT and Excel support",
|
||||
"ext-xml": "Excel support",
|
||||
"firephp/firephp-core": "Logging to Firebug console support",
|
||||
"raven/raven": "Sentry logging server support"
|
||||
},
|
||||
"config": {
|
||||
"vendor-dir": "htdocs/includes"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# This directory contains script example to use ansible to deploy or maitains dolibarr instances
|
||||
|
||||
This is a quick tutorial:
|
||||
|
||||
* Install ansible:
|
||||
> apt-get install ansible
|
||||
|
||||
* Add ip of server to manage into
|
||||
/etc/ansible/hosts
|
||||
|
||||
* Deploy public key to managed servers
|
||||
- authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}"
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env ansible-playbook
|
||||
|
||||
# Run script with ansible-playbook deploydev.yml
|
||||
# or ./deploydev.yml
|
||||
|
||||
- name: Configure webserver with apache
|
||||
hosts: webservers
|
||||
sudo: True
|
||||
tasks:
|
||||
- name: install apache
|
||||
apt: name=apache update_cache=yes
|
||||
- name: copy apache config file
|
||||
copy: src=files/apachealias.conf dest=/etc/apache/conf.d/dolibarr_dev
|
||||
#- name: enable configuration
|
||||
# file: >
|
||||
# dest=/etc/apache/sites-enabled/default
|
||||
# src=/etc/apache/sites-available/default
|
||||
# state=link
|
||||
- name: copy info.html
|
||||
template: src=templates/info.html.j2 dest=/var/www/dolibarr_dev/info.html
|
||||
mode=0644
|
||||
- name: restart apache
|
||||
service: name=apache state=restarted
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
Alias /dolibarr_dev /var/www/dolibarr
|
||||
@@ -1,2 +0,0 @@
|
||||
[webservers]
|
||||
testserver ansible_ssh_host=127.0.0.1 ansible_ssh_port=22
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Page info ansible</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Apache, configured by Ansible</h1>
|
||||
<p>If you can see this, Ansible successfully installed apache.</p>
|
||||
<p>{{ ansible_managed }}</p>
|
||||
</body>
|
||||
</html>
|
||||
11
dev/codesniffer/README
Executable file → Normal file
11
dev/codesniffer/README
Executable file → Normal file
@@ -1,12 +1,9 @@
|
||||
README (English)
|
||||
--------------------------------
|
||||
|
||||
This directory contains ruleset files to use to develop Dolibarr EPR & CRM.
|
||||
This directory contains ruleset files to use to
|
||||
develop Dolibarr EPR & CRM with Eclipse.
|
||||
|
||||
To install/upgrade phpcs:
|
||||
> sudo pear upgrade PHP_CodeSniffer
|
||||
|
||||
Note with Eclipse: You must setup the PTI plugin of Eclipse into PHPCodeSniffer menu with:
|
||||
Note: You must setup the PTI plugin of Eclipse into PHPCodeSniffer menu with:
|
||||
* tab value to 4
|
||||
* path of code sniffer standard to dev/codesniffer
|
||||
|
||||
* path of code sniffer standard to dev/codesniffer
|
||||
0
dev/codesniffer/php.ini
Executable file → Normal file
0
dev/codesniffer/php.ini
Executable file → Normal file
0
dev/codesniffer/ruleset.dtd
Executable file → Normal file
0
dev/codesniffer/ruleset.dtd
Executable file → Normal file
15
dev/codesniffer/ruleset.xml
Executable file → Normal file
15
dev/codesniffer/ruleset.xml
Executable file → Normal file
@@ -289,6 +289,15 @@
|
||||
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature" />
|
||||
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.Indent">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
@@ -304,12 +313,6 @@
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Functions.ValidDefaultValue" />
|
||||
|
||||
|
||||
0
dev/codetemplates/README
Executable file → Normal file
0
dev/codetemplates/README
Executable file → Normal file
0
dev/codetemplates/codetemplates.dtd
Executable file → Normal file
0
dev/codetemplates/codetemplates.dtd
Executable file → Normal file
0
dev/codetemplates/codetemplates.xml
Executable file → Normal file
0
dev/codetemplates/codetemplates.xml
Executable file → Normal file
@@ -23,21 +23,6 @@ Replace call to serialize_val with no bugged value
|
||||
|
||||
|
||||
|
||||
FPDI:
|
||||
-----
|
||||
Replace:
|
||||
$this->_readXref($this->_xref, $this->_findXref());
|
||||
with:
|
||||
try {
|
||||
$this->_readXref($this->_xref, $this->_findXref());
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
print $e->getMessage();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
TCPDF:
|
||||
------
|
||||
* Removed all fonts except
|
||||
@@ -62,19 +47,6 @@ In htdocs/includes/tcpdf/tcpdf.php
|
||||
* Renamed getmypid into dol_getmypid().
|
||||
|
||||
|
||||
TCPDI:
|
||||
------
|
||||
Add fpdf_tpl.php 1.2
|
||||
Add tcpdi.php
|
||||
Add tcpdi_parser.php and replace:
|
||||
require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
|
||||
with:
|
||||
require_once(dirname(__FILE__).'/../tcpdf/include/tcpdf_filters.php');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSGANTT:
|
||||
--------
|
||||
* Replace in function JSGantt.taskLink
|
||||
|
||||
0
dev/examples/README
Executable file → Normal file
0
dev/examples/README
Executable file → Normal file
@@ -66,11 +66,11 @@ $myproduct=new Product($db);
|
||||
|
||||
// Definition of product instance properties
|
||||
$myproduct->ref = '1234';
|
||||
$myproduct->label = 'label';
|
||||
$myproduct->libelle = 'libelle';
|
||||
$myproduct->price = '10';
|
||||
$myproduct->price_base_type = 'HT';
|
||||
$myproduct->tva_tx = '19.6';
|
||||
$myproduct->type = Product::TYPE_PRODUCT;
|
||||
$myproduct->type = 0;
|
||||
$myproduct->status = 1;
|
||||
$myproduct->description = 'Description';
|
||||
$myproduct->note = 'Note';
|
||||
|
||||
@@ -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, also files into includes."
|
||||
echo "Detect and fix files ending with bad ending chars (must be LF)"
|
||||
echo "Usage: fixdosfiles.sh [list|fix]"
|
||||
fi
|
||||
|
||||
# To detec
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
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 "*.txt" -o -iname "*.xml" \) -exec file "{}" + | 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 "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'htdocs\/includes' | 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 "*.txt" \) -exec file "{}" + | 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 "*.txt" \) -exec file "{}" + | grep -v 'htdocs\/includes' | grep CRLF
|
||||
fi
|
||||
|
||||
# To convert
|
||||
if [ "x$1" = "xfix" ]
|
||||
then
|
||||
for fic in `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 "*.txt" -o -iname "*.xml"\) -exec file "{}" + | grep CRLF | awk -F':' '{ print $1 }' `
|
||||
for fic in `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 "*.txt" \) -exec file "{}" + | grep CRLF | awk -F':' '{ print $1 }' `
|
||||
do
|
||||
echo "Fix file $fic"
|
||||
dos2unix $fic
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
Example fo recurring event, 1 week, no end, exported by Google
|
||||
|
||||
# The recurring event were recorded every monday the 20150518. This is the Recurrence-id, but then
|
||||
# first occurence was moved on tuesday. So this record were added.
|
||||
BEGIN:VEVENT
|
||||
DTSTART;TZID=Europe/Paris:20150519T100000
|
||||
DTEND;TZID=Europe/Paris:20150519T110000
|
||||
DTSTAMP:20150517T175754Z
|
||||
UID:9026chuafli29ns5soshvckamc@google.com
|
||||
RECURRENCE-ID;TZID=Europe/Paris:20150518T100000
|
||||
CREATED:20150517T174404Z
|
||||
DESCRIPTION:
|
||||
LAST-MODIFIED:20150517T175008Z
|
||||
LOCATION:
|
||||
SEQUENCE:1
|
||||
STATUS:CONFIRMED
|
||||
SUMMARY:aaa
|
||||
TRANSP:OPAQUE
|
||||
END:VEVENT
|
||||
|
||||
# The recurring event were recorded every monday the 20150518.
|
||||
BEGIN:VEVENT
|
||||
DTSTART;TZID=Europe/Paris:20150518T100000
|
||||
DTEND;TZID=Europe/Paris:20150518T110000
|
||||
RRULE:FREQ=WEEKLY;BYDAY=MO
|
||||
DTSTAMP:20150517T175754Z
|
||||
UID:9026chuafli29ns5soshvckamc@google.com
|
||||
CREATED:20150517T174404Z
|
||||
DESCRIPTION:
|
||||
LAST-MODIFIED:20150517T174404Z
|
||||
LOCATION:
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
SUMMARY:aaa
|
||||
TRANSP:OPAQUE
|
||||
END:VEVENT
|
||||
|
||||
|
||||
|
||||
|
||||
Example fo recurring event, every 2 month, no end, exported by Google
|
||||
|
||||
BEGIN:VEVENT
|
||||
DTSTART;TZID=Europe/Paris:20150519T080000
|
||||
DTEND;TZID=Europe/Paris:20150519T090000
|
||||
RRULE:FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=19
|
||||
DTSTAMP:20150517T175754Z
|
||||
UID:urkq3ih1mlaqeu4dbkpdh4i61s@google.com
|
||||
CREATED:20150517T175658Z
|
||||
DESCRIPTION:
|
||||
LAST-MODIFIED:20150517T175658Z
|
||||
LOCATION:
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
SUMMARY:bbbbb
|
||||
TRANSP:OPAQUE
|
||||
END:VEVENT
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/initdata/generate-commande.php
|
||||
* \file htdocs/dev/generate-commande.php
|
||||
* \brief Script de generation de donnees aleatoires pour les commandes
|
||||
*/
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/intdata/generate-facture.php
|
||||
* \file htdocs/dev/generate-facture.php
|
||||
* \brief Script de generation de donnees aleatoires pour les factures
|
||||
*/
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/initdata/generate-produit.php
|
||||
* \file htdocs/dev/generate-produit.php
|
||||
* \brief Script de generation de donnees aleatoires pour les produits
|
||||
*/
|
||||
|
||||
@@ -88,7 +88,7 @@ for ($s = 0 ; $s < GEN_NUMBER_PRODUIT ; $s++)
|
||||
$produit->type = rand(0,1);
|
||||
$produit->status = 1;
|
||||
$produit->ref = ($produit->type?'S':'P').time().$s;
|
||||
$produit->label = 'Label '.time().$s;
|
||||
$produit->libelle = 'Label '.time().$s;
|
||||
$produit->description = 'Description '.time().$s;
|
||||
$produit->price = rand(1,1000);
|
||||
$produit->tva_tx = "19.6";
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/initdata/generate-propale.php
|
||||
* \file htdocs/dev/generate-propale.php
|
||||
* \brief Script de generation de donnees aleatoires pour les propales
|
||||
*/
|
||||
|
||||
@@ -103,8 +103,7 @@ if ($resql)
|
||||
}
|
||||
}
|
||||
|
||||
$user->rights->propal->creer=1;
|
||||
$user->rights->propal->propal_advance->validate=1;
|
||||
$user->rights->propale->valider=1;
|
||||
|
||||
|
||||
if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"))
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/initdata/generate-societe.php
|
||||
* \brief Script de generation de donnees aleatoires pour les societes
|
||||
* \file htdocs/dev/generate-societe.php
|
||||
* \brief Script de generation de donnees aleatoires pour les societes
|
||||
*/
|
||||
|
||||
// Test si mode batch
|
||||
@@ -89,7 +89,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
||||
{
|
||||
print "Company $s\n";
|
||||
$soc = new Societe($db);
|
||||
$soc->name = "Company num ".time()."$s";
|
||||
$soc->nom = "Company num ".time()."$s";
|
||||
$soc->town = $listoftown[rand(0, count($listoftown)-1)];
|
||||
$soc->client = rand(1,2); // Une societe sur 2 est prospect, l'autre client
|
||||
$soc->fournisseur = rand(0,1); // Une societe sur 2 est fournisseur
|
||||
@@ -101,7 +101,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
||||
// Un client sur 3 a une remise de 5%
|
||||
$user_remise=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';
|
||||
$soc->note='Company created by the script generate-societe.php';
|
||||
$socid = $soc->create();
|
||||
|
||||
if ($socid >= 0)
|
||||
@@ -120,7 +120,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
||||
}
|
||||
}
|
||||
|
||||
print "Company ".$s." created nom=".$soc->name."\n";
|
||||
print "Company ".$s." created nom=".$soc->nom."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
0
dev/iso-normes/GURULABS-RPM-GUIDE-v1.0.PDF
Executable file → Normal file
0
dev/iso-normes/GURULABS-RPM-GUIDE-v1.0.PDF
Executable file → Normal file
0
dev/iso-normes/address_format.txt
Executable file → Normal file
0
dev/iso-normes/address_format.txt
Executable file → Normal file
0
dev/iso-normes/banknumber_format.txt
Executable file → Normal file
0
dev/iso-normes/banknumber_format.txt
Executable file → Normal file
0
dev/iso-normes/xmlexport.txt
Executable file → Normal file
0
dev/iso-normes/xmlexport.txt
Executable file → Normal file
@@ -1,5 +1,4 @@
|
||||
# ldapadd_sample1.txt
|
||||
# ldapadd is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to add a dc "my-domain".
|
||||
# This is the first thing to create
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# ldapadd_sample2.txt
|
||||
# ldapadd is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to add a ou "contacts"
|
||||
# This is the second thing to create after creating the root my-domain
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# ldapadd_sample3.txt
|
||||
# ldapadd is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to add cn records
|
||||
# This is the step to create records inside tree ou=contacts,dc=my-domain,dc=com
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# ldapdelete_sample1.txt
|
||||
# ldapdelete is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to delete a dc "my-domain"
|
||||
# This delete the first level of LDAP tree.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# ldapdelete_sample3.txt
|
||||
# ldapdelete is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to delete cn records
|
||||
# This is the step to delete a cn record stored inside tree ou=contacts,dc=my-domain,dc=com
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# ldapmodify_sample1.txt
|
||||
# ldapmodify is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to modify a dc "my-domain"
|
||||
#
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# ldapsearch_sample1.txt
|
||||
# ldapsearch is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to search into a ldap
|
||||
#
|
||||
# ldapsearch -h hostname -x
|
||||
# ldapsearch -h hostname -x -b "ou=people,dc=teclib,dc=infra"
|
||||
# ldapsearch -h hostname -x -z 0 -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -W "(objectclass=*)"
|
||||
# ldapsearch -h hostname -x -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -W "(objectclass=*)"
|
||||
@@ -1,12 +0,0 @@
|
||||
# This is an example of multitail setup file you can use to analyze dolibarr log files.
|
||||
# Usage: multitail -cS dolibarr documents/dolibarr.log
|
||||
colorscheme:dolibarr
|
||||
bright:1
|
||||
cs_re:yellow,red:.*EMERG.*
|
||||
cs_re:white,red:.*ALERT.*
|
||||
cs_re:green,red:.*CRIT.*
|
||||
cs_re:red:.*ERR.*
|
||||
cs_re:white,yellow:.*WARNING.*
|
||||
cs_re:green,yellow:.*NOTICE.*
|
||||
cs_re:green:.*INFO.*
|
||||
cs_re:white:.*DEBUG.*
|
||||
@@ -6,7 +6,7 @@ PROGNAME=${0##*/}
|
||||
INPUT=''
|
||||
QUIET='0'
|
||||
NOSTATS='0'
|
||||
INPLACE='0' # (1=Images are replaced, 0=New images are stored into $OUTPUT)
|
||||
INPLACE='0'
|
||||
max_input_size=0
|
||||
max_output_size=0
|
||||
|
||||
|
||||
0
dev/phpunit/README
Executable file → Normal file
0
dev/phpunit/README
Executable file → Normal file
0
dev/phpunit/eclipse_setup_for_pti_phpunit.png
Executable file → Normal file
0
dev/phpunit/eclipse_setup_for_pti_phpunit.png
Executable file → Normal file
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
@@ -1,123 +0,0 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/skeletons/build_api_class.php
|
||||
* \ingroup core
|
||||
* \brief Create a complete API class file from existant class file
|
||||
*/
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
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;
|
||||
}
|
||||
|
||||
// Include Dolibarr environment
|
||||
require_once($path."../../htdocs/master.inc.php");
|
||||
// After this $db is a defined handler to database.
|
||||
|
||||
// Main
|
||||
$version='1';
|
||||
@set_time_limit(0);
|
||||
$error=0;
|
||||
|
||||
$langs->load("main");
|
||||
|
||||
|
||||
print "***** $script_file ($version) *****\n";
|
||||
|
||||
|
||||
// -------------------- START OF BUILD_API_FROM_CLASS --------------------
|
||||
|
||||
// Check parameters
|
||||
if (! isset($argv[1]) && ! isset($argv[2]))
|
||||
{
|
||||
print "Usage: $script_file phpClassFile phpClassName\n";
|
||||
exit;
|
||||
}
|
||||
// Show parameters
|
||||
print 'Classfile='.$argv[1]."\n";
|
||||
print 'Classname='.$argv[2]."\n";
|
||||
|
||||
$classfile=$argv[1];
|
||||
$classname=$argv[2];
|
||||
$classmin=strtolower($classname);
|
||||
$classnameApi = $classname.'Api';
|
||||
$property=array();
|
||||
$targetcontent='';
|
||||
|
||||
// Load the class and read properties
|
||||
require_once($classfile);
|
||||
|
||||
$property=array();
|
||||
$class = new $classname($db);
|
||||
$values=get_class_vars($classname);
|
||||
|
||||
unset($values['db']);
|
||||
unset($values['error']);
|
||||
unset($values['errors']);
|
||||
unset($values['element']);
|
||||
unset($values['table_element']);
|
||||
unset($values['table_element_line']);
|
||||
unset($values['fk_element']);
|
||||
unset($values['ismultientitymanaged']);
|
||||
|
||||
// Read skeleton_api_class.class.php file
|
||||
$skeletonfile=$path.'skeleton_api_class.class.php';
|
||||
$sourcecontent=file_get_contents($skeletonfile);
|
||||
if (! $sourcecontent)
|
||||
{
|
||||
print "\n";
|
||||
print "Error: Failed to read skeleton sample '".$skeletonfile."'\n";
|
||||
print "Try to run script from skeletons directory.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Define output variables
|
||||
$outfile='out.api_'.$classmin.'.class.php';
|
||||
$targetcontent=$sourcecontent;
|
||||
|
||||
// Substitute class name
|
||||
$targetcontent=preg_replace('/skeleton_api_class\.class\.php/', 'api_'.$classmin.'.class.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
|
||||
//$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$tablenoprefix.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/SkeletonApi/', $classnameApi, $targetcontent);
|
||||
$targetcontent=preg_replace('/Skeleton/', $classname, $targetcontent);
|
||||
|
||||
// Build file
|
||||
$fp=fopen($outfile,"w");
|
||||
if ($fp)
|
||||
{
|
||||
fputs($fp, $targetcontent);
|
||||
fclose($fp);
|
||||
print "\n";
|
||||
print "File '".$outfile."' has been built in current directory.\n";
|
||||
}
|
||||
else $error++;
|
||||
|
||||
|
||||
|
||||
// -------------------- END OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
|
||||
|
||||
print "You can now rename generated files by removing the 'out.' prefix in their name and store them into directory /module/class.\n";
|
||||
return $error;
|
||||
@@ -174,7 +174,7 @@ $targetcontent=$sourcecontent;
|
||||
// Substitute class name
|
||||
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$element=\'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$tablenoprefix.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
||||
|
||||
// Substitute comments
|
||||
@@ -252,13 +252,7 @@ foreach($property as $key => $prop)
|
||||
if ($addfield)
|
||||
{
|
||||
$varprop.="\t\t\$sql.= \" ";
|
||||
if ($prop['field']=='datec')
|
||||
{
|
||||
$varprop.='"."\'".$this->db->idate(dol_now())."\'"."';
|
||||
if ($i < count($property)) $varprop.=",";
|
||||
$varprop.='";';
|
||||
}
|
||||
elseif ($prop['istime'])
|
||||
if ($prop['istime'])
|
||||
{
|
||||
$varprop.='".(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].')==0?\'NULL\':"\'".$this->db->idate(';
|
||||
$varprop.="\$this->".$prop['field']."";
|
||||
@@ -274,12 +268,6 @@ foreach($property as $key => $prop)
|
||||
if ($i < count($property)) $varprop.=",";
|
||||
$varprop.='";';
|
||||
}
|
||||
elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_author')
|
||||
{
|
||||
$varprop.='".$user->id."';
|
||||
if ($i < count($property)) $varprop.=",";
|
||||
$varprop.='";';
|
||||
}
|
||||
else
|
||||
{
|
||||
$varprop.='".(! isset($this->'.$prop['field'].')?\'NULL\':"\'".';
|
||||
@@ -301,17 +289,11 @@ $i=0;
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
$i++;
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && $prop['field'] != 'datec' && $prop['field'] != 'fk_user_author')
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
|
||||
{
|
||||
$varprop.="\t\t\$sql.= \" ";
|
||||
$varprop.=$prop['field'].'=';
|
||||
if ($prop['field']=='tms') {
|
||||
$varprop.='".(dol_strlen($this->'.$prop['field'].')!=0 ? "\'".$this->db->idate(';
|
||||
$varprop.='$this->'.$prop['field'];
|
||||
$varprop.=')."\'" : "\'".$this->db->idate(dol_now())."\'").';
|
||||
$varprop.='"';
|
||||
}
|
||||
elseif ($prop['istime'])
|
||||
if ($prop['istime'])
|
||||
{
|
||||
// (dol_strlen($this->datep)!=0 ? "'".$this->db->idate($this->datep)."'" : 'null')
|
||||
$varprop.='".(dol_strlen($this->'.$prop['field'].')!=0 ? "\'".$this->db->idate(';
|
||||
@@ -319,9 +301,6 @@ foreach($property as $key => $prop)
|
||||
$varprop.=')."\'" : \'null\').';
|
||||
$varprop.='"';
|
||||
}
|
||||
elseif ($prop['field']=='fk_user_mod') {
|
||||
$varprop.='".$user->id."';
|
||||
}
|
||||
else
|
||||
{
|
||||
$varprop.="\".";
|
||||
@@ -346,7 +325,6 @@ $targetcontent=preg_replace('/\$sql\.= " t\.field2";/', '', $targetcontent);
|
||||
|
||||
// Substitute select set parameters
|
||||
$varprop="\n";
|
||||
$varpropline="\n";
|
||||
$cleanparam='';
|
||||
$i=0;
|
||||
foreach($property as $key => $prop)
|
||||
@@ -360,22 +338,11 @@ foreach($property as $key => $prop)
|
||||
if ($prop['istime']) $varprop.=')';
|
||||
$varprop.=";";
|
||||
$varprop.="\n";
|
||||
|
||||
$varpropline.="\t\t\t\t\$line->".$prop['field']." = ";
|
||||
if ($prop['istime']) $varpropline.='$this->db->jdate(';
|
||||
$varpropline.='$obj->'.$prop['field'];
|
||||
if ($prop['istime']) $varpropline.=')';
|
||||
$varpropline.=";";
|
||||
$varpropline.="\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/\$this->prop1 = \$obj->field1;/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$this->prop2 = \$obj->field2;/', '', $targetcontent);
|
||||
|
||||
//Substirute fetchAll
|
||||
$targetcontent=preg_replace('/\$line->prop1 = \$obj->field1;/', $varpropline, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$line->prop2 = \$obj->field2;/', '', $targetcontent);
|
||||
|
||||
|
||||
// Substitute initasspecimen parameters
|
||||
$varprop="\n";
|
||||
|
||||
0
dev/skeletons/build_webservice_from_class.php
Normal file → Executable file
0
dev/skeletons/build_webservice_from_class.php
Normal file → Executable file
@@ -34,11 +34,11 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
class modMyModule extends DolibarrModules
|
||||
{
|
||||
/**
|
||||
* Constructor. Define names, constants, directories, boxes, permissions
|
||||
* Constructor. Define names, constants, directories, boxes, permissions
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db)
|
||||
function __construct($db)
|
||||
{
|
||||
global $langs,$conf;
|
||||
|
||||
@@ -57,7 +57,7 @@ class modMyModule extends DolibarrModules
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->description = "Description of module MyModule";
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||
$this->version = '1.0';
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
@@ -167,12 +167,6 @@ class modMyModule extends DolibarrModules
|
||||
// Example:
|
||||
//$this->boxes=array(array(0=>array('file'=>'myboxa.php','note'=>'','enabledbydefaulton'=>'Home'),1=>array('file'=>'myboxb.php','note'=>''),2=>array('file'=>'myboxc.php','note'=>'')););
|
||||
|
||||
// Cronjobs
|
||||
$this->cronjobs = array(); // List of cron jobs entries to add
|
||||
// Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>3600, 'unitfrequency'=>3600),
|
||||
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>3600, 'unitfrequency'=>3600)
|
||||
// );
|
||||
|
||||
// Permissions
|
||||
$this->rights = array(); // Permission array used by this module
|
||||
$r=0;
|
||||
@@ -186,6 +180,7 @@ class modMyModule extends DolibarrModules
|
||||
// $this->rights[$r][5] = 'level2'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
// $r++;
|
||||
|
||||
|
||||
// Main menu entries
|
||||
$this->menu = array(); // List of menus to add
|
||||
$r=0;
|
||||
@@ -249,24 +244,24 @@ class modMyModule extends DolibarrModules
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function init($options='')
|
||||
function init($options='')
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
//$this->_load_tables('/mymodule/sql/');
|
||||
$result=$this->_load_tables('/mymodule/sql/');
|
||||
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when module is disabled.
|
||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||
* Data directories are not deleted
|
||||
* Function called when module is disabled.
|
||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||
* Data directories are not deleted
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function remove($options = '')
|
||||
function remove($options='')
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
|
||||
@@ -1,288 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Luracast\Restler\RestException;
|
||||
|
||||
|
||||
/**
|
||||
* API class for skeleton object
|
||||
*
|
||||
* @smart-auto-routing false
|
||||
* @access protected
|
||||
* @class DolibarrApiAccess {@requires user,external}
|
||||
*
|
||||
*
|
||||
*/
|
||||
class SkeletonApi extends DolibarrApi
|
||||
{
|
||||
/**
|
||||
* @var array $FIELDS Mandatory fields, checked when create and update object
|
||||
*/
|
||||
static $FIELDS = array(
|
||||
'name'
|
||||
);
|
||||
|
||||
/**
|
||||
* @var Skeleton $skeleton {@type Skeleton}
|
||||
*/
|
||||
public $skeleton;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @url GET skeleton/
|
||||
*
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
global $db, $conf;
|
||||
$this->db = $db;
|
||||
$this->skeleton = new Skeleton($this->db);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get properties of a skeleton object
|
||||
*
|
||||
* Return an array with skeleton informations
|
||||
*
|
||||
* @param int $id ID of skeleton
|
||||
* @return array|mixed data without useless information
|
||||
*
|
||||
* @url GET skeleton/{id}
|
||||
* @throws RestException
|
||||
*/
|
||||
function get($id)
|
||||
{
|
||||
if(! DolibarrApiAccess::$user->rights->skeleton->read) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
$result = $this->skeleton->fetch($id);
|
||||
if( ! $result ) {
|
||||
throw new RestException(404, 'Skeleton not found');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('skeleton',$this->skeleton->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
return $this->_cleanObjectDatas($this->skeleton);
|
||||
}
|
||||
|
||||
/**
|
||||
* List skeletons
|
||||
*
|
||||
* Get a list of skeletons
|
||||
*
|
||||
* @param int $mode Use this param to filter list
|
||||
* @param string $sortfield Sort field
|
||||
* @param string $sortorder Sort order
|
||||
* @param int $limit Limit for list
|
||||
* @param int $page Page number
|
||||
*
|
||||
* @return array Array of skeleton objects
|
||||
*
|
||||
* @url GET /skeletons/
|
||||
*/
|
||||
function getList($mode, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
||||
global $db, $conf;
|
||||
|
||||
$obj_ret = array();
|
||||
|
||||
$socid = DolibarrApiAccess::$user->societe_id ? DolibarrApiAccess::$user->societe_id : '';
|
||||
|
||||
// If the internal user must only see his customers, force searching by him
|
||||
if (! DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) $search_sale = DolibarrApiAccess::$user->id;
|
||||
|
||||
$sql = "SELECT s.rowid";
|
||||
if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."skeleton as s";
|
||||
|
||||
if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
|
||||
$sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st";
|
||||
$sql.= " WHERE s.fk_stcomm = st.id";
|
||||
|
||||
// Example of use $mode
|
||||
//if ($mode == 1) $sql.= " AND s.client IN (1, 3)";
|
||||
//if ($mode == 2) $sql.= " AND s.client IN (2, 3)";
|
||||
|
||||
$sql.= ' AND s.entity IN ('.getEntity('skeleton', 1).')';
|
||||
if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND s.fk_soc = sc.fk_soc";
|
||||
if ($socid) $sql.= " AND s.fk_soc = ".$socid;
|
||||
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale
|
||||
|
||||
// Insert sale filter
|
||||
if ($search_sale > 0)
|
||||
{
|
||||
$sql .= " AND sc.fk_user = ".$search_sale;
|
||||
}
|
||||
|
||||
$nbtotalofrecords = 0;
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
}
|
||||
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
if ($limit) {
|
||||
if ($page < 0)
|
||||
{
|
||||
$page = 0;
|
||||
}
|
||||
$offset = $limit * $page;
|
||||
|
||||
$sql.= $db->plimit($limit + 1, $offset);
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$skeleton_static = new Skeleton($db);
|
||||
if($skeleton_static->fetch($obj->rowid)) {
|
||||
$obj_ret[] = parent::_cleanObjectDatas($skeleton_static);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new RestException(503, 'Error when retrieve skeleton list');
|
||||
}
|
||||
if( ! count($obj_ret)) {
|
||||
throw new RestException(404, 'No skeleton found');
|
||||
}
|
||||
return $obj_ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create skeleton object
|
||||
*
|
||||
* @param array $request_data Request datas
|
||||
* @return int ID of skeleton
|
||||
*
|
||||
* @url POST skeleton/
|
||||
*/
|
||||
function post($request_data = NULL)
|
||||
{
|
||||
if(! DolibarrApiAccess::$user->rights->skeleton->create) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
// Check mandatory fields
|
||||
$result = $this->_validate($request_data);
|
||||
|
||||
foreach($request_data as $field => $value) {
|
||||
$this->skeleton->$field = $value;
|
||||
}
|
||||
if( ! $this->skeleton->create(DolibarrApiAccess::$user)) {
|
||||
throw new RestException(500);
|
||||
}
|
||||
return $this->skeleton->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update skeleton
|
||||
*
|
||||
* @param int $id Id of skeleton to update
|
||||
* @param array $request_data Datas
|
||||
* @return int
|
||||
*
|
||||
* @url PUT skeleton/{id}
|
||||
*/
|
||||
function put($id, $request_data = NULL)
|
||||
{
|
||||
if(! DolibarrApiAccess::$user->rights->skeleton->create) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
$result = $this->skeleton->fetch($id);
|
||||
if( ! $result ) {
|
||||
throw new RestException(404, 'Skeleton not found');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('skeleton',$this->skeleton->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
foreach($request_data as $field => $value) {
|
||||
$this->skeleton->$field = $value;
|
||||
}
|
||||
|
||||
if($this->skeleton->update($id, DolibarrApiAccess::$user))
|
||||
return $this->get ($id);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete skeleton
|
||||
*
|
||||
* @param int $id Skeleton ID
|
||||
* @return array
|
||||
*
|
||||
* @url DELETE skeleton/{id}
|
||||
*/
|
||||
function delete($id)
|
||||
{
|
||||
if(! DolibarrApiAccess::$user->rights->skeleton->supprimer) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
$result = $this->skeleton->fetch($id);
|
||||
if( ! $result ) {
|
||||
throw new RestException(404, 'Skeleton not found');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('skeleton',$this->skeleton->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
if( !$this->skeleton->delete($id))
|
||||
{
|
||||
throw new RestException(500);
|
||||
}
|
||||
|
||||
return array(
|
||||
'success' => array(
|
||||
'code' => 200,
|
||||
'message' => 'Skeleton deleted'
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate fields before create or update object
|
||||
*
|
||||
* @param array $data Data to validate
|
||||
* @return array
|
||||
*
|
||||
* @throws RestException
|
||||
*/
|
||||
function _validate($data)
|
||||
{
|
||||
$skeleton = array();
|
||||
foreach (SkeletonApi::$FIELDS as $field) {
|
||||
if (!isset($data[$field]))
|
||||
throw new RestException(400, "$field field missing");
|
||||
$skeleton[$field] = $data[$field];
|
||||
}
|
||||
return $skeleton;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -20,462 +18,352 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/skeletons/skeleton_class.class.php
|
||||
* \ingroup mymodule othermodule1 othermodule2
|
||||
* \brief This file is an example for a CRUD class file (Create/Read/Update/Delete)
|
||||
* Put some comments here
|
||||
* \file dev/skeletons/skeleton_class.class.php
|
||||
* \ingroup mymodule othermodule1 othermodule2
|
||||
* \brief This file is an example for a CRUD class file (Create/Read/Update/Delete)
|
||||
* Put here some comments
|
||||
*/
|
||||
|
||||
// Put here all includes required by your class file
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
|
||||
//require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
//require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
||||
//require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||
//require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
|
||||
|
||||
/**
|
||||
* Class Skeleton_Class
|
||||
*
|
||||
* Put here description of your class
|
||||
* Put here description of your class
|
||||
*/
|
||||
class Skeleton_Class extends CommonObject
|
||||
{
|
||||
/**
|
||||
* @var DoliDb Database handler
|
||||
*/
|
||||
protected $db;
|
||||
var $db; //!< To store db handler
|
||||
var $error; //!< To return error code (or message)
|
||||
var $errors=array(); //!< To return several error codes (or messages)
|
||||
var $element='skeleton'; //!< Id that identify managed objects
|
||||
var $table_element='skeleton'; //!< Name of table without prefix where object is stored
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
* @deprecated
|
||||
* @see Skeleton_Class::errors
|
||||
*/
|
||||
public $error;
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
/**
|
||||
* @var string Id to identify managed objects
|
||||
*/
|
||||
public $element = 'skeleton';
|
||||
/**
|
||||
* @var string Name of table without prefix where object is stored
|
||||
*/
|
||||
public $table_element = 'skeleton';
|
||||
|
||||
/**
|
||||
* @var Skeleton_ClassLine[] Lines
|
||||
*/
|
||||
public $lines = array();
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
public $id;
|
||||
/**
|
||||
* @var mixed Sample property 1
|
||||
*/
|
||||
public $prop1;
|
||||
/**
|
||||
* @var mixed Sample property 2
|
||||
*/
|
||||
public $prop2;
|
||||
var $id;
|
||||
var $prop1;
|
||||
var $prop2;
|
||||
//...
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create object into database
|
||||
*
|
||||
* @param User $user User that creates
|
||||
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||
*
|
||||
* @return int <0 if KO, Id of created object if OK
|
||||
*/
|
||||
public function create(User $user, $notrigger = false)
|
||||
{
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
return 1;
|
||||
}
|
||||
|
||||
$error = 0;
|
||||
|
||||
/**
|
||||
* Create object into database
|
||||
*
|
||||
* @param User $user User that creates
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int <0 if KO, Id of created object if OK
|
||||
*/
|
||||
function create($user, $notrigger=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
$error=0;
|
||||
|
||||
// Clean parameters
|
||||
if (isset($this->prop1)) {
|
||||
$this->prop1 = trim($this->prop1);
|
||||
}
|
||||
if (isset($this->prop2)) {
|
||||
$this->prop2 = trim($this->prop2);
|
||||
}
|
||||
if (isset($this->prop1)) $this->prop1=trim($this->prop1);
|
||||
if (isset($this->prop2)) $this->prop2=trim($this->prop2);
|
||||
//...
|
||||
|
||||
// Check parameters
|
||||
// Put here code to add control on parameters values
|
||||
|
||||
// Insert request
|
||||
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '(';
|
||||
$sql .= ' field1,';
|
||||
$sql .= ' field2';
|
||||
// Insert request
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."(";
|
||||
$sql.= " field1,";
|
||||
$sql.= " field2";
|
||||
//...
|
||||
$sql .= ') VALUES (';
|
||||
$sql .= ' \'' . $this->prop1 . '\',';
|
||||
$sql .= ' \'' . $this->prop2 . '\'';
|
||||
$sql.= ") VALUES (";
|
||||
$sql.= " '".$this->prop1."',";
|
||||
$sql.= " '".$this->prop2."'";
|
||||
//...
|
||||
$sql .= ')';
|
||||
$sql.= ")";
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error ++;
|
||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||
|
||||
if (!$error) {
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
|
||||
if (! $error)
|
||||
{
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
|
||||
|
||||
if (!$notrigger) {
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action to call a trigger.
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action calls a trigger.
|
||||
|
||||
//// Call triggers
|
||||
//$result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
||||
//if ($result < 0) $error++;
|
||||
//// End call triggers
|
||||
//// Call triggers
|
||||
//$result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||
//// End call triggers
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
// Commit or rollback
|
||||
if ($error)
|
||||
{
|
||||
foreach($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(__METHOD__." ".$errmsg, LOG_ERR);
|
||||
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||
}
|
||||
$this->db->rollback();
|
||||
|
||||
return - 1 * $error;
|
||||
} else {
|
||||
return -1*$error;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->commit();
|
||||
|
||||
return $this->id;
|
||||
return $this->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load object in memory from the database
|
||||
*
|
||||
* @param int $id Id object
|
||||
* @param string $ref Ref
|
||||
*
|
||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||
*/
|
||||
public function fetch($id, $ref = null)
|
||||
{
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
$sql = 'SELECT';
|
||||
$sql .= ' t.rowid,';
|
||||
$sql .= ' t.field1,';
|
||||
$sql .= ' t.field2';
|
||||
/**
|
||||
* Load object in memory from the database
|
||||
*
|
||||
* @param int $id Id object
|
||||
* @param string $ref Ref
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function fetch($id,$ref='')
|
||||
{
|
||||
global $langs;
|
||||
$sql = "SELECT";
|
||||
$sql.= " t.rowid,";
|
||||
$sql.= " t.field1,";
|
||||
$sql.= " t.field2";
|
||||
//...
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
|
||||
if (null !== $ref) {
|
||||
$sql .= ' WHERE t.ref = ' . '\'' . $ref . '\'';
|
||||
} else {
|
||||
$sql .= ' WHERE t.rowid = ' . $id;
|
||||
}
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t";
|
||||
if ($ref) $sql.= " WHERE t.ref = '".$ref."'";
|
||||
else $sql.= " WHERE t.rowid = ".$id;
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$numrows = $this->db->num_rows($resql);
|
||||
if ($numrows) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
dol_syslog(get_class($this)."::fetch");
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($this->db->num_rows($resql))
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->id = $obj->rowid;
|
||||
$this->prop1 = $obj->field1;
|
||||
$this->prop2 = $obj->field2;
|
||||
$this->id = $obj->rowid;
|
||||
$this->prop1 = $obj->field1;
|
||||
$this->prop2 = $obj->field2;
|
||||
//...
|
||||
}
|
||||
$this->db->free($resql);
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
if ($numrows) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error="Error ".$this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load object in memory from the database
|
||||
*
|
||||
* @param string $sortorder Sort Order
|
||||
* @param string $sortfield Sort field
|
||||
* @param int $limit offset limit
|
||||
* @param int $offset offset limit
|
||||
* @param array $filter filter array
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function fetchAll($sortorder, $sortfield, $limit, $offset, array $filter = array())
|
||||
{
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
$sql = 'SELECT';
|
||||
$sql .= ' t.rowid,';
|
||||
$sql .= ' t.field1,';
|
||||
$sql .= ' t.field2';
|
||||
//...
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'mytable as t';
|
||||
|
||||
// Manage filter
|
||||
$sqlwhere = array();
|
||||
if (count($filter) > 0) {
|
||||
foreach ($filter as $key => $value) {
|
||||
$sqlwhere [] = ' AND ' . $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
|
||||
}
|
||||
}
|
||||
if (count($sqlwhere) > 0) {
|
||||
$sql .= ' WHERE ' . implode(' AND ', $sqlwhere);
|
||||
}
|
||||
$sql .= ' ORDER BY ' . $sortfield . ' ' . $sortorder . ' ' . $this->db->plimit($limit + 1, $offset);
|
||||
|
||||
$this->lines = array();
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$line = new Skeleton_ClassLine();
|
||||
|
||||
$line->id = $obj->rowid;
|
||||
$line->prop1 = $obj->field1;
|
||||
$line->prop2 = $obj->field2;
|
||||
|
||||
$this->lines[] = $line;
|
||||
//...
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
return $num;
|
||||
} else {
|
||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||
|
||||
return - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update object into database
|
||||
*
|
||||
* @param User $user User that modifies
|
||||
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function update(User $user, $notrigger = false)
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
/**
|
||||
* Update object into database
|
||||
*
|
||||
* @param User $user User that modifies
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function update($user, $notrigger=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
$error=0;
|
||||
|
||||
// Clean parameters
|
||||
if (isset($this->prop1)) {
|
||||
$this->prop1 = trim($this->prop1);
|
||||
}
|
||||
if (isset($this->prop2)) {
|
||||
$this->prop2 = trim($this->prop2);
|
||||
}
|
||||
if (isset($this->prop1)) $this->prop1=trim($this->prop1);
|
||||
if (isset($this->prop2)) $this->prop2=trim($this->prop2);
|
||||
//...
|
||||
|
||||
// Check parameters
|
||||
// Put here code to add a control on parameters values
|
||||
|
||||
// Update request
|
||||
$sql = 'UPDATE ' . MAIN_DB_PREFIX . $this->table_element . ' SET';
|
||||
if (isset($this->field1)) {
|
||||
$sql .= ' field1=\'' . $this->db->escape($this->field1) . '\',';
|
||||
} else {
|
||||
$sql .= ' field1=null' . ',';
|
||||
}
|
||||
if (isset($this->field2)) {
|
||||
$sql .= ' field2=\'' . $this->db->escape($this->field2) . '\'';
|
||||
} else {
|
||||
$sql .= ' field2=null';
|
||||
}
|
||||
// Update request
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET";
|
||||
$sql.= " field1=".(isset($this->field1)?"'".$this->db->escape($this->field1)."'":"null").",";
|
||||
$sql.= " field2=".(isset($this->field2)?"'".$this->db->escape($this->field2)."'":"null")."";
|
||||
//...
|
||||
$sql .= ' WHERE rowid=' . $this->id;
|
||||
$sql.= " WHERE rowid=".$this->id;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error ++;
|
||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||
dol_syslog(__METHOD__);
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action calls a trigger.
|
||||
|
||||
//// Call triggers
|
||||
//$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||
//// End call triggers
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error && !$notrigger) {
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action calls a trigger.
|
||||
|
||||
//// Call triggers
|
||||
//$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||
//// End call triggers
|
||||
}
|
||||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
// Commit or rollback
|
||||
if ($error)
|
||||
{
|
||||
foreach($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(__METHOD__." ".$errmsg, LOG_ERR);
|
||||
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||
}
|
||||
$this->db->rollback();
|
||||
|
||||
return - 1 * $error;
|
||||
} else {
|
||||
return -1*$error;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->commit();
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete object in database
|
||||
|
||||
/**
|
||||
* Delete object in database
|
||||
*
|
||||
* @param User $user User that deletes
|
||||
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @param User $user User that deletes
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function delete(User $user, $notrigger = false)
|
||||
function delete($user, $notrigger=0)
|
||||
{
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
$error = 0;
|
||||
global $conf, $langs;
|
||||
$error=0;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
if (!$error) {
|
||||
if (!$notrigger) {
|
||||
if (! $error)
|
||||
{
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action calls a trigger.
|
||||
// want this action calls a trigger.
|
||||
|
||||
//// Call triggers
|
||||
//$result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||
//// End call triggers
|
||||
//// Call triggers
|
||||
//$result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||
//// End call triggers
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element;
|
||||
$sql .= ' WHERE rowid=' . $this->id;
|
||||
if (! $error)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql.= " WHERE rowid=".$this->id;
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error ++;
|
||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
dol_syslog(__METHOD__);
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||
}
|
||||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
// Commit or rollback
|
||||
if ($error)
|
||||
{
|
||||
foreach($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(__METHOD__." ".$errmsg, LOG_ERR);
|
||||
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||
}
|
||||
$this->db->rollback();
|
||||
|
||||
return - 1 * $error;
|
||||
} else {
|
||||
return -1*$error;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->commit();
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load an object from its id and create a new one in database
|
||||
*
|
||||
* @param int $fromid Id of object to clone
|
||||
*
|
||||
* @return int New id of clone
|
||||
*/
|
||||
public function createFromClone($fromid)
|
||||
{
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
global $user;
|
||||
$error = 0;
|
||||
$object = new Skeleton_Class($this->db);
|
||||
|
||||
/**
|
||||
* Load an object from its id and create a new one in database
|
||||
*
|
||||
* @param int $fromid Id of object to clone
|
||||
* @return int New id of clone
|
||||
*/
|
||||
function createFromClone($fromid)
|
||||
{
|
||||
global $user,$langs;
|
||||
|
||||
$error=0;
|
||||
|
||||
$object=new Skeleton_Class($this->db);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
$object->fetch($fromid);
|
||||
// Reset object
|
||||
$object->id = 0;
|
||||
$object->id=0;
|
||||
$object->statut=0;
|
||||
|
||||
// Clear fields
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$result = $object->create($user);
|
||||
$result=$object->create($user);
|
||||
|
||||
// Other options
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
$this->errors = $object->errors;
|
||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error=$object->error;
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
|
||||
return $object->id;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->rollback();
|
||||
|
||||
return - 1;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialise object with example values
|
||||
* Id must be 0 if object instance is a specimen
|
||||
* Initialise object with example values
|
||||
* Id must be 0 if object instance is a specimen
|
||||
*
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
public function initAsSpecimen()
|
||||
function initAsSpecimen()
|
||||
{
|
||||
$this->id = 0;
|
||||
$this->prop1 = 'prop1';
|
||||
$this->prop2 = 'prop2';
|
||||
$this->id=0;
|
||||
$this->prop1='prop1';
|
||||
$this->prop2='prop2';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Skeleton_ClassLine
|
||||
*/
|
||||
class Skeleton_ClassLine
|
||||
{
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
public $id;
|
||||
/**
|
||||
* @var mixed Sample line property 1
|
||||
*/
|
||||
public $prop1;
|
||||
/**
|
||||
* @var mixed Sample line property 2
|
||||
*/
|
||||
public $prop2;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -72,10 +72,6 @@ if (($id > 0 || ! empty($ref)) && $action != 'add')
|
||||
if ($result < 0) dol_print_error($db);
|
||||
}
|
||||
|
||||
// Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('skeleton'));
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
@@ -84,114 +80,108 @@ $extrafields = new ExtraFields($db);
|
||||
* Put here all code to do according to value of "action" parameter
|
||||
********************************************************************/
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook))
|
||||
// Action to add record
|
||||
if ($action == 'add')
|
||||
{
|
||||
// Action to add record
|
||||
if ($action == 'add')
|
||||
if (GETPOST('cancel'))
|
||||
{
|
||||
if (GETPOST('cancel'))
|
||||
$urltogo=$backtopage?$backtopage:dol_buildpath('/buildingmanagement/list.php',1);
|
||||
header("Location: ".$urltogo);
|
||||
exit;
|
||||
}
|
||||
|
||||
$error=0;
|
||||
|
||||
/* object_prop_getpost_prop */
|
||||
$object->prop1=GETPOST("field1");
|
||||
$object->prop2=GETPOST("field2");
|
||||
|
||||
if (empty($object->ref))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result=$object->create($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$urltogo=$backtopage?$backtopage:dol_buildpath('/buildingmanagement/list.php',1);
|
||||
// Creation OK
|
||||
$urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1);
|
||||
header("Location: ".$urltogo);
|
||||
exit;
|
||||
}
|
||||
|
||||
$error=0;
|
||||
|
||||
/* object_prop_getpost_prop */
|
||||
$object->prop1=GETPOST("field1");
|
||||
$object->prop2=GETPOST("field2");
|
||||
|
||||
if (empty($object->ref))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result=$object->create($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Creation OK
|
||||
$urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1);
|
||||
header("Location: ".$urltogo);
|
||||
exit;
|
||||
}
|
||||
{
|
||||
// Creation KO
|
||||
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
|
||||
else setEventMessages($object->error, null, 'errors');
|
||||
$action='create';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Creation KO
|
||||
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
|
||||
else setEventMessages($object->error, null, 'errors');
|
||||
$action='create';
|
||||
}
|
||||
}
|
||||
|
||||
// Cancel
|
||||
if ($action == 'update' && GETPOST('cancel')) $action='view';
|
||||
|
||||
// Action to update record
|
||||
if ($action == 'update' && ! GETPOST('cancel'))
|
||||
else
|
||||
{
|
||||
$error=0;
|
||||
$action='create';
|
||||
}
|
||||
}
|
||||
|
||||
$object->prop1=GETPOST("field1");
|
||||
$object->prop2=GETPOST("field2");
|
||||
// Cancel
|
||||
if ($action == 'update' && GETPOST('cancel')) $action='view';
|
||||
|
||||
if (empty($object->ref))
|
||||
// Action to update record
|
||||
if ($action == 'update' && ! GETPOST('cancel'))
|
||||
{
|
||||
$error=0;
|
||||
|
||||
$object->prop1=GETPOST("field1");
|
||||
$object->prop2=GETPOST("field2");
|
||||
|
||||
if (empty($object->ref))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),null,'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result=$object->update($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),null,'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result=$object->update($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$action='view';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Creation KO
|
||||
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
|
||||
else setEventMessages($object->error, null, 'errors');
|
||||
$action='edit';
|
||||
}
|
||||
$action='view';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Creation KO
|
||||
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
|
||||
else setEventMessages($object->error, null, 'errors');
|
||||
$action='edit';
|
||||
}
|
||||
}
|
||||
|
||||
// Action to delete
|
||||
if ($action == 'confirm_delete')
|
||||
else
|
||||
{
|
||||
$result=$object->delete($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Delete OK
|
||||
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||
header("Location: ".dol_buildpath('/buildingmanagement/list.php',1));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! empty($object->errors)) setEventMessages(null,$object->errors,'errors');
|
||||
else setEventMessages($object->error,null,'errors');
|
||||
}
|
||||
$action='edit';
|
||||
}
|
||||
}
|
||||
|
||||
// Action to delete
|
||||
if ($action == 'confirm_delete')
|
||||
{
|
||||
$result=$object->delete($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Delete OK
|
||||
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||
header("Location: ".dol_buildpath('/buildingmanagement/list.php',1));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! empty($object->errors)) setEventMessages(null,$object->errors,'errors');
|
||||
else setEventMessages($object->error,null,'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -218,7 +208,7 @@ jQuery(document).ready(function() {
|
||||
}
|
||||
init_myfunc();
|
||||
jQuery("#mybutton").click(function() {
|
||||
init_myfunc();
|
||||
init_needroot();
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
@@ -231,56 +221,15 @@ if ($action == 'list' || empty($id))
|
||||
$sql.= " t.rowid,";
|
||||
$sql.= " t.field1,";
|
||||
$sql.= " t.field2";
|
||||
// Add fields for extrafields
|
||||
foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key;
|
||||
// Add fields from hooks
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mytable as t";
|
||||
$sql.= " WHERE field3 = 'xxx'";
|
||||
// Add where from hooks
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
$sql.= " ORDER BY field1 ASC";
|
||||
|
||||
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="noborder">'."\n";
|
||||
|
||||
// Fields title
|
||||
print '<table class="noborder">'."\n";
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('field1'),$_SERVER['PHP_SELF'],'t.field1','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('field2'),$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder);
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Fields title search
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_field1" value="'.$search_field1.'" size="10">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_field2" value="'.$search_field2.'" size="10">';
|
||||
print '</td>';
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</tr>'."\n";
|
||||
|
||||
print '</tr>';
|
||||
|
||||
dol_syslog($script_file, LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
@@ -294,34 +243,21 @@ if ($action == 'list' || empty($id))
|
||||
if ($obj)
|
||||
{
|
||||
// You can use here results
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<tr><td>';
|
||||
print $obj->field1;
|
||||
print '</td><td>';
|
||||
print $obj->field2;
|
||||
print '</td>';
|
||||
$parameters=array('obj' => $obj);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</tr>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters=array('sql' => $sql);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print "</table>\n";
|
||||
print "</form>\n";
|
||||
print '</table>'."\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -331,12 +267,12 @@ if ($action == 'create')
|
||||
{
|
||||
print_fiche_titre($langs->trans("NewResidence"));
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border centpercent">'."\n";
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td>';
|
||||
print '<input class="flat" type="text" size="36" name="label" value="'.$label.'">';
|
||||
@@ -344,11 +280,13 @@ if ($action == 'create')
|
||||
|
||||
print '</table>'."\n";
|
||||
|
||||
dol_fiche_end();
|
||||
print '<br>';
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"> <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
|
||||
print '<center><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"> <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
||||
@@ -356,19 +294,21 @@ if ($action == 'create')
|
||||
// Part to edit record
|
||||
if (($id || $ref) && $action == 'edit')
|
||||
{
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"></div>';
|
||||
print '<br>';
|
||||
|
||||
print '<center><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"></center>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
||||
@@ -412,9 +352,8 @@ if ($id && (empty($action) || $action == 'view'))
|
||||
|
||||
|
||||
// Example 2 : Adding links to objects
|
||||
//$somethingshown=$form->showLinkedObjectBlock($object);
|
||||
//$linktoelem = $form->showLinkToObjectBlock($object);
|
||||
//if ($linktoelem) print '<br>'.$linktoelem;
|
||||
// The class must extends CommonObject class to have this method available
|
||||
//$somethingshown=$object->showLinkedObjectBlock();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,24 +9,24 @@
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/dolibarrnew/theme/eldy/img/favicon.ico"/>
|
||||
<title>Login Dolibarr 3.4.0-alpha</title>
|
||||
<!-- Includes for JQuery (Ajax library) -->
|
||||
<link rel="stylesheet" type="text/css" href="/dolibarrnew/includes/jquery/css/smoothness/jquery-ui.custom.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/dolibarrnew/includes/jquery/css/smoothness/jquery-ui-latest.custom.css" />
|
||||
<link rel="stylesheet" type="text/css" title="default" href="/dolibarrnew/custom/filemanager/css/filemanager.css.php"><!-- Added by module filemanager-->
|
||||
<!-- Includes JS for JQuery -->
|
||||
<script type="text/javascript" src="/dolibarrnew/includes/jquery/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/dolibarrnew/includes/jquery/js/jquery-latest.min.js"></script>
|
||||
<script type="text/javascript" src="/dolibarrnew/core/js/dst.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/dolibarrnew/theme/eldy/style.css.php?lang=fr_FR" />
|
||||
<!-- HTTP_USER_AGENT = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22 -->
|
||||
</head>
|
||||
<body class="body">
|
||||
|
||||
<div class="center">
|
||||
<center>
|
||||
|
||||
<div class="login_table" align="center">
|
||||
|
||||
<!-- <tr><td colspan="2" valign="middle"> -->
|
||||
<div id="login_line1" align="center">
|
||||
|
||||
<div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><div class="center">
|
||||
<div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><center>
|
||||
|
||||
<table class="none" summary="Login pass" cellpadding="2" align="center">
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</center>
|
||||
</div> <!-- end div left -->
|
||||
|
||||
<!-- </td>
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
0
dev/test/testtcpdf.php
Executable file → Normal file
0
dev/test/testtcpdf.php
Executable file → Normal file
@@ -40,18 +40,8 @@ class autoTranslator
|
||||
const DIR_SEPARATOR = '/';
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $_destlang Destination lang
|
||||
* @param string $_refLang Ref lang
|
||||
* @param string $_langDir Dir lang
|
||||
* @param string $_limittofile Limit to file
|
||||
* @param string $_apikey Api key
|
||||
* @return void
|
||||
*/
|
||||
function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey)
|
||||
{
|
||||
function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey)
|
||||
{
|
||||
|
||||
// Set enviorment variables
|
||||
$this->_destlang = $_destlang;
|
||||
|
||||
@@ -1,179 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (c) 2015 Tommaso Basilici <t.basilici@19.coop>
|
||||
*
|
||||
* 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 2 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
echo "<html>";
|
||||
echo "<head>";
|
||||
|
||||
echo "<STYLE type=\"text/css\">
|
||||
|
||||
table {
|
||||
background: #f5f5f5;
|
||||
border-collapse: separate;
|
||||
box-shadow: inset 0 1px 0 #fff;
|
||||
font-size: 12px;
|
||||
line-height: 24px;
|
||||
margin: 30px auto;
|
||||
text-align: left;
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #777;
|
||||
border-left: 1px solid #555;
|
||||
border-right: 1px solid #777;
|
||||
border-top: 1px solid #555;
|
||||
border-bottom: 1px solid #333;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
padding: 10px 15px;
|
||||
position: relative;
|
||||
text-shadow: 0 1px 0 #000;
|
||||
}
|
||||
|
||||
td {
|
||||
border-right: 1px solid #fff;
|
||||
border-left: 1px solid #e8e8e8;
|
||||
border-top: 1px solid #fff;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
padding: 10px 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
tr {
|
||||
background-color: #f1f1f1;
|
||||
|
||||
}
|
||||
|
||||
tr:nth-child(odd) td {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
</STYLE>";
|
||||
|
||||
echo "<body>";
|
||||
|
||||
echo "If you call this file with the argument \"?unused=true\" it searches for the translation strings that exist in en_US but are never used.<br>";
|
||||
echo "IMPORTANT: that can take quite a lot of time (up to 10 minutes), you need to tune the max_execution_time on your php.ini accordingly.<br>";
|
||||
echo "Happy translating :)<br>";
|
||||
|
||||
|
||||
// STEP 1 - Search duplicates keys
|
||||
|
||||
|
||||
// directory containing the php and lang files
|
||||
$htdocs = "../../htdocs/";
|
||||
|
||||
// directory containing the english lang files
|
||||
$workdir = $htdocs."langs/en_US/";
|
||||
|
||||
|
||||
$files = scandir($workdir);
|
||||
if (empty($files))
|
||||
{
|
||||
echo "Can't scan workdir = ".$workdir;
|
||||
exit;
|
||||
}
|
||||
|
||||
$exludefiles = array('.','..','README');
|
||||
$files = array_diff($files,$exludefiles);
|
||||
$langstrings_3d = array();
|
||||
$langstrings_full = array();
|
||||
foreach ($files AS $file) {
|
||||
$path_file = pathinfo($file);
|
||||
// we're only interested in .lang files
|
||||
if ($path_file['extension']=='lang') {
|
||||
$content = file($workdir.$file);
|
||||
foreach ($content AS $line => $row) {
|
||||
// don't want comment lines
|
||||
if (substr($row,0,1) !== '#') {
|
||||
// don't want lines without the separator (why should those even be here, anyway...)
|
||||
if (strpos($row,'=')!==false) {
|
||||
$row_array = explode('=',$row); // $row_array[0] = key
|
||||
$langstrings_3d[$path_file['basename']][$line+1]=$row_array[0];
|
||||
$langstrings_3dtrans[$path_file['basename']][$line+1]=$row_array[1];
|
||||
$langstrings_full[]=$row_array[0];
|
||||
$langstrings_dist[$row_array[0]]=$row_array[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($langstrings_3d AS $filename => $file) {
|
||||
foreach ($file AS $linenum => $value) {
|
||||
$keys = array_keys($langstrings_full, $value);
|
||||
if (count($keys)>1)
|
||||
{
|
||||
foreach ($keys AS $key) {
|
||||
$dups[$value][$filename][$linenum] = trim($langstrings_3dtrans[$filename][$linenum]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "<h2>Duplicate strings in lang files in $workdir - ".count($dups)." found</h2>";
|
||||
|
||||
echo "<table border_bottom=1> ";
|
||||
echo "<thead><tr><th align=\"center\">#</th><th>String</th><th>File and lines</th></thead>";
|
||||
echo "<tbody>";
|
||||
$count = 0;
|
||||
foreach ($dups as $string => $pages) {
|
||||
$count++;
|
||||
echo "<tr>";
|
||||
echo "<td align=\"center\">$count</td>";
|
||||
echo "<td>$string</td>";
|
||||
echo "<td>";
|
||||
foreach ($pages AS $page => $lines ) {
|
||||
echo "$page ";
|
||||
foreach ($lines as $line => $translatedvalue) {
|
||||
//echo "($line - ".(substr($translatedvalue,0,20)).") ";
|
||||
echo "($line - ".htmlentities($translatedvalue).") ";
|
||||
}
|
||||
echo "<br>";
|
||||
}
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
echo "</tbody>";
|
||||
echo "</table>";
|
||||
|
||||
|
||||
// STEP 2 - Search key not used
|
||||
|
||||
|
||||
if (! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true')
|
||||
{
|
||||
foreach ($langstrings_dist AS $value)
|
||||
{
|
||||
$search = '\'trans("'.$value.'")\'';
|
||||
$string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'*';
|
||||
exec($string,$output);
|
||||
if (empty($output)) {
|
||||
$unused[$value] = true;
|
||||
echo $value.'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
echo "<h2>Strings in en_US that are never used</h2>";
|
||||
echo "<pre>";
|
||||
print_r($unused);
|
||||
echo "</pre>";
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
echo "</body>";
|
||||
echo "</html>";
|
||||
@@ -2,9 +2,9 @@
|
||||
#------------------------------------------------------
|
||||
# Script to push language files to Transifex
|
||||
#
|
||||
# Laurent Destailleur (eldy) - eldy@users.sourceforge.net
|
||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
# Usage: txpush.sh (source|xx_XX) [-r dolibarr.file] [-f]
|
||||
# Usage: txpush.sh (source|all|xx_XX) [-r dolibarr.file] [-f]
|
||||
#------------------------------------------------------
|
||||
|
||||
# Syntax
|
||||
@@ -13,7 +13,7 @@ then
|
||||
echo "This push local files to transifex."
|
||||
echo "Note: If you push a language file (not source), file will be skipped if transifex file is newer."
|
||||
echo " Using -f will overwrite translation but not memory."
|
||||
echo "Usage: ./dev/translation/txpush.sh (source|xx_XX) [-r dolibarr.file] [-f] [--no-interactive]"
|
||||
echo "Usage: ./dev/translation/txpush.sh (source|all|xx_XX) [-r dolibarr.file] [-f] [--no-interactive]"
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -23,15 +23,20 @@ then
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "x$1" = "xall" ]
|
||||
then
|
||||
for fic in ar_SA bg_BG bs_BA ca_ES cs_CZ da_DK de_DE el_GR es_ES et_EE eu_ES fa_IR fi_FI fr_FR he_IL hr_HR hu_HU id_ID is_IS it_IT ja_JP ka_GE ko_KR lt_LT lv_LV mk_MK nb_NO nl_NL pl_PL pt_PT ro_RO ru_RU ru_UA sk_SK sl_SI sq_AL sv_SE th_TH tr_TR uk_UA uz_UZ vi_VN zh_CN zh_TW
|
||||
do
|
||||
echo "tx push --skip -t -l $fic $2 $3"
|
||||
tx push --skip -t -l $fic $2 $3
|
||||
done
|
||||
else
|
||||
if [ "x$1" = "xsource" ]
|
||||
then
|
||||
echo "tx push -s $2 $3"
|
||||
tx push -s $2 $3
|
||||
else
|
||||
for file in `find htdocs/langs/$1/*.lang -type f`
|
||||
do
|
||||
export basefile=`basename $file | sed -s s/\.lang//g`
|
||||
echo "tx push --skip -r dolibarr.$basfile -t -l $1 $2 $3 $4"
|
||||
tx push --skip -r dolibarr.$basefile -t -l $1 $2 $3 $4
|
||||
done
|
||||
echo "tx push --skip -t -l $1 $2 $3 $4"
|
||||
tx push --skip -t -l $1 $2 $3 $4
|
||||
fi
|
||||
fi
|
||||
|
||||
0
doc/images/appicon_128.png
Executable file → Normal file
0
doc/images/appicon_128.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
0
doc/images/appicon_16.ico
Executable file → Normal file
0
doc/images/appicon_16.ico
Executable file → Normal file
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user