2
0
forked from Wavyzz/dolibarr

Compare commits

..

530 Commits
19.0.4 ... 18.0

Author SHA1 Message Date
Regis Houssin
b1d57a6bd1 FIX sql syntax error (#35588) 2025-10-02 15:45:30 +02:00
ldestailleur
16904d12f8 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-02 03:18:10 +02:00
ldestailleur
1525b9c85e Rename label 2025-10-02 03:17:57 +02:00
Marc de Lima Lucio
ffe07999cf FIX: pgsql: error when calculating depreciations (#34213)
* FIX: pgsql: error when calculating depreciations

* FIX: asset deprectiation: optimize sql

* FIX: travis
2025-10-02 02:39:29 +02:00
Regis Houssin
24146d89c5 FIX #35568 (#35569)
* FIX #35568

* FIX clear "thirdparty" object before or during the fetch

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-01 19:54:50 +02:00
ldestailleur
477d755bbc Clean CI files 2025-10-01 19:32:40 +02:00
ldestailleur
f85b53a4ca Test CI 2025-10-01 19:29:30 +02:00
ldestailleur
a6e01fe7b7 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 19:28:46 +02:00
ldestailleur
43c2336683 Log 2025-10-01 19:28:36 +02:00
Thomas C.
e1b919366e FIX : To have only the sender's entity when sending mail (#31053)
* fix

* Update html.formmail.class.php

* Update html.formmail.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: lvessiller-opendsi <lvessiller@open-dsi.fr>
2025-10-01 19:18:31 +02:00
ldestailleur
40e4a6959f Fix CI 2025-10-01 19:17:22 +02:00
ldestailleur
52ae202aff Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 16:59:49 +02:00
ldestailleur
2ca2fe7f28 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 16:55:23 +02:00
ldestailleur
140310c508 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 16:55:05 +02:00
ldestailleur
64cf2513bd Clean CI 2025-10-01 16:54:52 +02:00
Marc de Lima Lucio
a3969c1d2c FIX: php 8+ warnings when creating deposits (#35582) 2025-10-01 16:21:05 +02:00
Regis Houssin
d9563ac0ed Update pr-18.yaml (#35577)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-01 14:49:29 +02:00
ldestailleur
bea2f674f0 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 14:34:04 +02:00
ldestailleur
80494870c0 Try to fix CI 18 2025-10-01 14:33:56 +02:00
Eric - CAP-REL
d25847602b missing fk_user_creat value (#35576) 2025-10-01 13:59:27 +02:00
ldestailleur
283efbbffe Test CI 2025-10-01 13:57:10 +02:00
ldestailleur
2e430a71a3 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 13:54:19 +02:00
ldestailleur
faf2971ff7 Try to fix Ci 18 2025-10-01 13:54:11 +02:00
Regis Houssin
acf5e30b30 FIX missing entity filter (#35517) 2025-09-27 12:07:43 +02:00
ldestailleur
76b5540124 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-09-27 12:06:49 +02:00
ldestailleur
8bb63c5963 Test on autoassign 2025-09-27 12:06:40 +02:00
HENRY Florian
f532f85d8c fix: remove space in global conf test (#35484) 2025-09-26 20:54:21 +02:00
Dylan Bourdere
a63eae7903 Fix: property api dir_temp (#35439)
* fix undefined property

* rename key
2025-09-25 11:59:09 +02:00
ldestailleur
79210c0120 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-09-25 11:57:12 +02:00
ldestailleur
d87ebbf926 Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-09-25 11:55:28 +02:00
ldestailleur
08b105502e Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-09-25 11:55:21 +02:00
ldestailleur
bd2aba1a2f Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-09-25 11:54:59 +02:00
ldestailleur
a4601686a6 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-09-25 11:54:18 +02:00
lvessiller-opendsi
bcf6d6a7a2 FIX api orders : forward database error on failure (backpot commit d9e81cb) (#35478) 2025-09-25 11:47:51 +02:00
ldestailleur
db5f33442a Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-09-24 15:25:33 +02:00
ldestailleur
84ba1852aa Another try to have autoassignement on v18 2025-09-24 15:25:15 +02:00
Dylan Bourdere
65a3b0893d fix undefined properties (#35435) 2025-09-22 20:31:50 +02:00
Dylan Bourdere
669c939bcd use getDolGlobalString to avoid getting undefined property (#35436) 2025-09-22 20:30:47 +02:00
Dylan Bourdere
92454d671f rename tab name in comment of modulebuilder (#35431) 2025-09-22 12:11:32 +02:00
ldestailleur
f33fe1036f Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-09-20 16:05:06 +02:00
Frédéric FRANCE
f43f2909ff rule is deprecated (#35410) 2025-09-20 16:02:39 +02:00
Regis Houssin
fc8b0a80c0 FIX missing check constant PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS (#33277)
* FIX missing check constant PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS

* use getDolGlobalString

like eldy suggest

* use getDolGlobalString

* Use getDolGlobalString

* use getDolGlobalString

* Use getDolGlobalString

---------

Co-authored-by: Eric - CAP-REL <1468823+rycks@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-18 11:22:36 +02:00
Eric - CAP-REL
4adc4a31e2 Merge pull request #35262 from SylvainLegrand/Fix_rights_for_user_creer
Fix rights for bank tab on user card
2025-09-18 09:31:22 +02:00
Francis Appels
7920cf8596 Fix option SERVICE_ARE_ECOMMERCE_200238EC (#35372) 2025-09-17 18:19:52 +02:00
Charlène Benke
c5451242e7 Add default values for database configuration (#35366)
warning error yet correct on old version
2025-09-17 14:46:32 +02:00
Florian Mortgat
60f089c015 FIX 17.0: ContratLigne::fetch() returns 1 even if the line doesn't exist (#35324) 2025-09-12 15:19:20 +02:00
Laurent Destailleur
8e689c1479 Complete #35313 2025-09-12 02:26:21 +02:00
Eric - CAP-REL
8efe6d477e exclude escpos-php/doc from filelist_xml (#35313) 2025-09-12 02:15:56 +02:00
Eric - CAP-REL
870c2a8f50 Prepare 18.0.8 (#35299)
* Prepare 18.0.8

* Update filefunc.inc.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-11 12:21:33 +02:00
atm-lucas
7d898184b5 Modify condition display button (#35257) 2025-09-09 19:30:14 +02:00
Sylvain Legrand
bba84133e7 Update bank.php 2025-09-09 07:00:19 +03:00
ThomasNgr-OpenDSI
01aa901f93 18.0 fix CVE 2024 40137 (#34762)
* Sec: Remove all functions that accept callable params - CVE-2024-40137

* FIX #34746 - More complete fix for CVE-2024-40137

---------

Co-authored-by: ldestailleur <eldy@destailleur.fr>
2025-09-04 14:59:44 +02:00
ldestailleur
96a74c4976 Disable this test where result is not predicable 2025-09-04 14:13:13 +02:00
kkhelifa-opendsi
a69ba88857 FIX: Correct the calculation of the amount of the current period between the period provided (#35083) 2025-09-04 13:27:49 +02:00
Sylvain Legrand
b05be5e1df Fix discount applied 2 times on contract (#35219)
on update line the discount was apply 2 times !
no problem on insert line.

Already solved on v22
2025-09-04 12:01:26 +02:00
kkhelifa-opendsi
247c38923f FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call (#34717)
* FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call

* Modification to take into account the value saved in the cookie

* Update invoice.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-03 16:36:18 +02:00
lvessiller-opendsi
e818bf732d FIX extra field list depend on parent list when editing a card (#35165) 2025-09-01 19:55:00 +02:00
lvessiller-opendsi
2d55195982 FIX missing quick edit for extrafields (baclport commit 4fc66c6) (#35160) 2025-09-01 19:50:48 +02:00
Alexandre SPANGARO
5788438864 FIX Missing sentence part (#35144) 2025-09-01 19:21:22 +02:00
Sylvain Legrand
4f684df12f Fix supplier invoice API (#35100)
* Fix supplier invoice API

We can't modify mode_reglement_id from API on supplier invoice !

* Update fournisseur.facture.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-28 03:05:05 +02:00
lvessiller-opendsi
adbbf9e3b2 FIX set global mysoc and load langs in API access (#35041)
* FIX set global mysoc and load langs in API access

* FIX reset mysoc and langs only if entity of API has changed
2025-08-28 02:50:38 +02:00
Marc de Lima Lucio
1f29c7758c FIX: accountancy general ledger: bad handling of hook return (#34029)
* FIX: accountancy general ledger: bad handling of hook return

* FIX: accountancy balance: bad handling of hook return
2025-08-27 11:30:26 +02:00
kkhelifa-opendsi
07512d1dad FIX - Fix missing token for disable custom group category for compta report (page /htdocs/accountancy/admin/categories_list.php) (#35084) 2025-08-27 03:06:19 +02:00
lvessiller-opendsi
3362a6b06d FIX The combo of custom groups has disappeared (backport v19) (#35016) 2025-08-20 19:03:18 +02:00
Regis Houssin
9666a96d8c FIX #34893 (#34897)
* FIX #34893

* FIX change error code to USERNOTALLOWEDTOCHANGEPASS
2025-08-09 15:19:02 +02:00
ldestailleur
1b59bcfadb Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-08-07 16:14:17 +02:00
ldestailleur
347bf3e4d6 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-08-07 16:14:00 +02:00
Maxime Kohlhaas
b3a2257638 Fix : contract line activation error when duration not defined (#34813)
* Fix : contract line activation error when duration not defined

* Fix of fix

* Update card.php

---------

Co-authored-by: x <x@x.x>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-06 21:22:47 +02:00
Marc de Lima Lucio
24652ec722 FIX: asset: could not select invoice in disposal pop-in (#34725) 2025-08-02 00:50:07 +02:00
Laurent Destailleur
b226894e36 Merge remote-tracking branch 'origin/17.0' into 18.0 2025-07-31 23:14:31 +02:00
Laurent Destailleur
3b0a4c9fa9 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2025-07-31 23:11:32 +02:00
Laurent Destailleur
0928191fdd Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-07-31 23:01:57 +02:00
VIAL-GOUTEYRON Quentin
154a25f8cb Enhance working days calculation to incorporate half-day adjustments and optimize public holiday checks (#34552)
* "Enhance working days calculation to incorporate half-day adjustments and optimize public holiday checks"

* "Add test cases for num_open_day() to validate half-day and weekend boundary scenarios"

* "Update DateLibTest to include Saturday and Sunday as non-working days in test setup"
2025-07-31 22:59:29 +02:00
Maxime Kohlhaas
6a88d31675 Fix : missing langs load on comm card file (#34812)
Co-authored-by: x <x@x.x>
2025-07-26 14:57:23 +02:00
Sylvain Legrand
437a07ba3c fix use of MAIN_CHECKBOX_LEFT_COLUMN on stockadate (#34783) 2025-07-23 16:17:30 +02:00
Florian Mortgat
f4555c4413 FIX 17.0 SQL syntax error and/or constraint error when calling Facture::update() after a clone (e.g. in a trigger) (#34778)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-23 11:26:49 +02:00
ldestailleur
ed4006b51b Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-07-22 12:47:52 +02:00
Florian Mortgat
bc33f7e1a7 FIX 17.0: when you clone an invoice that was created from a template invoice, the clone should not be linked to the template invoice (#34777) 2025-07-22 12:10:41 +02:00
ldestailleur
3c1b5846c9 Fix travis file 2025-07-22 12:08:51 +02:00
ldestailleur
fe96d826ef Avoid duplicate apt install 2025-07-15 21:49:28 +02:00
ldestailleur
df60ce695c Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-07-15 18:09:34 +02:00
ldestailleur
3b5e07dca9 Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-07-09 15:27:37 +02:00
ldestailleur
8927d1260a Fix travis 2025-07-09 15:27:28 +02:00
HENRY Florian
ee294917e1 fix: bad date management on update in time spent list if column is not displayed (#34511)
* fix: if column date is missing in tasktime, line update failed with Data mandatory

* fix: if column date is missing in tasktime list, line update failed with Data mandatory

* fix: remove badd php comment

* Update time.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-06 13:51:42 +03:00
Laurent Destailleur
53cf9f0bf1 Doc 2025-07-05 00:40:19 +02:00
Lucas Marcouiller
f4efa58022 Fix #17816 match compta/paiement.php payment method for credit note invoices (#34696) 2025-07-04 20:06:35 +03:00
Eric - CAP-REL
737dc7726e remove dpatch and add debhelper+po-debconf (#34685) 2025-07-04 09:36:44 +03:00
Eric - CAP-REL
af095c0e11 check if rpmbuild/sources dir exists (#34687) 2025-07-04 09:35:44 +03:00
Frédéric FRANCE
453b289346 fix ajax product with multiprices (#34672) 2025-07-01 16:13:57 +03:00
ldestailleur
2bef534e60 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 18:55:06 +02:00
ldestailleur
c0161ccead Fix CI 2025-06-28 18:54:53 +02:00
ldestailleur
1be67fee52 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 18:54:33 +02:00
ldestailleur
4a88509cdf Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 18:54:19 +02:00
ldestailleur
a4b1700bae Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-06-28 18:53:25 +02:00
ldestailleur
f5cb64afaa Fix CI 2025-06-28 18:53:12 +02:00
Marc de Lima Lucio
4841a8d2ce FIX: pre-send mail mass action: keep __EMAIL__ substitution (#34522)
* FIX: pre-send mail mass action: keep __EMAIL__ substitution

* FIX: comment

* test github workflows

* test github workflow for 18

* test v18 pr workflow

* FIX: massaction email tpl: keep preset

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-28 17:58:07 +02:00
ldestailleur
52a5d4ca0a Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 17:55:04 +02:00
ldestailleur
cb0d39ff6e Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 17:54:58 +02:00
ldestailleur
a5c51589d3 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-06-28 17:54:41 +02:00
ldestailleur
b4501511c8 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-06-28 17:54:22 +02:00
ldestailleur
e18c5b9d68 Fix CI 2025-06-28 17:40:01 +02:00
Vincent Maury
b940f2eae3 Fix bug in product->get_sousproduits_arbo (#34561)
* Update product.class.php

depending on php version used, when var $this->sousprods not correctly declared it'snot filled

* Update product.class.php

sousprods prop now initialized when declared

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-28 17:34:12 +02:00
ldestailleur
e6ff31abf1 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 17:19:04 +02:00
ldestailleur
d31bad82a1 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-06-28 17:14:50 +02:00
ldestailleur
bc0b0bebd3 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-06-28 17:09:51 +02:00
ldestailleur
031acacdab Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-06-28 17:04:21 +02:00
POTIER Mathieu
18725aec6b [FIX] loop interrupt if an error occurs in sendEmailsRemindersOnInvoiceDueDate (#34657) 2025-06-28 16:45:52 +02:00
ldestailleur
75c3456743 FIX #34654 2025-06-28 13:14:11 +02:00
ldestailleur
c0db33caf2 Having LTS in v18 and not in v19, v20... lets think that only v18 is LTS
and LTS is propagated during merge. Better to keep the mention into
Changelog only or into doc.
2025-06-24 14:04:21 +02:00
ldestailleur
8159249209 Fix changelog 2025-06-22 17:26:59 +02:00
Pichi1966
9f76298e58 FIX BankTransfer information in line.php (#34425)
* Prepare 18.0.7

* FIX BankTransfer information in line.php

FIX BankTransfer information in line.php

This is too fix a wrong information in line.php.
The mention of WithDrawalsReceipts instead of BankTransfers is wrong information

* Suppress Tab in line.php

---------

Co-authored-by: VESSILLER <lvessiller@open-dsi.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-22 12:57:33 +02:00
Pichi1966
f1ecb023ff FIX BankTransfer link in rejets.php (#34424)
* Prepare 18.0.7

* FIX BankTransfer link in rejets.php

FIX BankTransfer link in rejets.php
This is to fix a wrong action link in rejets.php.
The link was sending to a WithDrawals screen creating confusion.

---------

Co-authored-by: VESSILLER <lvessiller@open-dsi.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-22 12:57:09 +02:00
lvessiller-opendsi
ce1243140f FIX js warning (Backport commit 84d982c) (#34555)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-22 12:49:52 +02:00
Marc
52c827c2bb FIX #34541 (#34597) 2025-06-21 14:35:20 +02:00
lvessiller-opendsi
c263fccb5f Prepare 18.0.7 (#34575)
* Prepare 18.0.7

* Changelog for 18.0.7 LTS
2025-06-19 14:58:38 +02:00
ldestailleur
719de0aef3 Disable not working github actions 2025-06-19 10:51:51 +02:00
ldestailleur
4cc3be24d3 Doc 2025-06-19 10:46:15 +02:00
Eric - CAP-REL
b1109f6803 add env var for non-origin repository (#34577) 2025-06-19 10:44:18 +02:00
ldestailleur
fda1499eee Fix CI 2025-06-18 14:28:36 +02:00
Pichi1966
4bb42de5d6 FIX BankTransfer link in list.php (#34513)
FIX BankTransfer link in list.php

This is to fix a wrong action link in list.php.
The link was sending to a WithDraw screen creating confusion.
2025-06-15 03:03:42 +02:00
Laurent Destailleur
f31270df2a Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-15 00:50:35 +02:00
Laurent Destailleur
d50a938d12 Doc 2025-06-15 00:50:25 +02:00
Marc de Lima Lucio
478a8a4d52 FIX: try to fix v18 github action workflow (#34439)
* FIX: try to fix v18 github action workflow

* FIX: try to fix v18 github action workflow, part 2

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-15 00:30:44 +02:00
Laurent Destailleur
fa135a216b Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-15 00:23:45 +02:00
Laurent Destailleur
79779b1d2f Doc 2025-06-15 00:23:13 +02:00
Marc de Lima Lucio
456adc1e95 FIX: receptions: crash from api because of classes not found (#34523) 2025-06-14 23:59:21 +02:00
Marc de Lima Lucio
06dc4f5426 FIX: event info tab: php 8.1 warning (#34458)
* FIX: event info tab: php 8.1 warning

* Update info.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-14 11:59:03 +02:00
Marc de Lima Lucio
467c772504 FIX: common fields: php warning with select input field (#34495) 2025-06-14 11:58:25 +02:00
Laurent Destailleur
1bd6757e62 Fix CI 2025-06-14 02:15:10 +02:00
Marc de Lima Lucio
1c52426b90 FIX: expensereport: php warning when generating pdf with multilangs (#34492) 2025-06-14 02:09:01 +02:00
Marc de Lima Lucio
bc18656fd5 FIX: files lib: multiple php 8.1 warnings (#34462) 2025-06-14 00:27:36 +02:00
Marc de Lima Lucio
c77c4efcb8 FIX: accountancy lettering: php8.1 warning (#34469) 2025-06-13 23:57:37 +02:00
Marc de Lima Lucio
cada04442b FIX: manufacturing orders: php 8.1 warnings on agenda tab (#34475) 2025-06-13 23:49:11 +02:00
Benjamin Falière
4bd11f64d7 FIX (#34448)
Co-authored-by: Benjamin Falière <benjamin.faliere@altairis.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-13 23:45:18 +02:00
Marc de Lima Lucio
9c45f42e4f FIX: product translation: redirect after successful action (#34403)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-13 17:25:33 +02:00
Marc de Lima Lucio
c9f743983a FIX: accountancy expensereport journal: php 8.1 warning (#34457) 2025-06-13 17:11:40 +02:00
Laurent Destailleur
1497541129 Fix travis 2025-06-13 15:30:30 +02:00
lvessiller-opendsi
878474f1d1 FIX element must be visible to set focus on select input when using default values (#34406) 2025-06-12 12:23:55 +02:00
Marc de Lima Lucio
0afd5cc7e3 FIX: social contribution payment: correct error reporting (#34002)
* FIX: social contribution payment: correct error reporting

* FIX: social contribution payment: correclty handle return of adding payment to bank
2025-06-11 21:22:37 +02:00
William Mead
1aaa29ad9e Fixed expense report permission. Added contributor details. (#34368) 2025-06-08 14:37:23 +02:00
noec764
4096b00bd5 FIX: Too heavy sql query (#34371)
Co-authored-by: Noé <noe@scopen.fr>
2025-06-08 14:26:44 +02:00
Marc de Lima Lucio
dcc4334768 FIX: warnings when printing start/end date on line tpl (#34359) 2025-06-05 18:34:56 +02:00
Marc de Lima Lucio
f137074a98 FIX: cash control report: php warning (#34358) 2025-06-05 18:30:06 +02:00
Marc de Lima Lucio
f8f31daa16 FIX: accountancy fec export: remove dol_print_date warning (#34363) 2025-06-05 18:29:33 +02:00
Marc de Lima Lucio
35528a5885 FIX: prevent log warning with online signature url (#34361) 2025-06-05 18:29:12 +02:00
HENRY Florian
8853bfd51a fix: ref_client GETPOST facture/card.php should be alpha (#34311)
* fix: ref_client GETPOST facture/card.php should be alpha

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-04 14:09:03 +02:00
lvessiller-opendsi
ce0f46a483 FIX local taxes text in PDF (#34343) 2025-06-03 17:03:15 +02:00
ldestailleur
9a8a07e85a Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-02 14:27:14 +02:00
Marc de Lima Lucio
26bcc944cf FIX: projects: go back to edit view after cloning (#34221)
* FIX: projects: go back to edit view after cloning

* FIX: projects: go back to edit view after cloning
2025-05-27 21:23:16 +02:00
Eric - CAP-REL
d2d9590019 Fix to make protection ok when no stock and (#34207)
STOCK_ALLOW_NEGATIVE_TRANSFER on

Co-authored-by: Laurent Destailleur <eldy@users.sourceforge.net>
2025-05-27 21:16:38 +02:00
ThomasNgr-OpenDSI
fe4b1ff34d FIX modification de dates de pièces comptables sur plusieurs entités différentes (#34226) 2025-05-27 20:16:41 +02:00
HENRY Florian
4e95aab6b5 fix: On Clone Invoice, ref_customer is not clean (#34296) 2025-05-27 15:58:28 +02:00
William Mead
4fb79ba8a1 FIX API expense report line comments (v18+) (#34297)
* Fixed API expense report line comments

* Added contributor details
2025-05-27 15:57:48 +02:00
Marc de Lima Lucio
a42593db0d FIX: asset depreciation: php warnings (#34219) 2025-05-22 21:17:58 +02:00
Marc de Lima Lucio
cfc766ebbe FIX: accountancy general ledger: last total not shown if last account group shown has only one entry (#34251) 2025-05-22 19:29:49 +02:00
HENRY Florian
51e4ce05c9 FIX: mandatory extrafelds on lines are not checked (#34228)
* FIX: mandatory extrafelds on lines are not checked

* FIX: mandatory extrafelds on lines are not checked
2025-05-22 17:40:41 +02:00
Marc de Lima Lucio
819c3fd08a FIX: accountancy: bad filter on custom account groups (#34205) 2025-05-20 22:42:34 +02:00
atm-lucas
4c6955017f Adding mapping to module rights (#34212) 2025-05-20 21:47:08 +02:00
HENRY Florian
de40214a09 fix: multi filter journal in accountancy/bookkeeping/list.php and in export (#34217)
* fix: filter journal IN

* fix: filter journal IN
2025-05-20 20:33:31 +02:00
Marc de Lima Lucio
491ecaccfe FIX: asset depreciation: division by zero (#34218) 2025-05-20 20:32:08 +02:00
Marc de Lima Lucio
3b3f3fa29b FIX: product suplier tab: last modif date column was wrongly dependant of module barcode (#34170)
* FIX: product suplier tab: last modif date column was wrongly dependant of module barcode

* FIX: product suplier tab: last modif date column was wrongly dependant of module barcode, part 2
2025-05-17 14:05:42 +02:00
lvessiller-opendsi
efb9327896 FIX local taxes text in object line view mode (#34103) 2025-05-12 20:09:16 +02:00
Frédéric FRANCE
223f0c2763 fix translation (#34086) 2025-05-09 23:46:07 +02:00
Laurent Destailleur (aka Eldy)
b85bfc40f4 Fix phpunit 2025-05-06 11:59:08 +02:00
lvessiller-opendsi
cc78023a44 FIX allow double colon and string obfuscation in dol eval for computed extra fields (#34015)
* FIX allow double colon and string obfuscation in dol eval for computed extra fields

* Update functions.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-05-06 11:50:28 +02:00
Marc de Lima Lucio
9b74628e29 FIX: accountancy balance: keep subtotals when sorting (#34001) 2025-05-04 11:27:19 +02:00
Marc de Lima Lucio
0ef0d339b5 FIX: pgsql: error when creating sequences in migration scripts (#34021)
* FIX: pgsql: error in migration from 15 to 16

* FIX: pgsql: error in migration from 7 to 8
2025-05-04 11:26:34 +02:00
Laurent Destailleur
5bf5d23495 Update AbstractClient.php 2025-05-04 11:22:54 +02:00
Marc de Lima Lucio
02588036c2 FIX: oauth: php 8 warnings (#34027)
* FIX: oauth: fix php 8 warnings (backport of 9edfb1d113)

* FIX: oauth: fix php 8 warnings (backport of 9edfb1d113), part 2
2025-05-04 11:20:26 +02:00
Marc de Lima Lucio
8e0d3911e6 FIX: pgsql: case sensitivity in select queries (#34028) 2025-05-04 11:19:59 +02:00
Marc de Lima Lucio
3929ef0bfa FIX: accountancy: warning when account not found in plan (#34030) 2025-05-04 10:50:33 +02:00
William Mead
c3b35d4da5 Fixed PHPDoc. Added contributor details. (#33988) 2025-04-29 06:40:04 +02:00
ThomasNgr-OpenDSI
5e887e8850 Fix : on update of an order line, the TTC price would be used as HT price (#33940)
* Fix : on update of an order line, the TTC price would be used as HT price

* Update commande.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-22 11:48:22 +02:00
William Mead
61df34acd6 Fixed public ticket layout for Safari (#33933) 2025-04-21 10:42:51 +02:00
Frédéric FRANCE
f5b11b78da fix typo (#33920) 2025-04-19 11:46:22 +02:00
lvessiller-opendsi
d7758f9ae6 FIX bank payment rejection on SEPA (backport commit 100a657) (#33838) 2025-04-14 19:25:41 +02:00
ldestailleur
8434e6567f Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-04-10 14:17:05 +02:00
ldestailleur
2c38bea2b0 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-04-10 14:16:58 +02:00
ldestailleur
096b59913d Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-04-10 14:16:34 +02:00
ldestailleur
d38b9e6248 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-04-10 14:16:11 +02:00
ldestailleur
f256deb54b Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-04-10 14:15:48 +02:00
ThomasNgr-OpenDSI
7fa3474ecd FIX : constant PAYMENTBYBANKTRANSFER_ADDDAYS was never saved (#33799) 2025-04-09 15:44:51 +02:00
Marc de Lima Lucio
363b05d314 FIX: warehouse list: broken status filter (#33667) 2025-04-02 12:30:53 +02:00
ldestailleur
3fe6132c94 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-03-31 11:52:55 +02:00
ldestailleur
238f684576 Fix extension of debian.tar file 2025-03-31 11:52:47 +02:00
Eric - CAP-REL
e6ebf315ed package: make dir if needed (#33644) 2025-03-28 23:09:50 +01:00
Eric - CAP-REL
70e4d1ccd0 build zip & tar package : add more files on exclude list (#33634) 2025-03-28 15:00:37 +01:00
Eric - CAP-REL
a8a95cba75 debian build package on bookworm (#33635) 2025-03-28 10:19:08 +01:00
Laurent Destailleur (aka Eldy)
1a015cd91e Exclude more files 2025-03-27 15:01:50 +01:00
ldestailleur
9b36b6e965 Fix typo 2025-03-24 14:43:40 +01:00
ldestailleur
cbb9f5aa0c Replace hard coded value with var 2025-03-24 14:41:02 +01:00
ldestailleur
ef159f919e Backport fix in v20 #33536 2025-03-19 16:10:25 +01:00
ldestailleur
3e8c5651cd Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-03-19 14:09:48 +01:00
ldestailleur
0a4f1ffc06 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-03-19 14:09:41 +01:00
atm-lucas
42a1cde41a useless product fetch on invoice create (#33505) 2025-03-19 14:00:03 +01:00
MDW
324f9631d7 FIX: Replace compromised tj-actions/changed-files (#33481)
# FIX: Replace compromised tj-actions/changed-files

See https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised .

(Backport from develop)
2025-03-15 16:38:56 +01:00
Eric - CAP-REL
8073c0e1be FIX : close all services on contract will close all lines (#33466)
* close line : line could be inactive or open

* Update contrat.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-03-15 12:03:37 +01:00
Eric - CAP-REL
b256c9aaba fix missing alter table for tms auto update timestamp (#33451)
* fix missing alter table for tms auto update timestamp

* two tables was renamed 13.0 -> 16.0
2025-03-15 10:55:17 +01:00
ldestailleur
4897c9de7f Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-03-14 12:20:56 +01:00
ldestailleur
2058d572d9 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-03-14 12:17:06 +01:00
ldestailleur
089fab828b Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-03-14 12:14:10 +01:00
ldestailleur
fa05dc44ce Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-03-14 11:29:14 +01:00
ldestailleur
5b9453e302 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-03-14 11:28:33 +01:00
ldestailleur
d81a2d060e Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0 2025-03-14 11:27:49 +01:00
Eric - CAP-REL
8d9dc8c87d translation "by amoun" link (#33440) 2025-03-13 23:04:41 +01:00
Eric - CAP-REL
97aaff7395 13.0 fix migration missing tms auto update (#33443)
* tms field in llx_product is not updated to default timestamp

* but that's not the only one ...
2025-03-13 23:01:52 +01:00
HENRY Florian
7a1fa20959 fix: allow positive line in creditnote invoice if FACTURE_ENABLE_NEGATIVE_LINES and INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN (#33434)
* fix: allow positive line in creditnote invoice if FACTURE_ENABLE_NEGATIVE_LINES and INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN

* fix: allow positive line in creditnote invoice if FACTURE_ENABLE_NEGATIVE_LINES and INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN
2025-03-13 11:18:17 +01:00
warnerbryce
2f36edef3b FIX : PAIEMENT Wrong field displayed for DateChequeReceived (#33390) 2025-03-12 19:29:04 +01:00
Florian Mortgat
f7fe6c4f1a FIX warnings (#33423)
* FIX warnings

* fix: empty({function call})
2025-03-12 19:15:24 +01:00
atm-adrien
b9f4ddb021 FIX : Count on supplier invoice list does not match count in DB (#33351) 2025-03-11 03:00:46 +01:00
Eric - CAP-REL
6f4b2a8905 allow spaces on natural search (#33324)
* allow spaces on natural search like documentation says

* clear comment

* sanitize backport from 19.0

* update sanitize call to be compatible with dolibarr 19.0 backported function
2025-03-11 02:13:06 +01:00
Laurent Destailleur
0e95f70b8d Merge pull request #33329 from am97/fix/18.0/accountancy_code_sort
Fix: sort $aux_account after adding all items
2025-03-05 14:23:46 +01:00
Andrés Maldonado
dd7189b1d0 Fix: sort $aux_account after adding all items
Currently, some items are added to $aux_account, then the array is
sorted, then more items are added. In the end, the list visible in the
UI is not sorted.
2025-03-04 17:28:27 +01:00
Laurent Destailleur
cd21d385d6 Merge pull request #33229 from BenjaminFlr/fixTicketNotifMail
FIX(ticket): Notification email without public interface
2025-03-01 10:39:24 +01:00
Laurent Destailleur
86442aa7f0 Merge pull request #33264 from OPEN-DSI/18.0_fix_show_mail_error_validate_expense_report
FIX : Show true error when send notify email at validate expense report
2025-03-01 00:24:04 +01:00
Kamel Khelifa
39cd4fcb9e FIX : Show true error when send notify email at validate expense report 2025-02-27 16:43:42 +01:00
Benjamin Falière
4272cfa7e4 Restore url public ticket 2025-02-26 10:06:43 +01:00
Benjamin Falière
db56e5c8ea Replace getDolGlobalString by getDolGlobalInt 2025-02-25 21:09:59 +01:00
Benjamin Falière
0c573812e9 Remove empty on getDolGlobalString() 2025-02-25 16:03:07 +01:00
Benjamin Falière
4cf6394f01 FIX(ticket): Notification email without public interface
Remove link to public interface from automatic notification email if not enabled.
2025-02-25 15:43:21 +01:00
Laurent Destailleur
00ccb45bc4 Merge pull request #33131 from Easya-Solutions/18_fix_invoice_create
FIX invoice creation : use dol_include_once instead of require_once to allow external modules.
2025-02-21 18:05:24 +01:00
Laurent Destailleur
8aa1d1165f Merge pull request #33146 from Easya-Solutions/18.0_fix-wrong-label-status-product-tooltip
FIX #33145 wrong label status buy on product tooltip
2025-02-21 11:38:28 +01:00
VESSILLER
5911d7d0c0 Protect product object for line label 2025-02-20 08:21:50 +01:00
VESSILLER
41e54529b0 FIX #33145 wrong label status buy on prodcut tooltip 2025-02-19 17:26:54 +01:00
tnegre
f89aff96f7 FIX invoice creation : use dol_include_once instead of require_once to allow external modules 2025-02-19 11:45:07 +01:00
Laurent Destailleur
54df3c2991 Merge pull request #33084 from rycks/18.0_fix_change_deposit_conditions_value
set deposit percent to zero on change
2025-02-19 11:41:28 +01:00
Laurent Destailleur
85bce8b71f Merge pull request #33118 from Easya-Solutions/18.0_fix-accountancy-export-quadratus
FIX #33117 accountancy export Quadratus when doc ref is less than 10 char
2025-02-18 20:49:31 +01:00
VESSILLER
9d9d890c97 FIX accountancy export Quadratus when doc ref is less than 10 char 2025-02-18 12:07:19 +01:00
Laurent Destailleur
f511e2e523 Merge pull request #33099 from Easya-Solutions/18_fix_cve_2024-34051
FIX #CVE-2024-34051
2025-02-17 19:45:24 +01:00
Laurent Destailleur (aka Eldy)
bd9bf8b5a8 FIX #CVE-2024-34051 2025-02-17 12:24:03 +01:00
Eric Seigne
5fd5eae3b1 set deposit percent to zero on change 2025-02-14 09:35:57 +01:00
Laurent Destailleur
6aa4d6a940 Merge pull request #33072 from FHenry/18_fix_supplierorder_catcherroroncreate
fix: On Supplier Order create, if insertExtrafield failed, Dolibarr do not return error and continue
2025-02-13 17:29:22 +01:00
Florian HENRY
7997e927a0 fix: On Supplier Order create, if insertExtrafield failed, Dolibarr do not return error and continue 2025-02-13 14:59:15 +01:00
Laurent Destailleur
9516f9bbd2 Merge pull request #33039 from Easya-Solutions/18.0_fix-fileupload-with-ref-as-prefix
FIX #33038 drag and drop files are not prefixed with object reference
2025-02-12 22:48:43 +01:00
VESSILLER
f7bd03fb75 FIX #33038 drag and drop files are not prefixed with object reference 2025-02-12 16:02:00 +01:00
Laurent Destailleur
ea60024712 Merge pull request #33024 from Easya-Solutions/18.0_fix-shipment-with-same-product-in-other-subkit
FIX display full tree on shipment card when a kit contains a same component in other sub-kit
2025-02-12 04:02:13 +01:00
VESSILLER
edea44bccb FIX display full tree on shipment card when a kit contains a same component in other sub-kit 2025-02-11 17:12:15 +01:00
Laurent Destailleur
09df62600e Merge pull request #32616 from rycks/18.0_fix_zero_is_a_value_into_dictionnary
zero could be a value
2025-02-11 09:07:29 +01:00
Eric Seigne
94eaf5d089 cancel first idea 2025-02-11 00:32:57 +01:00
Eric Seigne
d04ac67ecd backport 20.0 solution 2025-02-11 00:31:59 +01:00
Laurent Destailleur
81b9286ea4 Merge pull request #32999 from Easya-Solutions/18_FIX_missing_unset_post
Fix missing unset post fourn_ref
2025-02-10 13:21:34 +01:00
Laurent Destailleur
c648bd8c90 Merge pull request #32982 from Easya-Solutions/18.0_fix-shipment-dispatch-serial-warehouses
FIX bad dispatched quantities for batches on shipment card
2025-02-10 12:52:42 +01:00
Laurent Destailleur
99a291f878 Merge pull request #32979 from rycks/18.0_user_author_deprecated
fk_user_author instead of user_author into update
2025-02-10 11:57:25 +01:00
ulysse-vldn
47f10cdc29 Fix missing unset post fourn_ref 2025-02-10 09:55:47 +01:00
VESSILLER
7eba8832e6 FIX bad dispatched quantities for batches on shipment card 2025-02-07 15:47:36 +01:00
Eric Seigne
03340d6016 in case of old code in other part makes a direct assignation 2025-02-07 15:13:20 +01:00
Eric Seigne
d288fe74a2 fk_user_author instead of user_author into update 2025-02-07 15:05:49 +01:00
Laurent Destailleur
28d588fd40 Merge pull request #32832 from Easya-Solutions/18.0_add_missing_hook_action_list
Missing hook PrintFieldListFrom on actions list
2025-02-06 18:23:15 +01:00
Laurent Destailleur (aka Eldy)
9fc78cd1b6 Fix regression 2025-02-05 18:16:09 +01:00
Laurent Destailleur
34298f6c8c Merge pull request #32947 from Easya-Solutions/18.0_fix-shipment-updated-message
FIX wrong message on update shipment
2025-02-05 16:39:11 +01:00
VESSILLER
bbbba45fc1 FIX wrong message on update shipment 2025-02-05 11:19:36 +01:00
Laurent Destailleur (aka Eldy)
bfb97edccf Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-02-05 10:59:49 +01:00
Laurent Destailleur (aka Eldy)
989c9b9548 Debug v22 2025-02-05 10:59:25 +01:00
Laurent Destailleur (aka Eldy)
82b7326c99 Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-02-05 10:49:20 +01:00
Laurent Destailleur (aka Eldy)
d2e6335e95 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-02-05 10:49:14 +01:00
Laurent Destailleur (aka Eldy)
711f21e8a0 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-02-05 10:48:43 +01:00
Laurent Destailleur (aka Eldy)
e1c343cedd Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-02-05 10:48:16 +01:00
Laurent Destailleur
51def8d31d Merge pull request #32411 from Easya-Solutions/18_fix_search_ticket_list
FIX select group and severity search fields on ticket list
2025-02-03 15:53:24 +01:00
Laurent Destailleur
bbb8b0f01f Merge pull request #32830 from hregis/17.0
FIX compatibility with multicompany
2025-01-30 13:25:07 +01:00
Laurent Destailleur (aka Eldy)
c115a76d4e Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-01-30 12:41:34 +01:00
Laurent Destailleur
63ab8d9f75 Merge pull request #32871 from atm-irvine/fix_undefined_properties
fix(contrat,facture-rec): undefined properties
2025-01-30 12:40:08 +01:00
Irvine Fleith
7848d77830 fix(contrat,facture-rec): undefined properties 2025-01-30 09:58:29 +01:00
ThomasNgr-OpenDSI
737a807456 Merge branch '18.0' into 18.0_add_missing_hook_action_list 2025-01-30 09:19:21 +01:00
Laurent Destailleur
e6a6426b5b Merge pull request #32850 from atm-irvine/fix_missing_hook_printFieldListSearchParam
fix(services-list): added missing hook printFieldListSearchParam in services list
2025-01-29 16:49:48 +01:00
Irvine Fleith
f3dc94d334 fix(services-list): added missing hook printFieldListSearchParam 2025-01-29 10:14:46 +01:00
Laurent Destailleur
e4f0c1a42b Merge pull request #32829 from Easya-Solutions/18.0_fix-hook-product-list-missing
Backport from v20 missing executeHooks printFieldListFrom in product list page
2025-01-28 23:47:20 +01:00
Laurent Destailleur
44d6803d12 Merge pull request #32834 from atm-irvine/fix_missing_hook_printFieldListWhere
fix(services-list): added missing hook printFieldListWhere
2025-01-28 23:46:14 +01:00
Laurent Destailleur
f80e83b846 Merge pull request #32833 from Easya-Solutions/18_fix_inner_join_action_list
action/list.php : replace comma-joins by INNER JOIN
2025-01-28 23:45:41 +01:00
Irvine Fleith
bdcd7b5ef3 fix(services-list): added missing hook printFieldListWhere 2025-01-28 14:47:10 +01:00
tnegre
17d1c279ab action/list.php : replace comma-joins by INNER JOIN 2025-01-28 14:44:10 +01:00
tnegre
dd40aea380 Add hook PrintFieldListFrom on actions list 2025-01-28 14:18:26 +01:00
Regis Houssin
f9ec70f1db FIX compatibility with multicompany 2025-01-28 14:05:59 +01:00
VESSILLER
83bc7b70a0 Backport from v20 missing executeHooks printFieldListFrom in product list page 2025-01-28 13:34:49 +01:00
tnegre
2cbede2ef8 Merge branch '18.0' into 18_fix_search_ticket_list 2025-01-27 15:20:18 +01:00
tnegre
729e6c4aba Revert "set empty value for choice"
This reverts commit e8aaa51edc.
2025-01-27 15:12:24 +01:00
Laurent Destailleur
a2e865587f Merge pull request #32812 from hregis/fix_18_wrong_margin
FIX wrong left margin (v18 to develop ?)
2025-01-27 14:29:19 +01:00
Laurent Destailleur
c6ab6cd57e Merge pull request #32811 from hregis/fix_18_cannot_delete_file_task
FIX can not delete files in task card
2025-01-27 14:25:18 +01:00
Regis Houssin
837b2ff060 FIX wrong left margin (v18 to develop ?) 2025-01-27 13:59:12 +01:00
Laurent Destailleur
c7ee83b3b9 FIX can not delete files in task card 2025-01-27 12:39:24 +01:00
Laurent Destailleur
a404b80988 Merge pull request #32757 from rycks/18.0_missing_hookmanager_on_some_odt_modules
missing hookmanager like others doc_generic*odt modules
2025-01-23 00:42:46 +01:00
Eric Seigne
cbe15c7c71 missing hookmanager like others doc_generic*odt modules 2025-01-22 23:53:16 +01:00
Laurent Destailleur
278b07099c Merge pull request #32729 from hregis/fix_18_wrong_update_param
FIX wrong update function parameter
2025-01-21 08:26:40 +01:00
Regis Houssin
576e70c3ce FIX wrong update function parameter 2025-01-20 22:32:30 +01:00
Laurent Destailleur
5433aa8d2e Merge pull request #32720 from Easya-Solutions/18.0_fix-supplier-order-linked-line-delete
FIX delete supplier order when at least one line linked to customer order line
2025-01-20 15:14:05 +01:00
Laurent Destailleur
b67fdb3e51 Merge pull request #32719 from Easya-Solutions/14.0_fix-supplier-order-linked-line-delete
FIX delete supplier order line when linked to customer order line
2025-01-20 15:13:22 +01:00
VESSILLER
7f2a253625 Uniformize SQL concat char 2025-01-20 12:17:12 +01:00
VESSILLER
ad60a50d4d Uniformize SQL concat char 2025-01-20 11:58:58 +01:00
VESSILLER
08a976fd85 FIX delete supplier order when at least one line linked to customer order line 2025-01-20 11:56:54 +01:00
VESSILLER
426f4305b0 FIX delete supplier order when at least one line linked to customer order line 2025-01-20 11:48:37 +01:00
VESSILLER
db47ce3bb1 FIX delete supplier order line when linked to customer order line 2025-01-20 11:33:24 +01:00
Laurent Destailleur (aka Eldy)
1b42078d1e Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-01-20 10:24:30 +01:00
Laurent Destailleur (aka Eldy)
736890b244 Merge 2025-01-20 10:15:31 +01:00
Laurent Destailleur (aka Eldy)
2664518bd3 Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-01-20 10:14:52 +01:00
Laurent Destailleur (aka Eldy)
c6f90d8361 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-01-20 10:14:44 +01:00
Laurent Destailleur (aka Eldy)
cc732621ab Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-01-20 10:14:25 +01:00
Laurent Destailleur (aka Eldy)
04fed9526a Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-01-20 10:13:04 +01:00
Laurent Destailleur
9f4692e1c9 Merge pull request #31460 from OPEN-DSI/18.0_fix_return_hook_sendmail
FIX: Fix return value of hook sendMail when hook return -1 who must be return false in sendfile() function
2025-01-20 09:23:44 +01:00
Laurent Destailleur
1fa3b63fdc Merge pull request #32346 from aspangaro/18_fixloanpayment
FIX #32339 Delete a loan settlement is partial
2025-01-20 04:13:26 +01:00
Laurent Destailleur
af2889e982 Merge pull request #32505 from IC-William/fix-email-notification-ticket-assignee-18
FIX send email to assigned user on ticket create
2025-01-20 04:08:23 +01:00
Laurent Destailleur
4d925db3cd Merge pull request #32515 from Easya-Solutions/18_fix_many_tags_in_string
FIX ODT substitution when many HTML tags in string
2025-01-20 04:06:50 +01:00
Laurent Destailleur
36d91f1c07 Merge pull request #32563 from marc-dll/18.0_FIX_variants_copy_multiprices
FIX: product variants copy: also copy multiprice variations
2025-01-20 04:03:44 +01:00
Laurent Destailleur
bcc260dc08 Merge pull request #32650 from ATM-Consulting/FIX_towStatusOnInvoiceLinkedObjectBlock
FIX : Many status on invoice linked object block
2025-01-20 02:53:18 +01:00
Laurent Destailleur
9507b89fec Merge pull request #32674 from fappels/18_fix_fatal_error_on_kit
FIX: #26250 fatal error on kit
2025-01-20 00:12:10 +01:00
Francis Appels
a52a218ae4 Use same patch like in #26454 2025-01-16 19:17:47 +01:00
Laurent Destailleur
0409b8b9c5 Merge pull request #32652 from FHenry/18_fix_fetch_expensereport_wihtout_entity_check_by_ref
fix: add entity in where for fetch when fetch by ref
2025-01-16 15:41:45 +01:00
Laurent Destailleur
f68cf0034a Merge pull request #32683 from ATM-Consulting/FIX/133/TK2501-3514/api-put
FIX 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request
2025-01-16 11:41:26 +01:00
atm-florian
ba4e97f07b FIX 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request cf. PR #29237
+ security for Tickets API: disable updating rowid
2025-01-16 10:37:29 +01:00
Laurent Destailleur (aka Eldy)
c2c3879032 Clean php file 2025-01-16 00:36:56 +01:00
Laurent Destailleur (aka Eldy)
c4529ed986 Clean file 2025-01-16 00:35:38 +01:00
Laurent Destailleur (aka Eldy)
8b7eaf360e Fix phpunit 2025-01-15 20:08:13 +01:00
Laurent Destailleur (aka Eldy)
2f317f0f52 Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-01-15 20:07:40 +01:00
Laurent Destailleur (aka Eldy)
bd35af1360 Fix phpunit 2025-01-15 20:07:31 +01:00
Francis Appels
351a7bd6bb FIX: #26250 fatal error on kit 2025-01-15 19:01:18 +01:00
Laurent Destailleur
fe6d59c090 Merge pull request #32651 from ATM-Consulting/FIX/133/bug/pre-commit-debug-bar-fails
Apply suggestion by @mdeweerd to ensure pre-commit will pass.
2025-01-15 15:53:48 +01:00
Laurent Destailleur
d4e66426e7 Merge pull request #32621 from ATM-Consulting/FIX/132/bug/cache-collisions-dol-getIdFromCode
FIX 17.0 - collisions in cache for dol_getIdFromCode
2025-01-15 15:51:23 +01:00
Laurent Destailleur
88d81aa943 Merge pull request #27159 from atm-lena/17.0_FIX_MultilangsTranslationPDFLinesDescription
FIX Multilangs : PDF lines description
2025-01-15 15:38:48 +01:00
Laurent Destailleur
f24f4e012d Merge pull request #32557 from Easya-Solutions/18_fix_join_soc_commerciaux
fix join societe_commerciaux in societe list
2025-01-15 15:12:42 +01:00
Laurent Destailleur
60ea952b78 Merge pull request #32338 from Easya-Solutions/18.0_fix_error_delete_loan
FIX : display error when loan can't be deleted
2025-01-15 15:08:22 +01:00
Laurent Destailleur
5354b54ec0 Merge pull request #32663 from Easya-Solutions/14_FIX_socpeopleassigned_update_event
Backport Fix bad management when inserting contacts of actioncomm
2025-01-15 14:40:07 +01:00
Laurent Destailleur
49feeee85e Merge pull request #32654 from atm-irvine/fix_search_thirdparty_by_name
fix(services-list): search thirdparty by name
2025-01-15 14:37:32 +01:00
Laurent Destailleur
42d8591758 Merge pull request #32660 from Easya-Solutions/14_FIX_selectcontacts_param_update_event
FIX selectcontact is loading all contacts when update event
2025-01-15 14:35:32 +01:00
Laurent Destailleur (aka Eldy)
cf156e024d Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-01-15 12:16:03 +01:00
Laurent Destailleur (aka Eldy)
6b0c8f39d5 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-01-15 12:15:28 +01:00
Laurent Destailleur (aka Eldy)
2c2e01d14c Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-01-15 12:14:06 +01:00
Laurent Destailleur (aka Eldy)
abc1d1dcb3 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-01-15 12:13:44 +01:00
Laurent Destailleur
628189f57f Backport of #00e65eb
Fix bad management when inserting contacts of actioncomm
2025-01-15 11:00:05 +01:00
uvaldenaire-opendsi
748dcd0881 FIX selectcontact is loading all contacts if socid is empty and MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT is not set 2025-01-15 10:12:16 +01:00
Florian HENRY
2d1d6f13c9 chore: review 2025-01-15 09:10:11 +01:00
Laurent Destailleur
4f98ca37e2 Merge pull request #32653 from mdeweerd/pr32651
Fix ci 17.0 and up - Install maximum php version found in check.php
2025-01-15 01:11:52 +01:00
Irvine Fleith
a34eaa07ed fix(services-list): search thirdparty by name 2025-01-14 16:19:52 +01:00
MDW
20f2293c01 Always install expected php version 2025-01-14 16:15:04 +01:00
MDW
7869e45954 Move installation of php before pre-commit run 2025-01-14 16:15:03 +01:00
MDW
9af7eaf08c Use PHP version from check.php 2025-01-14 16:15:01 +01:00
Florian HENRY
79ed9c7e37 fix: add entity in where for fetch when fetch by ref 2025-01-14 16:08:40 +01:00
Laurent Destailleur
eb8167bc57 Merge pull request #32414 from altairisfr/fix_status_ticket
FIX: status ticket update for new message
2025-01-14 14:35:24 +01:00
atm-florian
df992477be Apply suggestion by @mdeweerd to ensure pre-commit will pass. 2025-01-14 14:34:09 +01:00
Florian Mortgat
79c55149b2 Update htdocs/core/lib/functions.lib.php 2025-01-14 11:00:38 +01:00
Adrien Raze
ac1077bfe3 FIX : There were many status indicator in the invoice linked object block (propal card) 2025-01-14 09:48:13 +01:00
Laurent Destailleur
a46c47c134 Merge pull request #32542 from Al-thi/fix/stock-import
FIX #21294 Stock import sql query
2025-01-13 02:43:37 +01:00
atm-florian
762e4ec8d1 updated local pre-commit hook -> fix typo 2025-01-10 17:01:59 +01:00
atm-florian
77f982d1a8 FIX 17.0 - collisions in cache for dol_getIdFromCode 2025-01-10 16:25:27 +01:00
Laurent Destailleur
7a7146c03d Merge pull request #32600 from Easya-Solutions/14_fix_selectcontacts_socid_param
fix selectcontacts  param
2025-01-10 12:03:36 +01:00
Eric Seigne
a34d760a88 fix edit : display zero value instead of nothing 2025-01-10 11:28:46 +01:00
Eric Seigne
e9eb22f8f0 zero could be a value 2025-01-10 11:17:06 +01:00
Maxime Kohlhaas
e1a47ed0fb Merge branch '17.0' of github.com:Dolibarr/dolibarr into 18.0 2025-01-09 18:08:00 +01:00
Maxime Kohlhaas
6388f6e62a Merge branch '16.0' of github.com:Dolibarr/dolibarr into 17.0 2025-01-09 18:07:09 +01:00
Maxime Kohlhaas
e2605fbf64 Merge branch '15.0' of github.com:Dolibarr/dolibarr into 16.0 2025-01-09 18:05:33 +01:00
Maxime Kohlhaas
90c24b3d95 Merge branch '14.0' of https://github.com/Dolibarr/dolibarr into 15.0 2025-01-09 18:01:51 +01:00
uvaldenaire-opendsi
0912b3b04f fix selectcontacts param 2025-01-09 15:09:38 +01:00
tnegre
7e82f70c77 add case when HTML tags contain attributes 2025-01-09 11:05:45 +01:00
Laurent Destailleur
2dd81deb13 Merge pull request #32568 from atm-maxime/14.0
Fix : cron job user rights force reload
2025-01-07 21:29:15 +01:00
Maxime Kohlhaas
273ec857a3 Fix : cron job user rights force reload 2025-01-07 18:39:19 +01:00
Marc de Lima Lucio
ef564caf28 FIX: qual 2025-01-07 17:37:30 +01:00
Marc de Lima Lucio
3ef6299c83 FIX: phpcs 2025-01-07 17:20:57 +01:00
Marc de Lima Lucio
ec58ee940a FIX: product variants copy: also copy multiprice variations 2025-01-07 17:09:48 +01:00
Laurent Destailleur
2519278269 Merge pull request #32558 from Easya-Solutions/14_fix_join_soc_commerciaux
fix join societe_commerciaux in societe list
2025-01-07 15:54:42 +01:00
uvaldenaire-opendsi
74881ae251 fix join societe_commerciaux in societe list 2025-01-07 13:51:34 +01:00
uvaldenaire-opendsi
c218eaa6ed fix join societe_commerciaux in societe list 2025-01-07 13:45:59 +01:00
Alexis Thietard
b7cb799af0 FIX #21294 Stock import sql query
To respect the PostgreSQL update statement syntax, cf.
https://www.postgresql.org/docs/17/sql-update.html

```
column_name
    The name of a column in the table named by table_name. The column name can
    be qualified with a subfield name or array subscript, if needed. Do not
    include the table's name in the specification of a target column — for
    example, UPDATE table_name SET table_name.col = 1 is invalid.
```

Signed-off-by: Alexis Thietard <alexis.thietard@rtone.fr>
2025-01-06 14:36:50 +01:00
tnegre
78bf506790 fix tests in error 2025-01-06 09:44:04 +01:00
tnegre
61b03b0c05 Testing ODF : revert parameters order for assertEquals() 2025-01-06 09:44:04 +01:00
tnegre
b31962f7e2 fix 2025-01-06 09:44:04 +01:00
tnegre
112220da86 BUG: when there are two identical HTML tags in a substitution string, everything is taken between first opening tag and last closing tag. Write test to reproduce. 2025-01-06 09:44:04 +01:00
Laurent Destailleur
1fafc1b6ad Merge branch '18.0' into fix-email-notification-ticket-assignee-18 2025-01-05 17:30:02 +01:00
Frédéric France
eb4e059683 fix 2025-01-05 17:29:46 +01:00
Laurent Destailleur
b5ff688841 Merge branch '18.0' into fix-email-notification-ticket-assignee-18 2025-01-05 17:23:20 +01:00
Laurent Destailleur (aka Eldy)
8805b8cac4 Exclude test files 2025-01-05 17:22:30 +01:00
Laurent Destailleur
d01a99cd79 Merge branch '18.0' into fix-email-notification-ticket-assignee-18 2025-01-05 17:16:58 +01:00
Laurent Destailleur (aka Eldy)
1866713082 Avoid error 2025-01-05 17:10:00 +01:00
Laurent Destailleur (aka Eldy)
9ecc88230f Test pr action 2025-01-05 17:08:02 +01:00
Laurent Destailleur
8ddd050a34 Merge pull request #32487 from rycks/18.0_fix_name_to_lastname_socpeople
there is no "name" field into llx_socpeople table
2025-01-02 16:53:57 +01:00
William Mead
4c4b773de5 Fix send on assign 2025-01-02 14:59:44 +01:00
William Mead
37a815af53 Cleaned code 2025-01-02 14:50:14 +01:00
William Mead
f60f34cdf8 Backport fix for send email to assigned user on ticket create 2025-01-02 14:07:46 +01:00
Laurent Destailleur (aka Eldy)
4267f5f010 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-31 17:18:15 +01:00
Laurent Destailleur (aka Eldy)
f08c9605db Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2024-12-31 17:17:45 +01:00
Laurent Destailleur (aka Eldy)
e41dfcbbb3 Fix phpcs 2024-12-31 17:17:00 +01:00
Laurent Destailleur (aka Eldy)
a0b6aa28a7 Fix phpcs 2024-12-31 17:13:43 +01:00
Laurent Destailleur (aka Eldy)
c273495261 Fix ci 2024-12-31 17:12:37 +01:00
Eric Seigne
220090813d there is no "name" field into llx_socpeople table 2024-12-30 10:28:23 +01:00
Laurent Destailleur
e65ee097a5 Merge pull request #30915 from MaximilienR-easya/18.0_Backport_yogosha
Backport #yogosha18281
2024-12-30 04:58:37 +01:00
Laurent Destailleur (aka Eldy)
92963af09f Fix yml syntax 2024-12-29 17:04:54 +01:00
Laurent Destailleur (aka Eldy)
8ccdbf374b Update test 2024-12-29 15:57:17 +01:00
Laurent Destailleur (aka Eldy)
0300209b3d Missing new line 2024-12-24 02:00:37 +01:00
Laurent Destailleur
a5f51dc969 Merge pull request #32433 from frederic34/15.0-fix_ci
fix CI for branch 15.0
2024-12-19 18:58:29 +01:00
Frédéric France
04b7fdd4c4 fix CI 2024-12-19 18:32:16 +01:00
Laurent Destailleur (aka Eldy)
e3c44568a0 Test github action 2024-12-19 18:31:15 +01:00
Laurent Destailleur
37f3fccc35 Merge pull request #32383 from atm-etienne/fix/130/remove_dol_syslog_throws
Fix/130/remove dol syslog throws
2024-12-19 18:10:38 +01:00
Laurent Destailleur
fedcec58a6 Update errors.lang 2024-12-19 18:09:50 +01:00
Laurent Destailleur
be95c92c45 Update functions.lib.php 2024-12-19 18:07:02 +01:00
Laurent Destailleur (aka Eldy)
810fd7e744 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-19 17:51:14 +01:00
Laurent Destailleur (aka Eldy)
c6afa1a6cb Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2024-12-19 17:50:40 +01:00
Laurent Destailleur (aka Eldy)
29eedd2ac4 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2024-12-19 17:50:34 +01:00
Laurent Destailleur (aka Eldy)
ead519811c Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-12-19 17:50:09 +01:00
Laurent Destailleur
5203652796 Merge pull request #32430 from Benoit-PASCAL/fix-fetch-action-linked-object
fix: fetch action linked object
2024-12-19 17:49:50 +01:00
Laurent Destailleur
750ed5e91c Merge pull request #32412 from Easya-Solutions/17.0_fix_no_commit_to_branch
pre-commit : change regex for hook no-commit-to-branch to block only `18.0`, not `18.0_branch_description`
2024-12-19 17:38:15 +01:00
Benoît PASCAL
425c23d28c fix: fetch action linked object 2024-12-19 15:38:19 +01:00
Noé Cendrier
900a91a0a2 Merge pull request #22 from altairis-melina/fix_statut_ticket
Fix: Statut ticket
2024-12-18 11:40:07 +01:00
Mélina JOUM
ce06c12da6 FIX: GETPOST('private_message') 2024-12-18 11:19:56 +01:00
tnegre
b73bcd68a9 pre-commit : change regex for hook no-commit-to-branch in order to allow branches BEGINNING by 18.0, such as 18.0_fix_foo 2024-12-18 10:47:46 +01:00
tnegre
86833633ef fix 2024-12-18 10:26:26 +01:00
tnegre
21ac3b28ef Merge branch '18.0' into 18.0_fix_error_delete_loan 2024-12-18 09:50:13 +01:00
Etienne BENDER
6aee2db1d4 Remove use of getDolGlobalInt() 2024-12-17 09:01:04 +01:00
Laurent Destailleur (aka Eldy)
a6da3b189a Not required, but for better code consistency 2024-12-16 12:59:16 +01:00
Laurent Destailleur
65d6403fa3 Merge branch '18.0' into 18_fixloanpayment 2024-12-13 14:05:43 +01:00
Laurent Destailleur (aka Eldy)
62c1d500e8 Avoid errors 2024-12-13 14:05:04 +01:00
Alexandre SPANGARO
ef090aa895 CI 2024-12-13 06:22:44 +01:00
Alexandre SPANGARO
d9be3efa90 FIX #32339 Delete a loan settlement is partial 2024-12-13 06:18:45 +01:00
tnegre
a4785adb3d FIX : display error when loan can't be deleted 2024-12-12 15:31:40 +01:00
Laurent Destailleur (aka Eldy)
3c22179183 Rename file 2024-12-09 14:20:28 +01:00
Etienne BENDER
a96d13d5aa Add translation for bad log level 2024-12-09 10:56:35 +01:00
Etienne BENDER
f1868ee162 Replace dol_syslog throws by default log level 2024-12-09 10:50:29 +01:00
Laurent Destailleur (aka Eldy)
cfd4919829 Test 2024-12-09 08:40:25 +01:00
Laurent Destailleur (aka Eldy)
30893bf676 Test 2024-12-09 08:36:07 +01:00
Laurent Destailleur (aka Eldy)
28213b3129 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-08 16:44:08 +01:00
Laurent Destailleur (aka Eldy)
c3ede4413d Test 2024-12-08 16:01:45 +01:00
Laurent Destailleur (aka Eldy)
21eca275e9 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-08 15:54:01 +01:00
Laurent Destailleur (aka Eldy)
127b9701ff Test 2024-12-08 15:53:25 +01:00
Laurent Destailleur (aka Eldy)
ee7201fc61 Test 2024-12-08 15:43:42 +01:00
Laurent Destailleur (aka Eldy)
c075e078e9 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-08 15:41:37 +01:00
Laurent Destailleur (aka Eldy)
f9eb6b69f5 Test 2024-12-08 15:41:29 +01:00
Laurent Destailleur (aka Eldy)
3d9b7ed7d3 Test 2024-12-08 15:40:35 +01:00
Laurent Destailleur (aka Eldy)
6920b72cf4 Test 2024-12-08 15:35:03 +01:00
Laurent Destailleur (aka Eldy)
9a9602f418 Test 2024-12-08 15:09:08 +01:00
Laurent Destailleur (aka Eldy)
0960fcba2a Test 2024-12-08 15:02:43 +01:00
Laurent Destailleur (aka Eldy)
9b46ed9c2d Test 2024-12-08 14:57:17 +01:00
Laurent Destailleur (aka Eldy)
d055b1fb29 Test 2024-12-08 14:36:07 +01:00
Laurent Destailleur (aka Eldy)
9411ac2144 Test 2024-12-08 14:35:30 +01:00
Laurent Destailleur (aka Eldy)
eb2b35e3b1 Test 2024-12-08 14:32:16 +01:00
Laurent Destailleur (aka Eldy)
ab5f9a0884 Tst 2024-12-08 14:31:00 +01:00
Laurent Destailleur (aka Eldy)
b4ece8d154 Fix 2024-12-08 14:25:10 +01:00
Laurent Destailleur (aka Eldy)
75e504ffbc Test 2024-12-08 14:20:15 +01:00
Laurent Destailleur (aka Eldy)
3877f257b4 Test 2024-12-08 14:13:13 +01:00
Laurent Destailleur (aka Eldy)
6f2d8b23b4 Test 2024-12-08 14:09:47 +01:00
Laurent Destailleur (aka Eldy)
80326acb71 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-08 14:08:07 +01:00
Laurent Destailleur (aka Eldy)
d9035eecda Test 2024-12-08 14:07:37 +01:00
Laurent Destailleur (aka Eldy)
da6f1fbc9a Test 2024-12-08 14:04:10 +01:00
Laurent Destailleur (aka Eldy)
4bb2b9f971 Test 2024-12-08 13:51:23 +01:00
Laurent Destailleur (aka Eldy)
a0864dfb3f Fix test 2024-12-08 13:05:24 +01:00
Laurent Destailleur (aka Eldy)
d3d534efee Test 2024-12-08 12:54:25 +01:00
Laurent Destailleur (aka Eldy)
2e94f7dbd4 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-08 12:52:59 +01:00
Laurent Destailleur (aka Eldy)
2c4b3bf6ad Test 2024-12-08 12:52:44 +01:00
tnegre
e8aaa51edc set empty value for choice 2024-12-06 14:06:54 +01:00
tnegre
e48e1e27d5 replace code from develop to match DLB18 variable name 2024-12-06 12:07:37 +01:00
Laurent Destailleur (aka Eldy)
c86b50e3fc The $empty param must follow same rules than other select component. 2024-12-06 11:57:27 +01:00
Laurent Destailleur
42368b37e9 Merge pull request #32251 from ATM-Consulting/FIX/130/coeur/fetch-return-value-bad-test
Fix 17.0 missing test of return value
2024-12-05 19:28:42 +01:00
Laurent Destailleur
addefdf0cf Merge pull request #32247 from atm-irvine/fix_missing_error_cron_createrecurringinvoice
Added new error message for CRON createRecurringInvoice
2024-12-05 18:14:40 +01:00
Laurent Destailleur
59642d8d93 Merge pull request #32131 from frederic34/patch-10
backport of PR 32080
2024-12-05 16:47:42 +01:00
Laurent Destailleur
a26eecf0fd Merge pull request #32190 from JonBendtsen/v18_Updating_Invoice_Notes_32134
throw RestException(500) if update of invoice fails #32134
2024-12-05 16:39:56 +01:00
Laurent Destailleur
69449668a8 Merge pull request #32205 from atm-quentin/FIX_total_time
Fix for incorrect total time calculation in project overview tab
2024-12-05 16:21:51 +01:00
Laurent Destailleur
084d99f670 Merge pull request #32216 from Easya-Solutions/18.0_fix_ticket_list
Ticket : don't autofill search field for ticket type on multiselect
2024-12-05 16:12:22 +01:00
atm-florian
15c19b99c9 FIX 17.0: warnings due to uninitialized variables + delete code that doesn't apply to recurring invoices (AFAIK, there is no recurring credit note feature) 2024-12-05 12:15:20 +01:00
atm-florian
c418a6ff57 FIX 17.0 - missing error handling for FactureRec::fetch in card-rec.php 2024-12-05 12:14:13 +01:00
Irvine Fleith
3aad5fd283 Added new error message for CRON createRecurringInvoice 2024-12-05 09:02:51 +01:00
Frédéric FRANCE
d04b1e57d2 Merge branch '18.0' into patch-10 2024-12-03 21:39:47 +01:00
tnegre
f5c715c6a7 Ticket : don't autofill search field for ticket type on multiselect 2024-12-03 15:05:39 +01:00
Quentin VIAL--GOUTEYRON
d8fecc1522 FIX : in projet/element.php total_time is always back to 0 2024-12-03 08:39:34 +01:00
Jon Bendtsen
30a9da8fbf Merge branch '18.0' into v18_Updating_Invoice_Notes_32134 2024-12-02 07:31:35 +01:00
Jon Bendtsen
e6712300d5 phan fix, remove code never reached 2024-12-02 07:29:18 +01:00
Laurent Destailleur (aka Eldy)
c547362ae9 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-02 01:41:04 +01:00
Laurent Destailleur (aka Eldy)
9ec4575c43 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2024-12-02 01:38:41 +01:00
Günter Lukas
4962dd1a81 Fix #29353 (#32151)
Hidden extrafields are NULL on update. Can only happen with extrafields in positions of commercial elements (facture, propal, commande, etc)
2024-12-02 00:48:13 +01:00
Mathieu Moulin
6337a987d8 Fix handling of boolean extrafields in list filters (#32109)
* Fix show payment URL in massaction context when not one email per recipient

* Debug v20 - fix param for filter on boolean

* FIX : Fix case when the value of a extrafields of the type 'boolean', 'select' or other have an option with a value equal to '0'.
It's not reselected when the filter is set.

* Revert "Fix show payment URL in massaction context when not one email per recipient"

This reverts commit 0986d487f1.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: kkhelifa <kkhelifa@open-dsi.fr>
2024-12-01 23:28:49 +01:00
Jon Bendtsen
7a500976d2 Merge branch '18.0' into v18_Updating_Invoice_Notes_32134 2024-12-01 10:27:43 +01:00
Jon Bendtsen
0e1744a6ec throw RestException(500) if update of invoice fails #32134 2024-12-01 10:24:25 +01:00
Frédéric FRANCE
29a7a410c8 backport of https://github.com/Dolibarr/dolibarr/pull/32080
backport of fix part
2024-11-28 13:28:34 +01:00
Mathieu Moulin
e9009ede87 Fix double hook printFieldPreListTitle in command list (#32108)
* Fix command list : remove double hook printFieldPreListTitle

* Remove files
2024-11-27 22:02:29 +01:00
Frédéric FRANCE
7b16039084 fix test (#32110) 2024-11-27 18:02:59 +01:00
Thomas C.
acdab170a7 fix (#32012) 2024-11-22 17:58:21 +01:00
Laurent Destailleur
32b18d6bfd Execute 2024-11-22 15:22:22 +01:00
Jon Bendtsen
9cd7d381a6 flip supplier proposal and orders to show up as negative in the project Profit overview (#32048)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2024-11-22 13:25:25 +01:00
Frédéric FRANCE
e35b534ee2 fix ajax tooltip lib_foot.js.php (#32044)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-22 13:22:05 +01:00
Laurent Destailleur
682544ad45 Update test.yaml (#32054)
* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update pr-18.yaml

* Update test.yaml
2024-11-22 13:08:56 +01:00
Laurent Destailleur
53ffe42f92 Test CI 2024-11-22 00:27:58 +01:00
Laurent Destailleur
c2a037842d Add test 2024-11-22 00:22:26 +01:00
Laurent Destailleur
552bebf564 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-22 00:20:23 +01:00
Laurent Destailleur
ec93f50863 Test 2024-11-22 00:15:14 +01:00
HENRY Florian
240c5bb311 fix: buyer and sellers in supplier invoice and supplier order list are not corectly defined (#32028)
* fix: buyer and sellers in supplier invoice and supplier order list are not corectly defined

* chore: revert bad changes
2024-11-21 23:00:41 +01:00
lvessiller-opendsi
c12a7e144a FIX TakePos barcode rule (#31857)
* FIX TakePos barcode rule

* Keep last test confition on barcode rule
2024-11-21 19:07:58 +01:00
HENRY Florian
991f53db9e FIX: use tax with code on supplier order line give tax code missing in supplier invoice (#32018)
* FIX: use vat with code on supplier order result code missing in supplier invoice

* FIX: use vat with code on supplier order result code missing in supplier invoice
2024-11-21 17:46:54 +01:00
Laurent Destailleur
877fd00353 Update pr-18.yaml 2024-11-21 13:21:58 +01:00
Frédéric FRANCE
d420d035de Update pr-18.yaml (#32024)
* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-21 13:02:14 +01:00
alkaan
115323dec8 FIX : removes traces of <<<HEAD conflicts following the postponement of branch 13 modifications (#32014)
Co-authored-by: John Fleuret <john.fleuret@atgp.net>
2024-11-20 20:57:22 +01:00
Laurent Destailleur
ac6c57e90e Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-19 12:59:14 +01:00
Laurent Destailleur
9c4bb84460 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-11-19 12:57:19 +01:00
Laurent Destailleur
5a58b8e721 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-11-19 12:56:37 +01:00
Laurent Destailleur
b068fdc9b3 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-11-19 12:56:19 +01:00
Laurent Destailleur
b8533e1853 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-11-19 12:49:19 +01:00
Laurent Destailleur
753e5e535d Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0 2024-11-19 12:47:14 +01:00
Laurent Destailleur
99774022a5 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-19 03:36:44 +01:00
Laurent Destailleur
c5ebc9b7bd Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-11-19 03:33:15 +01:00
Florian Charlaix
f2f3e478d1 New Add a workflow to let @lvessiller-opendsi and @rycks merge 18.0 PR by accepting reviews (#31898)
* Add a workflow to let @lvessiller-opendsi and @crycks merge 18.0 PR by accepting reviews

* Try to fix permissions
2024-11-18 17:58:56 +01:00
Benoît PASCAL
f10d9464a1 fix: get file link in invoice list with multicompany (#31966) 2024-11-18 17:58:25 +01:00
lvessiller-opendsi
580d789a00 FIX send mail to BCC when email formated as Fullname <email> (#31983) 2024-11-18 14:56:09 +01:00
uvaldenaire-opendsi
98d106e6b5 Fix delete project when mrp module never enabled (#31982)
Co-authored-by: Laurent Destailleur <eldy@users.sourceforge.net>
2024-11-18 14:55:20 +01:00
Laurent Destailleur
bca77bddb8 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-17 10:31:38 +01:00
Laurent Destailleur
7ca9f0022a Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-17 10:31:11 +01:00
Mathieu Moulin
a602309e04 Fix user::load_previous_next_ref() with MULTICOMPANY_TRANSVERSE_MODE bad sql query (cartesian product replaced by INNER JOIN) (#31946) 2024-11-16 18:19:59 +01:00
Mathieu Moulin
f51935a258 Fix slow user card when many users in same group, disable loading of all other users (#31947) 2024-11-16 18:10:08 +01:00
Thomas C.
976399c2d9 fix (#31683) 2024-11-16 10:57:03 +01:00
Mathieu Moulin
cd6ed63768 Fix Specimen warning in supplier admin when database has no products (#31867) 2024-11-16 10:45:01 +01:00
Mathieu Moulin
348981a419 Fix show payment URL in massaction context when not one email per recipient (#31927) 2024-11-16 00:06:15 +01:00
Mathieu Moulin
adf59f2599 Fix mod_facture_fournisseur_tulip::getExample & get_next_value if no object in parameter (#31878) 2024-11-16 00:00:05 +01:00
kkhelifa-opendsi
d0323fa27d FIX : Update on a sold line of bank entrie set the type to empty, now it's fixed #22539 (#31888) 2024-11-15 23:53:04 +01:00
William Mead
038f8d5dff Backported default ticket severity fix (#31908) 2024-11-15 23:44:08 +01:00
William Mead
bab49d66c5 Backported default ticket type fix (#31912) 2024-11-15 23:36:54 +01:00
Francis Appels
230eee4ead FIX issue #28222 Edit date extrafield diplayed on all on lines (#31914)
* FIX issue #28222 Edit date extrafield diplayed on all on lines

* wrong id
2024-11-15 23:31:12 +01:00
Marc de Lima Lucio
ce9a1b3661 FIX: swiftmailer: correctly set errors-to header (#31826) 2024-11-15 14:10:35 +01:00
MaximilienR-easya
4feb9def4e Fix Preview present even when there is no corresponding file (#30585)
* Fix cas de previews de fichier non existant

* another way to detect missing or missnamed file than using file_exists function
2024-11-13 22:52:42 +01:00
lvessiller-opendsi
dccde49388 FIX calculate start date of cloned task from cloned project (#31799)
* FIX calculate start date of cloned task from cloned project

* Fix wrong strat comment
2024-11-13 21:31:22 +01:00
Laurent Destailleur
a039a00277 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-13 16:35:07 +01:00
Laurent Destailleur
d30a0ea066 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-11-13 16:32:54 +01:00
Laurent Destailleur
ab6c74ae88 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-11-13 16:29:18 +01:00
Laurent Destailleur
fbca98ec2a Merge 2024-11-13 16:25:00 +01:00
thomas-Ngr
93f23fe452 ODF : fix : escape specials chars in IF ELSE ENDIF $key (#31796)
* ODF : fix : escape specials chars in IF ELSE ENDIF $key

* fix missing brackets

* add delimiter to preg_quote

---------

Co-authored-by: Brice Werry <bwerry@open-dsi.fr>
2024-11-13 16:18:08 +01:00
lvessiller-opendsi
8a55e2f6a4 FIX old copy not needed in supplier order create method (#31733) 2024-11-08 17:51:44 +01:00
lvessiller-opendsi
e0a3756c6e FIX update status on create supplier order for trigger (#31642) 2024-10-30 23:35:39 +01:00
Kamel Khelifa
87c16498ca FIX: Fix return value of hook sendMail when hook return -1 who must be return false in sendfile() function 2024-10-18 14:26:04 +02:00
mrozniecki
bad8ee865d Fix title encode 2024-09-20 14:34:34 +02:00
mrozniecki
1ee3c5e5a0 Backport fix title 2024-09-13 12:08:58 +02:00
mrozniecki
0be0c1a1c1 Backport #yogosha18281 2024-09-10 14:01:04 +02:00
atm-lena
66a175e48d langs of recipient 2024-01-22 14:52:51 +01:00
atm-lena
e24da32424 Load multilangs in function pdf_getlinedesc() 2024-01-16 14:13:28 +01:00
atm-lena
a13b720598 Merge branch '17.0' of https://github.com/Dolibarr/dolibarr into 17.0_FIX_MultilangsTranslationPDFLinesDescription 2024-01-16 14:08:52 +01:00
atm-lena
86971c7b86 Clean Conditions 2023-12-22 09:30:35 +01:00
atm-lena
daccab5a07 Merge branch '17.0' of https://github.com/Dolibarr/dolibarr into 17.0_FIX_MultilangsTranslationPDFLinesDescription 2023-12-22 09:22:38 +01:00
atm-lena
4d32d93ee2 Clean Travis 2023-12-18 17:28:41 +01:00
atm-lena
abc9eb7bdc Clean Code 2023-12-18 13:44:19 +01:00
atm-lena
ec19dcc8f8 Invoice 2023-12-18 13:34:50 +01:00
atm-lena
9051e411d0 FIX Multilangs : PDF lines description 2023-12-18 12:00:41 +01:00
5617 changed files with 226344 additions and 278317 deletions

View File

@@ -7,18 +7,18 @@ Bug reports and feature requests
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
Default **language here is English**. So please prepare your contributions in English.
Default **language here is english**. So please prepare your contributions in english.
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
3. Tell us the version you are using! (look at /htdocs/admin/system/dolibarr.php? and check if you are using the latest version)
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging information whenever possible).
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
5. Delete unnecessary submissions.
6. **Check your Message at Preview before sending.**
<a name="code"></a>Submit code
<a name="code"></a>Code
---------------------
### Basic workflow
@@ -35,22 +35,20 @@ Default **language here is English**. So please prepare your contributions in En
Unless you're fixing a bug, all pull requests should be made against the *develop* branch.
If you're fixing a bug, it is preferred that you cook your fix and pull request it against an oldest version affected.
If you're fixing a bug, it is preferred that you cook your fix and pull request it
against the oldest version affected that's still supported.
We recommend to push it into N - 2 for N the latest version available, if not possible into version N - 1, and finally into develop.
This is just a recommendation, currently, if you push a bug fix on a very old version, it is still merged and propagated into
higher versions.
We officially support versions N, N 1 and N 2 for N the latest version available.
The rule N - 2 is just a tip if you don't know which version to choose to get the best the best compromise between ease of correction
and number of potential beneficiaries of the correction.
Choose your base branch accordingly.
### General rules
Please don't edit the ChangeLog file. This file is generated from all commit messages during release process by the project manager.
Please don't edit the ChangeLog file. File will be generated from all commit messages during release process by the project manager.
### <a name="commits"></a>Commits
Use clear commit messages with the following structure:
```plaintext
```
[KEYWORD] [ISSUENUM] DESC
LONGDESC
@@ -68,13 +66,10 @@ where
#### Keyword
In uppercase if you want to have the log comment appears into the generated ChangeLog file.
The keyword can be omitted if your commit does not fit in any of the following categories:
The keyword can be ommitted if your commit does not fit in any of the following categories:
- Fix/FIX: for a bug fix
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
- Close/CLOSE: for closing a referenced feature request
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is preferred)
- Perf/PERF: for a performance enhancement
- Qual/QUAL: for quality code enhancement or re-engineering
#### Issuenum
If your commit fixes a referenced bug or feature request.
@@ -95,19 +90,19 @@ Feel free to express technical details, use cases or anything relevant to the cu
This section can span multiple lines.
If your PR is a change on interface, you must also paste a screenshot showing the new screen.
Try to keep lines under 120 characters.
#### Examples
<pre>
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
or
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
or
NEW|New|QUAL|Qual|PERF|Perf Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
or
Short description (when the commit is not introducing feature nor closing a bug)
Long description (Can span across multiple lines).
Long description (Can span accross multiple lines).
</pre>
### Pull Requests
@@ -124,7 +119,7 @@ Also, some code changes need a prior approbation:
* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-jedi in your issue) to see if such a library can be accepted.
* if you add new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
* if you add a new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR (A label is added in such a case).
@@ -135,8 +130,7 @@ If your PR has errors reported by the Continuous Integration Platform, it means
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR.
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%.
A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%. A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
### Resources
@@ -150,7 +144,7 @@ All other translations are managed online at [Transifex](https://www.transifex.c
Translations done on transifex are available in the next major release.
Note: Sometimes, the source text (English) is modified. In such a case, the translation is reset. Transifex assume that if the original source
Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
to retrieve all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.

View File

@@ -68,4 +68,4 @@ body:
id: files
attributes:
label: Attached files
description: Screenshots, screencasts, dolibarr.log, debugging information
description: Screenshots, screencasts, dolibarr.log, debugging informations

View File

@@ -1,7 +1,7 @@
# Instructions
*This is a template to help you make good pull requests. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
*Please:*
- *only keep the "FIX", "CLOSE", "NEW", "PERF" or "QUAL" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
- *only keep the "FIX", "CLOSE" or "NEW" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
- *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)*
- *replace the bracket enclosed texts with meaningful information*
@@ -16,12 +16,3 @@
# NEW|New [*Short description*]
[*Long description*]
# PERF|Perf #[*issue_number Short description*]
[*Long description*]
# QUAL|Qual #[*issue_number Short description*]
[*Long description*]

86
.github/scripts/get_changed_php.sh vendored Executable file
View File

@@ -0,0 +1,86 @@
#!/bin/bash
# Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
set -euo pipefail
# This script retrieves the list of changed PHP files for a pull request
# using the GitHub API and sets two outputs:
# - any_changed: "true" if at least one PHP file changed, "false" otherwise
# - all_changed_files: space-separated list of changed PHP file paths
#
# Required environment variables:
# GITHUB_TOKEN - GitHub token with repo access
# GITHUB_REPOSITORY - "owner/repo"
# GITHUB_EVENT_PATH - Path to the event JSON payload
# Verify required environment variables are set
if [[ -z "${GITHUB_TOKEN:-}" ]]; then
echo "GITHUB_TOKEN is not set" >&2
exit 1
fi
if [[ -z "${GITHUB_REPOSITORY:-}" ]]; then
echo "GITHUB_REPOSITORY is not set" >&2
exit 1
fi
if [[ -z "${GITHUB_EVENT_PATH:-}" ]]; then
echo "GITHUB_EVENT_PATH is not set" >&2
exit 1
fi
# Extract the pull request number from the event payload
pr_number=$(jq --raw-output '.pull_request.number' "$GITHUB_EVENT_PATH")
if [[ "$pr_number" == "null" ]]; then
echo "Not a pull request event"
exit 0
fi
# Split repository into owner and repo name
# Split repository into owner and repo name using Bash parameter expansion
owner="${GITHUB_REPOSITORY%%/*}" # Extract text before the first '/'
repo="${GITHUB_REPOSITORY##*/}" # Extract text after the last '/'
page=1
per_page=100
changed_php_files=()
# Loop through all pages to gather changed files
while true; do
response=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" \
"https://api.github.com/repos/${owner}/${repo}/pulls/${pr_number}/files?per_page=${per_page}&page=${page}")
# Filter for files ending with .php and add them to the list
mapfile -t files < <(echo "$response" | jq -r '.[] | select(.filename | test("\\.php$")) | .filename')
changed_php_files+=("${files[@]}")
# Check if we have reached the last page (less than per_page results)
count=$(echo "$response" | jq 'length')
if (( count < per_page )); then
break
fi
((page++))
done
# Build a space-separated string of changed PHP files
# This does not cope with files that have spaces.
# But such files do not exist in the project (at least not for the
# files we are filtering).
all_changed_files=$(IFS=" " ; echo "${changed_php_files[*]}")
# Determine changed files flag
if [ -z "$all_changed_files" ]; then
any_changed="false"
else
any_changed="true"
fi
# Set outputs for GitHub Actions if GITHUB_OUTPUT is available
if [ -n "${GITHUB_OUTPUT:-}" ]; then
echo "any_changed=${any_changed}" >> "$GITHUB_OUTPUT"
echo "all_changed_files=${all_changed_files}" >> "$GITHUB_OUTPUT"
else
# Otherwise, print the outputs
echo "any_changed=${any_changed}"
echo "all_changed_files=${all_changed_files}"
fi

View File

@@ -3,8 +3,6 @@ on:
schedule:
- cron: "0 20 * * 1,3,5"
workflow_dispatch:
branches:
- develop
# push:
# branches:
# - develop
@@ -21,7 +19,7 @@ jobs:
fetch-depth: 1
#php-version: '7.1'
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2.1
uses: JetBrains/qodana-action@v2023.1.5
#with:
# php-version: '7.1'
env:

View File

@@ -2,9 +2,8 @@
name: "Exakat analysis"
on:
# execute once a month, the 1st
schedule:
- cron: "0 20 1 * *"
- cron: "0 20 * * *"
workflow_dispatch:
branches:
- develop
@@ -16,13 +15,11 @@ jobs:
exakat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Exakat
uses: docker://exakat/exakat-ga
with:
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
ignore_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
file_extensions: php
project_reports: Perfile
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
ignore_dirs: '/htdocs/includes,/build,/dev,/doc,/scripts,/test'

View File

@@ -235,7 +235,7 @@ jobs:
sudo cat /etc/apache2/sites-enabled/000-default.conf
sudo service apache2 restart
curl -I localhost
- name: Check Apache availability
- name: Chech Apache availability
run: |
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
# Ensure we stop on error with set -e

View File

@@ -190,7 +190,7 @@ jobs:
sudo cat /etc/apache2/sites-enabled/000-default.conf
sudo service apache2 restart
curl -I localhost
- name: Check Apache availability
- name: Chech Apache availability
run: |
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
# Ensure we stop on error with set -e

View File

@@ -11,7 +11,7 @@ jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 50 # important!

View File

@@ -1,8 +1,6 @@
name: GitHub CI PHPCS and PHPCBF
on:
pull_request:
types: [opened]
on: push
#on:
# push:
# paths:
@@ -13,7 +11,7 @@ jobs:
# uses: ./.github/workflows/files_changed.yaml
# with:
# folder_path: .*
linter_name:
name: Run & fix PHP Code Sniffer
runs-on: ubuntu-latest
@@ -21,9 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
# fetch-depth: 10
fetch-depth: 10
- name: echo Get list of all changed files
run: |
@@ -43,21 +39,6 @@ jobs:
phpcs_ref_name: ${{github.ref_name}}
phpcs_github_event_name: ${{github.event_name}}
phpcs_files: ${{ needs.filesChanged.outputs.all_changed_files }}
#- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
# with:
# commit_message: Fix PHPCS errors by GitHub PHPCSfixer action
- name: Commit changes
uses: EndBug/add-and-commit@v9.1.3
- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
with:
default_author: github_actions
committer_name: GitHub Actions
committer_email: actions@github.com
#author_name: PHP CS fixer
#author_email: eldy@destailleur.fr
#committer_name: PHP CS fixer
#committer_email: eldy@destailleur.fr
message: 'PHP CS fixer github action'
add: '*.php'
commit_message: Fix PHPCS errors by GitHub PHPCSfixer action

51
.github/workflows/pr-18.yaml vendored Normal file
View File

@@ -0,0 +1,51 @@
# Action to prepare the github action
# Go on Dolibarr - Settings - Developer settings - Enter a name + webhook to disable + Permissions (see app test) + Can install by any account
# Click on generate the private keys
# Click on Install application - choose user of the Organization
# Go on Organisation - Secret and variables and create a secret PR18_SECRET_KEY and copy the content of received private key. Choose the repository access to "Repository Dolibarr".
# Go on Organisation - Secret and variables and create a variable PR18_APP_ID and copy the ID of the previously create ID. Choose the repository access to "Repository Dolibarr".
#
name: Set reviewer and label for v18
on:
pull_request_target:
types: [opened, synchronize, reopened]
branches:
- "18.0"
push:
branches:
- "18.0"
permissions:
pull-requests: write
issues: write
jobs:
assign-and-label-v18:
runs-on: ubuntu-latest
steps:
#- name: Install GitHub CLI
# run: sudo apt-get install gh
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.PR18_APP_ID }}
private-key: ${{ secrets.PR18_SECRET_KEY }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Assign reviewer
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
url: ${{ github.event.pull_request.html_url }}
run: |
echo "env.url=${{env.url}}"
gh pr edit "${{env.url}}" --add-reviewer rycks
gh pr edit "${{env.url}}" --add-reviewer lvessiller-opendsi
#gh pr edit "${{env.url}}" --add-reviewer eldy
gh pr edit "${{env.url}}" --add-label "Issue for v18 maintenance Team"

View File

@@ -14,18 +14,18 @@ jobs:
run: sudo apt-get update && sudo apt-get install cppcheck
if: false
# Checkout git sources to analyze
- uses: actions/checkout@v4
# The next uses the git API because there is no clone yet.
# This is faster for a big repo.
- name: Get all changed php files (if PR)
id: changed-php
uses: tj-actions/changed-files@v42
if: github.event_name == 'pull_request'
with:
files: |
**.php
if: env.gh_event == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./.github/scripts/get_changed_php.sh
# Checkout git sources to analyze
- uses: actions/checkout@v4
# Action setup-python needs a requirements.txt or pyproject.toml
# This ensures one of them exists.
- name: Create requirements.txt if no requirements.txt or pyproject.toml
@@ -42,6 +42,21 @@ jobs:
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Extract PHP version
id: extract-php-version
run: |
PHP_VERSION=$(sed -n 's/.*\$arrayphpmaxversionwarning\s*=\s*array\s*(\s*\([0-9]\+\)\s*,\s*\([0-9]\+\).*/\1.\2/p' htdocs/install/check.php)
echo "PHP_VERSION=$PHP_VERSION" >> $GITHUB_ENV
- name: Setup PHPCS
uses: shivammathur/setup-php@v2
# Install proper php version, and also install phpcs which may be needed
with:
php-version: ${{ env.PHP_VERSION }} # Version from check.php
coverage: none # disable xdebug, pcov
tools: phpcs
# Run all the precommit tools (defined into pre-commit-config.yaml).
# We can force exclusion of some of them here.
- name: Run pre-commit hooks
@@ -62,24 +77,6 @@ jobs:
# files: |
# **.php
- name: Setup PHPCS
uses: shivammathur/setup-php@v2
# Install when we're going to run phpcs
if: |
steps.changed-php.outputs.any_changed == 'true'
||
(
github.event_name == 'push'
&& (
github.event.ref == 'refs/heads/develop'
|| endsWith(github.event.ref, '.0')
)
)
with:
php-version: 8.1
coverage: none # disable xdebug, pcov
tools: phpcs
- name: Run some pre-commit hooks on selected changed files only
if: steps.changed-php.outputs.any_changed == 'true'
env:

View File

@@ -8,7 +8,7 @@ on:
types: [created]
workflow_dispatch:
permissions: {} # none
permissions: {} # no restriction by default
jobs:
stale:

13
.gitignore vendored
View File

@@ -59,12 +59,11 @@ package-lock.json
doc/install.lock
/.asciidoctorconfig.adoc
.idea
# Qodana
.idea/vcs.xml
.idea/modules.xml
.idea/workspace.xml
.idea/inspectionProfiles/Project_Default.xml
.idea/jsLinters/jshint.xml
/composer.json
/composer.lock
/build/phpstan/phpstan
/build/phpstan/bootstrap_custom.php
phpstan_custom.neon
/.php-cs-fixer.cache
/.php_cs.cache

View File

@@ -1,63 +0,0 @@
<?php
/* PHP 7.0 */
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude([
'core/includes',
'custom',
'documents',
'doctemplates',
'vendor',
'install/doctemplates',
'htdocs/custom',
'htdocs/includes',
'htdocs/install/doctemplates',
])
->notPath('vendor');
/* PHP 7.4+ */
/*
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude([
'custom',
'documents',
'htdocs/custom',
'htdocs/includes',
])
->notPath([
'vendor',
]);
*/
return (new PhpCsFixer\Config())
->setRules([
// Apply PSR-12 as per https://wiki.dolibarr.org/index.php?title=Langages_et_normes#PHP:~:text=utiliser%20est%20le-,PSR%2D12,-(https%3A//www
'@PSR12' => true, // Disabled for now to limit number of changes
// Minimum version Dolibarr v18.0.0
// Compatibility with min 7.1 is announced with Dolibarr18.0 but
// app is still working with 7.0 so no reason to abandon compatiblity with this target for the moment.
// So we use target PHP70 for the moment.
'@PHP70Migration' => true,
//'@PHP71Migration' => true,
// Avoid adding public to const (incompatible with PHP 7.0):
'visibility_required' => ['elements'=>['property', 'method']],
//'strict_param' => true,
//'array_syntax' => ['syntax' => 'short'],
//'list_syntax' => false,
//'visibility_required' => false,
'array_syntax' => false,
'ternary_to_null_coalescing' => false
])
->setFinder($finder)
// TAB Indent violates PSR-12 "must" rule, but used in code
// (See https://www.php-fig.org/psr/psr-12/#24-indenting )
->setIndent("\t")
// All files MUST use the Unix LF line ending only
// https://www.php-fig.org/psr/psr-12/#22-files
->setLineEnding("\n")
;

View File

@@ -1,13 +0,0 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
<!--
Documentation:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset
-->
<rule ref="dev/setup/codesniffer/ruleset.xml"/>
<arg value="p"/>
<arg name="colors"/>
<arg name="extensions" value="php,inc" />
</ruleset>

View File

@@ -6,7 +6,7 @@ repos:
rev: v4.5.0
hooks:
- id: no-commit-to-branch
args: [--branch, develop, --pattern, \d+.0]
args: [--branch, develop, --pattern, \d+.0$]
- id: check-yaml
args: [--unsafe]
- id: check-json
@@ -26,12 +26,6 @@ repos:
- id: fix-byte-order-marker
- id: check-case-conflict
# Beautify shell scripts
- repo: https://github.com/gitleaks/gitleaks.git
rev: v8.16.1
hooks:
- id: gitleaks
# Beautify shell scripts
- repo: https://github.com/lovesegfault/beautysh.git
rev: v6.2.1
@@ -87,6 +81,8 @@ repos:
]
pass_filenames: false # Run on all files
- id: php-lint
exclude:
(?x)^(htdocs/includes/symfony/var-dumper/Tests/.*)$
- id: php-stan
stages: [manual]
files: \.(php)$

236
.scrutinizer.yml Normal file
View File

@@ -0,0 +1,236 @@
# .scrutinizer.yml
#build:
# - php-scrutinizer-run
build:
nodes:
analysis:
tests:
override:
- command: php-scrutinizer-run
idle_timeout: 8000
#- php-scrutinizer-run --sub-project-dir=htdocs/admin
imports:
- php
filter:
excluded_paths:
- build/
- dev/
- doc/
- documents/
- node_modules/
- test/
- htdocs/custom/
- htdocs/includes/
- htdocs/install/doctemplates/
#dependency_paths:
# - htdocs/includes/
paths:
- htdocs/*
- scripts/*
tools:
# php_analyzer. Doc on https://scrutinizer-ci.com/docs/tools/php/php-analyzer/
php_analyzer:
enabled: true
extensions:
- php
#dependency_paths:
# - htdocs/includes/
filter:
excluded_paths:
- build/
- dev/
- doc/
- documents/
- htdocs/custom/
- htdocs/includes/
- htdocs/install/doctemplates/
- htdocs/core/class/lessc.class.php
- node_modules/
- test/
paths:
- htdocs/*
- scripts/*
config:
parameter_reference_check:
enabled: true
checkstyle:
enabled: false
no_trailing_whitespace: true
naming:
enabled: true
local_variable: ^[a-z][a-zA-Z0-9]*$
abstract_class_name: ^Abstract|Factory$
utility_class_name: Utils?$
constant_name: ^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$
property_name: ^[a-z][a-zA-Z0-9]*$
method_name: ^(?:[a-z]|__)[a-zA-Z0-9]*$
parameter_name: ^[a-z][a-zA-Z0-9]*$
interface_name: ^[A-Z][a-zA-Z0-9]*Interface$
type_name: ^[A-Z][a-zA-Z0-9]*$
exception_name: ^[A-Z][a-zA-Z0-9]*Exception$
isser_method_name: ^(?:is|has|should|may|supports)
unreachable_code:
enabled: true
check_access_control:
enabled: true
typo_checks:
enabled: true
check_variables:
enabled: true
check_calls:
enabled: true
too_many_arguments: true
missing_argument: true
argument_type_checks: lenient # Allowed Values: "disabled", "lenient", "strict"
suspicious_code:
enabled: true
overriding_parameter: false
overriding_closure_use: true
parameter_closure_use_conflict: true
parameter_multiple_times: true
non_existent_class_in_instanceof_check: true
non_existent_class_in_catch_clause: true
assignment_of_null_return: true
non_commented_switch_fallthrough: true
non_commented_empty_catch_block: true
overriding_private_members: true
use_statement_alias_conflict: true
precedence_in_condition_assignment: true
dead_assignments:
enabled: true
verify_php_doc_comments:
enabled: false
parameters: true
return: true
suggest_more_specific_types: true
ask_for_return_if_not_inferrable: true
ask_for_param_type_annotation: true
loops_must_use_braces:
enabled: true
check_usage_context:
enabled: true
simplify_boolean_return:
enabled: false
phpunit_checks:
enabled: false
reflection_checks:
enabled: true
# Checks Common Precedence Mistakes
precedence_checks:
enabled: true
assignment_in_condition: true
comparison_of_bit_result: true
basic_semantic_checks:
enabled: true
# Disabled unused code. In most cases, we want to keep it.
unused_code:
enabled: false
deprecation_checks:
enabled: true
useless_function_calls:
enabled: true
metrics_lack_of_cohesion_methods:
enabled: true
metrics_coupling:
enabled: true
stable_code:
namespace_prefixes: []
classes: []
doctrine_parameter_binding:
enabled: false
doctrine_entity_manager_injection:
enabled: false
symfony_request_injection:
enabled: false
doc_comment_fixes:
enabled: true
reflection_fixes:
enabled: false
use_statement_fixes:
enabled: true
remove_unused: true
# Whether you would like multiple imports in one USE statement to be preserved, e.g. ``use A, B;``.
preserve_multiple: false
# Whether you would like to preserve blank lines between use statements.
preserve_blanklines: false
order_alphabetically: false
# To use specific config for a specific path, use path_configs: (see example on page https://scrutinizer-ci.com/docs/configuration/tool_config_structure)
# php_depend
#php_pdepend:
# enabled: false
# configuration_file: null
# suffixes:
# - php
# excluded_dirs: { }
# filter:
# excluded_paths:
# - 'build/*'
# - 'dev/*'
# - 'doc/*'
# - 'test/*'
# - 'htdocs/includes/*'
# paths: { }
# change tracking
#php_changetracking:
# enabled: false
# bug_patterns:
# - '\bfix(?:es|ed)?\b'
# feature_patterns:
# - '\badd(?:s|ed)?\b'
# - '\bimplement(?:s|ed)?\b'
# filter:
# excluded_paths:
# - 'build/*'
# - 'dev/*'
# - 'doc/*'
# - 'documents/*'
# - 'htdocs/includes/*'
# - 'node_modules/*'
# - 'test/*'
# paths: { }
# Similar code detection
#php_sim:
# enabled: false
# min_mass: 30
# filter:
# excluded_paths:
# - 'build/*'
# - 'dev/*'
# - 'doc/*'
# - 'documents/*'
# - 'htdocs/includes/*'
# - 'node_modules/*'
# - 'test/*'
# paths: { }
# Coding-Style / Bug Detection
#js_hint:
# enabled: false
# use_native_config: true
# extensions:
# - js
# filter:
# excluded_paths:
# - 'build/*'
# - 'dev/*'
# - 'doc/*'
# - 'documents/*'
# - 'htdocs/includes/*'
# - 'node_modules/*'
# - 'test/*'
# paths: { }
# config: { }
# path_configs: { }
before_commands: { }
after_commands: { }
artifacts: { }
build_failure_conditions: { }

14
.stickler.yml Normal file
View File

@@ -0,0 +1,14 @@
---
linters:
phpcs:
standard: 'dev/setup/codesniffer/ruleset.xml'
extensions: 'php'
tab_width: 4
fixer: true
fixers:
enable: true
files:
ignore:
- 'htdocs/includes/*'

View File

@@ -2,13 +2,13 @@
# from Dolibarr GitHub repository.
# For syntax, see https://docs.travis-ci.com/user/languages/php/
# We use dist: bionic = 18.04, focal = 20.04
# We use dist: focal = 20.04, jammy = 22.04
os: linux
dist: focal
dist: jammy
language: generic
#scan_logs: false
scan_logs: false
git:
depth: 1
@@ -21,7 +21,7 @@ services:
addons:
mariadb: '10.5'
mariadb: '10.6'
env:
@@ -31,27 +31,25 @@ env:
jobs:
fast_finish: true
allow_failures:
- php: '8.3'
#allow_failures:
#- php: nightly
include:
- stage: PHP min and max
- stage: PHP 7.0-8.1
if: type = push
php: '7.1'
env:
- DB=postgresql
- TRAVIS_PHP_VERSION=7.1
- stage: PHP min and max
- stage: PHP 7.0-8.1
if: type = pull_request OR type = push
php: '8.2'
env:
- DB=mysql
- TRAVIS_PHP_VERSION=8.2
- stage: PHP 8.3
if: type = push AND branch = develop
php: '8.3'
php: '8.1'
env:
- DB=mysql
- TRAVIS_PHP_VERSION=8.3
- TRAVIS_PHP_VERSION=8.1
#- stage: PHP Dev
# if: type = push AND branch = developdisabled
# php: '8.2'
# env: DB=mysql
notifications:
email:
@@ -83,13 +81,7 @@ before_install:
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
sudo apt install unzip apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1
fi
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
sudo apt install unzip apache2 php8.2 php8.2-cli php8.2-curl php8.2-mysql php8.2-pgsql php8.2-gd php8.2-imap php8.2-intl php8.2-ldap php8.2-xml php8.2-mbstring php8.2-xml php8.2-zip libapache2-mod-php8.2
fi
if [ "$TRAVIS_PHP_VERSION" = '8.3' ]; then
sudo apt install unzip apache2 php8.3 php8.3-cli php8.3-curl php8.3-mysql php8.3-pgsql php8.3-gd php8.3-imap php8.3-intl php8.3-ldap php8.3-xml php8.3-mbstring php8.3-xml php8.3-zip libapache2-mod-php8.3
fi
- |
echo Install pgsql if run is for pgsql
if [ "$DB" = 'postgresql' ]; then
@@ -114,15 +106,15 @@ before_install:
install:
- |
if [ "$TRAVIS_PHP_VERSION" = '7.0' ]; then
sudo update-alternatives --set php /usr/bin/php7.0
fi
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
sudo update-alternatives --set php /usr/bin/php7.1
fi
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
sudo update-alternatives --set php /usr/bin/php8.1
fi
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
sudo update-alternatives --set php /usr/bin/php8.2
fi
php -i | head -
- |
@@ -133,10 +125,9 @@ install:
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
sudo chmod -R a+rwx /usr/local/bin/composer
#sudo apt install composer
composer -V
composer -n config -g vendor-dir htdocs/includes
sudo composer -n config -g vendor-dir htdocs/includes
sudo chmod -R a+rwx /home/travis/.config/composer
echo
- |
@@ -159,7 +150,7 @@ install:
squizlabs/php_codesniffer ^3
fi
# phpunit 9 is required for php 8
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = '8.2' ] || [ "$TRAVIS_PHP_VERSION" = '8.3' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = '8.2' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
sudo composer self-update 2.4.4
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
php-parallel-lint/php-parallel-lint ^1.2 \
@@ -206,8 +197,8 @@ before_script:
phpcs -i | head -
# Check PHP Vardump check version
echo "PHP Vardump check version"
which var_dump_check
var_dump_check --version
which var-dump-check
var-dump-check --version
# Check PHPUnit version
echo "PHPUnit version"
which phpunit
@@ -268,9 +259,8 @@ before_script:
- |
export CONF_FILE=htdocs/conf/conf.php
echo "Setting up Dolibarr '$CONF_FILE'"
echo "Setting up Dolibarr $CONF_FILE"
echo '<?php' > $CONF_FILE
echo 'error_reporting(E_ALL);' >> $CONF_FILE
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
@@ -335,54 +325,26 @@ script:
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
fi
set +e
echo
- |
echo "Checking coding style (only for 1 version to not overload travis and avoid duplicate tests)"
echo "Checking coding style (only for Pull Requests builds and 1 version to not overload travis and avoid duplicate tests)"
# Ensure we catch errors
set -e
# Exclusions are defined in the ruleset.xml file
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
fi
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
fi
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
fi
set +e
echo
- |
echo "Checking missing debug (only for 1 version to not overload travis and avoid duplicate tests)"
echo "Checking missing debug"
# Ensure we catch errors
set -e
# Exclusions are defined in the ruleset.xml file
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
fi
set +e
@@ -394,7 +356,6 @@ script:
# Ensure we catch errors
set +e
echo '<?php ' > $INSTALL_FORCED_FILE
echo 'error_reporting(E_ALL);' >> $INSTALL_FORCED_FILE
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
@@ -414,7 +375,6 @@ script:
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
#cat $INSTALL_FORCED_FILE
echo
- |
echo "Upgrading Dolibarr"
@@ -480,22 +440,15 @@ script:
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade17001800.log
php upgrade2.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-2.log
php step5.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-3.log
php upgrade.php 18.0.0 19.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade18001900.log || cat $TRAVIS_BUILD_DIR/upgrade18001900.log
php upgrade2.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-2.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-2.log
php step5.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-3.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-3.log
set +e
echo
- |
echo Show some debug info like table content or log
#show table content and log
#echo '\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
cat $TRAVIS_BUILD_DIR/upgrade18001900.log
echo
#cat $TRAVIS_BUILD_DIR/upgrade500600.log
- |
echo Result of migration scripts
ls -alrt $TRAVIS_BUILD_DIR/
echo Show content of last file
cat $TRAVIS_BUILD_DIR/"$(ls -rt $TRAVIS_BUILD_DIR/ | tail -n1)"
@@ -514,7 +467,6 @@ script:
echo
#cat /tmp/dolibarr_install.log
cat $TRAVIS_BUILD_DIR/enablemodule.log
echo
- |
echo "Unit testing"
@@ -524,7 +476,6 @@ script:
phpunitresult=$?
echo "Phpunit return code = $phpunitresult"
set +e
echo
after_script:
- |

View File

@@ -200,6 +200,12 @@ source_file = htdocs/langs/en_US/ldap.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:link]
file_filter = htdocs/langs/<lang>/link.lang
source_file = htdocs/langs/en_US/link.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:loan]
file_filter = htdocs/langs/<lang>/loan.lang
source_file = htdocs/langs/en_US/loan.lang

View File

@@ -23,22 +23,20 @@ Licence of dependencies of third-party components used by Dolibarr (all compatib
Component Version License GPL Compatible Usage
-------------------------------------------------------------------------------------
PHP libraries:
EvalMath 1.0 BSD Yes Safe math expressions evaluation. Used by dynamic price only. TODO Replace with dol_eval ?
EvalMath 1.0 BSD Yes Safe math expressions evaluation
Escpos-php 3.0 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert
MathPHP 2.8.1 MIT License Yes Modern math library for PHP (only few files)
Mobiledetect 2.8.41 MIT License Yes Detect mobile devices browsers
NuSoap 0.9.16 LGPL 2.1+ Yes Library to develop SOAP Web services. From https://github.com/f00b4r/nusoap/tree/v0.9.16
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
ParseDown 1.7.4 MIT License Yes Markdown parser
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
PHPDebugBar 1.18.2 MIT License Yes Used only by the module "debugbar" for developers
PHPSpreadSheet 1.12.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
PHP-Iban 4.1.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
PHP-Imap 2.7.2 MIT License Yes Library to use IMAP with OAuth
PHPSpreadSheet 1.12.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
php-iban 4.1.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
PrestaShop-WS-Lib 94feb5f OSL-3.0 No Library providing API client for Prestashop.
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet)
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
@@ -54,7 +52,7 @@ bacon, dasprid, swiss-qr-bill, kmukku, symfony/validator
JS libraries:
Ace 1.4.14 BSD Yes JS library to get code syntaxique coloration in a textarea.
ChartJS 3.7.1 MIT License Yes JS library for graph
CKEditor 4.22.1 LGPL-2.1+ Yes Editor WYSIWYG
CKEditor 4.18 LGPL-2.1+ Yes Editor WYSIWYG
jQuery 3.6.4 MIT License Yes JS library
jQuery UI 1.13.2 GPL and MIT License Yes JS library plugin UI
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css

820
ChangeLog
View File

@@ -2,606 +2,100 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 19.0.4 compared to 19.0.3 *****
FIX: fatal when updating recurring supplier invoice line with php8 ($remise_percent is '' instead of 0) (#31713)
FIX: supplier invoice template card: buyer and seller swapped in VAT-related function calls (probably a copy-paste from customer invoice templates) (#31446)
FIX: #25853 Thirdparty Massaction (#25868)
FIX: #28505 Blank page from thirparty to projects (#31637)
FIX: #30757
FIX: #30762
FIX: #30768 allocate the correct invoice_line_id to the element timespent (#30769)
FIX: #30772 Accountancy document export - The project filter on expenses report don't work (#30824)
FIX: #30836
FIX: #30960 show and search extrafields (#31026)
FIX: Add same security test whe nuploading files from API than from GUI (#31114)
FIX: ajaxik URL in ExpenseReport to load coef calculation (#30918)
FIX: attached file on first page load (#30694)
FIX: autoselect the fiscal period by default
FIX: avoid from re-initializing array result on nested hook getEntity (#30626)
FIX: avoid odt errors (#31126)
FIX: avoid pgsql error (#30678)
FIX: avoid the return "AND (())" (#30829)
FIX: Backport fix fatal error on price with some truncating setup
FIX: box_actions.php still uses fk_user_done which no longer exists (#31190)
FIX: can validate shipment without stock movement (#31780)
FIX: column position on PDF of payments
FIX: const WORKFLOW_RECEPTION_CLASSIFY_NEWD_INVOICE (#31601)
FIX: Debug extrafields for bank lines
FIX: email templates for expense report not visible
FIX: Error message overwrited when a error occurs during update of product multilangs (#30841)
FIX: error return missing in mo creation when qty to consume is <= 0 (#31134)
FIX: Extrafield following between rec invoice and classic invoice (#31445)
FIX: Fatal error on create loan schedule (#30656)
FIX: Fix bug select columns and acces to the public ticket list from the public ticket card (case when we have connected to another client before, the track id stocked in session overwrite the new track id from the public ticket card) (#31000)
FIX: fixed search filter for projects resetting when set to empty (#30902)
FIX: if you call fetchLines several times, your $object->lines contains duplicates (#31167)
FIX: If you have no stock of your product, an error is displayed when you delete the reception. (#31504)
FIX: Invoice unpaid widget - SQL error on group by with constant MAIN_COMPANY_PERENTITY_SHARED (#30866)
FIX: issue on action set condition in particular when you set a deposi… (#31518)
FIX: late order search option (v18+) (#30692)
FIX: late propal search option (v18+) (#30687)
FIX: missing fk_parent_line parameter (#30806)
FIX: mysql error during dump for enable sandbox M999999 (#31116)
FIX: PHP-warning-multiprice-in-liste-product-if-level-is-not-defined-on-product (#31507)
FIX: Protection to avoid an extrafield to be mandatory if computed
FIX: purge files cron: php warnings when rest module enabled (#30919)
FIX: removed unreachable code (#31141)
FIX: show preview pdf list expensereport (#31694)
FIX: Substitution error in ticket emails in the subject (#30778)
FIX: substitutions THIRDPARTY_XXX are not available for actioncomm reminders (#31385)
FIX: use price() to display qty on a product's stats tab to avoid showing too many decimals when rounding errors are possible (#31165)
FIX: Vat code is lost when updating lines in POS
FIX: when qty is not an integer, apply price() (#31138)
FIX: Wrong default PDF model when creating the second situation invoice (#30843)
FIX: wrong subprice if price base type is TTC (#30887)
***** ChangeLog for 18.0.8 compared to 18.0.7 *****
35 files changed, 647 insertions(+), 298 deletions(-)
***** ChangeLog for 19.0.3 compared to 19.0.2 *****
FIX: #29403 HRM - Unable to delete a skill in a job Profile (#29779)
FIX: #29439 incomplete API return (#29796)
FIX: #29756 Sql error on comment search (#29761)
FIX: #29780 Restore filtes when using "back to list"
FIX: #30010 : Use conf TICKET_MESSAGE_MAIL_INTRO instead of translation key (#30081)
FIX: #30274 : Add the include before executing dolibarr_set_const (#30320)
FIX: #30467
FIX: #30576 - Salary payment - Date of the payment is not displayed (#30592)
FIX: Accountancy - Avoid space on FEC name file (#29716)
FIX: Accountancy - Generate entries of expense report with localtax (#30411)
FIX: ASSET: annual depreciation starting year (Again ;-)) #26084 (#30040)
FIX: Backport page inventory.php from v18 to fix pagination bugs causing data loss (#29688)
FIX: back to page on error in contact card (#29627)
FIX: Bad calculation of $nbtotalofrecord (#30183)
FIX: Bad count of total of supplie rinvoice into the list
FIX: Better compatibility when objectdesc is not valid, and warnings
FIX: broken pdf preview when multicompany sharing (#30188)
FIX: compatibility with MULTICOMPANY_TRANSVERSE_MODE (#30599)
FIX: Conflict with autoload (#30399)
FIX: Display the real_PMP on inventory when its value is equal to 0 (#22291)
FIX: Error mesg show untranslated extrafield name (#30227)
FIX: executeHooks $object default value (#29647)
FIX: expedition PDF models using units labels (#30358)
FIX: Extrafield intshowzero in list (#29789)
FIX: Extrafields always been delete and re insert for categories (#29781)
FIX: extrafields on Organized events was broken
FIX: fatal error on loading pictures in attached documents of an event (#30553)
FIX: for country type (#29745)
FIX: group by qty in product margin tab (#29853)
FIX: init total amounts in margin module (#29854)
FIX: issue to get the right files exported in Quadratrus export.php (#30004)
FIX: lang output for sales representative on PDF (#30469)
FIX: langs in common docgenerator (#29774)
FIX: langs overwrite (#29630)
FIX: lettering (auto) for invoice deposit with company discount (#29633)
FIX: missing $object and $action for hook parameters (#30484)
FIX: Missing $param in hook call for list
FIX: Missing expense report picto in list (#29917)
FIX: Missing expense report picto in menu (#29908)
FIX: Missing the description in tooltip when option show in tooltip on
FIX: mo cloning (#29686)
FIX: modification date from label in accounting bookkeeping list (#30038)
FIX: move porpale ref pdf cornas (#29989)
FIX: Not qualified lines for reception (#29473)
FIX: on change ref for bank account attachment are lost (#30529)
FIX: orders to bill menu (#30179)
FIX: Page expands when ticket messages are too long (#29785)
FIX: parameter name (#29666)
FIX: PHP8 warning if $conf->reception is checked the old fashion way (#29697)
FIX: PHP 8 warning on output of successful cronjob (#29922)
FIX: PHP exception on getSpecialCode (#29646)
FIX: php warning if cookie doesnt exist (#29723)
FIX: pos: invoice date incorrectly set because of timezome mismatches (reverts #36e91da) (#30184)
FIX: public project form return an error if SOCIETE_EMAIL_UNIQUE (#29942)
FIX: REPLENISH MANY FOURN WHEN ORDER ALREADY CREATE (#29710)
FIX: Supplier Order search on date valid (#30448)
FIX: Ternary operator condition is always true/false (#29649)
FIX: to avoid error during upgrade with pgsql (#30443)
FIX: transfer in accountancy for expense reports.
FIX: uninitialised var (#29728)
FIX: - Unknown Character on HTML (#30257)
FIX: Unsigned propal having signing date (#29825)
FIX: Update asset.class.php
FIX: update date_echeance of supplier invoices when we update invoice date in the past (#29886)
FIX: User List - Function is show in wrong column when module HRM enabled (#30186)
FIX: var name error and remove useless code (#30601)
FIX: Warning: Undefined property: PropaleLigne::$situation_percent in /home/httpd/vhosts/aflac.fr/domains/dol190.aflac.fr/httpdocs/core/lib/pdf.lib.php on line 2442 (#30033)
FIX: wrong value for duration unit (#30261)
FIX: The ZAR currency must show the R before the amount
FIX: #34746 - More complete fix for CVE-2024-40137
FIX: Correct the calculation of the amount of the current period between the period provided (#35083)
FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call (#34717)
FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call
FIX: missing quick edit for extrafields (baclport commit 4fc66c6) (#35160)
FIX: Missing sentence part (#35144)
FIX: set global mysoc and load langs in API access (#35041)
FIX: set global mysoc and load langs in API access
FIX: reset mysoc and langs only if entity of API has changed
FIX: accountancy general ledger: bad handling of hook return (#34029)
FIX: accountancy general ledger: bad handling of hook return
FIX: accountancy balance: bad handling of hook return
FIX: - Fix missing token for disable custom group category for compta report (page /htdocs/accountancy/admin/categories_list.php) (#35084)
FIX: The combo of custom groups has disappeared (backport v19) (#35016)
FIX: #34893 (#34897)
FIX: #34893
FIX: change error code to USERNOTALLOWEDTOCHANGEPASS
FIX: asset: could not select invoice in disposal pop-in (#34725)
FIX: 17.0 SQL syntax error and/or constraint error when calling Facture::update() after a clone (e.g. in a trigger) (#34778)
FIX: 17.0: when you clone an invoice that was created from a template invoice, the clone should not be linked to the template invoice (#34777)
FIX: pre-send mail mass action: keep __EMAIL__ substitution (#34522)
FIX: pre-send mail mass action: keep __EMAIL__ substitution
FIX: comment
FIX: massaction email tpl: keep preset
FIX: loop interrupt if an error occurs in sendEmailsRemindersOnInvoiceDueDate (#34657)
FIX: #34654
***** ChangeLog for 19.0.2 compared to 19.0.1 *****
FIX: $object->oldcopy may be a stdClass and not original object
FIX: 16.0 - parent company gets emptied when updating a third party from the card in edit mode (#28269)
FIX: 16.0 - the e-mail templates configured in the notification module are not used if the recipient is a fixed e-mail address (#29407)
FIX: 17.0 - $num doesn't take trigger-modified newref into account, leading to inconsistencies if BILL_SUPPLIER_VALIDATE changes the invoice's ref (#28684)
FIX: #22948
FIX: #24265 regression cannot see all product on takepos (#28753)
FIX: #26015
FIX: #28205
FIX: #28251 Fixing subpermission name on api_multicurrencies.class.php (#28252)
FIX: #28347 FIX: occurred#28962 FIX: #29224 FIX: #29035 (#29303)
FIX: #28369
FIX: #28429
FIX: #28491 (#28522)
FIX: #28518 (#28520)
FIX: #28533 Mo::deleteLine removes the "main" MoLine if consumed line is delete (#28535)
FIX: #28564
FIX: #28978 FIX: #28976
FIX: #29029 Impossible to delete an order line
FIX: #29114 Missing contact term in intervention
FIX: #29114 Translate contact term in intervention
FIX: #29225
FIX: #29229
FIX: #29333 supplier order extrafields of link type displays error (#29334)
FIX: #29496 - filtering a record should not hide its child not filtered
FIX: #29531
FIX: Accolad
FIX: Accountancy export with file or not
FIX: Accountancy - Not trunc id_import
FIX: accounting FEC import (Issue #28306) (#29414)
FIX: Adding the dependencies list feature for extrafields "select" (#28549)
FIX: Add new hidden conf "DISABLE_QTY_OVERWRITTEN" (#28523)
FIX: Amount of localtaxes in foreign currency was wrong on screen and PDF
FIX: an error in a complex else condition
FIX: an error occurred when doing a mass vat change de 0% on supplier invoice (#29417)
FIX: avoid error "Column 'entity' in where clause is ambiguous" (#28270)
FIX: avoid php warnings (#29247)
FIX: avoid to delete "lock" and "unlock" files
FIX: avoid Unknown column 'pfp.ref_fourn' (#28145)
FIX: avoid warning "error parsing attribute name in Entity" (#28543)
FIX: background color for enabled modules (#29378)
FIX: Bad column for total in bom list
FIX: Bad condition on button back to draft on recruitment job.
FIX: Bad CRLF when sending text only content. Fix dol_htmlwithnojs()
FIX: Bad management on error creation of bookkeeping
FIX: Bad picto on list of permission of a user when user not admin
FIX: bad search on _ char in like when Debugbar is on
FIX: bad timezone for the start/end date of an event
FIX: Better test on validity of compute field syntax with parenthesis
FIX: Blank list when contract was checked in list of tickets (#29528)
FIX: Button for disabled modules must not appear.
FIX: categories protection limit
FIX: close #28279
FIX: Condition on newDateLimReglement
FIX: Conflict with autoload
FIX: contact/address title is always "New Contact/Address" even if the contact/address already exists (#29581)
FIX: Count of virtual stock at Services and MoLine with disabled stock change (#28580)
FIX: css of background of modules that was black
FIX: default workstation on BOM
FIX: disabled pito of menu must be greyed.
FIX: Display the date according to user language on substitutions (#29510)
FIX: Don't display column when it's out of date (#28271)
FIX: duplicate error check (#29433)
FIX: duplicate with lines: 414-416 (#28358)
FIX: edit bank suggested for credit transfer payment in invoice setup
FIX: empty array with php8.2
FIX: Ergonomic fail part02 (#29373)
FIX: Error When cloning fourn price no default value for tva_tx (#28368)
FIX: Error when updating user (#29304)
FIX: fatal error Unsupported operand types when recording load payment
FIX: Fix create shipping with product who have negative stocks on warehouse but the negative stock transfer is allowed (#26217)
FIX: Fix save directory for invoice ODT and multientities
FIX: hasRight function
FIX: Hide number beside select contract & added langs to translate c… (#29529)
FIX: Hierarchy Employee view do not filter on employee = 1 (#29496)
FIX: incorrect page numbering in PDF #29458 (#29476)
FIX: Inline edition not implemented
FIX: inventoryDeletePermission id define twice
FIX: Issue with special characters in French
FIX: link type extrafield on warehouse not working (#29339)
FIX: logo and escape in RSS
FIX: logo of paypal payment on payment page
FIX: made invalid code shape error more user friendly (#29498)
FIX: Manual deletion of a bookkeeping line
FIX: Merge of thirdparties must also move uploaded files
FIX: migration missing 2 columns in llx_resource and 1 in llx_user
FIX: missing comma in query (#29435)
FIX: Missing declaration of type export FEC/FEC2 for export with file source
FIX: missing entity parameter for ajax_constantonoff
FIX: missing hide "new" button where "product" or "service" module are disable
FIX: missing trans
FIX: Move the trigger for delete order line before the SQL request
FIX: MRP divide product not working
FIX: multiple problems with multicompany
FIX: navigation after filter in subaccount
FIX: notification: error 500 in fixed emails due to a bad copy/paste (#29580)
FIX: notification module: for supplier orders (any of the 3 triggers), user can choose an e-mail template in conf, but the conf is not used when sending the notification (#28216)
FIX: not redirtect when error occurs on updating card (#29388)
FIX: Not trancate the multicurrency rate shown on cards (even if the global MAIN_MAX_DECIMALS_SHOWN is set to 0) (#28211)
FIX: Oauth login
FIX: Option MAIN_DOC_USE_TIMING can be a string with date format
FIX: Payment on customer invoice - Remove accountid in url if empty for apply default value (#28156)
FIX: Pb in redirect of a website page in USEDOLIBARRSERVER mode
FIX: PDF Fatal error : Backport fix from #23972
FIX: PDF Translations Extrafields
FIX: permission on payment file of a tax
FIX: peut pas faire mieux !
FIX: php8: Fatal when empty $tmpvat is an empty string (no silent conversion to '0' when used in arithmetic operations) (#29451)
FIX: php warning global conf (#29478)
FIX: PHP Warning: Undefined array key "totalam" on line 1890 (#29489 #29578 #29487)
FIX: PHP Warning: Undefined properties
FIX: PHP Warning: Undefined variable $lib (#28342)
FIX: PHP Warning: Undefined variable $mode (#28697)
FIX: PHP Warning: Undefined variable $socid on line 55 (#29490)
FIX: PHP Warning: Undefined variable $tva_npr in /fourn/facture/card.php on line 1695 (#29593)
FIX: Picto for mime in top menu
FIX: position of field in list of field in shipment list
FIX: postgresql error (#28542)
FIX: PUT /thirdparties/{id} and PUT /contacts/{id} should throw exception if update returns < 0 (#29596)
FIX: quote in sql request
FIX: Regression #29340
FIX: Repair the replenishment list (#29336)
FIX: Responsive on admin project
FIX: round capital societe (#29211)
FIX: Row size of role contact in thirdparty (#29456)
FIX: Scale for the "second" unit (#29327)
FIX: search and add extrafields to tasks when conf disabled (#29542)
FIX: Shipment closing action has wrong value (#28174)
FIX: skip adding tab if user doesn't have permission (#28698)
FIX: sometimes a string type instead integer is return, why ?
FIX: some tooltips has disappeared on invoice action button
FIX: Special code is now transmitted by args only in order supplier (#28546 #28619)
FIX: SQL syntax error in DDLUpdateField
FIX: StockTransfer class has no table_element_line
FIX: subscription must be editable when accounting isn't reconciled (#28469)
FIX: supplier price duplicate entry on update supplier product ref (#29290)
FIX: Support of lot serial not working on TakePOS
FIX: syntax error (but same result) :-)
FIX: TakePOS | Add product / Delete line of existing invoice
FIX: TASK_CREATE Trigger (#29483)
FIX: The filter ! was broken in emailcollector
FIX: The localtax must be exported only if activated
FIX: Ticket new message notification sent twice
FIX: trackid and temp dir on payment confirmation of event registration
FIX: Translation for select (#28677)
FIX: Undefined array key default on fields (#29243)
FIX: upload odt files should not start/end with space
FIX: use $conf->browser->os instead
FIX: used hasRight function
FIX: Value of field int = 0 from modulebuilder must not be set to null
FIX: We should be able to add a workstation on bom lines (#29361 #29360)
fix: when invoice is created by WORKFLOW_ORDER_AUTOCREATE_INVOICE on ORDER_NEW, the invoice must have the default bank account of the thirdparty is it's empty on order
FIX: wrong array key (#29317)
FIX: Wrong currency shown in TakePOS payment page
FIX: wrong shortcut key for macintosh
FIX: wrong sql request with product category filter
FIX: wrong stock permission number
NEW: Constant to select if typent helps define whether the thirdparty is a company
NEW: Support Reply-To tracking in emails sending (tickets only for the
SEC: #yogosha21416
SEC: Add a protection against installation of external module bypassing
SEC: A user with export permission can export module data without permissions on module.
***** ChangeLog for 18.0.7 compared to 18.0.6 *****
138 files changed, 1622 insertions(+), 530 deletions(-)
***** ChangeLog for 19.0.1 compared to 19.0.0 *****
FIX: 16.0 - parent company gets emptied when updating a third party from the card in edit mode (#28269)
FIX: 17.0: $num doesn't take trigger-modified newref into account, leading to inconsistencies if BILL_SUPPLIER_VALIDATE changes the invoice's ref (#28684)
FIX: #22948
FIX: #24265 regression cannot see all product on takepos (#28753)
FIX: #28205
FIX: #28251 Fixing subpermission name on api_multicurrencies.class.php (#28252)
FIX: #28369
FIX: #28429
FIX: #28491 (#28522)
FIX: #28518 (#28520)
FIX: #28533 Mo::deleteLine removes the "main" MoLine if consumed line is delete (#28535)
FIX: #28564
FIX: Adding the dependencies list feature for extrafields "select" (#28549)
FIX: Add new hidden conf "DISABLE_QTY_OVERWRITTEN" (#28523)
FIX: Amount of localtaxes in foreign currency was wrong on screen and PDF
FIX: an error in a complex else condition
FIX: avoid error "Column 'entity' in where clause is ambiguous" (#28270)
FIX: avoid Unknown column 'pfp.ref_fourn' (#28145)
FIX: avoid warning "error parsing attribute name in Entity" (#28543)
FIX: Bad column for total in bom list
FIX: Bad condition on button back to draft on recruitment job.
FIX: Bad CRLF when sending text only content. Fix dol_htmlwithnojs()
FIX: Bad picto on list of permission of a user when user not admin
FIX: bad timezone for the start/end date of an event
FIX: Better test on validity of compute field syntax with parenthesis
FIX: close #28279
FIX: Count of virtual stock at Services and MoLine with disabled stock change (#28580)
FIX: disabled picto of menu must be greyed.
FIX: Don't display column when it's out of date (#28271)
FIX: duplicate with lines: 414-416 (#28358)
FIX: edit bank suggested for credit transfer payment in invoice setup
FIX: Error When cloning fourn price no default value for tva_tx (#28368)
FIX: fatal error Unsupported operand types when recording load payment
FIX: Fix create shipping with product who have negative stocks on warehouse but the negative stock transfer is allowed (#26217)
FIX: migration missing 2 columns in llx_resource and 1 in llx_user
FIX: missing trans
FIX: notification module: for supplier orders (any of the 3 triggers), user can choose an e-mail template in conf, but the conf is not used when sending the notification (#28216)
FIX: Not trancate the multicurrency rate shown on cards (even if the global MAIN_MAX_DECIMALS_SHOWN is set to 0) (#28211)
FIX: Option MAIN_DOC_USE_TIMING can be a string with date format
FIX: Payment on customer invoice - Remove accountid in url if empty for apply default value (#28156)
FIX: Pb in redirect of a website page in USEDOLIBARRSERVER mode
FIX: permission on payment file of a tax
FIX: PHP Warning: Undefined variable $lib (#28342)
FIX: PHP Warning: Undefined variable $mode (#28697)
FIX: Picto for mime
FIX: Picto in top menu
FIX: position of field in list of field in shipment list
FIX: postgresql error (#28542)
FIX: quote in sql request
FIX: Responsive on admin project
FIX: Shipment closing action has wrong value (#28174)
FIX: skip adding tab if user doesn't have permission (#28698)
FIX: some tooltips has disappeared on invoice action button
FIX: Special code is now transmitted by args only in order supplier (#28546)
FIX: Special code is now transmitted by args only in order supplier (#28619)
FIX: subscription must be editable when accounting isn't reconciled (#28469)
FIX: Translation for select (#28677)
FIX: upload odt files should not start/end with space
FIX: Value of field int = 0 from modulebuilder must not be set to null
FIX: Wrong currency shown in TakePOS payment page
FIX: #yogosha21416
***** ChangeLog for 19.0.0 compared to 18.0.0 *****
For users:
----------
NEW: Compatibility with PHP 8.2 (warning must be disabled)
NEW: Module Workstation (used to enhance the module BOM and Manufacturing Order) is now stable
NEW: Add a confirmation popup when deleting extrafields
NEW: Add type 'icon' type for extrafields
NEW: Close #20930 Use ajax for state loading after country change
NEW: #23331 Add support for parent projects (#24856)
NEW: #22531 Expense report - Add two fields into export : Qty & Unit price (excl.) (#26309)
NEW: #22626 date filter thirdparties contracts projects (#22707)
NEW: #24085 Add the Project filter
NEW: #25312 Support extrafields in selectForForms
NEW: #26312 Manage intermediate BIC - SQL Part (#26325)
NEW: Accountancy - Add quick navigation with keyboard shortcut on ledger (#26221)
NEW: Accountancy - FEC/FEC2 format export with attachments (#26192)
NEW: Accountancy - Option to choose length of lettering code
NEW: Add a button to create a product or a service from an order or an invoice (#26173)
NEW: Add a button to re-encrypt data of a dolcrypt extrafield password
NEW: Add a CLI tool to regenerate all documents
NEW: Add a goto url from smartphone search page
NEW: Add all id prof checker on thirdparty for code compta customer and supplier
NEW: add and list external contributors on ticket public interface
NEW: Add a protection on purgeFiles
NEW: Add a public page to list all open surveys
NEW: Add chart of accounts PCG08-PYME-CAT for ES in catalan language
NEW: add constant to check if qty shipped not greater than qty ordered
NEW: Add context for the movement stock (role toconsume/toproduce) on mrp
NEW: Add contract link on ticket
NEW: Add culum Technical ID in list of details lines of an order (#26164)
NEW: ADD: custom compute for exports
NEW: Add custom Text on footer total (#26334)
NEW: Add different picto for each type of extrafields (date, string, ...)
NEW: Add edit line on MO (#26122)
NEW: Added notification on closed intervention
NEW: Added of a popup on validation instead of a database fielld to know if the user wants to include subwarehouse
NEW: Added of the field "include_sub_warehouse" in the table "llx_inventory"
NEW: Added total line to third-parties list (#26148)
NEW: Added VAT free & VAT amounts on payment input
NEW: Add ext payment system ID in the payment page with link to Stripe
NEW: Add field TechnicalID in list of users
NEW: Add filter on status of line of a dictionary
NEW: Add get_substitutionarray_other() on shipping odt (#25080)
NEW: add IdProfCheck on thirdparty for BE (xxxx.xxx.xxx)
NEW: Add index on prelevement_demande
NEW: Add invoice subtype in customer invoice (#26543) and template invoice (SQL part) (#26535)
NEW: Add label to price level when changing price (#26240)
NEW: Add modifications of template invoices into agenda
NEW: Add more company informations (ProfId7 to 10) (#25266)
NEW: Add more information to holiday mailings (#25461)
NEW: Add more param on fetch() to prepare perf optimization
NEW: Add more tables activated by module activation only
NEW: Add new field into $fields array + Creation of the function getChildWarehouse()
NEW: Add option for cancel consumed and produced lines (delete lines and rollback stocks) when delete or cancel an manufacturing order (#26254)
NEW: Add option in PDF for purchase order and quotation to hide prices
NEW: Add option TAKEPOS_HIDE_PRODUCT_PRICES to hide prices in TakePOS
NEW: add order supplier submit notif
NEW: add parent product column on list
NEW: Add picto in product/service list in object lines (#25511)
NEW: Add possibility to choose separator #21426
NEW: Add preselected update keys attribute to import class and select it by default if filled
NEW: add product barcode on stock exports
NEW: Add recurring behaviour
NEW: add recursive deletion option for child m os (#26102)
NEW: Add refactoring user permission (#26162)
NEW: add sorting of product price list by customer (#26483)
NEW: Add tab Events/Agenda on recurring invoices
NEW: Add the formEditObjectLine hook on commande card and invoice card
NEW: Add the picto phone of thirdparty on the kanban view of projects
NEW: Add the status of partnership to select partnership for emailing
NEW: add Ticket tab on contract
NEW: agenda per user use quarter hour split instead of half hour split
NEW: Allow generation of delivery note through REST-API (#26226)
NEW: Allow sync of currency rates with currency layer by default.
NEW: Allow to have products not managed in stocks - SQL Part (#26190)
NEW: Assign contact to a ticket message (#24735)
NEW: Better protection against reserved words
NEW: billing on shipment+reception. Can be done before or after delivery.
NEW: can edit bomline workstation
NEW: Can edit both the Test and Live stripe customer account on payment
NEW: Can include product variants in list of products
NEW: Can manage ODT documents for groups of users.
NEW: Can modify the picto into modulebuilder
NEW: Can restore product in stock when deleting the supplier invoice
NEW: Can see the favicon file into setup of properties of a website
NEW: Can switch product batch management to no management. (#21691)
NEW: Can upload/delete ODT template for project and tasks
NEW: chart of accounts ES PCG08-PYME-CAT in catalan language
NEW: clone skill object (#26526)
NEW: close notification for interventions
NEW: column in table prelevement_lignes for fk_user (#26196)
NEW: CONF allow modify ticket classification even if closed
NEW: conf to display date entry stock exped and sort in date order (#22625)
NEW: create a product from a free line in a document (#22324)
NEW: customize position in complete_head_from_modules (#26406)
NEW: Date d'entree en stock sur les exped au moment de la création
NEW: Date field for shipment export (#25574)
NEW: Date format dayhoursec is using year on 2 char on smartphones
NEW: Default customer, category and product when enable TakePOS (#25031)
NEW: do not add default value in list
NEW: drop down for action button show a simple button if only 1 action
NEW: Enhance github_commits_perversion to get more stats on git commits
NEW: Enhance IPN to support payment_intent.succeeded for both card/ban
NEW: extrafields password accepts 'dolcrypt' algorithm (reversible algo)
NEW: Factorize a lot of code for numbering modules
NEW: filter on from/to period rather than month/year (#26378)
NEW: FontAwesome - Add possibility to select another version
NEW: Form for add object's property on moduleBuilder
NEW: Can generate SEPA files for salaries (#26541)
NEW: massactions to delete projects
NEW: Generic doc template for donations (#26338)
NEW: Get list evaluation with skills details in user fiche (#26510)
NEW: hidden conf to disable use of dns_get_record (which can become unresponsive) (#26339)
NEW: improved resource data structure
NEW: Include sub warehouse in inventory
NEW: inventory without virtual products (kits)
NEW: Invoice subtypes for customers and vendors (#26233)
NEW: Invoice time from task, make task note better display in invoice line
NEW: lazy load to substitute project variables (#26451)
NEW: LDAP Active Directory UserAccountControl (#25507)
NEW: Library including math and financial functions (#25035)
NEW: Loan - Can upload a file with drag and drop
NEW: Manage rate indirect. (#26449)
NEW: memorize model name for pdf hooks
NEW: Menu editor is reponsive
NEW: Merge the "Create ..." buttons on contract into one.
NEW: More accurate tooltip on what admin permissions are
NEW: (#24834) new option for hide the footer (#25464)
NEW: (#25044) new option for choose project visibility
NEW: new option for hide the footer of tickets on the public interface
NEW: no need to create invoice supplier object on supplier card for standalone credit note
NEW: Option to show label, ref+label or only ref of product in TakePOS
NEW: payment full amount detail tooltip
NEW: possibility to deselect line when create a recurring invoice + missing to use fk_parent_line
NEW: Project - List - use select2 multiselect for status
NEW: Propagate invoice extrafields into template invoice (#26529)
NEW: remove include_subwarehouse form llx_inventory database table
NEW: resource improvements - data structure (#26285)
NEW: Retrieve vat details from the Greek Ministry of Finance GSIS SOAP web service and autocomplete third party fields
NEW: Right for stats orders (#24607)
NEW: rights and check access to create portal accounts
NEW: Row in list higher height (#26177)
NEW: Save date of RUM creation when creating a Stripe SEPA mandate
NEW: shipment can include service (for information and invoicing) (#26407)
NEW: Show id of module on the tooltip module help page
NEW: show VAT free amount on payment input close #26208 (#26209)
NEW: start and end date for due date filter on invoice list
NEW: Sub total in list (#26165)
NEW: Suport html content for combo list of email recipient
NEW: Website: Support of js into the Dolibarr server preview
NEW: TakePOS - add constant to check qty asked is available (#24820)
NEW: TakePOS - add constant to choose contact instead of customer (#24807)
NEW: TakePOS - amount label with or without tax in free product (#24829)
NEW: TakePOS compatibility with lots and serials (#26426)
NEW: Top menu support picto of modules that are font awesome picto.
NEW: updating by adding massactions for delete projects in societe tab
NEW: updating by adding tooltip for api section in Modulebuilder
NEW: updating by adjust request Sql for Salary invoice (#26279)
NEW: updating for display Help title when try to delete Don (issue #25314)
NEW: Upgrade in module builder in menu section
NEW: use account address in sepa mandate (#23642)
NEW: VAT rate - Add entity
NEW: When an user unset the batch management of products, transformation of each batch stock mouvement in global stock mouvement
NEW: PDF Generation for each Human Resource Evaluations.
SEC: #25512 applicative anti bruteforce - security on too many login attempts (#25520)
SEC: Add action confirm_... as sensitive to need a CSRF token
SEC: Disable not used PHP streams
SEC: Add option MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY
For developers or integrators:
------------------------------
QUAL Reduce very seriously the technical debt (using PHPStan, Psalm and Rector)
NEW Tool in dev/tools/rector to autofix code using style coding practice rules
PERF: Removed a useless fetch_thirdparty
PERF: Perf avoid 2 useless fetch into the triggers of agenda.
PERF: performance & code quality enhancements template sections
QUAL: Remove hardcoded code for OVH sms. Generic method is ok now.
QUAL: Code fix using rector
QUAL: Force subclass MINVERSION (#26314)
QUAL: group all flag images into 1 sprite file. (#26459)
QUAL: Move conf->global into getDolGlobal...
QUAL: Refactor merging companies and fix #26272 with Reception objects (#26320)
QUAL: Removed deprecated field remise, remise_percent, remise_absolute
QUAL: Standardize code and look and feel for dictionaries
QUAL: Standardize code. Renamed ID of user properties into ->user_xxx_id
QUAL: Use dol_clone with parameter 2 for ->oldcopy
QUAL: use switch case instead of if elseif statements for actions
QUAL: Better respect of REST API RFC.
NEW: [Add hook in user bank page]
NEW: #19501 Add two hooks in dolreceiptprinter.php (#26439)
NEW: Accountancy - Add hooks on PrintFieldList for expensereportsjournal, purchasesjournal, sellsjournal
NEW: add a $notrigger param to Product::updatePrice() method (#26404)
NEW: Add a rule to fix empty($conf->global->...) into !getDolGlobal...
NEW: Add column extraparams on societe_rib
NEW: Add hook on selectLotDataList() function (#25368)
NEW: add Hooks and prepare extrafields management for product invoices consumptions (#26280)
NEW: Add hooks on import, step 5 - 6 (#24915)
NEW: add hook tabContentCreateSupplierOrder (#26418)
NEW: add hook tabContentViewSupplierInvoice (#26431)
NEW: add new hook AfterImportInsert
NEW: add new hook OrderCard (#26380)
NEW: add new hook tabContentCreateOrder (#26408)
NEW: Add phpunit for REST API of contacts
NEW: Add triggers COMPANY_RIB_XXX already present in companybankaccount.class.php
NEW: Add triggers on import success
NEW: Add trigger when deleting a bank account line
NEW: subproduct triggers in product class (#25142)
NEW: ModuleBuilder: add section changeLog to Doc in MB
NEW: ModuleBuilder: Add api url to documentation in ModuleBuilder
NEW: ModuleBuilder: Checkin comments begin and end before each actions
NEW: ModuleBuilder: edit properties in description tab for ModuleBuilder
NEW: ModuleBuilder: remove dictionary in ModuleBuilder
NEW: ModuleBuilder: add page for create dictionary
NEW: ModuleBuilder: add badge for each tabs
NEW: ModuleBuilder: for edit name of dictionnary and delete it in MB
NEW: add barcode function to check if EAN13 is valid (
WARNING:
--------
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* Recheck the setup of your module Workflow to see if you need to enable the new setting to have shipment set to billed automatically when
an invoice from a shipment is validated (and if your process is to make invoice on shipment and not on order), because this setup has changed.
* The hook changeHelpURL is replaced by llxHeader
* The property ->brouillon has been removed from all classes. It was not reliable and was a duplicate of ->status == self::STATUS_DRAFT.
* The duplicated and deprecated property ->date_livraison that was renamed into ->delivery_date has been completely removed.
* The property ->user_close to store ID of closing user has been renamed into ->user_closing_id.
* The property ->user_validation to store ID of user validating has been renamed into ->user_validation_id.
* The property ->user_creation to store ID of user of creation has been renamed into ->user_creation_id.
* The property ->user_modification to store ID of user of modification has been renamed into ->user_modification_id.
* The private array ->status_short, ->statuts and ->status_long are now array ->labelStatusShort and ->labelStatus everywhere.
* The duplicate property ->user_creat, ->date_creat, ->date_valid have been removed (use instead user_creation, date_creation, date_validation).
* The method get_substitutionarray_shipment_lines() has been removed. Use the generic get_substitutionarray_lines() instead.
* The method ProductcustomerPrice->fetch_all_log() has been renamed into camel case ->fetchAllLog()
* It was possible to use a variable $soc or $right inside a PHP code condition of some extrafields properties, this is no more true (this 2 variables are no more global variables).
* New hook files of modules actions_mymodule.class.php should now "extends CommonHookActions"
* Endpoint for API /partnershipapi and /recruitment has been renamed into /partnerships and /recruitments to follow name conventions.
* Hidden option ACCOUNTANCY_AUTOFIX_MISSING_LINK_TO_USER_ON_SALARY_BANK_PAYMENT has been renamed into ACCOUNTANCY_AUTOFIX_MISSING_LINK_TO_USER_ON_SALARY_BANK_PAYMENT
* The delete() method of AdherentType, Contact, Delivery, MultiCurrency, CurrencyRate now need $user as first parameter.
* A very high number of class properties (with old name in french) are now deprecated in favor of the property name in english.
* The load of hook context productdao has been removed before calling loadvirtualstock. Modules must use the context of main parent page or 'all' for all cases.
FIX: 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request cf. PR #29237
FIX: 17.0 - collisions in cache for dol_getIdFromCode
FIX: 17.0 - missing error handling for FactureRec::fetch in card-rec.php
FIX: 17.0: warnings due to uninitialized variables + delete code that doesn't apply to recurring invoices (AFAIK, there is no recurring credit note feature)
FIX: #21294 Stock import sql query
FIX: #26250 fatal error on kit
FIX: #32339 Delete a loan settlement is partial
FIX: #33038 drag and drop files are not prefixed with object reference
FIX: #33117 accountancy export Quadratus when doc ref is less than 10 char
FIX: #33145 wrong label status buy on product tooltip
FIX: accountancy export Quadratus when doc ref is less than 10 char
FIX: bad dispatched quantities for batches on shipment card
FIX: bank payment rejection on SEPA (backport commit 100a657) (#33838)
FIX: calculate start date of cloned task from cloned project (#31799)
FIX: can not delete files in task card
FIX: close all services on contract will close all lines (#33466)
FIX: compatibility with multicompany
FIX: constant PAYMENTBYBANKTRANSFER_ADDDAYS was never saved (#33799)
FIX: Count on supplier invoice list does not match count in DB (#33351)
FIX: #CVE-2024-34051
FIX: delete supplier order line when linked to customer order line
FIX: delete supplier order when at least one line linked to customer order line
FIX: display error when loan can't be deleted
FIX: display full tree on shipment card when a kit contains a same component in other sub-kit
FIX: Fix case when the value of a extrafields of the type 'boolean', 'select' or other have an option with a value equal to '0'.
FIX: Fix return value of hook sendMail when hook return -1 who must be return false in sendfile() function
FIX: GETPOST('private_message')
FIX: in projet/element.php total_time is always back to 0
FIX: invoice creation : use dol_include_once instead of require_once to allow external modules
FIX: invoice creation : use dol_include_once instead of require_once to allow external modules.
FIX: issue #28222 Edit date extrafield displayed on all on lines (#31914)
FIX: Many status on invoice linked object block
FIX: Multilangs : PDF lines description
FIX: ODT substitution when many HTML tags in string
FIX: old copy not needed in supplier order create method (#31733)
FIX: PAIEMENT Wrong field displayed for DateChequeReceived (#33390)
FIX: phpcs
FIX: product variants copy: also copy multiprice variations
FIX: qual
FIX: removes traces of <<<HEAD conflicts following the postponement of branch 13 modifications (#32014)
FIX: Replace compromised tj-actions/changed-files (#33481)
FIX: selectcontact is loading all contacts if socid is empty and MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT is not set
FIX: selectcontact is loading all contacts when update event
FIX: select group and severity search fields on ticket list
FIX: send email to assigned user on ticket create
FIX: send mail to BCC when email formatted as Fullname <email> (#31983)
FIX: Show true error when send notify email at validate expense report
FIX: status ticket update for new message
FIX: swiftmailer: correctly set errors-to header (#31826)
FIX: TakePos barcode rule (#31857)
FIX: There were many status indicator in the invoice linked object block (propal card)
FIX(ticket): Notification email without public interface
FIX: Update on a sold line of bank entries set the type to empty, now it's fixed #22539 (#31888)
FIX: update status on create supplier order for trigger (#31642)
FIX: use tax with code on supplier order line give tax code missing in supplier invoice (#32018)
FIX: use vat with code on supplier order result code missing in supplier invoice
FIX: warehouse list: broken status filter (#33667)
FIX: warnings (#33423)
FIX: wrong left margin (v18 to develop ?)
FIX: wrong message on update shipment
FIX: wrong update function parameter
***** ChangeLog for 18.0.6 compared to 18.0.5 *****
@@ -736,6 +230,7 @@ FIX: wrong shortcut key for macintosh
FIX: wrong sql request with product category filter
FIX: wrong stock permission number
***** ChangeLog for 18.0.5 compared to 18.0.4 *****
FIX: 17.0: deprecated field should only be a fallback
FIX: 17.0 - php8 warnings: test for $field existence before checking if it is null or empty
@@ -993,8 +488,8 @@ FIX: when adding new times on a survey, all hours would be erased.
***** ChangeLog for 18.0.0 compared to 17.0.0 *****
For users:
----------
For uses:
---------
NEW: PHP 8.2 compatibility (not yet complete).
NEW: Module Workstations Management upgraded to stable status.
@@ -1007,56 +502,66 @@ NEW: Accountancy - Manage intra-community VAT on supplier invoices - FPC22
NEW: Accountancy - iSuiteExpert export model
NEW: Accountancy - Quadratus export with attachments in accountancy export
NEW: Accountancy - Can filter on a custom group of accounts. Perf or ledger list.
NEW: Accountancy - Can select the export format during export of journals
NEW: Accountancy - sort of column of custom group of account
NEW: Can upload a file with drag and drop on purchase invoice, vats, salaries and social contributions
NEW: Can upload a file with drag and drop on purchase invoice, vats, salaries and social contributions
NEW: Authentication: #22740 add OpenID Connect impl
NEW: Authentication: add experimental support for Google OAuth2 connexion
NEW: Authentication: can now edit service name for OAuth token
NEW: Add a public virtual card page for each user
NEW: Add a status on supplier price ref (WIP to close a supplier ref)
NEW: add bookmarks in selectable landing pages for users
NEW: Add column ext_payment_site into societe_rib to allow multiple payment mode
NEW: add convertion of images to webp for a single image in website media editor
NEW: Add CRC for currency symbol before amount
NEW: add customer code to invoices listing
NEW: Add filter on nb of generation done in list of recurring invoices
NEW: Add filters and sort on product unit column
NEW: Add link to edit VAT list from error message of missing VAT
NEW: add margins in paiement/card.php
NEW: Add mass action delete on VAT
NEW: Add origin info when create a product batch when created from a movement stock
NEW: Add possibility to choose format #21426
NEW: Add SQL contraint on product_stock table to allow only exsting product and warehouse #23543
NEW: Add STRIPE_DEBUG, a way to log Stripe IPN
NEW: An external module can modify the quick search fields
NEW: Bank: Bank name no more mandatory on creation. Can be generated if empty.
NEW: Bank: Add fields zip, town, country for owner of a bank account
NEW: Auto activate some modules on install (Export/Import/Wysiwyg editor)
NEW: Autofill email form with the email template with status "Default" on
NEW: Bank name no more mandatory on creation. Can be generated if empty.
NEW: Bank: Add fields zip, town, country for owner of a bank account
NEW: batch referential objets
NEW: Can add the add now link on date into addfieldvalue()
NEW: Can add an array of several links in date selector
NEW: Can bin accounting line for a given month
NEW: Can edit account on miscellaneous payment (if not transfered)
NEW: Can edit inline the VAT number from supplier tab
NEW: Can fill date of salary payment with date of start of salary
NEW: Can go back to draft on shipment when stock change not on validate
NEW: Can modify bank account of sepa payment (if file not sent yet)
NEW: Customers: add date due and labels into customer comm card
NEW: Can select the export format during export of journals
NEW: Can set a checkbox in formconfirm by clicking on the label
NEW: Can set flag default value on email templates
NEW: Can set the page "List of opportunities" as landing page
NEW: Can show the SQL request used on emailing selection
NEW: Can show the sql request used on emailing selection
NEW: can stay on edit field when errors occurs
NEW: comment in api_mymodule for seperate methods
NEW: constant PROPALE_ADDON_NOTE_PUBLIC_DEFAULT
NEW: create email substitution variable for intervention signature URL
NEW: Contacts: presend mass action in contact list
NEW: Contacts: hook printFieldListFrom in contact list
NEW: Customers: add date due and labels into customer comm card
NEW: Debug the custom CSS feature to avoid a directory search/scan at
NEW: dev name
NEW: Disable bad reputation product price
NEW: Email: autofill email form with the email template with status "Default" on
NEW: dolExplodeIntoArray can accept regex
NEW: dol_sort_array can sort on alphabetical order even if val is num
NEW: element time integration code + SQL
NEW: Email: don't have closed contact proposed as receiver for the mails
NEW: Email: can set flag default value on email templates
NEW: Email-Collector: add field reply-to in email collector as possible filter
NEW: Email-Collector: substitute date now in email collector
NEW: Email-Collector: operation type in email collector to load or create contact
NEW: Email-Collector: easier setup - can also use ! for negative search
NEW: Email-Templates: show module into list of email templates
NEW: Events: can add any contact on events if global MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT is set at 1
NEW: Events: list with color
NEW: Events: remove default percentage for event creation url
NEW: expend/collapse list of social networks
NEW: Filter on amount and qty on list of service's contracts
NEW: formconfirm can support field with format datetime
NEW: getCommonSubstitutionArray to have more substitute keys
NEW: GeoIP: Can test a geoip conversion from the geoip setup page
NEW: GUI: add a CSS editor into the admin GUI
NEW: GUI: add dropdown button actions (example on Create button on project)
@@ -1067,17 +572,16 @@ NEW: GUI: can set background style with MAIN_LOGIN_BACKGROUND_STYLE
NEW: Help: Tooltip to explain how to add a photo on a product
NEW: Help: Possibility to link to German pages in help
NEW: helper functions for dates + small demo case
NEW: HR - Salary: can fill date of salary payment with date of start of salary
NEW: hook printFieldListFrom in contact list
NEW: HR - Salary: can modify the date of payment of a salary (if not reconciled)
NEW: HR - Salary: date for salary payment includes the hour/min
NEW: HR - Salary: adding button Send Email on the salary file
NEW: Import: filter on entity in import
NEW: Import: map table to element for get entity in import
NEW: inc.php: handle parameters from argv
NEW: Installation: Auto activate some modules on install (Export/Import/Wysiwyg editor)
NEW: Invoice: show category of operations
NEW: Invoice: add customer code to invoices listing
NEW: Invoice - show category of operations
NEW: Keep a link between user created from recruitment and application
NEW: List product in orders
NEW: Mass Actions: Better responsive for mass actions
NEW: Members: add numbering modules for members
NEW: Members: add widget box_members_by_tags.php
@@ -1092,74 +596,74 @@ NEW: Notifications: add Customer Order delivered (ORDER_NEW) in module Notificat
NEW: Notifications: for Sign or Refused Propal from Online Page
NEW: Now we can edit amount on VAT and salaries clone action
NEW: only get open contact from liste_contact function, to not have access to closed contact as mail receiver
NEW: Option: MAIN_SECURITY_MAXFILESIZE_DOWNLOADED #yogosha10660
NEW: Option to manage deposit slips for more payment modes (not only
NEW: Option to show column for field and line selection on the left
NEW: Orders: add sub total in order list det
NEW: Orders: list product in orders
NEW: Orders export: allow to export field 'shipment method'
NEW: payment default values when supplier order created from reception
NEW: Payment: manage contracts
NEW: Payment: sepaStripe now creates the payment mode with type pm_ using new API
NEW: Payment: add partial payment reason "withholding tax"
NEW: Payment: Can edit account on miscellaneous payment (if not transfered)
NEW: Payment : manage contracts
NEW: presend mass action in contact list
NEW: Print PDF: category of operation for crabe PDF model
NEW: Print PDF: Name and date to print on PDF Sign
NEW: Print PDF: Use the more recent PDF templates for documents by default on a fresh install
NEW: Print PDF: Option PDF_SHOW_PHONE_AFTER_USER_CONTACT to show phone after specific assigned contact on PDF
NEW: Print PDF: Option PDF_SHOW_EMAIL_AFTER_USER_CONTACT to show email after specific assigned contact on PDF
NEW: product images on popup are cached
NEW: Products: Add origin info when create a product batch when created from a movement stock
NEW: Products: Add statistics by amount on statistics of products.
NEW: Products: Add SQL contraint on product_stock table to allow only existing product and warehouse #23543
NEW: Proposals: filter for Signed+Billed in proposals
NEW: Proposals: can modify margin rates in offers like VAT rates
NEW: Proposals: option filter for NoSalesRepresentativeAffected in proposals list
NEW: Proposals: constant PROPALE_ADDON_NOTE_PUBLIC_DEFAULT
NEW: Provide the oldcopy value when calling setValueFrom() function with a trigger key
NEW: Reception: can receive more than qty ordered on reception
NEW: referential objects of batch
NEW: remove default percentage for event creation url
NEW: remove keys whose table element is the same as element in map list
NEW: repair script skip views
NEW: search on time spent duration range
NEW: Security: Save date to invalidate other session into user table
NEW: Security: Invalidate all sessions of a user when password is modified.
NEW: Service Contracts: Filter on amount and qty on list of service's contracts
NEW: search on time spent duration range
NEW: sepaStripe now creates the payment mode with type pm_ using new API
NEW: set payment default values when supplier order created from reception
NEW: set today start time at beginning
NEW: Show counter of access of website in website list
NEW: Show main currency in company info user tooltip
NEW: Show module into list of emails templates
NEW: Show picto into the combobox of widgets
NEW: Show supplier invoice ref of direct debit transfer tab invoices
NEW: Social Networks: expend/collapse list of social networks
NEW: show supplier name in getNomUrl of supplier order
NEW: sort of column of custom group of account
NEW: Supplier Invoices: add ability of ODT support to supplier invoices
NEW: Stock limit for alert and desired optimal stock by product and warehouse import
NEW: Stock: Add warehouse create and modify triggers.
NEW: Stock: Can select several warehouses into the view stock at date in past
NEW: Stripe: add STRIPE_DEBUG, a way to log Stripe IPN
NEW: Supplier Invoices: add ability of ODT support to supplier invoices
NEW: Supplier Order: show supplier name in getNomUrl of supplier order
NEW: Supplier Order: set payment default values when supplier order created from reception
NEW: Supplier Price: Add a status on supplier price ref (WIP to close a supplier ref)
NEW: Support different bank account for several direct debit payments
NEW: Support multiselect in the warehouse selection combo box
NEW: Option: MAIN_SECURITY_MAXFILESIZE_DOWNLOADED #yogosha10660
NEW: Survey: Comment on survey is possible only after vote.
NEW: tables: llx_element_time to store time spent on several elements (mo, ticket...)
NEW: TakePOS: adapt category and product pictures sizes on TakePOS
NEW: TakePOS: limit load products in TakePOS
NEW: The batch for remind on due date can be setup for using validation date
NEW: The refresh link for IMAP collector is always visible
NEW: Third-Party: use an ajax component to switch prospection status on thirdparty list
NEW: The refresh link for imap collector is always visible
NEW: The upgrade process can be done by creating a file upgrade.unlock
NEW: Tickets: --Send an email when ticket assigned--
NEW: Tickets: Send a notification email when ticket assigned
NEW: Tickets: set ticket status to answered if the client has answered from the public interface
NEW: Tickets: added an option to display the progress of tickets on the public interface
NEW: Tickets: add link to thirdparty tickets history
NEW: Tickets: notify also the contributor affected to a ticket if a new message public is post (add global TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ALSO_CONTRIBUTOR)
NEW: Upgrades: The upgrade process can be done by creating a file upgrade.unlock
NEW: Use a cache file for external RSS in calendar
NEW: Use by default the domain $dolibarr_main_url_root for SMTP HELO
NEW: Users: add a public virtual card page for each user
NEW: use more recent model by default
NEW: VAT can be modified during add of line
NEW: Website Module: Increment website counter on each page access in website module
NEW: Website Module: Show counter of access of website in website list
NEW: Widgets: Show picto into the combobox of widgets
NEW: write all fields and their properties in asciidoc format
NEW: Can add an array of several links in date selector
NEW: Option PDF_SHOW_PHONE_AFTER_USER_CONTACT to show phone after specific assigned contact on PDF
NEW: Option PDF_SHOW_EMAIL_AFTER_USER_CONTACT to show email after specific assigned contact on PDF
NEW: Widgets: Implement MAIN_ACTIVATE_FILECACHE on birthday widget
NEW: Widgets: Add widget "The next upcoming events"
NEW: Widgets: Add widget of open opportunities
NEW: use an ajax component to switch prospection status on thirdparty list
NEW: Add partial payment reason "withholding tax"
@@ -1169,28 +673,18 @@ For developers or integrators:
NEW: Make it possible to select hours and minutes in form_confirm
NEW: add triggers on mailing
NEW: Add a trigger when create a shipping line batch and fix propagate missing errors
NEW: add function for listing objects from directory
NEW: add function for listiong objects from directory
NEW: add helplist property to describe fields of objects
NEW: API: Support contact in post() document API
NEW: API: more APIs (update currency rate, upload of supplier documents, ...)
NEW: Hooks: printFieldListFrom in contact list
NEW: Hooks: add hook in loadLotStock() in html.formproduct.class.php file
NEW: Hooks: add hook 'llxFooter'
NEW: Hooks: add hook online sign
NEW: Hooks: add sent info in the parameters provided to the hook sendMailAfter
NEW: Libraries: Update libs parsedownto 1.7.4, phpspreadsheet lib to v1.12, ESCPOS v3.0, jquery, Stripe.
NEW: add hook in loadLotStock() in html.formproduct.class.php file, add hook 'llxFooter', Add hook online sign
NEW: Update lib parsedownto 1.7.4, phpspreadsheet lib to v1.12, ESCPOS v3.0, jquery, Stripe.
NEW: Support contact in post() document API
NEW: More APIs (update currency rate, upload of supplier documents, ...)
NEW: ModuleBuilder: updating in modulbuilder on tab Menu when adding object
NEW: ModuleBuilder: add/edit permissions
NEW: ModuleBuilder: better generated documentation
NEW: add sent info in the parameters provided to the hook sendMailAfter
NEW: add setAsSelectUser into factory for generic setup page
NEW: add option keepspace into dol_string_nospecialchar()
NEW: dol_sort_array can sort on alphabetical order even if val is num
NEW: dolExplodeIntoArray can accept regex
NEW: element time integration code + SQL
NEW: tables: llx_element_time to store time spent on several elements (mo, ticket...)
NEW: Provide the oldcopy value when calling setValueFrom() function with a trigger key
NEW: getCommonSubstitutionArray to have more substitute keys
NEW: write all fields and their properties in asciidoc format
WARNING:
@@ -1213,7 +707,7 @@ Note that to find all the parameters that are encrypted into the setup database,
***** ChangeLog for 17.0.4 compared to 17.0.3 *****
FIX: $this->newref already exists and could have been modified by trigger but we still use a local variable for the filesystem-based renaming
FIX: $this->newref already exists and could have been modified by a trigger but we still use a local variable for the filesystem-based renaming
FIX: 16.0 only, backport fix for SQL error on global search product
FIX: 17.0: deprecated field should only be a fallback
FIX: 17.0 PHP8: supplier invoice class:
@@ -2644,7 +2138,7 @@ FIX: Button text on proposal card for create a invoice
FIX: calculateCosts of BOM must not be included into fetch
FIX: calculation of balance in conciliation page on desc sorting.
FIX: card.php
FIX: Change date format of the inventorycode to be equal as mass stock transfer
FIX: Change date format of the inventorycode to be equal as mass stock transfert
FIX: check if greater 0
FIX: close cash with some terminals in TakePOS
FIX: compatibility with Multicompany
@@ -7426,7 +6920,7 @@ FIX: #6253 Supplier invoice list filter does not respect "thirdparty" filter
FIX: #6277
FIX: project list and ajax completion return wrong list.
FIX: bug margin calculation by user with multicompany
FIX: Can make a stock transfer on product not on sale/purchase.
FIX: Can make a stock transfert on product not on sale/purchase.
FIX: extrafield input for varchar was not working with special char within (ie double quotes)
FIX: javascript error
FIX: link for not found photo when using gravatar. Must use external url.
@@ -7906,7 +7400,7 @@ FIX: Check of EAN13 barcode when mask was set to use 13 digits instead of 12
FIX: correct display of minimum buying price
FIX: Creation of thumb image for size "small" was not done.
FIX: Damn, where was the project ref ?
FIX: Default vat is not set correctly when an error occurred and we use VAT identified by a code.
FIX: Default vat is not set correctly when an error occured and we use VAT identified by a code.
FIX: dont retrieve new buying price on margin display
FIX: Duplicate records into export
FIX: Each time we edit a line, we loose the unit price.
@@ -10665,7 +10159,7 @@ For developers:
- Can protect a module to not being enabled if javascript disabled.
- If module numberwords is installed, code can use langs->getLabelFromNumber
to get value of an amount in text.
- A module can add substitution keys in makesubsitutions() functions.
- A module can add subsitution keys in makesubsitutions() functions.
- Add $conf->browser->phone defined to optimise code for smartphone browsers.
- All external libs are now in same directory /includes.
- All install files are now in same directory /install.

View File

@@ -70,7 +70,7 @@ Note: *Le processus de migration peut être lancé manuellement et plusieurs foi
## CE QUI EST NOUVEAU
Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog).
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
## CE QUE DOLIBARR PEUT FAIRE
@@ -88,11 +88,11 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
- Gestion de contrats de services
- Gestion de stock et inventaires
- Gestion des expéditions
- Gestion des demandes de congés
- Gestion des demandes de congès
- Gestion des notes de frais
- Gestion de recrutement
- GED (Gestion Electronique de Documents)
- E-Mailings de masse
- EMailings de masse
- Réalisation de sondages
- Gestion d'adhérents
- Point de vente/Caisse enregistreuse
@@ -107,17 +107,17 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
- Support des codes barres
- Calcul des marges
- Connectivité LDAP
- Intégration de ClickToDial
- Intégratn de ClickToDial
- Intégration RSS
- Intégration Skype
- Intégration de système de paiements (PayPal, Stripe, Paybox...)
- Intégation Skype
- Intégration de système de paiements (Paypal, Stripe, Paybox...)
-
### Divers
- Multi-langue.
- Multi-utilisateurs avec différents niveaux de permissions par module.
- Multidevise.
- Multi-devise.
- Peux être multi-société par ajout du module externe multi-société.
- Plusieurs thèmes visuels.
- Application simple à utiliser.
@@ -127,7 +127,7 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
- Support natif de nombreuses fonctions spécifiques aux pays comme:
- La taxe espagnole TE et ISPF
- La tax espagnole TE et ISPF
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
- La loi française Finance 2016 et logiciels de caisse
- La double taxe canadienne
@@ -139,7 +139,7 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
### Extension
Dolibarr peut aussi être étendu à volonté avec l'ajout de modules/applications externes développées par des développeurs tiers, disponible sur [DoliStore](https://www.dolistore.com).
Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
@@ -168,15 +168,15 @@ Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/CO
## ACTUALITES ET RESEAUX SOCIAUX
Suivez le projet Dolibarr sur les réseaux francophones
Suivez le projet Dolibarr project sur les réseaux francophones
- [Facebook](https://www.facebook.com/dolibarr.fr)
- [X](https://www.twitter.com/dolibarr_france)
- [Twitter](https://www.twitter.com/dolibarr_france)
ou sur les réseaux anglophones
- [Facebook](https://www.facebook.com/dolibarr)
- [X](https://www.twitter.com/dolibarr)
- [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
- [GitHub](https://github.com/Dolibarr/dolibarr)

View File

@@ -9,7 +9,7 @@ Dolibarr ERP & CRM is a modern software package that helps manage your organizat
It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
You can freely use, study, modify or distribute it according to its license.
You can freely use, study, modify or distribute it according to its licence.
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
@@ -47,9 +47,9 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommended if you know git as it makes it easier if you want to upgrade later):
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later):
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is the main version like 3.6, 9.0, ...)
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...)
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
@@ -57,7 +57,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
- From your browser, go to the dolibarr "install/" page
The URL will depends on how your web setup was set up to point to your dolibarr installation. It may look like:
The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
`http://localhost/dolibarr/htdocs/install/`
@@ -71,7 +71,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
- Follow the installer instructions
### SaaS/Cloud setup
### Saas/Cloud setup
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See [https://saas.dolibarr.org](https://saas.dolibarr.org)). However, this third solution is not free.
@@ -81,7 +81,7 @@ Dolibarr supports upgrading, usually without the need for any (commercial) suppo
- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
- Check that your installed PHP version is supported by the new version [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
- Overwrite all old files from the 'dolibarr' directory with files provided into the new version's package.
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
 If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
@@ -98,13 +98,13 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
Product Management
- Products and/or Services catalogue
- Products and/or Services catalog
- Stock / Warehouse management + Inventory
- Barcodes
- Batches / Lots / Serials
- Product Variants
- Bill of Materials (BOM)
- Manufacturing Orders (MO)
- Manufacturing Orders
Customer/Sales Management
@@ -114,8 +114,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Customer Orders management
- Contracts/Subscription management
- Interventions management
- Ticket System (+ Knowledge management)
- Partnership management
- Ticket System
- Shipping management
- Customer Invoices/Credit notes and payment management
- Point of Sale (POS)
@@ -125,7 +124,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Suppliers/Vendors + Contacts
- Supplier (price) requests
- Purchase Orders management
- Delivery/Reception
- Delivery/Receiption
- Supplier Invoices/credit notes and payment management
- INCOTERMS
@@ -142,18 +141,16 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
Collaboration
- Shared calendar/agenda (with ical and vcal import/export for third-party tools integration)
- Shared calendar/agenda (with ical and vcal import/export for third party tools integration)
- Projects & Tasks management
- Event organization
- Ticket System
- Surveys
HR - Human Resources Management
HR
- Employee's leaves management
- Expense reports
- Recruitment management
- Employee/staff management
- Timesheets
### Other application/modules
@@ -171,20 +168,20 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Payment platforms integration (PayPal, Stripe, Paybox...)
- Email-Collector
(around 100 modules available by default, 1000+ addons at the official marketplace Dolistore.com)
(around 100 modules available by default, 1000+ on the addon market place)
### Other general features
- Multi-Language Support (Localization in most major languages)
- Multi-users and groups with finely-grained rights
- Multi-Users and groups with finely grained rights
- Multi-Currency
- Multi-Company (by adding of an external module)
- Very user-friendly and easy to use
- Very user friendly and easy to use
- Customizable dashboards
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
- APIs (REST, SOAP)
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
- Support a lot of country-specific features:
- Support a lot of country specific features:
- Spanish Tax RE and ISPF
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
- Canadian double taxes (federal/province) and other countries using cumulative VAT
@@ -192,7 +189,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Argentina invoice numbering using A,B,C...
- ZATCA e-invoicing QR-Code
- Compatible with [European directives](https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
- Compatible with data privacy rules (Europe GDPR, ...)
- Compatible with data privacy rules (europe GDPR, ...)
- ...
- Flexible PDF & ODT generation for invoices, proposals, orders...
- ...
@@ -207,7 +204,7 @@ See exact requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequ
### Extending
Dolibarr can be extended with a lot of other external applications or modules from third-party developers available at the [DoliStore](https://www.dolistore.com).
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
## WHAT DOLIBARR CAN'T DO YET
@@ -215,19 +212,19 @@ These are features that Dolibarr does **not** yet fully support:
- Tasks dependencies in projects
- Payroll module
- No native embedded Webmail, but you can send emails to contacts in Dolibarr with e.g. offers, invoices, etc.
- No native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
- Dolibarr can't do coffee (yet)
## DOCUMENTATION
Administrator, user, developer and translator's documentation are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
Administrator, user, developer and translator's documentations are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
## CONTRIBUTING
This project exists thanks to all the people who contribute.
Please read the instructions on how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
Please read the instructions how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
A View on Contributors:
A view on Contributors:
[![Dolibarr](https://opencollective.com/dolibarr/contributors.svg?width=890&button=false)](https://github.com/Dolibarr/dolibarr/graphs/contributors)
@@ -242,7 +239,7 @@ See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) fil
Follow Dolibarr project on:
- [Facebook](https://www.facebook.com/dolibarr)
- [X](https://x.com/dolibarr)
- [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [Reddit](https://www.reddit.com/r/Dolibarr_ERP_CRM/)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)

View File

@@ -20,9 +20,9 @@ We believe that the future of software is online SaaS. This means software are m
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery.
Any type of denial-of-service attack is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
Any type of denial of service attacks is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
We recommend to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
### User Agent
@@ -30,7 +30,7 @@ If you try to find bug on Dolibarr, we recommend to append to your user-agent he
### Account access
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put in your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
## Eligibility and Responsible Disclosure
@@ -38,7 +38,7 @@ We are happy to thank everyone who submits valid reports which help us improve t
You must be the first reporter of the vulnerability (duplicate reports are closed).
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommend to install software on your own platform.
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform.
You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability.
@@ -48,31 +48,27 @@ Reports are processed around once a month.
ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid":
* The version to analyze must be the last version available in the "develop" branch. Reports on vulnerabilities already fixed (so already reported) in the develop branch will not be validated.
* $dolibarr_main_prod must be set to 1 in conf.php
* $dolibarr_nocsrfcheck must be kept to the value 0 in conf.php (this is the default value)
* The version to analyze must be the last version available into "develop" branch or into last stable "vX.Y" released version.
* $dolibarr_main_prod must be set to 1 into conf.php
* $dolibarr_nocsrfcheck must be kept to the value 0 into conf.php (this is the default value)
* $dolibarr_main_force_https must be set to something else than 0.
* Some constant must be set in the backoffice menu Home - Setup - Other
- MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3
- MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1
- MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1
- MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 1
CSRF attacks and HTML injections are accepted but double check this setup that is experimental setup that already fix a lot of case and soon enabled by default.
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles in "experimental", "development" or external modules are not valid vulnerabilities).
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3 into backoffice menu Home - Setup - Other (this protection should be set to 3 soon by default). CSRF attacks are accepted but
double check that you have set MAIN_SECURITY_CSRF_WITH_TOKEN to value 3.
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles into "experimental", "developement" or external modules are not valid vulnerabilities).
* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer).
* The web server setup must be done so that only the documents directory is in write mode. The root directory called htdocs must be read-only.
* The modules DebugBar and ModuleBuilder must NOT be enabled. (by default, these modules are not enabled. They are developer tools)
* Ability for a high-level user to edit web site pages in the CMS by including HTML or JavaScript is an expected feature. Vulnerabilities in the website module are validated only if HTML or JavaScript injection can be done by a non-allowed user.
* Fail2ban rules for rate limit on the login page, forgotten password page, API calls and all public pages (/public/*) must be installed as recommended in the section "About - Admin tools - Section Access limits and mitigation".
* Ability for a high level user to edit web site pages into the CMS by including HTML or Javascript is an expected feature. Vulnerabilities into the website module are validated only if HTML or Javascript injection can be done by a non allowed user.
* Fail2ban rules for rate limit on the login page,password forgotten page, api calls and all public pages (/public/*) must be installed as recommendend into the section "About - Admin tools - Section Access limits and mitigation".
Scope is the web application (backoffice) and the APIs.
Scope is the web application (back office) and the APIs.
## Examples of vulnerabilities that are Qualified for reporting.
* Remote code execution (RCE)
* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA)
* Code injections (JS, SQL, PHP). HTML are covered only for fields that are not description, notes or comments fields (where rich content is allowed on purpose).
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except in the module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except into module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
* Cross-Site Requests Forgery (CSRF) with real security impact (when using GET URLs, CSRF are qualified only for creating, updating or deleting data from pages restricted to admin users)
* Open redirect
* Broken authentication & session management
@@ -80,21 +76,24 @@ Scope is the web application (backoffice) and the APIs.
* Cross-Origin Resource Sharing (CORS) with real security impact
* Horizontal and vertical privilege escalation
* "HTTP Host Header" XSS
* Software version disclosure (for non-admin users only)
* Stack traces or path disclosure (for non-admin users only)
* Software version disclosure (for non admin users only)
* Stack traces or path disclosure (for non admin users only)
## Examples of vulnerabilities that are Non-qualified for reporting.
* "Self" XSS
* Clickjacking/UI redressing
* Presence of autocomplete attribute on web forms
* Logout and other instances of low-severity Cross-Site Request Forgery
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
* Reports on features on modules flagged as "deprecated", "experimental" or "development" if the module needs to be enabled for that (this is not the case on production).
* Software or libraries versions, private IP disclosure, Stack traces or path disclosure when logged-in user is admin.
* Any vulnerabilities due to a configuration different than the one defined in chapter "Scope for qualified vulnerabilities".
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the recommended fail2ban rules were not installed.
* SSL/TLS best practices
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
* Denial of Service attacks
* Clickjacking/UI redressing
* Physical or social engineering attempts or issues that require physical access to a victims computer/device
* Presence of autocomplete attribute on web forms
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
* Logout and other instances of low-severity Cross-Site Request Forgery
* Missing security-related HTTP headers which do not lead directly to a vulnerability
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
* Reports on features flagged as "experimental" or "development"
* Software version or private IP disclosure when logged-in user is admin
* Stack traces or path disclosure when logged-in user is admin
* Any vulnerabilities due to a configuration different than the one defined into chapter "Scope for qualified vulnerabilities".
* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the fail2ban recommended fail2ban rules were not installed.

View File

@@ -1,17 +1,16 @@
<?php
$force_install_message = 'KeepDefaultValuesMamp';
$force_install_main_data_root = '/Applications/MAMP/dolibarr_documents';
$force_install_type = 'mysqli';
$force_install_dbserver = 'localhost';
$force_install_port = '8889';
$force_install_database = 'dolibarr';
$force_install_createdatabase = '1';
$force_install_databaselogin = 'dolibarrmysql';
$force_install_databasepass = 'root';
$force_install_createuser = '1';
$force_install_databaserootlogin = 'root';
$force_install_databaserootpass = 'root';
$force_install_dolibarrlogin = 'admin';
$force_install_nophpinfo = '1';
$force_install_lockinstall = '444';
$force_install_message='KeepDefaultValuesMamp';
$force_install_main_data_root='/Applications/MAMP/dolibarr_documents';
$force_install_type='mysqli';
$force_install_dbserver='localhost';
$force_install_port='8889';
$force_install_database='dolibarr';
$force_install_createdatabase='1';
$force_install_databaselogin='dolibarrmysql';
$force_install_databasepass='root';
$force_install_createuser='1';
$force_install_databaserootlogin='root';
$force_install_databaserootpass='root';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='444';

View File

@@ -1,7 +1,7 @@
# How to use it ?
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the current workspace with Docker.
This docker image is intended for development usage.
This docker image is intended for developpement usage.
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
Before build/run, define the variable HOST_USER_ID as following:

View File

@@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=L'instal·lador DoliWamp intentarà iniciar o reini
OldVersionFoundAndMoveInNew=S'ha trobat una versió antiga de base de dades i ha estat moguda per a ser utilitzada per la nova versió de Dolibarr
OldVersionFoundButFailedToMoveInNew=S'ha trobat una versió antiga de base de dades, però no es pot moure per a ser utilitzada per la nova versió de Dolibarr
DLLMissing=La teva instal·lació windows no té el component "Microsoft Visual C++ Redistributable for Visual Studio 2017". Instal·la primer la versió de 32-bit (vcredist_x86.exe) (pots trobar-la a https://www.microsoft.com/en-us/download/) i reiniciar després la instal·lació/actualització de DoliWamp.
DLLMissing=La teva instal·lació windows no té el component "Microsoft Visual C++ Redistributable for Visual Studio 2015". Instal·la primer la versió de 32-bit (vcredist_x86.exe) (pots trobar-la a https://www.microsoft.com/en-us/download/) i reiniciar després la instal·lació/actualització de DoliWamp.
ContinueAnyway=Continua igualment (el procés d'instal·lació podria fallar sense aquest prerequisit)

View File

@@ -44,5 +44,5 @@ DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache
OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by the new Dolibarr version
OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with the new Dolibarr version
DLLMissing=Your Windows installation is missing The "Microsoft Visual C++ Redistributable for Visual Studio 2017" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170) and restart DoliWamp installation/upgrade after.
DLLMissing=Your Windows installation is missing The "Microsoft Visual C++ Redistributable for Visual Studio 2015" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
ContinueAnyway=Continue anyway (install process may fail without this prerequisite)

View File

@@ -44,5 +44,5 @@ DoliWampWillStartApacheMysql=L'installeur DoliWamp va maintenant d
OldVersionFoundAndMoveInNew=Une ancienne version de base a <20>t<EFBFBD> trouv<75>e et d<>plac<61>e pour fonctionner avec la nouvelle version de Dolibarr.
OldVersionFoundButFailedToMoveInNew=Une ancienne version de base a <20>t<EFBFBD> trouv<75>e mais ne peut <20>tre d<>plac<61>e pour <20>tre utilis<69>e avec la nouvelle version de Dolibarr.
DLLMissing=L'installation de votre Windows est incompl<70>te. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2017". Installer la version 32-bit (vcredist_x86.exe) d'abord (vous pourrez le trouver <20> https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp apr<70>s.
DLLMissing=L'installation de votre Windows est incompl<70>te. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2015". Installer la version 32-bit (vcredist_x86.exe) d'abord (vous pourrez le trouver <20> https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp apr<70>s.
ContinueAnyway=Continuer malgr<67> tout (le process d'installaton <20>chouera)

View File

@@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=Die DoliWamp-Installation wird nun starten oder Apa
OldVersionFoundAndMoveInNew=Eine alte Datenbankversion wurde gefunden und verschoben, um von der neuen Dolibarr-Version verwendet zu werden.
OldVersionFoundButFailedToMoveInNew=Eine alte Datenbankversion wurde gefunden, konnte jedoch nicht verschoben werden, um mit der neuen Dolibarr-Version verwendet zu werden.
DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2017" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2015" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
ContinueAnyway=Fahren Sie trotzdem fort (der Installationsvorgang kann ohne diese Voraussetzung fehlschlagen).

View File

@@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=El instalador DoliWamp intentará iniciar o reinici
OldVersionFoundAndMoveInNew=Se ha encontrado una versión antigua de base de datos y ha sido movida para ser utilizada por la nueva versión de Dolibarr
OldVersionFoundButFailedToMoveInNew=Se ha encontrado una versión antigua de base de datos, pero no se pudo mover para ser utilizada por la nueva versión de Dolibarr
DLLMissing=Su instalación Windows no tiene el componente "Microsoft Visual C++ Redistributable for Visual Studio 2017". Instale primero la versión de 32-bit (vcredist_x86.exe) (puedes encontrarlo en https://www.microsoft.com/en-us/download/) y reiniciar después la instalación/actualización de DoliWamp.
DLLMissing=Su instalación Windows no tiene el componente "Microsoft Visual C++ Redistributable for Visual Studio 2015". Instale primero la versión de 32-bit (vcredist_x86.exe) (puedes encontrarlo en https://www.microsoft.com/en-us/download/) y reiniciar después la instalación/actualización de DoliWamp.
ContinueAnyway=Continua igualmente (el proceso de instalación podría fallar sin este prerequisito)

View File

@@ -1,5 +1,5 @@
#-------------------------------------------------------------------#
# Makefile to build UsedPort exe
# Makefile
#-------------------------------------------------------------------#
# 1.0 Laurent Destailleur Creation
#-------------------------------------------------------------------#

View File

@@ -253,7 +253,6 @@ int main(int argc, char **argv)
//----------------
int noarg,curseurarg,help=0,invalide=0;
char option;
char *endptr;
for (noarg=1;noarg<argc;noarg++) {
if (((argv[noarg][0])=='/') || ((argv[noarg][0])=='-')) {
@@ -262,7 +261,7 @@ for (noarg=1;noarg<argc;noarg++) {
if (strlen(argv[noarg]) < 3) { ++noarg; curseurarg=0; }
switch (option) {
case 's': strncpy(Host,argv[noarg]+curseurarg,sizeof(Host)); break;
case 'p': Port=strtol(argv[noarg] + curseurarg, &endptr, 10); break; // Get port from "-p80" (curseurarg = 2) or "-p 80" (curseurarg = 0)
case 'p': Port=atoi(argv[noarg]+curseurarg); break;
case '?': help=-1;break; // Help
case 'h': help=-1;break; // Help
case 'v': help=-1;break; // Help
@@ -271,20 +270,6 @@ for (noarg=1;noarg<argc;noarg++) {
}
}
// Check for conversion errors
if (*endptr != '\0') {
// Handle error: Invalid input format
printf("Invalid port number format\n");
exit(-1);
}
// Check for overflow
if (Port < 0 || Port > INT_MAX) {
// Handle error: Port number out of range
printf("Port number out of range\n");
exit(-1);
}
help=!(Port > 0);
// Show usage

View File

@@ -100,9 +100,9 @@ Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversi
; Apache, Php, Mysql
; Put here path of Wampserver applications
; Value OK: apache 2.4.51, php 7.4.26, mariadb10.6.5 (wampserver3.2.6_x64.exe)
; Value OK: apache 2.4.51, php 7.3.33, mariadb10.6.5 (wampserver3.2.6_x64.exe)
Source: "C:\wamp64\bin\apache\apache2.4.51\*.*"; DestDir: "{app}\bin\apache\apache2.4.51"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
Source: "C:\wamp64\bin\php\php7.4.26\*.*"; DestDir: "{app}\bin\php\php7.4.26"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
Source: "C:\wamp64\bin\php\php7.3.33\*.*"; DestDir: "{app}\bin\php\php7.3.33"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
Source: "C:\wamp64\bin\mariadb\mariadb10.6.5\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
; Mysql data files (does not overwrite if exists)
@@ -121,7 +121,7 @@ Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flag
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.51\conf"; Flags: ignoreversion;
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion;
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion;
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.4.26"; Flags: ignoreversion;
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.3.33"; Flags: ignoreversion;
Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion;
@@ -228,7 +228,7 @@ begin
//version des applis, a modifier pour chaque version de WampServer 2
apacheVersion := '2.4.51';
phpVersion := '7.4.26' ;
phpVersion := '7.3.33' ;
mysqlVersion := '10.6.5';
smtpServer := 'localhost';

View File

@@ -251,7 +251,7 @@ safe_mode_protected_env_vars = LD_LIBRARY_PATH
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
open_basedir = "WAMPROOT;C:\WINDOWS\TEMP"
open_basedir = "WAMPROOT"
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is

View File

@@ -22,18 +22,18 @@
* \brief This script create a xml checksum file
*/
if (!defined('NOREQUIREDB')) {
if (! defined('NOREQUIREDB')) {
define('NOREQUIREDB', '1'); // Do not create database handler $db
}
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit(1);
exit;
}
require_once $path."../htdocs/master.inc.php";
@@ -44,18 +44,18 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
* Main
*/
$includecustom = 0;
$includeconstants = array();
$buildzip = 0;
$includecustom=0;
$includeconstants=array();
$buildzip=0;
if (empty($argv[1])) {
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
exit(1);
exit -1;
}
$i = 0;
$i=0;
$result = array();
while ($i < $argc) {
if (!empty($argv[$i])) {
@@ -71,10 +71,10 @@ while ($i < $argc) {
$includeconstants[$i] = $result["includeconstant"];
}
if (!empty($result["buildzip"])) {
$buildzip = 1;
$buildzip=1;
}
if (preg_match('/includeconstant=/', strval($argv[$i]))) {
$tmp = explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str()
$tmp=explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str()
if (count($tmp) != 3) {
print "Error: Bad parameter includeconstant=".$result['includeconstant'] ."\n";
exit -1;
@@ -87,41 +87,41 @@ while ($i < $argc) {
if (empty($release)) {
print "Error: Missing release parameter\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit(2);
exit -1;
}
$savrelease = $release;
// If release is auto, we take current version
$tmpver = explode('-', $release, 2);
$tmpver=explode('-', $release, 2);
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') {
$release = DOL_VERSION;
$release=DOL_VERSION;
if ($tmpver[1] && $tmpver[0] == 'auto') {
$release .= '-'.$tmpver[1];
$release.='-'.$tmpver[1];
}
}
if (empty($includecustom)) {
$tmpverbis = explode('-', $release, 2);
$tmpverbis=explode('-', $release, 2);
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') {
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit(3);
exit -1;
}
} else {
$tmpverter = explode('-', DOL_VERSION, 2);
$tmpverter=explode('-', DOL_VERSION, 2);
if ($tmpverter[0] != $tmpverbis[0]) {
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit(4);
exit -1;
}
}
} else {
if (!preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
if (! preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit(5);
exit -1;
}
}
@@ -137,17 +137,17 @@ foreach ($includeconstants as $countrycode => $tmp) {
print "\n";
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
$outputdir = dirname(dirname(__FILE__)).'/htdocs/install';
$outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
print 'Delete current files '.$outputdir.'/filelist*.xml*'."\n";
dol_delete_file($outputdir.'/filelist*.xml*', 0, 1, 1);
$checksumconcat = array();
$checksumconcat=array();
$outputfile = $outputdir.'/filelist-'.$release.'.xml';
$outputfile=$outputdir.'/filelist-'.$release.'.xml';
$fp = fopen($outputfile, 'w');
if (empty($fp)) {
print 'Failed to open file '.$outputfile."\n";
exit(6);
exit(-1);
}
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
@@ -156,8 +156,8 @@ fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now
foreach ($includeconstants as $countrycode => $tmp) {
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
foreach ($tmp as $constname => $constvalue) {
$valueforchecksum = (empty($constvalue) ? '0' : $constvalue);
$checksumconcat[] = $valueforchecksum;
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
$checksumconcat[]=$valueforchecksum;
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
}
fputs($fp, '</dolibarr_constants>'."\n");
@@ -172,26 +172,26 @@ $files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom
*/
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$regextoexclude = '('.($includecustom?'':'custom|').'documents|escpos-php\/doc|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir = '';
$needtoclose = 0;
$dir='';
$needtoclose=0;
foreach ($files as $filetmp) {
$file = $filetmp['fullname'];
//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
if ($newdir != $dir) {
if ($newdir!=$dir) {
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
}
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
$dir = $newdir;
$needtoclose = 1;
$needtoclose=1;
}
if (filetype($file) == "file") {
$md5 = md5_file($file);
$checksumconcat[] = $md5;
if (filetype($file)=="file") {
$md5=md5_file($file);
$checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
}
}
@@ -205,7 +205,7 @@ fputs($fp, md5(join(',', $checksumconcat))."\n");
fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n");
$checksumconcat = array();
$checksumconcat=array();
fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
@@ -215,27 +215,27 @@ $iterator2 = new RecursiveIteratorIterator($dir_iterator2);
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
$files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
*/
$regextoinclude = '\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
$regextoexclude = '(custom|documents|conf|install)$'; // Exclude dirs
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
$regextoexclude='(custom|documents|conf|install)$'; // Exclude dirs
$files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir = '';
$needtoclose = 0;
$dir='';
$needtoclose=0;
foreach ($files as $filetmp) {
$file = $filetmp['fullname'];
//$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
if ($newdir != $dir) {
if ($newdir!=$dir) {
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
}
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
$dir = $newdir;
$needtoclose = 1;
$needtoclose=1;
}
if (filetype($file) == "file") {
$md5 = md5_file($file);
$checksumconcat[] = $md5;
if (filetype($file)=="file") {
$md5=md5_file($file);
$checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
}
}

View File

@@ -2,9 +2,9 @@
#----------------------------------------------------------------------------
# \file build/makepack-dolibarr.pl
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
# \author (c)2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
# \author (c)2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
#
# This is list of constant you can set to have generated packages moved into a specific dir:
# This is list of constant you can set to have generated packages moved into a specific dir:
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
#DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'
#DESTIMODULES='/media/HDDATA1_LD/Mes Sites/Web/Admin1/wwwroot/files/modules'
@@ -18,10 +18,12 @@ use Term::ANSIColor;
# Change this to defined target for option 98 and 99
$PROJECT="dolibarr";
$PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/dolibarr_documents/website/www.dolibarr.org/files";
$PUBLISHBETARC="$ENV{'DESTIASSOLOGIN'}\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/dolibarr_documents/website/www.dolibarr.org/files";
$PUBLISHSTABLE="$ENV{'DESTISFLOGIN'}\@frs.sourceforge.net:/home/frs/project/dolibarr";
# due to implicit origin on git commands, example
# implicit origin, lionel upstream, eric dolibarr
$GITREMOTENAME="$ENV{'GITREMOTENAME'}";
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
%REQUIREMENTPUBLISH=(
@@ -36,7 +38,7 @@ $PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/
"RPM_FEDORA"=>"rpmbuild",
"RPM_MANDRIVA"=>"rpmbuild",
"RPM_OPENSUSE"=>"rpmbuild",
"DEB"=>"dpkg dpatch",
"DEB"=>"dpkg",
"FLATPACK"=>"flatpack",
"EXEDOLIWAMP"=>"ISCC.exe",
"SNAPSHOT"=>"tar"
@@ -98,6 +100,13 @@ if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
exit 1;
}
if (! $ENV{"GITREMOTENAME"})
{
print "Error: environment variable GITREMOTENAME does not exist. You can set it to 'origin' or any other git remote name.\n";
print "$PROG.$Extension aborted.\n";
sleep 2;
exit 1;
}
# Detect OS type
# --------------
if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='linux'; $CR=''; }
@@ -129,7 +138,7 @@ if (! $TEMP || ! -d $TEMP) {
print "$PROG.$Extension aborted.\n";
sleep 2;
exit 2;
}
}
$BUILDROOT="$TEMP/buildroot";
@@ -172,7 +181,7 @@ $newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/1/gi; # dev
$newbuild =~ s/beta(.?)/2/gi; # beta (we want beta1, beta2, betax to be same package name)
$newbuild =~ s/rc(.?)/3/gi; # rc (we want rc1, rc2, rcx to be same package name)
if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale is same than rc.
if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale is same than rc.
# now newbuild is 0-1 or 0-4 for example. Note that for native package (see debian/source/format), we should not use a dash part but to get a better version management
$build = $newbuild;
$build =~ s/-.*$//g;
@@ -190,8 +199,8 @@ for (0..@ARGV-1) {
if ($ARGV[$_] =~ /^-*target=(\w+)/i) { $target=$1; $batch=1; }
if ($ARGV[$_] =~ /^-*desti=(.+)/i) { $DESTI=$1; }
if ($ARGV[$_] =~ /^-*prefix=(.+)/i) {
$PREFIX=$1;
$FILENAMESNAPSHOT.="-".$PREFIX;
$PREFIX=$1;
$FILENAMESNAPSHOT.="-".$PREFIX;
}
}
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTIBETARC is defined
@@ -210,7 +219,7 @@ print "Target directory (DESTI) : $DESTI\n";
# Choose package targets
#-----------------------
if ($target) {
if ($target eq "ALL") {
if ($target eq "ALL") {
foreach my $key (@LISTETARGET) {
if ($key ne 'SNAPSHOT' && $key ne 'SF' && $key ne 'ASSO') { $CHOOSEDTARGET{$key}=1; }
}
@@ -236,10 +245,10 @@ else {
printf(" %2d - %-14s (%s)\n",$cpt,"ASSO (publish)","Need ".$REQUIREMENTPUBLISH{"ASSO"});
$cpt=99;
printf(" %2d - %-14s (%s)\n",$cpt,"SF (publish)","Need ".$REQUIREMENTPUBLISH{"SF"});
# Ask which target to build
print "Choose one target number or several separated with space (0 - ".$cpt."): ";
$NUM_SCRIPT=<STDIN>;
$NUM_SCRIPT=<STDIN>;
chomp($NUM_SCRIPT);
if ($NUM_SCRIPT !~ /^[0-9\s]+$/)
{
@@ -286,11 +295,11 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
print "Error: You asked creation of several rpms. Because all rpm have same name, you must defined an environment variable DESTI to tell packager where it can create subdirs for each generated package.\n";
exit;
}
$atleastonerpm=1;
}
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target}))
$atleastonerpm=1;
}
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target}))
{
# Test
# Test
print "Test requirement for target $target: Search '$req'... ";
$newreq=$req; $newparam='';
if ($newreq eq 'zip') { $newparam.='-h'; }
@@ -299,12 +308,12 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
print "Test command ".$cmd."... ";
$ret=`$cmd`;
$coderetour=$?; $coderetour2=$coderetour>>8;
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/)) && $PROGPATH) {
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/)) && $PROGPATH) {
# Not found error, we try in PROGPATH
$ret=`"$PROGPATH/$ALTERNATEPATH{$req}/$req\" 2>&1`;
$coderetour=$?; $coderetour2=$coderetour>>8;
$REQUIREMENTTARGET{$target}="$PROGPATH/$ALTERNATEPATH{$req}/$req";
}
}
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/))) {
# Not found error
@@ -333,7 +342,7 @@ $nbofpublishneedchangelog=0;
foreach my $target (sort keys %CHOOSEDTARGET) {
if ($target eq '-CHKSUM') { $nbofpublishneedchangelog++; }
if ($CHOOSEDTARGET{$target} < 0) { next; }
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP' && $target ne '-CHKSUM')
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP' && $target ne '-CHKSUM')
{
$nboftargetneedbuildroot++;
}
@@ -369,12 +378,12 @@ if ($nboftargetok) {
}
if (! $BUILD || $BUILD eq '0-rc') # For a major version
{
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
}
else # For a maintenance release
{
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
}
print "\n";
if (! $ret)
@@ -397,10 +406,10 @@ if ($nboftargetok) {
print "Go to directory $SOURCE\n";
$olddir=getcwd();
chdir("$SOURCE");
print "Clean $SOURCE/htdocs/includes/autoload.php\n";
$ret=`rm -f $SOURCE/htdocs/includes/autoload.php`;
$ret=`git ls-files . --exclude-standard --others`;
if ($ret)
{
@@ -409,12 +418,16 @@ if ($nboftargetok) {
print "Canceled.\n";
exit;
}
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
print $ret."\n";
# Copy to final dir
$NEWDESTI=$DESTI;
if ( !-d "$NEWDESTI/signatures" ) {
use File::Path qw( make_path );
make_path "$NEWDESTI/signatures" or die "Failed to create path: $NEWDESTI/signatures";
}
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
use File::Copy qw(copy);
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
@@ -427,32 +440,32 @@ if ($nboftargetok) {
print "Go to directory $SOURCE\n";
$olddir=getcwd();
chdir("$SOURCE");
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
$ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`;
if ($ret =~ /(already exists|existe déjà)/)
{
print "WARNING: Tag ".$MAJOR.'.'.$MINOR.'.'.$BUILD." already exists. Overwrite (y/N) ? ";
$QUESTIONOVERWRITETAG=<STDIN>;
$QUESTIONOVERWRITETAG=<STDIN>;
chomp($QUESTIONOVERWRITETAG);
if ($QUESTIONOVERWRITETAG =~ /(o|y)/)
{
print 'Run git tag -a -f -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
print 'Run git push -f --tags'."\n";
$ret=`git push -f --tags`;
print 'Run git push $GITREMOTENAME -f --tags'."\n";
$ret=`git push $GITREMOTENAME -f --tags`;
#$ret=`git push -f origin "$MAJOR.$MINOR.$BUILD"`;
}
}
else
{
print 'Run git push --tags'."\n";
$ret=`git push --tags`;
print 'Run git push $GITREMOTENAME --tags'."\n";
$ret=`git push $GITREMOTENAME --tags`;
#$ret=`git push origin "$MAJOR.$MINOR.$BUILD"`;
}
chdir("$olddir");
}
# Update buildroot if required
#-----------------------------
if ($nboftargetneedbuildroot)
@@ -462,7 +475,7 @@ if ($nboftargetok) {
print "Delete directory $BUILDROOT\n";
$ret=`rm -fr "$BUILDROOT"`;
mkdir "$BUILDROOT";
mkdir "$BUILDROOT/$PROJECT";
print "Copy $SOURCE into $BUILDROOT/$PROJECT\n";
@@ -488,7 +501,7 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/phpstan.neon`;
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
$ret=`rm -f $BUILDROOT/$PROJECT/README-*.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/Doli*-*`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.deb`;
@@ -538,8 +551,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/security`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/spec`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/tools/php-cs-fixer/vendor`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/tools/rector/vendor`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/uml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/vagrant`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/xdebug`;
@@ -557,20 +568,20 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot11.png`;
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot12.png`;
# Security to avoid to package data files
# Security to avoid to package data files
print "Remove documents dir\n";
$ret=`rm -fr $BUILDROOT/$PROJECT/document`;
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
print "Remove subdir of custom dir\n";
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs but not files
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs, even symbolic links, but not files
# Removed known external modules to avoid any error when packaging from env where external modules are tested
# Removed known external modules to avoid any error when packaging from env where external modules are tested
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/abricot*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/accountingexport*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
@@ -583,7 +594,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/forceproject*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/langs/*/README.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`;
@@ -596,15 +606,15 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/common/fontawesome-5/svgs`;
# Removed other test files
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
# Removed files installed by the awful composer
# Removed files installed by the awful composer
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
@@ -630,33 +640,27 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/examples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/examples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/vendor`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/webmozart`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/autoload.php`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/*/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/*/*/bin`;
}
# Build package for each target
#------------------------------
foreach my $target (sort keys %CHOOSEDTARGET)
foreach my $target (sort keys %CHOOSEDTARGET)
{
if ($CHOOSEDTARGET{$target} < 0) { next; }
if ($target eq '-CHKSUM') { next; }
print "\nBuild package for target $target\n";
if ($target eq 'SNAPSHOT')
if ($target eq 'SNAPSHOT')
{
$NEWDESTI=$DESTI;
@@ -680,13 +684,13 @@ if ($nboftargetok) {
next;
}
if ($target eq 'TGZ')
if ($target eq 'TGZ')
{
$NEWDESTI=$DESTI;
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
}
print "Remove target $FILENAMETGZ.tgz...\n";
@@ -700,7 +704,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ/build/exe`;
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ/htdocs/includes/ckeditor/_source`; # We can't remove it with exclude file, we need it for some tarball packages
print "Compress $FILENAMETGZ into $FILENAMETGZ.tgz...\n";
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMETGZ.tgz\" $FILENAMETGZ";
print "$cmd\n";
@@ -712,14 +716,14 @@ if ($nboftargetok) {
next;
}
if ($target eq 'XZ')
if ($target eq 'XZ')
{
$NEWDESTI=$DESTI;
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
}
}
print "Remove target $FILENAMEXZ.xz...\n";
unlink("$NEWDESTI/$FILENAMEXZ.xz");
@@ -732,7 +736,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$FILENAMEXZ/build/exe`;
$ret=`rm -fr $BUILDROOT/$FILENAMEXZ/htdocs/includes/ckeditor/_source`; # We can't remove it with exclude file, we need it for some tarball packages
print "Compress $FILENAMEXZ into $FILENAMEXZ.xz...\n";
print "Go to directory $BUILDROOT\n";
@@ -748,15 +752,15 @@ if ($nboftargetok) {
$ret=`mv "$BUILDROOT/$FILENAMEXZ.xz" "$NEWDESTI/$FILENAMEXZ.xz"`;
next;
}
if ($target eq 'ZIP')
if ($target eq 'ZIP')
{
$NEWDESTI=$DESTI;
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
}
}
print "Remove target $FILENAMEZIP.zip...\n";
unlink("$NEWDESTI/$FILENAMEZIP.zip");
@@ -779,14 +783,14 @@ if ($nboftargetok) {
print $cmd."\n";
$ret= `$cmd`;
chdir("$olddir");
# Move to final dir
print "Move $FILENAMEZIP.zip to $NEWDESTI/$FILENAMEZIP.zip\n";
$ret=`mv "$BUILDROOT/$FILENAMEZIP.zip" "$NEWDESTI/$FILENAMEZIP.zip"`;
next;
}
if ($target =~ /RPM/) # Linux only
if ($target =~ /RPM/) # Linux only
{
$NEWDESTI=$DESTI;
$subdir="package_rpm_generic";
@@ -797,7 +801,7 @@ if ($nboftargetok) {
{
mkdir($DESTI.'/'.$subdir);
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
}
}
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
@@ -810,7 +814,7 @@ if ($nboftargetok) {
print "Create directory $BUILDROOT/$FILENAMETGZ2\n";
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2`;
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMETGZ2\n";
$cmd="cp -pr '$BUILDROOT/$PROJECT' '$BUILDROOT/$FILENAMETGZ2'";
$ret=`$cmd`;
@@ -827,6 +831,7 @@ if ($nboftargetok) {
print "Compress $FILENAMETGZ2 into $FILENAMETGZ2.tgz...\n";
$ret=`tar --exclude-from "$SOURCE/build/tgz/tar_exclude.txt" --directory "$BUILDROOT" -czvf "$BUILDROOT/$FILENAMETGZ2.tgz" $FILENAMETGZ2`;
if (! -d $RPMDIR . '/SOURCES') { mkdir($RPMDIR . '/SOURCES'); }
print "Move $BUILDROOT/$FILENAMETGZ2.tgz to $RPMDIR/SOURCES/$FILENAMETGZ2.tgz\n";
$cmd="mv $BUILDROOT/$FILENAMETGZ2.tgz $RPMDIR/SOURCES/$FILENAMETGZ2.tgz";
$ret=`$cmd`;
@@ -836,7 +841,7 @@ if ($nboftargetok) {
if ($target =~ /FEDO/i) { $BUILDFICSRC="${FILENAME}_fedora.spec"; }
if ($target =~ /MAND/i) { $BUILDFICSRC="${FILENAME}_mandriva.spec"; }
if ($target =~ /OPEN/i) { $BUILDFICSRC="${FILENAME}_opensuse.spec"; }
use Date::Language;
$lang=Date::Language->new('English');
$datestring = $lang->time2str("%a %b %e %Y", time);
@@ -854,7 +859,7 @@ if ($nboftargetok) {
}
close SPECFROM;
close SPECTO;
print "Copy patch file to $RPMDIR/SOURCES\n";
$ret=`cp "$SOURCE/build/rpm/dolibarr-forrpm.patch" "$RPMDIR/SOURCES"`;
$ret=`chmod 644 $RPMDIR/SOURCES/dolibarr-forrpm.patch`;
@@ -876,14 +881,14 @@ if ($nboftargetok) {
next;
}
if ($target eq 'DEB')
if ($target eq 'DEB')
{
$NEWDESTI=$DESTI;
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/package_debian-ubuntu');
if (-d $DESTI.'/package_debian-ubuntu') { $NEWDESTI=$DESTI.'/package_debian-ubuntu'; }
}
}
$olddir=getcwd();
@@ -964,13 +969,18 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/select2/LICENSE`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mike42/escpos-php/LICENSE.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mobiledetect/mobiledetectlib/LICENSE.txt`;
# Removed files we don't need (already removed)
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/.codeclimate.yml`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/.pre-commit-config.yaml`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/.vscode`;
$ret=`find $BUILDROOT/$PROJECT.tmp/ -type f -name '.editorconfig' -exec rm {} \\;`;
$ret=`find $BUILDROOT/$PROJECT.tmp/ -type f -name '.travis.yml' -exec rm {} \\;`;
# Rename upstream changelog to match debian rules
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
# Prepare source package (init debian dir)
print "Create directory $BUILDROOT/$PROJECT.tmp/debian\n";
$ret=`mkdir "$BUILDROOT/$PROJECT.tmp/debian"`;
@@ -1008,7 +1018,7 @@ if ($nboftargetok) {
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postrm" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/debian/dolibarr.templates" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/debian/install.forced.php.install" "$BUILDROOT/$PROJECT.tmp/debian"`;
# Set owners and permissions
#print "Set owners on files/dir\n";
#$ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`;
@@ -1039,8 +1049,8 @@ if ($nboftargetok) {
$ret=`$cmd`;
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; ";
$ret=`$cmd`;
print "Rename directory $BUILDROOT/$PROJECT.tmp into $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
$cmd="mv $BUILDROOT/$PROJECT.tmp $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
$ret=`$cmd`;
@@ -1048,14 +1058,14 @@ if ($nboftargetok) {
print "Go into directory $BUILDROOT\n";
chdir("$BUILDROOT");
# We need a tarball to be able to build "quilt" debian package (not required for native but we need patch so it is not a native)
print "Compress $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build into $BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz...\n";
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz\" $PROJECT-$MAJOR.$MINOR.$build";
print $cmd."\n";
$ret=`$cmd`;
# Creation of source package
# Creation of source package
print "Go into directory $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
chdir("$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build");
#$cmd="dpkg-source -b $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
@@ -1074,12 +1084,12 @@ if ($nboftargetok) {
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
#$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; # xz file is generated when build/debian/sources/option
#$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; # xz file is generated when build/debian/sources/option
$ret=`mv $BUILDROOT/*.debian.tar.gz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
next;
}
if ($target eq 'EXEDOLIWAMP')
{
$NEWDESTI=$DESTI;
@@ -1087,22 +1097,22 @@ if ($nboftargetok) {
{
mkdir($DESTI.'/package_windows');
if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; }
}
}
print "Remove target $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe...\n";
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
if ($OS eq 'windows') {
print "Check that ISCC.exe is in your PATH.\n";
} else {
print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
}
$SOURCEBACK=$SOURCE;
$SOURCEBACK =~ s/\//\\/g;
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
#$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
open(IN, '<' . $SOURCE."/build/exe/doliwamp/doliwamp.iss") or die $!;
open(OUT, '>' . "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss") or die $!;
@@ -1115,7 +1125,7 @@ if ($nboftargetok) {
close(OUT);
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" on OS $OS\n";
if ($OS eq 'windows') {
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
} else {
@@ -1129,26 +1139,26 @@ if ($nboftargetok) {
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
use File::Copy;
#$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
$ret=move("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe", "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n";
#$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
$ret=unlink("$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss");
next;
}
}
# Publish package for each target
#--------------------------------
foreach my $target (sort keys %CHOOSEDPUBLISH)
foreach my $target (sort keys %CHOOSEDPUBLISH)
{
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
print "\nList of files to publish (BUILD=$BUILD)\n";
%filestoscansf=(
"$DESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml"=>'none', # none means it won't be published on SF
@@ -1171,7 +1181,8 @@ if ($nboftargetok) {
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'package_debian-ubuntu',
#"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
@@ -1206,26 +1217,26 @@ if ($nboftargetok) {
print "\n";
}
if ($target eq 'SF' || $target eq 'ASSO')
if ($target eq 'SF' || $target eq 'ASSO')
{
print "\n";
if ($target eq 'SF') { $PUBLISH = $PUBLISHSTABLE; }
if ($target eq 'ASSO' && $BUILD =~ /[a-z]/i) { $PUBLISH = $PUBLISHBETARC.'/lastbuild'; }
if ($target eq 'ASSO' && $BUILD =~ /^[0-9]+$/) { $PUBLISH = $PUBLISHBETARC.'/stable'; }
$NEWPUBLISH=$PUBLISH;
print "Publish to target $NEWPUBLISH. Click enter or CTRL+C...\n";
# Ask which target to build
$NUM_SCRIPT=<STDIN>;
$NUM_SCRIPT=<STDIN>;
chomp($NUM_SCRIPT);
print "Create empty dir /tmp/emptydir. We need it to create target dir using rsync.\n";
$ret=`mkdir -p "/tmp/emptydir/"`;
%filestoscan=%filestoscansf;
foreach my $file (sort keys %filestoscan)
{
$found=0;
@@ -1235,30 +1246,30 @@ if ($nboftargetok) {
if ($target eq 'SF') {
if ($filestoscan{$file} eq 'none') {
next;
}
}
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
}
elsif ($target eq 'ASSO' and $NEWPUBLISH =~ /stable/) {
$destFolder="$NEWPUBLISH/$filestoscanstableasso{$file}";
}
}
elsif ($target eq 'ASSO' and $NEWPUBLISH !~ /stable/) {
$destFolder="$NEWPUBLISH";
}
}
else # No more used
{
$dirnameonly=$file;
$dirnameonly =~ s/.*\/([^\/]+)\/[^\/]+$/$1/;
$dirnameonly =~ s/.*\/([^\/]+)\/[^\/]+$/$1/;
$filenameonly=$file;
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
$destFolder="$NEWPUBLISH/$dirnameonly";
}
print "\n";
print "Publish file ".$file." to ".$destFolder."\n";
# mkdir
# mkdir
#my $ssh = Net::SSH::Perl->new("frs.sourceforge.net");
#$ssh->login("$user","$pass");
#$ssh->login("$user","$pass");
#use String::ShellQuote qw( shell_quote );
#$ssh->cmd('mkdir '.shell_quote($destFolder).' && exit');
@@ -1267,20 +1278,20 @@ if ($nboftargetok) {
#$sftp->mkdir($destFolder)
#$command="ssh eldy,dolibarr\@frs.sourceforge.net mkdir -p \"$destFolder\"";
#print "$command\n";
#print "$command\n";
#my $ret=`$command 2>&1`;
$command="rsync -s -e 'ssh' --recursive /tmp/emptydir/ \"".$destFolder."\"";
print "$command\n";
print "$command\n";
my $ret=`$command 2>&1`;
$command="rsync -s -e 'ssh' \"$file\" \"".$destFolder."\"";
print "$command\n";
print "$command\n";
my $ret2=`$command 2>&1`;
print "$ret2\n";
}
}
}
}
}
print "\n----- Summary -----\n";

View File

@@ -6,7 +6,7 @@ of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE versi
***** Prerequisites For Linux *****
Prerequisites to build tgz, debian and rpm packages:
> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli
> apt-get install perl tar dpkg p7zip-full rpm zip php-cli debhelper po-debconf
Prerequisites to build autoexe DoliWamp package from Linux (solution seems broken since Ubuntu 20.04):
> apt-get install wine q4wine
@@ -14,11 +14,11 @@ Prerequisites to build autoexe DoliWamp package from Linux (solution seems broke
> Install InnoSetup
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
For example by running wampserver3.2.6_x64.exe (https://www.wampserver.com).
For example by running wampserver3.2.6_x64.exe (https://www.wampserver.com).
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
> Add path to ISCC into PATH windows var:
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
open file build/exe/doliwamp.iss and click on button "Compile".
The .exe file will be build into directory build.
@@ -29,13 +29,12 @@ Prerequisites to build autoexe DoliWamp package from Windows:
> Install Perl for Windows (https://strawberryperl.com/)
> Install isetup-5.5.8.exe (https://www.jrsoftware.org)
> Install Microsoft Visual C++ Redistributable 2017 (https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170)
> Install WampServer-3.2.6-64.exe (Apache 2.4.51, PHP 7.4.26, MariaDB 10.6.5 for example. Version must match the values found into doliwamp.iss)
> Install WampServer-3.2.*-64.exe (Apache 2.4.51, PHP 7.3.33, MariaDB 10.6.5 for example. Version must match the values found into doliwamp.iss)
> Install GIT for Windows (https://git-scm.com/ => You must choose option "Add Git bash profile", "Git commit as-is")
> Install Dolibarr current version:
git clone https://github.com/dolibarr/dolibarr or git clone --branch X.Y https://github.com/dolibarr/dolibarr
> Install Dolibarr current version:
git clone https://github.com/dolibarr/dolibarr or git clone --branch X.Y https://github.com/dolibarr/dolibarr
> Add the path of PHP (C:\wamp64\bin\php\php7.4.26) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows.
> Add the path of PHP (C:\wamp64\bin\php\php7.3.33) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows.
> Create a config file c:\dolibarr\dolibarr\htdocs\conf\conf.php with content
<?php
@@ -44,12 +43,11 @@ Prerequisites to build autoexe DoliWamp package from Windows:
***** Actions to do a BETA *****
This files describe steps made by Dolibarr packaging team to make a
This files describe steps made by Dolibarr packaging team to make a
beta version of Dolibarr, step by step.
- Check all files are commited.
- Update version/info in ChangeLog, for this you can:
- Update version/info in ChangeLog, for this you can:
To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
To generate a changelog of a major new version x.y.0 (from a repo on branch x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
@@ -69,8 +67,7 @@ Recopy the content of the output file into the file ChangeLog.
***** Actions to do a RELEASE *****
This files describe steps made by Dolibarr packaging team to make a
This files describe steps made by Dolibarr packaging team to make a
complete release of Dolibarr, step by step.
- Check all files are commited.
@@ -87,9 +84,9 @@ Recopy the content of the output file into the file ChangeLog.
- Check content of built packages.
- Run makepack-dolibarr.pl again with option to publish files on
- Run makepack-dolibarr.pl again with option to publish files on
dolibarr foundation server (Dir /home/dolibarr/wwwroot/files/stable on www.dolibarr.org).
- Run makepack-dolibarr.pl again with option to publish files on
- Run makepack-dolibarr.pl again with option to publish files on
sourceforge. This will also add official tag.
- Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx"
on server to point to new files (used by some web sites).

View File

@@ -3,7 +3,9 @@ README (English)
Building a Patch file
##################################################
This directory contains tools to build a patch after a developer has made changes on files in its Dolibarr tree.
The output patch file can then be submited on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch.
Using this tool is now deprecated. You must use git pull requests to submit contributions.
This directory contains tools to build a patch
after a developer has made changes on files in its
Dolibarr tree.
The output patch file can then be submited on Dolibarr
dev mailing-list, with explanation on its goal, for
inclusion in main branch.

View File

@@ -1,22 +1,9 @@
PHPStan (https://phpstan.org)
-----------------------------
PHPStan
https://phpstan.org
PHPStan requires PHP >= 7.1
Config File is: ./phpstan.neon
Install: composer require --dev phpstan/phpstan
In dolibarr/build/phpstan
mkdir phpstan
cd phpstan
composer require --dev phpstan/phpstan
Build report from CLI:
In dolibarr/
mv htdocs/custom /tmp/
php build/phpstan/phpstan/vendor/bin/phpstan -v analyze -c ./phpstan.neon -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=table htdocs/commande/class
php build/phpstan/phpstan/vendor/bin/phpstan -v analyze -c ./phpstan.neon -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=table htdocs/
mv /tmp/custom htdocs
Build HTML report from Cron:
Example of line to add into a cron to generate a HTML report:
0 1 5 * * cd /home/dolibarr/preview.dolibarr.org/dolibarr; chmod -R u+w /home/dolibarr/preview.dolibarr.org/dolibarr; git pull; /home/dolibarr/phpstan/vendor/bin/phpstan -v analyze -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=github | awk ' BEGIN{ print "Date "strftime("%Y-%m-%d")"<br>" } { print $0"<br>" } END{ print NR } ' > /home/dolibarr/doxygen.dolibarr.org/phpstan/index.html
Config File: phpstan.neon

View File

@@ -1,16 +1,11 @@
<?php
// Defined some constants and load Dolibarr env to reduce PHPStan bootstrap that fails to load a lot of things.
//define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
//define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
//define('DOL_URL_ROOT', '/');
// Load the main.inc.php file to have functions env defined
if (!defined("NOLOGIN")) {
define("NOLOGIN", '1');
}
if (!defined("NOHTTPSREDIRECT")) {
define("NOHTTPSREDIRECT", '1');
}
if (! defined("NOLOGIN")) define("NOLOGIN", '1');
if (! defined("NOHTTPSREDIRECT")) define("NOHTTPSREDIRECT", '1');
global $conf, $langs, $user, $db;
include_once __DIR__ . '/../../htdocs/main.inc.php';

View File

@@ -1,5 +1,4 @@
<?php
//
// Take a look at conf.php.example file for an example of conf.php file
// and explanations for all possibles parameters.

View File

@@ -25,8 +25,8 @@ BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Applications/Productivity
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-mysqli, php-nusoap, dejavu-sans-fonts
Requires: mariadb-server, mariadb
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-nusoap, dejavu-sans-fonts
Requires: mysql-server, mysql
#BuildRequires: desktop-file-utils
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)

View File

@@ -46,8 +46,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
Group: Applications/Productivity
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-mysqli, php-nusoap, dejavu-sans-fonts, php-mbstring, php-xml
Requires: mariadb-server, mariadb
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-nusoap, dejavu-sans-fonts, php-mbstring, php-xml
Requires: mysql-server, mysql
BuildRequires: desktop-file-utils
%else
%if 0%{?mdkversion}

View File

@@ -3,6 +3,13 @@
.git
.gitignore
.scrutinizer.yml
.travis.yml
.vscode
.idea
.editorconfig
.codeclimate.yml
.pre-commit-config.yaml
.mailmap
Thumbs.db
build/exe
build/html

View File

@@ -22,3 +22,9 @@ dolibarr*.deb
dolibarr*.zip
cvschangelogbuilder_dolibarr*
dolibarr_install.log
.travis.yml
.vscode
.idea
.editorconfig
.codeclimate.yml
.pre-commit-config.yaml

1
dev/.gitignore vendored
View File

@@ -1,2 +1 @@
/spec
/tools/rector/vendor/

View File

@@ -18,7 +18,7 @@ With
CKEDITOR (4.22.1):
CKEDITOR (4.6.2):
-----------------
* In ckeditor/ckeditor/contents.css
Replace:
@@ -26,12 +26,7 @@ Replace:
With
body { ... margin: 5px;
* In ckeditor/ckeditor/ckeditor.js
Replace:
d.items&&
With
d&&d.items&&
ESCPOS:
-------
@@ -41,59 +36,40 @@ With
protected $connector;
SABRE:
------
rm -fr ./htdocs/includes/sabre/sabre/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/*/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/*/*/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/*/*/*/bin;
NUSOAP:
-------
* Line 1257 of file nusoap.php. Add:
* In file nusoap.php, to avoid a warning,
Replace
if (isset($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
By
if (! is_array($this->methodreturn) && isset($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only for libxml < 2.
* Line 4346 of file nusoap.php
* In file nusoap.php, to avoid a warning,
Replace call to serialize_val with no bugged value
$rev = array();
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
* In all files, replace constructor names into __construct. Replace also parent::constructor_name with parent::__construct
* Line 6566 of file nusoap.php, replace
* Line 4222 of file nusoap.php
$rev = array();
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
if (count($attrs) > 0) {
with
if (is_array($attrs) && count($attrs) > 0) {
TCPDF:
------
* Modify in tcpdf.php: make TCPDF::_out public.
(htdocs/core/lib/pdf.lib.php uses it as a public method)
Change:
protected function _out($s)
to
public function _out($s)
Change in method's _out phpdoc:
* @protected
to
* @public
* Replace in tcpdf.php:
if (isset($this->imagekeys)) {
foreach($this->imagekeys as $file) {
unlink($file);
}
}
with
if (isset($this->imagekeys)) {
foreach($this->imagekeys as $file) {
// DOL CHANGE If we keep this, source image files are physically destroyed
@@ -101,7 +77,8 @@ with
}
}
* Replace in tcpdf.php:
* Replace in tcpdf.php
$preserve = array(
'file_id',
'internal_encoding',
@@ -109,7 +86,9 @@ with
'bufferlen',
'buffer',
'cached_files',
with
$preserve = array(
'file_id',
'internal_encoding',
@@ -120,11 +99,14 @@ with
// @CHANGE DOL
'imagekeys',
* Replace in tcpdf.php:
* Replace in tcpdf.php
if (!@TCPDF_STATIC::file_exists($file)) {
return false;
}
with
if (!@TCPDF_STATIC::file_exists($file)) {
// DOL CHANGE If we keep this, the image is not visible on pages after the first one.
//var_dump($file.' '.(!@TCPDF_STATIC::file_exists($file)));
@@ -134,10 +116,13 @@ with
$file = $tfile;
}
}
* Replace in tcpdf.php:
* Replace in tcpdf.php
if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
with
// @CHANGE LDR Add support for src="file://..." links
if (strpos($imgsrc, 'file://') === 0) {
$imgsrc = str_replace('file://', '/', $imgsrc);
@@ -153,10 +138,12 @@ with
}
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace:
if (strpos($filename, '://') === false) {
with
if (strpos($filename, '//') === 0) {
// Share folder on a (windows) server
// e.g.: "//[MyServerName]/[MySharedFolder]/"
@@ -165,16 +152,11 @@ with
}
elseif (strpos($filename, '://') === false)
* To avoid to have QRcode changed because generated with a random mask, replace:
* To avoid to have QRcode changed because generated with a random mask, replace
define('QR_FIND_FROM_RANDOM', 2);
with
with:
define('QR_FIND_FROM_RANDOM', false);
* Change line:
imagesetpixel($imgalpha, $xpx, $ypx, $alpha);
into
imagesetpixel($imgalpha, $xpx, $ypx, (int) $alpha);
* Removed useless directories ("examples", "tools")
* Optionnaly, removed all fonts except
@@ -202,23 +184,6 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
return strval($number);
}
* Add this at begin of tcpdf_autoconfig.php
// @CHANGE LDR DOCUMENT_ROOT fix for IIS Webserver
if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
if (isset($_SERVER['SCRIPT_FILENAME']) && isset($_SERVER['PHP_SELF'])) {
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
} else {
// define here your DOCUMENT_ROOT path if the previous fails (e.g. '/var/www')
$_SERVER['DOCUMENT_ROOT'] = '/';
}
}
$_SERVER['DOCUMENT_ROOT'] = str_replace('//', '/', $_SERVER['DOCUMENT_ROOT']);
if (substr($_SERVER['DOCUMENT_ROOT'], -1) != '/') {
$_SERVER['DOCUMENT_ROOT'] .= '/';
}
TCPDI:

View File

@@ -25,7 +25,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$version = '1.7';
$error = 0;
$version='1.7';
$error=0;
// -------------------- START OF YOUR CODE HERE --------------------
// Include Dolibarr environment
require_once $path."../../../htdocs/master.inc.php";
require_once $path."../../htdocs/master.inc.php";
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
//$langs->setDefaultLang('en_US'); // To change default language of $langs
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0);
// Load user and its permissions
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (!$result > 0) {
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) {
dol_print_error('', $user->error);
exit;
}
@@ -74,20 +74,20 @@ $obj->note_public = 'A public comment';
$obj->note_private = 'A private comment';
$obj->cond_reglement_id = 1;
$line1 = new FactureLigne($db);
$line1->tva_tx = 10.0;
$line1->remise_percent = 0;
$line1->qty = 1;
$line1->total_ht = 100;
$line1->total_tva = 10;
$line1->total_ttc = 110;
$obj->lines[] = $line1;
$line1=new FactureLigne($db);
$line1->tva_tx=10.0;
$line1->remise_percent=0;
$line1->qty=1;
$line1->total_ht=100;
$line1->total_tva=10;
$line1->total_ttc=110;
$obj->lines[]=$line1;
// Create invoice
$idobject = $obj->create($user);
$idobject=$obj->create($user);
if ($idobject > 0) {
// Change status to validated
$result = $obj->validate($user);
$result=$obj->validate($user);
if ($result > 0) {
print "OK Object created with id ".$idobject."\n";
} else {
@@ -102,7 +102,7 @@ if ($idobject > 0) {
// -------------------- END OF YOUR CODE --------------------
if (!$error) {
if (! $error) {
$db->commit();
print '--- end ok'."\n";
} else {

View File

@@ -25,7 +25,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$version = '1.11';
$error = 0;
$version='1.11';
$error=0;
// -------------------- START OF YOUR CODE HERE --------------------
// Include Dolibarr environment
require_once $path."../../../htdocs/master.inc.php";
require_once $path."../../htdocs/master.inc.php";
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
//$langs->setDefaultLang('en_US'); // To change default language of $langs
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0);
// Load user and its permissions
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (!$result > 0) {
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) {
dol_print_error('', $user->error);
exit;
}
@@ -75,17 +75,17 @@ $com->note_private = 'A private comment';
$com->source = 1;
$com->remise_percent = 0;
$orderline1 = new OrderLine($db);
$orderline1->tva_tx = 10.0;
$orderline1->remise_percent = 0;
$orderline1->qty = 1;
$com->lines[] = $orderline1;
$orderline1=new OrderLine($db);
$orderline1->tva_tx=10.0;
$orderline1->remise_percent=0;
$orderline1->qty=1;
$com->lines[]=$orderline1;
// Create order
$idobject = $com->create($user);
$idobject=$com->create($user);
if ($idobject > 0) {
// Change status to validated
$result = $com->valid($user);
$result=$com->valid($user);
if ($result > 0) {
print "OK Object created with id ".$idobject."\n";
} else {
@@ -100,7 +100,7 @@ if ($idobject > 0) {
// -------------------- END OF YOUR CODE --------------------
if (!$error) {
if (! $error) {
$db->commit();
print '--- end ok'."\n";
} else {

View File

@@ -25,7 +25,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$version = '1.10';
$error = 0;
$version='1.10';
$error=0;
// -------------------- START OF YOUR CODE HERE --------------------
// Include Dolibarr environment
require_once $path."../../../htdocs/master.inc.php";
require_once $path."../../htdocs/master.inc.php";
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
//$langs->setDefaultLang('en_US'); // To change default language of $langs
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0);
// Load user and its permissions
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (!$result > 0) {
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) {
dol_print_error('', $user->error);
exit;
}
@@ -65,7 +65,7 @@ $db->begin();
require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php";
// Create instance of object
$myproduct = new Product($db);
$myproduct=new Product($db);
// Definition of product instance properties
$myproduct->ref = '1234';
@@ -91,7 +91,7 @@ if ($idobject > 0) {
// -------------------- END OF YOUR CODE --------------------
if (!$error) {
if (! $error) {
$db->commit();
print '--- end ok'."\n";
} else {

View File

@@ -25,7 +25,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$version = '1.7';
$error = 0;
$version='1.7';
$error=0;
// -------------------- START OF YOUR CODE HERE --------------------
// Include Dolibarr environment
require_once $path."../../../htdocs/master.inc.php";
require_once $path."../../htdocs/master.inc.php";
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
//$langs->setDefaultLang('en_US'); // To change default language of $langs
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0);
// Load user and its permissions
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (!$result > 0) {
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) {
dol_print_error('', $user->error);
exit;
}
@@ -71,10 +71,10 @@ $obj->login = 'ABCDEF';
$obj->nom = 'ABCDEF';
// Create user
$idobject = $obj->create($user);
$idobject=$obj->create($user);
if ($idobject > 0) {
// Change status to validated
$result = $obj->setStatut(1);
$result=$obj->setStatut(1);
if ($result > 0) {
print "OK Object created with id ".$idobject."\n";
} else {
@@ -82,7 +82,7 @@ if ($idobject > 0) {
dol_print_error($db, $obj->error);
}
} elseif ($obj->error == 'ErrorLoginAlreadyExists') {
print "User with login ".$obj->login." already exists\n";
print "User with login ".$obj->login." already exists\n";
} else {
$error++;
dol_print_error($db, $obj->error);
@@ -91,7 +91,7 @@ if ($idobject > 0) {
// -------------------- END OF YOUR CODE --------------------
if (!$error) {
if (! $error) {
$db->commit();
print '--- end ok'."\n";
} else {

View File

@@ -25,7 +25,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$version = '1.7';
$error = 0;
$version='1.7';
$error=0;
// -------------------- START OF YOUR CODE HERE --------------------
// Include Dolibarr environment
require_once $path."../../../htdocs/master.inc.php";
require_once $path."../../htdocs/master.inc.php";
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
//$langs->setDefaultLang('en_US'); // To change default language of $langs
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0);
// Load user and its permissions
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (!$result > 0) {
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) {
dol_print_error('', $user->error);
exit;
}
@@ -57,7 +57,7 @@ $user->getrights();
print "***** ".$script_file." (".$version.") *****\n";
if (!isset($argv[1])) { // Check parameters
if (! isset($argv[1])) { // Check parameters
print "Usage: ".$script_file." id_thirdparty ...\n";
exit;
}
@@ -72,9 +72,9 @@ require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php";
// Create contract object
$obj = new Contrat($db);
$obj->socid = $argv[1];
$obj->socid=$argv[1];
$listofcontractsforcompany = $obj->getListOfContracts('all');
$listofcontractsforcompany=$obj->getListOfContracts('all');
print $listofcontractsforcompany;

View File

@@ -1,124 +0,0 @@
{
"id": "evt_123456789",
"object": "event",
"api_version": "2023-10-16",
"created": 1702053463,
"data": {
"object": {
"id": "pi_123456789",
"object": "payment_intent",
"amount": 60,
"amount_capturable": 0,
"amount_details": {
"tip": {
}
},
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_123456789_secret_123456789",
"confirmation_method": "automatic",
"created": 1702053448,
"currency": "eur",
"customer": "cus_123456789",
"description": "Stripe payment from makeStripeSepaRequest: DID=31262-INV=123-CUS=123 did=123 ref=FA2312-123",
"invoice": null,
"last_payment_error": {
"code": "",
"decline_code": "generic_decline",
"message": "The transaction can't be processed because your customer's account information is missing or incorrect. Collect a new mandate and ask your customer to provide their name and address exactly as it appears on their bank account. After this, you can attempt the transaction again.",
"payment_method": {
"id": "pm_123456789",
"object": "payment_method",
"billing_details": {
"address": {
"city": null,
"country": "FR",
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": "email@example.com",
"name": "Test example",
"phone": null
},
"created": 1692688898,
"customer": "cus_123456789",
"livemode": false,
"metadata": {
"dol_version": "19.0.0-dev",
"dol_thirdparty_id": "123",
"ipaddress": "1.2.3.4",
"dol_id": "123",
"dol_type": "companypaymentmode",
"dol_entity": "1"
},
"sepa_debit": {
"bank_code": "123",
"branch_code": "",
"country": "AT",
"fingerprint": "123456789",
"generated_from": {
"charge": null,
"setup_attempt": null
},
"last4": "3202"
},
"type": "sepa_debit"
},
"type": "card_error"
},
"latest_charge": "py_123456789",
"livemode": false,
"metadata": {
"dol_version": "19.0.0-beta",
"dol_thirdparty_id": "123",
"ipaddress": "1.2.3.4",
"dol_id": "123",
"dol_type": "facture",
"dol_entity": "1"
},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
},
"sepa_debit": {
}
},
"payment_method_types": [
"card",
"sepa_debit"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": "DID=123-",
"statement_descriptor_suffix": "DID=123-",
"status": "requires_payment_method",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": null,
"idempotency_key": null
},
"type": "payment_intent.payment_failed"
}

View File

@@ -1,7 +1,5 @@
README
------
Scripts in this directory can be used to load massive data or purge data of a database instance.
Scripts in this directory can be used to load or purge data of a database instance.
WARNING: Some of this script may delete definitely data.
To init data for a demo, use instead the tool into dev/initdemo

View File

@@ -45,9 +45,9 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
* Parameters
*/
define('GEN_NUMBER_FACTURE', $argv[1] ?? 1);
define(GEN_NUMBER_FACTURE, 1);
$year = 2016;
$dates = array(mktime(12, 0, 0, 1, 3, $year),
$dates = array (mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 1, 9, $year),
mktime(12, 0, 0, 2, 13, $year),
mktime(12, 0, 0, 2, 23, $year),
@@ -168,8 +168,7 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0) {
$result=$object->validate($fuser);
if ($result) {
print " OK with ref ".$object->ref."\n";
;
print " OK with ref ".$object->ref."\n";;
} else {
dol_print_error($db, $object->error);
}

View File

@@ -51,9 +51,9 @@ require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
* Parametre
*/
define('GEN_NUMBER_COMMANDE', $argv[1] ?? 10);
define(GEN_NUMBER_COMMANDE, 10);
$year = 2016;
$dates = array(mktime(12, 0, 0, 1, 3, $year),
$dates = array (mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 1, 9, $year),
mktime(12, 0, 0, 2, 13, $year),
mktime(12, 0, 0, 2, 23, $year),

View File

@@ -50,7 +50,7 @@ include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
* Parameters
*/
define('GEN_NUMBER_PRODUIT', $argv[1] ?? 100);
define(GEN_NUMBER_PRODUIT, 100000);
$ret=$user->fetch('', 'admin');
@@ -64,24 +64,18 @@ $user->getrights();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$productsid[$i] = $row[0];
$i++;
$row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++;
}
}
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$societesid[$i] = $row[0];
$i++;
$row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++;
}
} else {
print "err";
@@ -90,12 +84,9 @@ if ($resql) {
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
$i++;
$row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++;
}
} else {
print "err";
@@ -108,7 +99,7 @@ for ($s = 0; $s < GEN_NUMBER_PRODUIT; $s++) {
$produit = new Product($db);
$produit->type = mt_rand(0, 1);
$produit->status = 1;
$produit->ref = ($produit->type ? 'S' : 'P').time().$s;
$produit->ref = ($produit->type?'S':'P').time().$s;
$produit->label = 'Label '.time().$s;
$produit->description = 'Description '.time().$s;
$produit->price = mt_rand(1, 999.99);

View File

@@ -47,9 +47,9 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
* Parameters
*/
define('GEN_NUMBER_PROPAL', $argv[1] ?? 10);
define(GEN_NUMBER_PROPAL, 10);
$year = 2016;
$dates = array(mktime(12, 0, 0, 1, 3, $year),
$dates = array (mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 1, 9, $year),
mktime(12, 0, 0, 2, 13, $year),
mktime(12, 0, 0, 2, 23, $year),
@@ -152,8 +152,8 @@ $user->rights->propal->creer=1;
$user->rights->propal->propal_advance->validate=1;
if (getDolGlobalString('PROPALE_ADDON') && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/" . getDolGlobalString('PROPALE_ADDON').".php")) {
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/" . getDolGlobalString('PROPALE_ADDON').".php";
if (!empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) {
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php";
}
$i=0;

View File

@@ -53,7 +53,7 @@ $listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Doroth
* Parametre
*/
define('GEN_NUMBER_SOCIETE', $argv[1] ?? 10);
define(GEN_NUMBER_SOCIETE, 10);
$ret=$user->fetch('', 'admin');
@@ -67,8 +67,7 @@ $user->getrights();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$productsid[$i] = $row[0];
@@ -79,8 +78,7 @@ if ($resql) {
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$societesid[$i] = $row[0];
@@ -93,8 +91,7 @@ if ($resql) {
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
@@ -120,13 +117,12 @@ for ($s = 0; $s < GEN_NUMBER_SOCIETE; $s++) {
$soc->country_id=1;
$soc->country_code='FR';
// Un client sur 3 a une remise de 5%
$user_remise=mt_rand(1, 3);
if ($user_remise==3) {
$user_remise=mt_rand(1, 3); if ($user_remise==3) {
$soc->remise_percent=5;
}
print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n";
$soc->note_private = 'Company created by the script generate-societe.php';
$socid = $soc->create($user);
$socid = $soc->create();
if ($socid >= 0) {
$rand = mt_rand(1, 4);

View File

@@ -62,9 +62,9 @@ dol_syslog($script_file." launched with arg ".implode(',', $argv));
$mode = $argv[1];
$filepath = $argv[2];
$filepatherr = $filepath.'.err';
$defaultlang = empty($argv[3]) ? 'en_US' : $argv[3];
$startlinenb = empty($argv[4]) ? 1 : $argv[4];
$endlinenb = empty($argv[5]) ? 0 : $argv[5];
$defaultlang = empty($argv[3])?'en_US':$argv[3];
$startlinenb = empty($argv[4])?1:$argv[4];
$endlinenb = empty($argv[5])?0:$argv[5];
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n";

View File

@@ -63,8 +63,8 @@ $mode = $argv[1];
$filepath = $argv[2];
$filepatherr = $filepath.'.err';
//$defaultlang = empty($argv[3])?'en_US':$argv[3];
$startlinenb = empty($argv[3]) ? 1 : $argv[3];
$endlinenb = empty($argv[4]) ? 0 : $argv[4];
$startlinenb = empty($argv[3])?1:$argv[3];
$endlinenb = empty($argv[4])?0:$argv[4];
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
@@ -128,8 +128,8 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
$object->client = $fields[7];
$object->fournisseur = $fields[8];
$object->name = $fields[13] ? trim($fields[13]) : $fields[0];
$object->name_alias = $fields[0] != $fields[13] ? trim($fields[0]) : '';
$object->name = $fields[13]?trim($fields[13]):$fields[0];
$object->name_alias = $fields[0]!=$fields[13]?trim($fields[0]):'';
$object->address = trim($fields[14]);
$object->zip = trim($fields[15]);

View File

@@ -63,8 +63,8 @@ $mode = $argv[1];
$filepath = $argv[2];
$filepatherr = $filepath.'.err';
//$defaultlang = empty($argv[3])?'en_US':$argv[3];
$startlinenb = empty($argv[3]) ? 1 : $argv[3];
$endlinenb = empty($argv[4]) ? 0 : $argv[4];
$startlinenb = empty($argv[3])?1:$argv[3];
$endlinenb = empty($argv[4])?0:$argv[4];
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";

View File

@@ -5,17 +5,15 @@
#
# Laurent Destailleur - eldy@users.sourceforge.net
#------------------------------------------------------
# Usage: initdemopassword.sh confirm
# Usage: initdemopassword.sh confirm
# usage: initdemopassword.sh confirm base port login pass
#------------------------------------------------------
# shellcheck disable=2006,2034,2046,2064,2068,2086,2155,2166,2186,2172,2268
# shellcheck disable=2012,2016,2154
export mydir=`echo "$0" | sed -e 's/initdemopassword.sh//'`;
if [ "x$mydir" = 'x' -o "x$mydir" = 'x./' ]
then
export mydir="."
export mydir="."
fi
export id=`id -u`;
@@ -58,107 +56,103 @@ then
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Reset login password" --clear \
--inputbox "Mysql database name :" 16 55 dolibarrdemo 2> $fichtemp
--inputbox "Mysql database name :" 16 55 dolibarrdemo 2> $fichtemp
valret=$?
case $valret in
0)
base=`cat $fichtemp` ;;
1)
exit ;;
255)
exit ;;
0)
base=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
rm $fichtemp
# ---------------------------- database port
DIALOG=${DIALOG=dialog}
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Reset login password" --clear \
--inputbox "Mysql port (ex: 3306):" 16 55 3306 2> $fichtemp
--inputbox "Mysql port (ex: 3306):" 16 55 3306 2> $fichtemp
valret=$?
case $valret in
0)
port=`cat $fichtemp` ;;
1)
exit ;;
255)
exit ;;
0)
port=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
rm $fichtemp
# ----------------------------- demo login
DIALOG=${DIALOG=dialog}
DIALOG="$DIALOG --ascii-lines"
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Reset login password" --clear \
--inputbox "Login to reset :" 16 55 dolibarrdemologin 2> $fichtemp
--inputbox "Login to reset :" 16 55 dolibarrdemologin 2> $fichtemp
valret=$?
case $valret in
0)
demologin=`cat $fichtemp` ;;
1)
exit ;;
255)
exit ;;
0)
demologin=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
rm fichtemp
# ----------------------------- demo pass
DIALOG=${DIALOG=dialog}
DIALOG="$DIALOG --ascii-lines"
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Reset login password" --clear \
--inputbox "Pass to set :" 16 55 dolibarrdemopass 2> $fichtemp
--inputbox "Pass to set :" 16 55 dolibarrdemopass 2> $fichtemp
valret=$?
case $valret in
0)
demopass=`cat $fichtemp` ;;
1)
exit ;;
255)
exit ;;
0)
demopass=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
rm fichtemp
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
# ---------------------------- confirmation
DIALOG=${DIALOG=dialog}
$DIALOG --title "Reset login password" --clear \
--yesno "Do you confirm ? \n Mysql database : '$base' \n Mysql port : '$port' \n Demo login: '$demologin' \n Demo password : '$demopass'" 15 55
--yesno "Do you confirm ? \n Mysql database : '$base' \n Mysql port : '$port' \n Demo login: '$demologin' \n Demo password : '$demopass'" 15 55
case $? in
0) echo "Ok, start process..." ;;
1) exit ;;
255) exit ;;
0) echo "Ok, start process...";;
1) exit;;
255) exit;;
esac
fi
# ---------------------------- run sql file
if [ "x$port" != "x0" ]
then
export Pport="-P$port"
fi
if [ "x$passwd" != "x" ]
then
export passwd="-p$passwd"
fi
#echo "mysql $Pport -u$admin $passwd $base < $mydir/$dumpfile"
#mysql $Pport -u$admin $passwd $base < $mydir/$dumpfile
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
if [ "x${demopasshash}" != "xpassword_hash" ]
then
echo '<?php echo MD5("'$demopass'"); ?>' > /tmp/tmp.php
echo '<?php echo MD5("'$demopass'"); ?>' > /tmp/tmp.php
newpass=`php -f /tmp/tmp.php`
else
echo '<?php echo password_hash("'$demopass'", PASSWORD_DEFAULT); ?>' > /tmp/tmp.php
@@ -166,22 +160,22 @@ else
fi
#rm /tmp/tmp.php
echo "echo \"UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';\" | mysql $Pport $base"
echo "UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';" | mysql $Pport $base
echo "echo \"UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';\" | mysql -P$port $base"
echo "UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';" | mysql -P$port $base
export res=$?
if [ $res -ne 0 ]; then
echo "Error to execute sql with mysql $Pport -u$admin -p***** $base"
echo "Error to execute sql with mysql -P$port -u$admin -p***** $base"
exit
fi
fi
if [ -s "$mydir/initdemopostsql.sql" ]; then
echo A file initdemopostsql.sql was found, we execute it.
echo "mysql $Pport $base < \"$mydir/initdemopostsql.sql\""
mysql $Pport $base < "$mydir/initdemopostsql.sql"
echo "mysql -P$port $base < \"$mydir/initdemopostsql.sql\""
mysql -P$port $base < "$mydir/initdemopostsql.sql"
else
echo No file initdemopostsql.sql found, so no extra sql action done.
fi
fi
if [ "x$res" = "x0" ]

File diff suppressed because one or more lines are too long

View File

@@ -4655,6 +4655,75 @@ INSERT INTO `llx_menu` VALUES (19289,'all',1,'cashdesk','top','cashdesk',0,NULL,
/*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_milestone`
--
DROP TABLE IF EXISTS `llx_milestone`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_milestone` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`fk_element` int(11) NOT NULL,
`elementtype` varchar(16) NOT NULL,
`label` varchar(255) NOT NULL,
`options` varchar(255) DEFAULT NULL,
`priority` int(11) DEFAULT '0',
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`fk_user_modif` int(11) DEFAULT NULL,
PRIMARY KEY (`rowid`),
UNIQUE KEY `uk_milestone_fk_element` (`fk_element`,`elementtype`),
KEY `idx_milestone_fk_user_modif` (`fk_user_modif`),
CONSTRAINT `fk_milestone_fk_user_modif` FOREIGN KEY (`fk_user_modif`) REFERENCES `llx_user` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_milestone`
--
LOCK TABLES `llx_milestone` WRITE;
/*!40000 ALTER TABLE `llx_milestone` DISABLE KEYS */;
INSERT INTO `llx_milestone` VALUES (2,779,'facture','azerty',NULL,0,'2013-03-09 12:19:30',NULL),(3,780,'facture','fsdf',NULL,0,'2013-03-09 13:01:08',NULL),(4,781,'facture','hhh',NULL,0,'2013-03-09 14:06:37',NULL);
/*!40000 ALTER TABLE `llx_milestone` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_monitoring_probes`
--
DROP TABLE IF EXISTS `llx_monitoring_probes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_monitoring_probes` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(64) NOT NULL,
`groupname` varchar(64) DEFAULT NULL,
`url` varchar(250) NOT NULL,
`useproxy` int(11) DEFAULT '0',
`checkkey` varchar(250) DEFAULT NULL,
`maxval` int(11) DEFAULT NULL,
`frequency` int(11) DEFAULT '60',
`active` int(11) DEFAULT '1',
`status` int(11) DEFAULT '0',
`lastreset` datetime DEFAULT NULL,
`oldesterrortext` text,
`oldesterrordate` datetime DEFAULT NULL,
PRIMARY KEY (`rowid`),
UNIQUE KEY `uk_monitoring_probes` (`title`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_monitoring_probes`
--
LOCK TABLES `llx_monitoring_probes` WRITE;
/*!40000 ALTER TABLE `llx_monitoring_probes` DISABLE KEYS */;
INSERT INTO `llx_monitoring_probes` VALUES (1,'aaa',NULL,'http://www.chiensderace.com',0,'chiens',1000,10,1,1,'2011-04-20 23:46:41',NULL,NULL),(2,'ChatsDeRace',NULL,'http://www.chatsderace.com',0,'chats',1000,5,1,1,'2011-04-20 23:46:41',NULL,NULL);
/*!40000 ALTER TABLE `llx_monitoring_probes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_notify`
--

View File

@@ -245,16 +245,6 @@ export list="
--ignore-table=$base.llx_c_ticketsup_category
--ignore-table=$base.llx_c_ticketsup_severity
--ignore-table=$base.llx_c_ticketsup_type
--ignore-table=$base.llx_cabinetmed_c_banques
--ignore-table=$base.llx_cabinetmed_c_examconclusion
--ignore-table=$base.llx_cabinetmed_cons_extrafields
--ignore-table=$base.llx_cabinetmed_diaglec
--ignore-table=$base.llx_cabinetmed_examaut
--ignore-table=$base.llx_cabinetmed_exambio
--ignore-table=$base.llx_cabinetmed_examenprescrit
--ignore-table=$base.llx_cabinetmed_motifcons
--ignore-table=$base.llx_cabinetmed_patient
--ignore-table=$base.llx_cabinetmed_societe
--ignore-table=$base.llx_congespayes
--ignore-table=$base.llx_congespayes_config
--ignore-table=$base.llx_congespayes_events
@@ -338,8 +328,6 @@ export list="
--ignore-table=$base.tmp_llx_accouting_account
--ignore-table=$base.tmp_llx_product_batch
--ignore-table=$base.tmp_llx_product_batch2
--ignore-table=$base.tmp_tmp
--ignore-table=$base.tmp_user
"
echo "mysqldump -P$port -u$admin -p***** $list $base > $mydir/$dumpfile"
mysqldump -P$port -u$admin $passwd $list $base > $mydir/$dumpfile

View File

@@ -21,7 +21,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -30,39 +30,39 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$error = 0;
$error=0;
$sourceserver = isset($argv[1]) ? $argv[1] : ''; // user@server:/src/file
$password = isset($argv[2]) ? $argv[2] : '';
$dataserver = isset($argv[3]) ? $argv[3] : '';
$database = isset($argv[4]) ? $argv[4] : '';
$loginbase = isset($argv[5]) ? $argv[5] : '';
$passwordbase = isset($argv[6]) ? $argv[6] : '';
$sourceserver=isset($argv[1])?$argv[1]:''; // user@server:/src/file
$password=isset($argv[2])?$argv[2]:'';
$dataserver=isset($argv[3])?$argv[3]:'';
$database=isset($argv[4])?$argv[4]:'';
$loginbase=isset($argv[5])?$argv[5]:'';
$passwordbase=isset($argv[6])?$argv[6]:'';
// Include Dolibarr environment
$res = 0;
if (!$res && file_exists($path."../../master.inc.php")) {
$res = @include $path."../../master.inc.php";
$res=0;
if (! $res && file_exists($path."../../master.inc.php")) {
$res=@include $path."../../master.inc.php";
}
if (!$res && file_exists($path."../../htdocs/master.inc.php")) {
$res = @include $path."../../htdocs/master.inc.php";
if (! $res && file_exists($path."../../htdocs/master.inc.php")) {
$res=@include $path."../../htdocs/master.inc.php";
}
if (!$res && file_exists("../master.inc.php")) {
$res = @include "../master.inc.php";
if (! $res && file_exists("../master.inc.php")) {
$res=@include "../master.inc.php";
}
if (!$res && file_exists("../../master.inc.php")) {
$res = @include "../../master.inc.php";
if (! $res && file_exists("../../master.inc.php")) {
$res=@include "../../master.inc.php";
}
if (!$res && file_exists("../../../master.inc.php")) {
$res = @include "../../../master.inc.php";
if (! $res && file_exists("../../../master.inc.php")) {
$res=@include "../../../master.inc.php";
}
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res = @include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
}
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res = @include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
}
if (!$res) {
if (! $res) {
die("Failed to include master.inc.php file\n");
}
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -72,13 +72,13 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
* Main
*/
$login = '';
$server = '';
$login='';
$server='';
if (preg_match('/^(.*)@(.*):(.*)$/', $sourceserver, $reg)) {
$login = $reg[1];
$server = $reg[2];
$sourcefile = $reg[3];
$targetfile = basename($sourcefile);
$login=$reg[1];
$server=$reg[2];
$sourcefile=$reg[3];
$targetfile=basename($sourcefile);
}
if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile) || empty($password) || empty($database) || empty($loginbase) || empty($passwordbase)) {
print "Usage: $script_file login@server:/src/file.(sql|gz|bz2) passssh databaseserver databasename loginbase passbase\n";
@@ -88,23 +88,22 @@ if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile
}
$targetdir = '/tmp';
$targetdir='/tmp';
print "Get dump file from server ".$server.", path ".$sourcefile.", connect with login ".$login." loaded into localhost\n";
$sftpconnectstring = $sourceserver;
$sftpconnectstring=$sourceserver;
print 'SFTP connect string : '.$sftpconnectstring."\n";
//print 'SFTP password '.$password."\n";
// SFTP connect
if (!function_exists("ssh2_connect")) {
dol_print_error('', 'ssh2_connect function does not exists');
exit(1);
if (! function_exists("ssh2_connect")) {
dol_print_error('', 'ssh2_connect function does not exists'); exit(1);
}
$connection = ssh2_connect($server, 22);
if ($connection) {
if (!@ssh2_auth_password($connection, $login, $password)) {
if (! @ssh2_auth_password($connection, $login, $password)) {
dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password), LOG_ERR);
exit(-5);
} else {
@@ -122,16 +121,16 @@ if ($connection) {
print 'Get file '.$sourcefile.' into '.$targetdir.$targetfile."\n";
ssh2_scp_recv($connection, $sourcefile, $targetdir.$targetfile);
$fullcommand = "cat ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
$fullcommand="cat ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
if (preg_match('/\.bz2$/', $targetfile)) {
$fullcommand = "bzip2 -c -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
$fullcommand="bzip2 -c -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
}
if (preg_match('/\.gz$/', $targetfile)) {
$fullcommand = "gzip -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
$fullcommand="gzip -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
}
print "Load dump with ".$fullcommand."\n";
$output = array();
$return_var = 0;
$output=array();
$return_var=0;
print strftime("%Y%m%d-%H%M%S").' '.$fullcommand."\n";
exec($fullcommand, $output, $return_var);
foreach ($output as $line) {

View File

@@ -21,7 +21,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -30,34 +30,34 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$error = 0;
$error=0;
$confirm = isset($argv[1]) ? $argv[1] : '';
$confirm=isset($argv[1])?$argv[1]:'';
// Include Dolibarr environment
$res = 0;
if (!$res && file_exists($path."../../master.inc.php")) {
$res = @include $path."../../master.inc.php";
$res=0;
if (! $res && file_exists($path."../../master.inc.php")) {
$res=@include $path."../../master.inc.php";
}
if (!$res && file_exists($path."../../htdocs/master.inc.php")) {
$res = @include $path."../../htdocs/master.inc.php";
if (! $res && file_exists($path."../../htdocs/master.inc.php")) {
$res=@include $path."../../htdocs/master.inc.php";
}
if (!$res && file_exists("../master.inc.php")) {
$res = @include "../master.inc.php";
if (! $res && file_exists("../master.inc.php")) {
$res=@include "../master.inc.php";
}
if (!$res && file_exists("../../master.inc.php")) {
$res = @include "../../master.inc.php";
if (! $res && file_exists("../../master.inc.php")) {
$res=@include "../../master.inc.php";
}
if (!$res && file_exists("../../../master.inc.php")) {
$res = @include "../../../master.inc.php";
if (! $res && file_exists("../../../master.inc.php")) {
$res=@include "../../../master.inc.php";
}
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res = @include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
}
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res = @include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
}
if (!$res) {
if (! $res) {
die("Failed to include master.inc.php file\n");
}
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -76,56 +76,56 @@ if (empty($confirm)) {
}
$tmp = dol_getdate(dol_now());
$tmp=dol_getdate(dol_now());
$tables = array(
'propal' => array(0 => 'datep', 1 => 'fin_validite', 2 => 'date_valid', 3 => 'date_cloture'),
'commande' => array(0 => 'date_commande', 1 => 'date_valid', 2 => 'date_cloture'),
'facture' => array(0 => 'datec', 1 => 'datef', 2 => 'date_valid', 3 => 'date_lim_reglement'),
'paiement' => array(0 => 'datep'),
'bank' => array(0 => 'datev', 1 => 'dateo'),
'commande_fournisseur' => array(0 => 'date_commande', 1 => 'date_valid', 3 => 'date_creation', 4 => 'date_approve', 5 => 'date_approve2', 6 => 'date_livraison'),
'supplier_proposal' => array(0 => 'datec', 1 => 'date_valid', 2 => 'date_cloture'),
'expensereport' => array(0 => 'date_debut', 1 => 'date_fin', 2 => 'date_create', 3 => 'date_valid', 4 => 'date_approve', 5 => 'date_refuse', 6 => 'date_cancel'),
'holiday' => array(0 => 'date_debut', 1 => 'date_fin', 2 => 'date_create', 3 => 'date_valid', 5 => 'date_refuse', 6 => 'date_cancel'),
'ticket' => array(0 => 'datec', 1 => 'date_read', 2 => 'date_close')
$tables=array(
'propal'=>array(0=>'datep', 1=>'fin_validite', 2=>'date_valid', 3=>'date_cloture'),
'commande'=>array(0=>'date_commande', 1=>'date_valid', 2=>'date_cloture'),
'facture'=>array(0=>'datec', 0=>'datef', 1=>'date_valid', 2=>'date_lim_reglement'),
'paiement'=>array(0=>'datep'),
'bank'=>array(0=>'datev', 1=>'dateo'),
'commande_fournisseur'=>array(0=>'date_commande', 1=>'date_valid', 3=>'date_creation', 4=>'date_approve', 5=>'date_approve2', 6=>'date_livraison'),
'supplier_proposal'=>array(0=>'datec', 1=>'date_valid', 2=>'date_cloture'),
'expensereport'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 4=>'date_approve', 5=>'date_refuse', 6=>'date_cancel'),
'holiday'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 5=>'date_refuse', 6=>'date_cancel'),
'ticket'=>array(0=>'datec', 1=>'date_read', 2=>'date_close')
);
$year = 2010;
$currentyear = $tmp['year'];
$year=2010;
$currentyear=$tmp['year'];
while ($year <= $currentyear) {
//$year=2021;
$delta1 = ($currentyear - $year);
$delta2 = ($currentyear - $year - 1);
$delta1=($currentyear - $year);
$delta2=($currentyear - $year - 1);
//$delta=-1;
if ($delta1) {
foreach ($tables as $tablekey => $tableval) {
print "Correct ".$tablekey." for year ".$year." and move them to current year ".$currentyear." ";
$sql = "select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
//$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." > NOW()";
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$i=0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
$obj=$db->fetch_object($resql);
if ($obj) {
print ".";
$sql2 = "UPDATE ".MAIN_DB_PREFIX.$tablekey." set ";
$j = 0;
$sql2="UPDATE ".MAIN_DB_PREFIX.$tablekey." set ";
$j=0;
foreach ($tableval as $field) {
if ($j) {
$sql2 .= ", ";
$sql2.=", ";
}
$sql2 .= $field." = ".$db->ifsql("DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR) > NOW()", "DATE_ADD(".$field.", INTERVAL ".$delta2." YEAR)", "DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR)");
$sql2.= $field." = ".$db->ifsql("DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR) > NOW()", "DATE_ADD(".$field.", INTERVAL ".$delta2." YEAR)", "DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR)");
$j++;
}
$sql2 .= " WHERE rowid = ".$obj->rowid;
$sql2.=" WHERE rowid = ".$obj->rowid;
//print $sql2."\n";
$resql2 = $db->query($sql2);
if (!$resql2) {
if (! $resql2) {
dol_print_error($db);
}
}

View File

@@ -23,7 +23,6 @@ Method to encode/decode ZATCA string is available in test/phpunit/BarcodeTest.ph
* FOR QR-Bill in switzerland - Facture-QR
-----------------------------------------
Syntax of QR Code - See file ig-qr-bill-v2.2-fr.pdf (more doc on https://www.swiss-qr-invoice.org/downloads/)
Syntax of complementary field named "structured information of invoice S1": https://www.swiss-qr-invoice.org/downloads/qr-bill-s1-syntax-fr.pdf
Syntax of complentary field named "structured information of invoice S1": https://www.swiss-qr-invoice.org/downloads/qr-bill-s1-syntax-fr.pdf
To test/validate: https://www.swiss-qr-invoice.org/validator/

View File

@@ -133,7 +133,7 @@
<rule ref="Generic.Formatting.SpaceAfterCast" />
<rule ref="Generic.Functions.CallTimePassByReference" />
<!-- <rule ref="Generic.Functions.CallTimePassByReference" /> -->
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />

View File

@@ -13,7 +13,7 @@
# fail2ban-client status web-accesslog-limit403
#
# To test rule file on a existing log file
# fail2ban-regex /var/log/apache2/access.log /etc/fail2ban/filter.d/web-accesslog-limit403.conf --print-all-matched
# fail2ban-regex /var/log/apache2/access.log /etc/fail2ban/filter.d/web-accesslog-limit403.conf
failregex = <HOST> - - .*HTTP/[0-9]+(.[0-9]+)?" 403
ignoreregex =

View File

@@ -13,7 +13,7 @@
# fail2ban-client status web-dolibarr-limitpublic
#
# To test rule file on a existing log file
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-limitpublic.conf --print-all-matched
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-limitpublic.conf
failregex = ^ [A-Z\s]+ <HOST>\s+--- Access to .*/public/
ignoreregex =

View File

@@ -13,7 +13,7 @@
# fail2ban-client status web-dolibarr-rulesbruteforce
#
# To test rule file on a existing log file
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf --print-all-matched
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf
failregex = ^ [A-Z\s]+ <HOST>\s+functions_.*::check_user_.* Authentication KO
ignoreregex =

View File

@@ -13,7 +13,7 @@
# fail2ban-client status web-dolibarr-rulespassforgotten
#
# To test rule file on a existing log file
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf --print-all-matched
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf
failregex = ^ [A-Z\s]+ <HOST>\s+--- Access to .*/passwordforgotten.php - action=buildnewpassword
ignoreregex =

View File

@@ -3,10 +3,10 @@ QODANA TUTO
This README explains how to use qodana to generate static analytics reports on the code
Install docker
apt install docker
Install qodana into ~/.loca/bin/qodana
curl -fsSL https://jb.gg/qodana-cli/install | bash
Install qodana
To run inspection on CLI
cd ~/git/dirtoscan

View File

@@ -1,15 +0,0 @@
= Install SonarQube locally
Check you are using Install Java SDK 17
java --version must show 61
To install java sdk 17 on ubuntu:
sudo apt update
sudo apt install -y openjdk-17-jdk
Unzip the sonar package into a directory
Edit the file conf/sonar.properties to modify port 9000 and 9001 (already used by Eclipse or xdebug) into 9080 and 9081
Launch sonar with
bin/linux*/sonar.sh console

View File

@@ -1 +1 @@
Files and tools of a skeleton to build a module were moved into htdocs/modulebuilder/template
Files and tools were moved into htdocs/modulebuilder/template

View File

@@ -1 +0,0 @@
/vendor/

View File

@@ -1,438 +0,0 @@
#!/usr/bin/env php
<?php
/*
* Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file dev/tools/apstats.php
* \brief Script to report Advanced Statistics on a coding project
*/
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__) . '/';
// Test si mode batch
$sapi_type = php_sapi_name();
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute " . $script_file . " from command line, you must use PHP for CLI mode.\n";
exit();
}
error_reporting(E_ALL & ~E_DEPRECATED);
define('PRODUCT', "apstats");
define('VERSION', "1.0");
$phpstanlevel = 2;
print '***** '.constant('PRODUCT').' - '.constant('VERSION').' *****'."\n";
if (empty($argv[1])) {
print 'You must run this tool being into the root of the project.'."\n";
print 'Usage: '.constant('PRODUCT').'.php pathto/outputfile.html [--dir-scc=pathtoscc] [--dir-phpstan=pathtophpstan]'."\n";
print 'Example: '.constant('PRODUCT').'.php documents/apstats/index.html --dir-scc=/snap/bin --dir-phpstan=~/git/phpstan/htdocs/includes/bin';
exit(0);
}
$outputpath = $argv[1];
$outputdir = dirname($outputpath);
$outputfile = basename($outputpath);
if (!is_dir($outputdir)) {
print 'Error: dir '.$outputdir.' does not exists or is not writable'."\n";
exit(1);
}
$dirscc = '';
$dirphpstan = '';
$i = 0;
while ($i < $argc) {
$reg = array();
if (preg_match('/--dir-scc=(.*)$/', $argv[$i], $reg)) {
$dirscc = $reg[1];
}
if (preg_match('/--dir-phpstan=(.*)$/', $argv[$i], $reg)) {
$dirphpstan = $reg[1];
}
$i++;
}
$timestart = time();
// Count lines of code of Dolibarr itself
/*
$commandcheck = 'cloc . --exclude-dir=includes --exclude-dir=custom --ignore-whitespace --vcs=git';
$resexec = shell_exec($commandcheck);
$resexec = (int) (empty($resexec) ? 0 : trim($resexec));
// Count lines of code of external dependencies
$commandcheck = 'cloc htdocs/includes --ignore-whitespace --vcs=git';
$resexec = shell_exec($commandcheck);
$resexec = (int) (empty($resexec) ? 0 : trim($resexec));
*/
// Count lines of code of application
$commandcheck = ($dirscc ? $dirscc.'/' : '').'scc . --exclude-dir=htdocs/includes,htdocs/custom,htdocs/theme/common/fontawesome-5,htdocs/theme/common/octicons';
print 'Execute SCC to count lines of code in project: '.$commandcheck."\n";
$output_arrproj = array();
$resexecproj = 0;
exec($commandcheck, $output_arrproj, $resexecproj);
// Count lines of code of dependencies
$commandcheck = ($dirscc ? $dirscc.'/' : '').'scc htdocs/includes htdocs/theme/common/fontawesome-5 htdocs/theme/common/octicons';
print 'Execute SCC to count lines of code in dependencies: '.$commandcheck."\n";
$output_arrdep = array();
$resexecdep = 0;
exec($commandcheck, $output_arrdep, $resexecdep);
// Get technical debt
$commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --level='.$phpstanlevel.' -v analyze -a build/phpstan/bootstrap.php --memory-limit 5G --error-format=github';
print 'Execute PHPStan to get the technical debt: '.$commandcheck."\n";
$output_arrtd = array();
$resexectd = 0;
exec($commandcheck, $output_arrtd, $resexectd);
$arrayoflineofcode = array();
$arraycocomo = array();
$arrayofmetrics = array(
'proj' => array('Bytes' => 0, 'Files' => 0, 'Lines' => 0, 'Blanks' => 0, 'Comments' => 0, 'Code' => 0, 'Complexity' => 0),
'dep' => array('Bytes' => 0, 'Files' => 0, 'Lines' => 0, 'Blanks' => 0, 'Comments' => 0, 'Code' => 0, 'Complexity' => 0)
);
// Analyse $output_arrproj
foreach (array('proj', 'dep') as $source) {
print 'Analyze SCC result for lines of code for '.$source."\n";
if ($source == 'proj') {
$output_arr = &$output_arrproj;
} elseif ($source == 'dep') {
$output_arr = &$output_arrdep;
} else {
print 'Bad value for $source';
die();
}
foreach ($output_arr as $line) {
if (preg_match('/^(───|Language|Total)/', $line)) {
continue;
}
//print $line."<br>\n";
if (preg_match('/^Estimated Cost.*\$(.*)/i', $line, $reg)) {
$arraycocomo[$source]['currency'] = preg_replace('/[^\d\.]/', '', str_replace(array(',', ' '), array('', ''), $reg[1]));
}
if (preg_match('/^Estimated Schedule Effort.*\s([\d\s,]+)/i', $line, $reg)) {
$arraycocomo[$source]['effort'] = str_replace(array(',', ' '), array('.', ''), $reg[1]);
}
if (preg_match('/^Estimated People.*\s([\d\s,]+)/i', $line, $reg)) {
$arraycocomo[$source]['people'] = str_replace(array(',', ' '), array('.', ''), $reg[1]);
}
if (preg_match('/^Processed\s(\d+)\s/i', $line, $reg)) {
$arrayofmetrics[$source]['Bytes'] = $reg[1];
}
if (preg_match('/^(.*)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)$/', $line, $reg)) {
$arrayoflineofcode[$source][$reg[1]]['Files'] = $reg[2];
$arrayoflineofcode[$source][$reg[1]]['Lines'] = $reg[3];
$arrayoflineofcode[$source][$reg[1]]['Blanks'] = $reg[4];
$arrayoflineofcode[$source][$reg[1]]['Comments'] = $reg[5];
$arrayoflineofcode[$source][$reg[1]]['Code'] = $reg[6];
$arrayoflineofcode[$source][$reg[1]]['Complexity'] = $reg[7];
}
}
if (!empty($arrayoflineofcode[$source])) {
foreach ($arrayoflineofcode[$source] as $key => $val) {
$arrayofmetrics[$source]['Files'] += $val['Files'];
$arrayofmetrics[$source]['Lines'] += $val['Lines'];
$arrayofmetrics[$source]['Blanks'] += $val['Blanks'];
$arrayofmetrics[$source]['Comments'] += $val['Comments'];
$arrayofmetrics[$source]['Code'] += $val['Code'];
$arrayofmetrics[$source]['Complexity'] += $val['Complexity'];
}
}
}
$timeend = time();
/*
* View
*/
$html = '<html>'."\n";
$html .= '<meta charset="utf-8">'."\n";
$html .= '<meta http-equiv="refresh" content="300">'."\n";
$html .= '<meta name="viewport" content="width=device-width, initial-scale=1.0">'."\n";
$html .= '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" integrity="sha512-q3eWabyZPc1XTCmF+8/LuE1ozpg5xxn7iO89yfSOd5/oKvyqLngoNGsx8jq92Y8eXJ/IRxQbEC+FGSYxtk2oiw==" crossorigin="anonymous" referrerpolicy="no-referrer" />'."\n";
$html .= '<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js" integrity="sha512-3gJwYpMe3QewGELv8k/BX9vcqhryRdzRMxVfq6ngyWXwo03GFEzjsUm8Q7RZcHPHksttq7/GFoxjCVUjkjvPdw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>'."\n";
$html .= '
<style>
body {
margin: 10px;
margin-left: 50px;
margin-right: 50px;
}
h1 {
font-size: 1.5em;
font-weight: bold;
padding-top: 5px;
padding-bottom: 5px;
margin-top: 5px;
margin-bottom: 5px;
}
header {
text-align: center;
}
header, section.chapter {
margin-top: 10px;
margin-bottom: 10px;
padding: 10px;
}
table {
border-collapse: collapse;
}
th,td {
padding-top: 5px;
padding-bottom: 5px;
padding-left: 10px;
padding-right: 10px;
}
.left {
text-align: left;
}
.right {
text-align: right;
}
.nowrap {
white-space: nowrap;
}
.opacitymedium {
opacity: 0.5;
}
.centpercent {
width: 100%;
}
.hidden {
display: none;
}
.trgroup {
background-color: #EEE;
}
.seedetail {
color: #000088;
cursor: pointer;
}
.box {
padding: 20px;
font-size: 1.2em;
margin-top: 10px;
margin-bottom: 10px;
width: 200px;
}
.box.inline-box {
display: inline-block;
text-align: center;
margin-left: 10px;
}
.back1 {
background-color: #884466;
color: #FFF;
}
.back2 {
background-color: #664488;
color: #FFF;
}
div.fiche>form>div.div-table-responsive {
min-height: 392px;
}
div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min {
overflow-x: auto;
}
.div-table-responsive {
line-height: 120%;
}
.div-table-responsive, .div-table-responsive-no-min {
overflow-x: auto;
min-height: 0.01%;
}
/* Force values for small screen 767 */
@media only screen and (max-width: 767px)
{
body {
margin: 5px;
margin-left: 5px;
margin-right: 5px;
}
}
</style>'."\n";
$html .= '<body>'."\n";
$html .= '<header>'."\n";
$html .= '<h1>Advanced Project Statistics</h1>'."\n";
$currentDate = date("Y-m-d H:i:s"); // Format: Year-Month-Day Hour:Minute:Second
$html .= '<span class="opacitymedium">Generated on '.$currentDate.' in '.($timeend - $timestart).' seconds</span>'."\n";
$html .= '</header>'."\n";
$html .= '<section class="chapter" id="linesofcode">'."\n";
$html .= '<h2>Lines of code</h2>'."\n";
$html .= '<div class="div-table-responsive">'."\n";
$html .= '<table class="centpercent">';
$html .= '<tr class="loc">';
$html .= '<th class="left">Language</th>';
$html .= '<th class="right">Bytes</th>';
$html .= '<th class="right">Files</th>';
$html .= '<th class="right">Lines</th>';
$html .= '<th class="right">Blanks</th>';
$html .= '<th class="right">Comments</th>';
$html .= '<th class="right">Code</th>';
//$html .= '<td class="right">'.$val['Complexity'].'</td>';
$html .= '</tr>';
foreach (array('proj', 'dep') as $source) {
$html .= '<tr class="trgroup" id="source'.$source.'">';
if ($source == 'proj') {
$html .= '<td>All files without dependencies';
} elseif ($source == 'dep') {
$html .= '<td>All files of dependencies only';
}
$html .= ' &nbsp; &nbsp; <span class="seedetail" data-source="'.$source.'">(See detail per file type...)</span>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Bytes']).'</td>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Files']).'</td>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Lines']).'</td>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Blanks']).'</td>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Comments']).'</td>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Code']).'</td>';
$html .= '<td></td>';
$html .= '</tr>';
if (!empty($arrayoflineofcode[$source])) {
foreach ($arrayoflineofcode[$source] as $key => $val) {
$html .= '<tr class="loc hidden source'.$source.' language'.str_replace(' ', '', $key).'">';
$html .= '<td>'.$key.'</td>';
$html .= '<td class="right"></td>';
$html .= '<td class="right nowrap">'.(empty($val['Files']) ? '' : formatNumber($val['Files'])).'</td>';
$html .= '<td class="right nowrap">'.(empty($val['Lines']) ? '' : formatNumber($val['Lines'])).'</td>';
$html .= '<td class="right nowrap">'.(empty($val['Blanks']) ? '' : formatNumber($val['Blanks'])).'</td>';
$html .= '<td class="right nowrap">'.(empty($val['Comments']) ? '' : formatNumber($val['Comments'])).'</td>';
$html .= '<td class="right nowrap">'.(empty($val['Code']) ? '' : formatNumber($val['Code'])).'</td>';
//$html .= '<td class="right">'.(empty($val['Complexity']) ? '' : $val['Complexity']).'</td>';
$html .= '<td class="nowrap">TODO graph here...</td>';
$html .= '</tr>';
}
}
}
$html .= '<tr class="trgroup">';
$html .= '<td class="left">Total</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Bytes'] + $arrayofmetrics['dep']['Bytes']).'</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Files'] + $arrayofmetrics['dep']['Files']).'</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Lines'] + $arrayofmetrics['dep']['Lines']).'</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Blanks'] + $arrayofmetrics['dep']['Blanks']).'</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Comments'] + $arrayofmetrics['dep']['Comments']).'</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Code'] + $arrayofmetrics['dep']['Code']).'</td>';
//$html .= '<td>'.$arrayofmetrics['Complexity'].'</td>';
$html .= '<td></td>';
$html .= '</tr>';
$html .= '</table>';
$html .= '</div>';
$html .= '</section>'."\n";
$html .= '<section class="chapter" id="projectvalue">'."\n";
$html .= '<h2>Project value</h2><br>'."\n";
$html .= '<div class="box inline-box back1">';
$html .= 'COCOMO (Basic organic model) value:<br>';
$html .= '<b>$'.formatNumber((empty($arraycocomo['proj']['currency']) ? 0 : $arraycocomo['proj']['currency']) + (empty($arraycocomo['dep']['currency']) ? 0 : $arraycocomo['dep']['currency']), 2).'</b>';
$html .= '</div>';
$html .= '<div class="box inline-box back2">';
$html .= 'COCOMO (Basic organic model) effort<br>';
$html .= '<b>'.formatNumber($arraycocomo['proj']['people'] * $arraycocomo['proj']['effort'] + $arraycocomo['dep']['people'] * $arraycocomo['dep']['effort']);
$html .= ' monthes people</b><br>';
$html .= '</section>'."\n";
$tmp = '';
$nblines = 0;
foreach ($output_arrtd as $line) {
$reg = array();
//print $line."\n";
preg_match('/^::error file=(.*),line=(\d+),col=(\d+)::(.*)$/', $line, $reg);
if (!empty($reg[1])) {
$tmp .= '<tr><td>'.$reg[1].'</td><td>'.$reg[2].'</td><td>'.$reg[4].'</td></tr>'."\n";
$nblines++;
}
}
$html .= '<section class="chapter" id="technicaldebt">'."\n";
$html .= '<h2>Technical debt <span class="opacitymedium">(PHPStan level '.$phpstanlevel.' -> '.$nblines.' warnings)</span></h2><br>'."\n";
$html .= '<div class="div-table-responsive">'."\n";
$html .= '<table class="list_technical_debt">'."\n";
$html .= '<tr><td>File</td><td>Line</td><td>Type</td></tr>'."\n";
$html .= $tmp;
$html .= '</table>';
$html .= '</div>';
$html .= '</section>'."\n";
$html .= '
<script>
$(document).ready(function() {
$( ".seedetail" ).on( "click", function() {
var source = $(this).attr("data-source");
console.log("Click on "+source);
jQuery(".source"+source).toggle();
} );
});
</script>
';
$html .= '</body>';
$html .= '</html>';
$fh = fopen($outputpath, 'w');
if ($fh) {
fwrite($fh, $html);
fclose($fh);
print 'Generation of output file '.$outputfile.' done.'."\n";
} else {
print 'Failed to open '.$outputfile.' for ouput.'."\n";
}
/**
* function to format a number
*
* @param string|int $number Number to format
* @param int $nbdec Number of decimal digits
* @return string Formated string
*/
function formatNumber($number, $nbdec = 0)
{
return number_format($number, 0, '.', ' ');
}

View File

@@ -1,11 +1,9 @@
# List of words codespell will ignore
# one per line, must be in lower case.
# one per line, case-sensitive (when not lowercase)
# PROVid
provid
# PostgreSQL
postgresql
# ZAR currency
zar
alltime
ba
@@ -21,7 +19,6 @@ contaxt
courant
datea
datee
doubleclick
errorstring
exten
falsy

View File

@@ -4,7 +4,6 @@
// Conversion du PDF en image png si fichier png non existant
// Save a stripe payment was done in realy life so later we will be able to force a commit on recorded payments
// To make a Stripe SEPA payment request, we must have the payment mode source already saved into societe_rib and retreived with ->sepaStripe
// If old value crypted in database is same than submited new value, it means we don't change it, so we don't update.
//break; // No break for sortfield and sortorder so we can cumulate fields (is it realy usefull ?)
$errmsg = 'Failed to retreive paymentintent or charge from id';
$minifile = getImageFileNameForSize($fileinfo['basename'], '_mini'); // For new thumbs using same ext (in lower case howerver) than original
@@ -36,19 +35,15 @@
// remove invalid value, as it didnt match anything
// we dont use the rank from orderline because we may have lines from several orders
dol_syslog("makeStripeSepaRequest get stripe connet account", LOG_DEBUG);
if (isset($this->oldcopy->array_options["options_".$key]) && $this->array_options["options_".$key] == $this->oldcopy->array_options["options_".$key]) { // If old value crypted in database is same than submited new value, it means we don't change it, so we don't update.
print '<input type="hidden" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; // class is requied to be used by javascript callForResult();
print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; // class is requied to be used by javascript callForResult();
print 'jQuery("select[name=\''.$paramkey.'\']").focus();'."\n"; // Not really usefull, but we keep it in case of.
$filles[$obj->fk_categorie_fille] = 1; // Set record for this child
$i2++; // a criteria for 1 more field was added to string (we can add several citeria for the same field as it is a multiselect search criteria)
$invoiceid = -1; // There is more than one invoice payed by this payment
$line->pa_ht = $line->pa_ht; // we choosed to have buy/cost price always positive, so no revert of sign here
$mesg .= '<br>Unkown Error, please refers to your administrator';
$result = $adh->setPassword($user, $this->pass, (!getDolGlobalString('DATABASE_PWD_ENCRYPTED') ? 0 : 1), 1); // Cryptage non gere dans module adherent
$result = $adh->setPassword($user, $this->pass, (empty($conf->global->DATABASE_PWD_ENCRYPTED) ? 0 : 1), 1); // Cryptage non gere dans module adherent
$result = $line->insert(0, 1); // When creating credit note with same lines than source, we must ignore error if discount alreayd linked
$s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297);
$value = ((!empty($this->array_options) && array_key_exists("options_".$key.$keysuffix, $this->array_options)) ? $this->array_options["options_".$key.$keysuffix] : null); // Value may be cleaned or formated later
$ways = $c->print_all_ways(' &gt;&gt; ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text
'capture' => true, // Charge immediatly
@@ -71,13 +66,10 @@
// Show subproducts of product (not recommanded)
// TODO Que faire si update echoue car on update avec un login deja existant pour un autre compte.
// dont try to send email if no recipient
// note: $cs->mandate contians ID of mandate on Stripe side
// nous avons au moins une reponse
// nous n'avons pas de reponse => n'existe pas
//'visible'=>$fille->visible,
break; // break for loop incase of error
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - found old pass in database", LOG_WARNING);
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - hash ".$cryptType." of pass is ok");
hide: { delay: 50 }, /* If I enable effect:\'toggle\' here, a bug appears: the tooltip is shown when collpasing a new dir if it was shown before */
if ($reg[1] == 'thi') { // Third-party
if (empty($objMod->dictionaries) && !empty($objMod->dictionnaries)) {
@@ -95,7 +87,6 @@
$repid[$obj->id] = $label;
$reponsesadd = str_split($obj->reponses);
$s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297);
$s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297);
$serie[$i] .= 'd' . $i . '.push([' . $x . ', ' . $y . ']);' . "\n";
$serie[$i] .= 'd' . $i . '.push({"label":"' . dol_escape_js($legends[$x]) . '", "data":' . $y . '});' . "\n";
$sql .= " SET reponses = '".$db->escape($reponsesadd)."'";
@@ -116,7 +107,6 @@
// Label mouvement
// Login is successfull with this method
// Lot/serie
// Message-ID=A, In-Reply-To=B, References=B and message can BE an answer but may be NOT (for example a transfer of an email rewriten)
// Message-ID=A, In-Reply-To=B, References=B and message can BE an answer or NOT (a transfer rewriten)
// Not a recongized record
// Note: This suppose that "pass_indatabase_crypted" is a md5 (guaranted by the previous test if "(empty($conf->global->MAIN_SECURITY_HASH_ALGO))"
@@ -163,9 +153,6 @@
$heigth = $tmp[3];
$info[$conf->global->LDAP_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
$info[getDolGlobalString('LDAP_FIELD_PASSWORD')] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
$info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
$objectoffield = $object; //For compatibily with the computed formula
$optstart .= ' data-tvatx-formated="' . dol_escape_htmltag(price($objp->tva_tx, 0, $langs, 1, -1, 2)) . '"';
$optstart .= ' data-tvatx-formated="'.dol_escape_htmltag(price($objp->tva_tx, 0, $langs, 1, -1, 2)).'"';
$outprice_ht = price($objp->price); // formated for langage user because is inserted into input field
@@ -180,7 +167,6 @@
$this->user_closing = $cluser;
$this->user_cloture = $cluser;
$usertime = 0; // We dont modify date because we want to have date into memory datep and datef stored as GMT date. Compensation will be done during output.
$valuetoshow = ucfirst($value); // Par defaut
$ways = $c->print_all_ways(' &gt;&gt; ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text
&& $obj->status != $tmpobject::STATUS_ABANDONED // Not abandonned
'adress'=>$obj->adress,
@@ -188,7 +174,6 @@
'transparency'=>$object->transparency, // Force transparency on onwer from preoperty of event
/* Remove selected id as soon as we type or delete a char (it means old selection is wrong). Use keyup/down instead of change to avoid loosing the product id. This is needed only for select of predefined product */
/*case 'select': // Not required, we chosed value='0' for undefined values
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again whith the caller
// Batch number managment
// Calculcate number of days consumed
// Cas des factures liees par un autre objet (ex: commande)
@@ -198,7 +183,6 @@
// For exemple, we may have error: 'No such customer: cus_XXXXX; a similar object exists in live mode, but a test mode key was used to make this request.'
// For full day events, date are also GMT but they wont but converted using tz during output
// If translation exists, we use it, otherwise, we use tha had coded label
// If we want to closed payed invoices
// Line dates planed
// Message-ID=A, In-Reply-To=B, References=B and message can BE an answer or NOT (a transfer rewriten)
// Note: $obj->halfday is 0:Full days, 2:Sart afternoon end morning, -1:Start afternoon, 1:End morning
@@ -207,10 +191,8 @@
// On selectionne les groupes auquel fait parti le user
// On verifie l'emplacement du modele
// Onwer
// Option to reload page to retrieve customer informations. Note, this clear other input
// Produit non deja existant
// Search submenu fot this mainmenu entry
// Selection of all product stock mouvements that contains batchs
// Si safe_mode on et command hors du parametre exec, on a un fichier out vide donc errormsg vide
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
// Strip off the beggining '<'
@@ -231,7 +213,6 @@
// at a time, and thats just stupid, so lets just hope this doesnt appear anywhere in the actual data
// de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur).
// if we have a PROJECTLEADER contact and we dont use it as recipient we store the contact object for later use
// multiselect array convert html entities into options tags, even if we dont want this, so we encode them a second time
// save curent cell padding
//$sql .= " AND (status <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason
//Esle it's separated key/value and coma list
@@ -250,7 +231,6 @@
error="Database $dbname NOT successfully droped. You have to do it manually."
foreach ($cats as $fille) {
if (!empty($childrens)) {
if (!getDolGlobalString('PROJECT_DISABLE_UNLINK_FROM_OVERVIEW') || $user->admin) { // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true
if (!isset($filles[$obj->fk_categorie_fille])) { // Only one record as child (a child has only on parent).
if ($conf->file->mailing_limit_sendbyweb != '-1') { // MAILING_LIMIT_SENDBYWEB was set to -1 in database, but it is allowed ot increase it.
if ($login && $login != '--bad-login-validity--') { // Login is successfull
@@ -266,29 +246,20 @@
jQuery("#mouvement").trigger("change");
print "ERROR: Failed to include file '".$filephp."'. Try to edit and re-save page ith this ID.";
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
setEventMessages($langs->trans('Bad value for email, emai lwas not verified by Google'), null, 'errors');
} else { // Pour les autres schémas, les membres sont listés sous forme de DN complets
$newmenu->add("/compta/stats/comp.php?leftmenu=report","Transforme",2,$user->hasRight('compta', 'resultat', 'lire'));
* Section Creditor (sepa Crediteurs bloc lines)
* Section Debitor (sepa Debiteurs bloc lines)
"confirm" => $confirmnow, // Do not confirm immediatly during creation of intent
"confirm" => $confirmnow, // try to confirm immediatly after create (if conditions are ok)
$ErrorLongMsg = "Session expired. Can't retreive PaymentType. Payment has not been validated.";
$accountparent->account_number = $obj->account_number2; // Sotre an account number for output
$action = 'transfert';
$allways = $parent->get_all_ways();
$bugbaseurl .= urlencode("## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…)\n");
$childs[] = array_combine($keys, $values);
$curent = getDolGlobalString($thisTypeConfName, getDolGlobalString('FACTURE_ADDON_PDF'));
$filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$info[$conf->global->LDAP_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
$info[getDolGlobalString('LDAP_FIELD_PASSWORD')] = $this->pass; // this->pass = mot de passe non crypte
$info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')] = $this->pass; // this->pass = mot de passe non crypte
$initialY = $tab_top + 7;
$invoicestatic->statut = $obj->fk_statut; // For backward comaptibility
$jsListType .= (!empty($jsListType) ? ',' : '').'"'.$type.'":"'.$curent.'"';
$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $showmode, '', 'project', 'list');
$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : '').'&search_status=99', $langs->trans("List"), 1, $showmode, '', 'project', 'list');
$object->actionmsg = dol_concatdesc($object->actionmsg, "\n".$langs->transnoentities("AttachedFiles").': '.$attachs);
@@ -297,16 +268,13 @@
$paramfortooltiptd .= ' title="' . ($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)) . '"'; // Attribut to put on td tag to store tooltip
$paramfortooltiptd .= ' title="'.($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)).'"'; // Attribut to put on td tag to store tooltip
$showfield = 1; // Par defaut
$societe->note_private = "Default customer automaticaly created by Point Of Sale module activation. Can be used as the default generic customer in the Point Of Sale setup. Can also be edited or removed if you don't need a generic customer.";
$tagdatabase = true; // We don't know what it was before, so now we consider we are version choosed.
$this->category->childs[] = $this->_cleanObjectDatas($cat);
$this->civility_id = $obj->civility_code; // Bad. Kept for backard compatibility
$this->date_delivery = $this->db->jdate($obj->date_delivery); // Date planed
$this->liste_array = $repid;
$this->statut = self::STATUS_DRAFT; // dperecated
$this->stringtoshow .= $serie[$i] . "\n";
$this->stringtoshow .= $this->mirrorGraphValues ? '[' . -$serie[$i] . ',' . $serie[$i] . ']' : $serie[$i];
$this->stringtoshow .= $this->mirrorGraphValues ? '[-' . $serie[$i] . ',' . $serie[$i] . ']' : $serie[$i];
$this->stringtoshow .= ' data: [' . $serie[$i] . ']';
$this->stringtoshow .= '<!-- Serie ' . $i . ' -->' . "\n";
$tmp = array('id_users'=>$obj->id_users, 'nom'=>$obj->name, 'reponses'=>$obj->reponses);
@@ -319,10 +287,8 @@
/* Removed due to awful harcoded values
/*case 'select': // Not required, we chosed value='0' for undefined values
// $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again whith the caller
// Add entry into bank accoun
// Add field of attribut
// Add link to the Direct Debit if invoice redused ('InvoiceRefused') in bank_url
// Ajout de l'utilisateur dans le groupe
// Batch number managment
// By default, electronic transfert from bank to bank
@@ -341,7 +307,6 @@
// Fonctions de conversion non presente dans ce PHP
// Get lines of sources alread delivered
// Get next free nuber for the ref of bon
// Get next free nunber for the ref of bon prelevement
// If create form is coming from same page, it means that post was sent but an error occured
// If not abandonned
// If option "one bill per third" is set, and an invoice for this thirdparty was already created, we re-use it.
@@ -358,12 +323,10 @@
// No temp directory provided, so we are not able to support convertion of data:image into physical images.
// On verifie l'emplacement du modele
// Option to reload page to retrieve customer informations. Note, this clear other input
// Or set status to "In porgress" if the client has answered and if the ticket has started
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
// Payment informations
// Proprietes particulieres a facture de remplacement
// Recursive call if there is childs to child
// Retreive lines
// See example with selectsearchbox.php. This case is reserverd for the selectesearchbox.php so we can
// Seperate "Real Name" from eMail address
// Should not happend. Entries are added
@@ -373,13 +336,11 @@
// Subscription informations
// TODO : if base exists in unit dictionary table, remove this convertion exception and update convertion infos in database.
// TODO Can we set it to submited ?
// TODO Replace this with a checkbox for each payment mode: "Send request to XXX immediatly..."
// TODO We can't, we dont' have full path of file, only last_main_doc and ->element, so we must first rebuild full path $destfull
// This convert an embedd file with src="/viewimage.php?modulepart... into a cid link
// This make 12 calls for each accountancy account (12 monthes M)
// Validate immediatly the order
// Warning, the function may add a LF so we are forced to trim to compare with old $out without having always a difference and an infinit loop.
// We chack if file exists
// We check if lines of invoice are not already transfered into accountancy
// We dont want on all entities, we delete all and current
// We must filter on assignement table
@@ -408,10 +369,8 @@
continue; // The field was not submited to be saved
dol_syslog("The user login has a validity between [".$user->datestartvalidity." and ".$user->dateendvalidity."], curren date is ".dol_now());
dol_syslog("functions_isallowed::check_user_api_key Authentication KO for '".$login."': The user login has a validity between [".$fuser->datestartvalidity." and ".$fuser->dateendvalidity."], curren date is ".dol_now());
dol_syslog('Bad password, connexion refused (see a previous notice message for more info)', LOG_NOTICE);
dol_syslog('Bad password, connexion refused', LOG_DEBUG);
dol_syslog('Bad value for code, connexion refused');
dol_syslog('Bad value for code, connexion refused', LOG_NOTICE);
dol_syslog('Call fetch_barcode with barcode_type not defined and cant be guessed', LOG_WARNING);
foreach ($allways as $way) {
foreach ($legends as $val) { // Loop on each serie
@@ -433,11 +392,7 @@
print '<div class="inline-block marginrightonly">'; // Button include dynamic contant
return $this->trigger(9, "an unexpected error occured");
} // don't wast resourses if we don't need them...
} elseif ($links[$key]['type'] == 'banktransfert') { // transfert between 1 local account and another local account
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
* @param array $menu_array_before Table of menu entries to show before entries of menu handler. This param is deprectaed and must be provided to ''.
* @param string $head Optionnal head lines
* Ouput html header of a page. It calls also top_httphead()
$action = ''; // Do not show form post if there was at least one successfull sent
$action = 'transfert';
$alreadyfound = array($id=>1); // We init array of found object to start of tree, so if we found it later (should not happened), we stop immediatly
@@ -469,7 +424,6 @@
$paramfortooltiptd = ($extracss ? ' class="' . $extracss . '"' : '') . ($extrastyle ? ' style="' . $extrastyle . '"' : ''); // Attribut to put on td text tag
$paramfortooltiptd = ($extracss ? ' class="'.$extracss.'"' : '').($extrastyle ? ' style="'.$extrastyle.'"' : ''); // Attribut to put on td text tag
$pdf->MultiCell($this->posxdiscount - $this->posxunit, 2, $outputlangs->transnoentities("Label Mouvement"), '', 'C');
$pdf->MultiCell(190, 5, $outputlangs->transnoentities("Informations"), '', 'L');*/
$pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position
$result -= $amountToBreakdown; // And canceled substraction has been replaced by breakdown
$result = $ldap->add($dn, $info, $user); // Wil fail if already exists
@@ -490,9 +444,6 @@
$sql = 'SELECT s.reponses';
$sql2 .= " SET reponses = '".$db->escape($newcar)."'";
$this->category->childs = array();
$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STDEST", "Contact destinataire transfert de stocks", 1, NULL, 0)');
$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STFROM", "Contact expéditeur transfert de stocks", 1, NULL, 0)');
$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "internal", "STRESP", "Responsable du transfert de stocks", 1, NULL, 0)');
$this->emetteur->country_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini
$this->error = 'update_note was called on objet with property table_element not defined';
$this->modelpdf = $modelpdf; // For bakward compatibility
@@ -513,13 +464,11 @@
'sr.type' => "Type ban is defaut",
/* Disabled because bcc must remain by defintion not visible
// $_POST contains fk_commandefourndet_X_Y where Y is num of product line and X is number of splitted line
// $new_array_options will be used for direct update, so must contains formated data for the UPDATE.
// $opt['filter[id]'] contais list of product id that are result of search
// 1 - Association des utilisateurs du groupe LDAP au groupe Dolibarr
// 2 - Suppression des utilisateurs du groupe Dolibarr qui ne sont plus dans le groupe LDAP
// A redirect is added if API call successfull
// Action according to choosed sending method
// Action according to the choosed sending method
// Add entry into bank accoun
// Add personnal information
// Adding <b> may convert the original string into a HTML string. Sowe have to first
@@ -537,7 +486,6 @@
// Chercher un contact existant avec cette adresse email
// Color of earch arc
// Defaut
// Delivery date planed
// Discard check of mandatory fiedls for other fields
// Documents are stored above the web pages root to prevent being downloaded without authentification
// Dont't use entity if you use rowid
@@ -575,13 +523,11 @@
// On verifie si aucun paiement n'a ete effectue
// On verifie si la balise prefix est utilisee
// On verifie si la facture a des paiements
// Option to reload page to retrieve customer informations.
// Option to reload page to retrieve customer informations. Note, this clear other input
// Parameteres execution
// Programm next run
// Replace espacing \' by ''.
// Replace protected special codes with matching number of _ as wild card caracter
// Retained warranty : usualy use on construction industry
// Select des informations du projet
// Set default encryption to yes, generate a salt and set default encryption algorythm (but only if there is no user yet into database)
// Show var initialized by include fo paypal lib at begin of this file
@@ -616,7 +562,6 @@
// add variables subtitutions ticket
// count the orders to ship in theorical stock when some are already removed by invoice validation.
// de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur).
// employee informations
// et on met la quantité de la ligne dans la limite du "budget" indiqué par dispatch.qty
// if "frequency" is empty or = 0, the reccurence is disabled
// mise a jour des reponses utilisateurs dans la base
@@ -625,13 +570,10 @@
// on verifie si l'objet est utilisé
// only if socid not filled else it's allready done upper
// procédure de remplacement de la table pour ajouter la contrainte
// reload page to retrieve customer informations
// reload page to retrieve supplier informations
// save curent cell padding
// si le curseur est un booleen on retourne la valeur 0
// this conf is actually hidden, by default we use 10% for "be carefull or warning"
//Add hook to filter on user (for exemple on usergroup define in custom modules)
//Another call for easy debugg
//Calcultate new task end date with difference between origin proj end date and origin task end date
//Calcultate new task start date with difference between old proj start date and origin task start date
//Calcultate new task start date with difference between origin proj start date and origin task start date
@@ -643,11 +585,9 @@
//XXX: Should be done just befor commit no ?
//but the note is saved, so just add a notification will be enought
//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement.
//print $langs->trans("Desription").' : ';
//print "connexion de type=".$conf->db->type." sur host=".$conf->db->host." port=".$conf->db->port." user=".$conf->db->user." name=".$conf->db->name;
//si le sujet n'est pas celui qui a été effacé alors on concatene
//si on voit une erreur, le fond de la case est rouge
The selectForForms is called with parameter $objectfield defined, so tha app can retreive the filter inside the ajax component instead of being provided as parameters. The
console.log("Load desciption into text area : "+description);
continue; // We discard parametes starting with ?
dol_print_error('', get_class($this)."::load_previous_next_ref was called on objet with property table_element not defined");
@@ -703,8 +643,6 @@
if ($value) { // If we have -1 here, pb is into insert, not into ouptut (fix insert instead of changing code here to compensate)
if (empty($objimport->array_import_convertvalue[0][$tmpcode])) { // If source file does not need convertion
jQuery("#mouvement").change(function() {
let hours = hour.getHours().toString().padStart(2, "0"); // Formater pour obtenir deux chiffres
let mins = hour.getMinutes().toString().padStart(2, "0"); // Formater pour obtenir deux chiffres
preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthese on tente recherche de traduction
print " - Error cant find payment mode for ".$condpayment."\n";
print "Expedition inexistante ou acces refuse";
@@ -713,8 +651,6 @@
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert">'.$langs->trans("TransferStock").'</a>';
print '<a class="cursoradd" href="'.$urltocreate.'">'; // Explicit link, usefull for nojs interfaces
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . (GETPOSTISSET('assujtva_value') ? 'checked="checked"' : 'checked="checked"') . ' value="1">'; // Assujeti par defaut en creation
print __METHOD__." module accouting must be enabled.\n";
print __METHOD__." module accouting must be enabled.\n"; exit(-1);
return -1; // Alternate souce not found
return false; // Sould be 6
@@ -736,7 +672,6 @@
$action = ''; // Do not show form post if there was at least one successfull sent
$action = 'transfert';
$allways = $this->get_all_ways(); // Load array of categories
$asciiDocTable = "[options=\"header\"]\n|===\n|Objet | URLs\n";
$buyingprice = (GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value
$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value
$canbedeleted = $object->can_be_deleted(); // Renvoi vrai si compte sans mouvements
@@ -757,7 +692,6 @@
$keyval = substr($nvpstr, $intial, $keypos);
$ldap = new Ldap(); // Les parametres sont passes et recuperes via $conf
$localobject->date=dol_mktime(12, 0, 0, 1, 1, 1915); // we use year 1915 to be sure to not have existing invoice for this year (usefull only if numbering is {0000@1}
$localobject->date_creation = dol_mktime(12, 0, 0, 1, 1, 1980); // we use year 1915 to be sure to not have existing invoice for this year (usefull only if numbering is {0000@1}
$mail = 'bidon@unvalid.unvalid';
$myclone = clone $object; // PHP clone is a shallow copy only, not a real clone, so properties of references will keep the reference (refering to the same target/variable)
$nbofsubproducts = count($prodschild); // This include only first level of childs
@@ -790,7 +724,6 @@
$sql .= " AND mc.statut NOT IN (-1,0)"; // -1 erreur, 0 non envoye, 1 envoye avec succes
$sql .= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test
$sql .= " WHERE u.email <> ''"; // u.email IS NOT NULL est implicite dans ce test
$sql .= " label = 'Annulation mouvement ID ".((int) $this->id)."',";
$sql .= " tms = tms"; // La date de derniere modif doit changer sauf pour la mise a jour de date de derniere connexion
$sql .= ", '".$this->db->escape($url)."'"; // dperecated
$sql = "SELECT id_users, nom as name, id_sondage, reponses";
@@ -828,7 +761,6 @@
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
$this->rights[$r][3] = 1; // La permission est-elle une permission par defaut
$this->rights[1][1] = 'Lire ses notes de frais et deplacements et celles de sa hierarchy';
$this->rights[1][3] = 0; // La permission est-elle une permission par defaut
$this->rights[1][3] = 1; // La permission est-elle une permission par defaut
$this->rights[2][3] = 0; // La permission est-elle une permission par defaut
$this->rights[3][1] = 'Lire mouvements de stocks';
@@ -841,7 +773,6 @@
'filles' => array('name'=>'filles', 'type'=>'tns:FillesArray')
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Validated', 2=>'Paid', 3=>'Abandonned')),
'qty_regulated' => array('type'=>'double', 'label'=>'QtyDelta', 'visible'=>1, 'enabled'=>1, 'position'=>34, 'index'=>1, 'help'=>'Qty aadded or removed (filled once movements are validated)'),
'type_mouvement' =>array('type'=>'smallint(6)', 'label'=>'Type mouvement', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
/* Definition de la date limite */
/* Liste des taches et role sur les projets ou taches */
/* width: ...px; If I use with, there is trouble on size of flex boxes solved with min + (max that is a little bit higer than min) */
@@ -890,11 +821,8 @@
// Exclude unsubscribed email adresses
// Files missings
// First, we get the max value (reponse immediate car champ indexe)
// For a string that is already HTML (contains HTML tags) but badly formated
// For a string that is already HTML (contains HTML tags) with special tags but badly formated
// For backward compatiblity, we detect file stored into an old path
// For each file build select list with PDF extention
// For exemple if element is project
// For external user, no check is done on company because readability is managed by public status of project and assignement.
// For external user, no check is done on company permission because readability is managed by public status of project and assignement.
// Forced filter on socid is similar to forced filter on project. TODO Use project assignement to allow to not use filter on project
@@ -903,7 +831,6 @@
// How the date for data are formated (format used bu jsgantt)
// How the date for data are formated (format used by dol_print_date)
// If lib not found in language file, we get label from cache/databse
// If on smartphone or optmized for small screen
// If option choosed, we create invoice
// If resultset not provided, we take the last used by connexion
// If stock increment is done on reception (recommanded choice)
@@ -917,7 +844,6 @@
// Links beetween objects are stored in this table
// Load extrafields if not allready done
// Load extrafiels if not allready does
// Load librairies to check BAN
// Log the init of hook but only for hooks thare are declared to be managed
// Loop on each line keword was found into file.
// Mis a jour contact
@@ -936,7 +862,6 @@
// Option to reload page to retrieve customer informations.
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
// Ouput page under the Dolibarr top menu
// Parameteres execution
// Permet de commencer l'impression de l'etiquette desiree dans le cas ou la page a deja servie
// Permettre l'exclusion de groupes
// Permettre l'inclusion de groupes
@@ -945,7 +870,6 @@
// Refresh / Reload web site (for non javascript browers)
// Remove '<' into remainging, so remove non closing html tags like '<abc' or '<<abc'. Note: '<123abc' is not a html tag (can be kept), but '<abc123' is (must be removed).
// Remove fields not relevent to categories
// Renaming can be done when we rename globaly a bank receipt but not when changing 1 line from one receipt into another one.
// Replace protected special codes with matching number of _ as wild card caracter
// Reset the substraction for this amount
// Retained warranty : usualy use on construction industry
@@ -969,10 +893,7 @@
// TODO Remove hooks with type 'output' (exemple createFrom). All hooks must be converted into 'addreplace' hooks.
// TODO Remove hooks with type 'output' (exemple getNomUrl). All hooks must be converted into 'addreplace' hooks.
// Tableau des parametres complementaires du post
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML + MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY to test disabling of bad atrributes
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML only to test disabling of bad atrributes
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML to test disabling of bad atrributes
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY only to test disabling of bad atrributes
// Test with restricthtml + MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES to test disabling of bad atrributes
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
// This improvment as provided by 'SirSir' to
@@ -1006,11 +927,9 @@
// reload page to retrieve customer informations
// reload page to retrieve supplier informations
// save curent cell padding
// submited to nothing.
// substract 1 because array start from 0
// this conf is actually hidden, by default we use 10% for "be carefull or warning"
// to allow mask usage for dir, we shoul introduce a new param "isdir" to 1 to complete newmask like this
// variable submitted at all, so no way to make a difference between variable not submited and variable
//$array_selected = array("s.rowid"=>1, "s.nom"=>2); // Mut be fields found into declaration of dataset
//$signature_line = dol_hash($keyforsignature, '5'); // Not really usefull
//Add hook to filter on user (for exemple on usergroup define in custom modules)
@@ -1037,7 +956,6 @@
console.log("Change montly amount echeance="+echeance+" idcap="+idcap+" capital="+capital);
dol_syslog("The user login has a validity between [".$user->datestartvalidity." and ".$user->dateendvalidity."], curren date is ".dol_now());
dol_syslog("Warning: Function form_constantes is calle with parameter strictw3c = 0, this is deprecated. Value must be 2 now.", LOG_DEBUG);
dol_syslog("line.php update bank line to set the new bank receipt nuber", LOG_DEBUG);
dol_syslog(get_class($this)."::getCustomerAccount Try to find the first system customer id for ".$site." of thirdparty id=".$id." (exemple: cus_.... for stripe)", LOG_DEBUG);
dol_syslog(get_class($this)."::setCategoriesCommon Oject Id:".$this->id.' type_categ:'.$type_categ.' nb tag add:'.count($categories), LOG_DEBUG);
foreach ($allways as $way) {
@@ -1047,12 +965,9 @@
http_response_code(202); // If we use 202, this is not really an error message, but this allow to ouput message on command line tools
if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success.
if (!empty($this->phone)) { // If a phone of thirdparty is defined, we add it ot mobile of contacts
if (!getDolGlobalString('PDF_BANK_HIDE_NUMBER_SHOW_ONLY_BICIBAN')) { // Note that some countries still need bank number, BIC/IBAN not enougth for them
if (!is_array($this->userassigned) && !empty($this->userassigned)) { // For backward compatibility when userassigned was an int instead fo array
if ($lines[$i]->fk_parent == $parent || $level < 0) { // if $level = -1, we dont' use sublevel recursion, we show all lines
if ($lines[$i]->fk_task_parent == $parent || $level < 0) { // if $level = -1, we dont' use sublevel recursion, we show all lines
if ($objectfield) { // We must retreive the objectdesc from the field or extrafield
if ($this->label == 'Annulation mouvement ID'.$this->id) {
if ($user->hasRight('stock', 'mouvement', 'creer')) {
if (GETPOST('import_name')) { // If we have submited a form, we take value used fot the update try
if (dol_strlen($phone) == 10) {// fixe 6 chiffres +352_AA_BB_CC
@@ -1078,12 +993,10 @@
print 'This website or feature is currently temporarly not available or failed after a technical error.<br><br>This may be due to a maintenance operation. Current status of operation ('.dol_print_date(dol_now(), 'dayhourrfc').') are on next line...<br><br>'."\n";
return $childs;
return $objet->compteur;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Lable")), null, 'errors');
unset($object->supplierprices); // Mut use another API to get them
while ($i < $nblot) { // Loop on each serie
} else // We decrease agressiveness
} else { // If thirdparty unkown, output the waiting account
} else { // We decrease agressiveness
} else { // old method. deprecated because ot can't retrieve type
} elseif (!empty($this->childtables)) { // If object has childs linked with a foreign key field, we check all child tables.
} elseif (!empty($this->fk_element) && !empty($this->childtables)) { // If object has childs linked with a foreign key field, we check all child tables.
@@ -1130,7 +1043,6 @@
* @param int $socid Id ot third party or 0 for all or -1 for empty list
* @param int $id Id du paiement dont il faut afficher les infos
* @param mixed $gm 'gmt'=Input informations are GMT values, 'tzserver'=Local to server TZ
* @param string $method Method of transmision to bank (0=Internet, 1=Api...)
* @param string $method method of transmision to bank
* @param string $method method of transmision to bank (0=Internet, 1=Api...)
* @param string $dolibarr_main_db_pass Mot de passe user a creer
@@ -1153,7 +1065,6 @@
* @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple)
* @return array Tableau info des attributs
* @return int < 0 if KO (infinit loop), >= 0 if OK
* @return int Return integer < 0 if KO (infinit loop), >= 0 if OK
* @return array Tableau des informations des champs de la table
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
* @return int 0 en cas de succes
@@ -1162,8 +1073,6 @@
* Charge indicateurs this->nb pour le tableau de bord
* Charge les informations d'ordre info dans l'objet commande
* Charge les informations d'ordre info dans l'objet facture
* Classify the reception as invoiced (used for exemple by trigger when WORKFLOW_RECEPTION_CLASSIFY_BILLED_INVOICE is on)
* Classify the shipping as invoiced (used for exemple by trigger when WORKFLOW_SHIPPING_CLASSIFY_BILLED_INVOICE is on)
* Connexion to server
* Define properties fullpath, fullrelativename, fulllabel of a directory of array this->cats and all its childs.
* For category id_categ and its childs available in this->cats, define property fullpath and fulllabel.
@@ -1210,7 +1119,6 @@
* Si le (pays vendeur = pays acheteur) alors la TVA par defaut=TVA du produit vendu. Fin de regle.
* Sinon la TVA proposee par defaut=0. Fin de regle.
* Si vendeur non assujeti a TVA, TVA par defaut=0. Fin de regle.
* - string (categories ids seprated by comma)
* - string (categories ids seprated by comma)
* - string (categories ids seprated by comma)
* All types can also return some values into an array ->results that will be finaly merged into this->resArray for caller.
@@ -1397,7 +1305,6 @@
* @param array $arrayofcriterias Array of available search criterias. Example: array($object->element => $object->fields, 'otherfamily' => otherarrayoffields, ...)
* @param array $search_component_params Array of selected search criterias
* @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ
* @param int $fk_product_stock id product_stock for objet
* @param int $disabledoutputofmessages Clear all messages stored into session without diplaying them
* @param int $lineid Id of production line to filter childs
* @param int $noescapecommand 1=Do not escape command. Warning: Using this parameter needs you alreay have sanitized the $command parameter. If not, it will lead to security vulnerability.
@@ -1436,7 +1343,6 @@
* @param array $info content informations of field
* @param boolean $confirmnow false=default, true=try to confirm immediatly after create (if conditions are ok)
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
* @param int $fk_socpeople Id of thirdparty contact (if source = 'external') or id of user (if souce = 'internal') to link
* @param int $fk_socpeople Id of thirdparty contact (if source = 'external') or id of user (if souce = 'internal') to link
* @param int $default_font_size default siez of font
* @param int $id id du paiement dont il faut afficher les infos
@@ -1449,7 +1355,6 @@
* @param int $disablestockchangeforsubproduct Disable stock change for sub-products of kit (usefull only if product is a subproduct)
* @param int $nbmax Number maxium of photos (0=no maximum)
* @param int $id Id of product to search childs of
* @param string $extrafieldsobjectkey The key to use to store retreived data (commonly $object->table_element)
* @param string $extrafieldsobjectkey The key to use to store retreived data (for example $object->table_element)
* @param string $moreparam To add more parametes on html input tag
* @param string $moreparam To add more parametes on html input tag
@@ -1469,19 +1374,11 @@
* @param int $month Specifig month - Can be empty
* @param int $year Specifig year - Can be empty
* @param int $_type Interger value representing Mail Transport Type
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $str Original string to encode and optionaly truncate
* @param string $page Url of page to call if confirmation is OK. Can contains parameters (param 'action' and 'confirm' will be reformated)
* @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of numeric value, or a select combo). Use '' to use same than $value
* @param string $output_format (html/opton (for option html only)/array (to return options arrays
* @param string $page Page name (website id must also be filled if this parameter is used). Exemple 'myaliaspage' or 'fr/myaliaspage'
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $_path Path to the sendmail execuable
* @param string $key Authentification key
* @param string $selected Id remise fixe pre-selectionnee
@@ -1491,7 +1388,6 @@
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
* @return float|string Total amout of discount
* @return int <0 if KO, number of equipments found if OK
* @return int Return integer <0 if KO, number of equipments found if OK
* @return string Javacript code to manage dependency
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
* @return array Array with inforation on table
@@ -1510,20 +1406,15 @@
* @var array Custom family informations
* @var array Header informations. Usually created at runtime by loadBox().
* @var array box dependancies
* @var boolean $standard_conforming_string Set this to true if postgres accept only standard encoding of sting using '' and not \'
* @var int Postion
* @var int Date for cancelation
* @var int ID for cancelation
* @var int -1=Unkown duration
* @var int Amount can be choosen by the visitor during subscription (0 or 1)
* @var int Code modifiable si il est invalide
* @var int Subsription required (0 or 1)
* @var int availabilty ID
* @var integer|string Date delivery planed
* @var string The name of constant to use to scan ODT files (Exemple: 'COMMANDE_ADDON_PDF_ODT_PATH')
* @var string Hash to identify ticket publically
* @var string availabilty code
* @var string availabilty label
* @var string ref custome
* Active Directory ne supporte pas les connexions anonymes
* Attention ce module est utilise par defaut si aucun module n'a
@@ -1543,7 +1434,6 @@
* Exemple: { "socid": 2, "date": 1595196000, "type": 0, "lines": [{ "fk_product": 2, "qty": 1 }] }
* Flag to 1 if we must clean ambiguous charaters for the autogeneration of password (List of ambiguous char is in $this->Ambi)
* Function to know all custom groupd from an accounting account
* Function to shwo the combo select to chose a type of field (varchar, int, email, ...)
* Function used to return childs of Mo
* If paid completelly, this->close_code will be null
* Inserts all informations into database.
@@ -1602,7 +1492,6 @@
* Return connexion ID
* Return direct childs id of a category into an array
* Return list of auxilary accounts. Cumulate list from customers, suppliers and users.
* Return list of categories having choosed type
* Return list of product formated for output
* Return the addtional SQL JOIN query for filtering a list by a category
* Return the addtional SQL SELECT query for filtering a list by a category
@@ -1620,7 +1509,6 @@
* ete definit dans la configuration
* or a COMMA delimted string, and inserts them into a highly
* reload conf value from databases is an aliase of loadValueFromConf
* reverse mouvement for object by updating infos
* statique et publique. Le nombre de parametres est determine automatiquement.
* the tagret is useful with hooks : that allow externals modules to add setup items on good place
* the underlaying array is destroyed and reconstructed.
@@ -1632,7 +1520,6 @@
# Log directoves
$IBS_RETOUR = "montant:M;ref:R;auto:A;trans:T"; // Format des parametres du get de validation en reponse (url a definir sous paybox)
$alwaysuncheckedmodules = array('dav', 'dynamicprices', 'incoterm', 'loan', 'multicurrency', 'paybox', 'paypal', 'stripe', 'google', 'printing', 'scanner', 'skype', 'website'); // Module we dont want by default
$alwaysuncheckedmodules = array('dav', 'dynamicprices', 'incoterm', 'loan', 'multicurrency', 'paybox', 'paypal', 'stripe', 'google', 'printing', 'scanner', 'socialnetworks', 'website'); // Module we dont want by default
$amount = (is_numeric($amount) ? $amount : 0); // Check if amount is numeric, for example, an error occured when amount value = o (letter) instead 0 (number)
$controle = $tableau[$report][10];
$data = getDecodeValue($mege, $type);
@@ -1643,8 +1530,6 @@
$intial = 0;
$ldaprecords = $ldap->getRecords('*', $conf->global->LDAP_MEMBER_DN, $conf->global->LDAP_KEY_MEMBERS, $required_fields, 'member'); // Fiter on 'member' filter param
$ldaprecords = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, $required_fields, 'user'); // Fiter on 'user' filter param
$ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_MEMBER_DN'), getDolGlobalString('LDAP_KEY_MEMBERS'), $required_fields, 'member'); // Fiter on 'member' filter param
$ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_USER_DN'), getDolGlobalString('LDAP_KEY_USERS'), $required_fields, 'user'); // Fiter on 'user' filter param
$mege = imap_fetchbody($mbox, $jk, $fpos);
$mege = imap_fetchbody($mbox, $jk, $fpos, FT_UID);
$object->status = $object->fk_statut; // for backwad compatibility
@@ -1671,7 +1556,6 @@
// Add format informations and link to download example
// Affichage de la liste des projets de la semaine
// Bit 1: 0 ligne normale - 1 si ligne de remise fixe
// Build filter to diplay only concerned lines
// By default use tls decied by PHP.
// Cas des parametres TAX_MODE_SELL/BUY_SERVICE/PRODUCT
// Chargement de la classe
@@ -1737,11 +1621,9 @@
// We open a list of transaction of a dedicated account and no page was set by defaut
// When a dictionnary is commented
// add properties and declare them in consturctor
// buil format asciidoc for urls in table
// but in some situations that is required (update legal informations for example)
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
// on transfert les données de l'un vers l'autre
// rewrite dictionnary if
// si le filtrage est parametre pour l'export ou pas
// start and end date that change with time andd that may be different that the period of reference for price.
// verify informations entred
@@ -1792,7 +1674,6 @@
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
print '<select name="mouvement" id="mouvement" class="minwidth100 valignmiddle">';
print '<tr><td colspan="2"><br>*** Force modules not found physicaly to be disabled (only modules adding js, css or hooks can be detected as removed physicaly)</td></tr>';
print 'Failed to open '.$outputfile.' for ouput.'."\n";
print 'Missing paramater s, c or a';
print 'Sorry, it seems your internet connexion is off.<br>';
print ajax_combobox("mouvement");
@@ -1806,7 +1687,6 @@
public $date_delivery; // Date delivery planed
public $debug_api; // usefull if no dialog
public $emetteur; // Objet societe qui emet
public $fk_origin_stock; // rowid in llx_product_batch table (not usefull)
public $graph; // Objet Graph (Artichow, Phplot...)
public $infofiles; // Used to return informations by function getDocumentsLink
public $lastsearch_values; // To store last saved search criterias for user
@@ -1998,7 +1878,6 @@
* \brief Onglet informations personnelles d'un contact
* \brief Page fiche LDAP groupe
* \brief Tab to manage contacts/adresses of proposal
* @return boolean True if informations are valid, false otherwise
* @return boolean True if informations are valid, false otherwise
* @return string Formated string
* @return string Return list fo image format
@@ -2051,10 +1930,8 @@
* @return string String with formated amounts ('19,6' or '19,6%' or '8.5% (NPR)' or '8.5% *' or '19,6 (CODEX)')
* @return array|int Array with details of VATs (per rate), -1 if no accountancy module, -2 if not yet developped, -3 if error
* @return array|int Array with details of VATs (per third parties), -1 if no accountancy module, -2 if not yet developped, -3 if error
* Classe mere des modeles de numerotation des references de bon de livraison
* Classe mere des modeles de numerotation des references de members
* Classe mere des modeles de numerotation des references de projets
* Classe mere des modeles de numerotation des tickets de caisse
* Classe permettant la gestion des stats des expensereports et notes de frais
* Delete files into database index using search criterias.
* Get formated error messages to output (Used to show messages on html output).
@@ -2119,7 +1996,6 @@
* @param string $objectname name of object whant to remove
* @retun boolean
* @return array returns an associtive array containing the response from the server.
* @return string Formated string
* @return string A HTML table that conatins a list with open (unpaid) supplier invoices
* @return string Formated value
* @return array Array of mesures
@@ -2142,7 +2018,6 @@
* Correspondance des livraisons et des commandes clients dans la table llx_co_liv
* Creation objet $langs (must be before all other code)
* For action=add, use: $var = GETPOST('var'); // No GETPOSTISSET, so GETPOST always called and default value is retreived if not a form POST, and value of form is retreived if it is a form POST.
* Generate Urls and add them to documentaion module
* It is usefull to search for a particular key and displaying arrays.
* Lattest modified orders
* Les catégories filles, sous tableau dez la catégorie
@@ -2197,17 +2072,14 @@
$FULLTAG = GETPOST("fulltag", 'alpha'); // fulltag is tag with more informations
$array = array(1=>'Value 1', 2=>'Value 2', 3=>'Value 3 ith a very long text. aze eazeae e ae aeae a e a ea ea ea e a e aea e ae aeaeaeaze.');
$conf = new stdClass(); // instantiate $conf explicitely
$html .= ' monthes people</b><br>';
$permissiontoadd = $user->rights->stock->mouvement->creer;
$permissiontodelete = $user->rights->stock->mouvement->creer; // There is no deletion permission for stock movement as we shoul dnever delete
$permissiontodelete = $user->rights->stock->mouvement->creer; // There is no deletion permission for stock movement as we should never delete
$permissiontoread = $user->rights->stock->mouvement->lire;
$seledted = !getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY') ? array() : explode(',', getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY'));
$seledted = empty($conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY) ? array() : explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY);
$sql = "SELECT id_users, nom as name, id_sondage, reponses";
$sql = 'SELECT nom as name, reponses';
$tag = GETPOST('tag'); // To retreive the emailing, and recipient
$tmpday = -date("w", dol_mktime(12, 0, 0, $month, 1, $year, 'gmt')) + 2; // date('w') is 0 fo sunday
$usercancreate = $user->rights->stock->mouvement->creer;
$usercancreate = (($user->rights->stock->mouvement->creer));
$usercandelete = $user->rights->stock->mouvement->creer;
@@ -2266,7 +2138,6 @@ $usercanread = (($user->rights->stock->mouvement->lire));
/* Affichage de la liste des projets du mois */
/* Badge style is based on boostrap framework */
/* Force values on one colum for small screen */
/* The buttonplus isgrowing on hover (dont know why). This is to avoid to have the cellegrowing too */
/* To make a div popup, we must use a position aboluste inside a position relative */
/* USING IMAGES FOR WEATHER INTEAD OF FONT AWESOME */
/* Warning: setting this may make screen not beeing refreshed after a combo selection */
@@ -2335,7 +2206,6 @@ $usercanread = (($user->rights->stock->mouvement->lire));
// TODO ajouter regle pour restreindre acces paiement
// Table to store complete informations (will replace all other table). Key is table name.
// Test to check image can be publically viewed is done inside the viewimage.php wrapper.
// The session_set_save_handler() at end of this fille will replace default session management.
// This 2 lines are usefull only if we want to exclude some Urls from the explorer
// This refresh list of dirs, not list of files (for preformance reason). List of files is refresh only if dir was not synchronized.
// To disable a constant whithout javascript
@@ -2344,11 +2214,9 @@ $usercanread = (($user->rights->stock->mouvement->lire));
// We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable.
// We must filter on assignement table
// badge color ajustement for color blind
// chek if salary pl
// current rule: uptodate = the end date is in future or no subcription required
// librarie core
// librarie jobs
// reverse mouvement of stock
// status color ajustement for color blind
//Activate Set adress in list
//Another call for easy debugg
@@ -2495,7 +2363,6 @@ NEW: Add SQL contraint on product_stock table to allow only exsting product and
NEW: Add email in event history, for reminder email of expired subsription
NEW: Add exemple of setup for multitail to render dolibarr log files
NEW: Add hidden option MAIN_EMAIL_SUPPORT_ACK to restore Email ack checkbox (feature abandonned by mailers)
NEW: Add more company informations (ProfId7 to 10) (#25266)
NEW: Add option to disable globaly some notifications emails.
NEW: Add option to display thirdparty adress in combolist
NEW: Add ressource extrafields.
@@ -2527,20 +2394,15 @@ NEW: Implement option SUPPLIER_ORDER_USE_DISPATCH_STATUS to add a status into ea
NEW: Introduce position of records into dictionnary of type of contacts
NEW: Introduce use of cache for thumbs images of users to save bandwith.
NEW: Look and feel v11: Some setup pages are by default direclty in edit mode.
NEW: Menu editor is reponsive
NEW: Merge all boxes "related objects" into one. This save a lot of room on most card and avoid often horizontal scoll.
NEW: ModuleBuilder - More feature that can be modifed after module generation
NEW: ModuleBuilder: for edit name of dictionnary and delete it in MB
NEW: On page to see/edit contact of an ojbect, the status of contact is visible (for both external and internal users).
NEW: Page to check if the operations/items created between two dates have attached item(s) and possibility to download all attachements
NEW: Payment: Can edit account on miscellaneous payment (if not transfered)
NEW: Product stock and subproduct stock are independant
NEW: Products: Add SQL contraint on product_stock table to allow only existing product and warehouse #23543
NEW: Remove tooltip tipTip library replaced with standatd jquery tooltip
NEW: Start to introduce search filters on dictionnaries for vat list.
NEW: Support of deployement of metapackages
NEW: When a new field to show into lists is selected, the form is automatically submited and field added.
NEW: When an user unset the batch management of products, transformation of each batch stock mouvement in global stock mouvement
NEW: X-Axis on graph are shown verticaly when there is a lot of values.
NEW: add API shipment mode dictionnary
NEW: add a prospect status for the contact with managment of custom icon
@@ -2568,13 +2430,11 @@ Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test
Store, search and retreive any article to keep your knowledge into a database. It can be used to manage a list of FAQ, or a database
The keyword can be ommitted if your commit does not fit in any of the following categories:
The output patch file can then be submited on Dolibarr
The output patch file can then be submited on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch.
This directory contains ruleset files to use to develop Dolibarr EPR & CRM.
This directory contains several subdirectories with entries for informations on Dolibarr.<br>
This docker image intended for developpement usage.
This docker image is intended for developpement usage.
This module provides a sheduled job that scan regularly one or several IMAP email boxes, with filtering rules, to automatically record data in your application, like
Une ligne represente un element : data[$x]
Upgrading to any other version or database system is abolutely required BEFORE trying to
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform.
@@ -2587,7 +2447,6 @@ elseif ($year && $month && $day) $daytoparsegmt = dol_mktime(0, 0, 0, $month, $d
function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localtax2_tx, $fk_pa, $paht)
function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals = array(), $actioncode = '', $usergroupid = '', $excludetype = '', $resourceid = 0)
if (!$user->hasRight('stock', 'mouvement', 'lire')) {
if (!empty($conf->variants->eabled) && !getDolGlobalString('VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT')) { // Add test to exclude products that has variants
if (!empty($conf->variants->eabled) && empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) { // Add test to exclude products that has variants
if (!empty($contactname)) { // acces a partir du module de recherche
if ($action == "transfert") {
@@ -2603,4 +2462,3 @@ print '<div class="div-table-responsive-no-min">'; // You can use div-table-resp
print_barre_liste($langs->trans("Sessions"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, ($num ? $num : ''), 'setup'); // Do not show numer (0) if no session found (it means we can't know)
print_liste_field_titre("Prority", $_SERVER["PHP_SELF"], "t.priority", "", $param, '', $sortfield, $sortorder);
session_start(); // To be able to keep info into session (used for not losing pass during navigation. pass must not transit through parmaeters)
} // this are value submited after submit of action 'submitdateselect'

View File

@@ -37,14 +37,14 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
exit();
}
error_reporting(E_ALL & ~E_DEPRECATED);
error_reporting(E_ALL & ~ E_DEPRECATED);
define('PRODUCT', "pg2mysql");
define('VERSION', "2.0");
// this is the default, it can be overridden here, or specified as the third parameter on the command line
$config['engine'] = "InnoDB";
if (!($argv[1] && $argv[2])) {
if (! ($argv[1] && $argv[2])) {
echo "Usage: php pg2mysql_cli.php <inputfilename> <outputfilename> [engine]\n";
exit();
} else {
@@ -141,7 +141,7 @@ function pg2mysql_large($infilename, $outfilename)
echo "Filesize: " . formatsize($fs) . "\n";
while ($instr = fgets($infp)) {
$linenum++;
$linenum ++;
$memusage = round(memory_get_usage(true) / 1024 / 1024);
$len = strlen($instr);
$pgsqlchunk[] = $instr;
@@ -163,7 +163,7 @@ function pg2mysql_large($infilename, $outfilename)
}
if (strlen($instr) > 3 && ($instr[$len - 3] == ")" && $instr[$len - 2] == ";" && $instr[$len - 1] == "\n") && $inquotes == false) {
$chunkcount++;
$chunkcount ++;
if ($linenum % 10000 == 0) {
$currentpos = ftell($infp);
@@ -246,7 +246,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
if (is_array($input)) {
$lines = $input;
} else {
$lines = explode("\n", $input);
$lines = split("\n", $input);
}
if ($header) {
@@ -302,7 +302,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$output .= 'DROP TABLE IF EXISTS `' . $reg2[1] . '`;' . "\n";
}
$output .= $line;
$linenumber++;
$linenumber ++;
continue;
}
@@ -313,7 +313,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$output .= $tbl_extra;
$output .= $line;
$linenumber++;
$linenumber ++;
$tbl_extra = "";
continue;
}
@@ -395,10 +395,10 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
if (strstr($line, " CONSTRAINT ")) {
$line = "";
// and if the previous output ended with a , remove the ,
$lastchr = substr($output, -2, 1);
$lastchr = substr($output, - 2, 1);
// echo "lastchr=$lastchr";
if ($lastchr == ",") {
$output = substr($output, 0, -2) . "\n";
$output = substr($output, 0, - 2) . "\n";
}
}
@@ -408,9 +408,9 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
if (substr($line, 0, 11) == "INSERT INTO") {
$line = str_replace('public.', '', $line);
if (substr($line, -3, -1) == ");") {
if (substr($line, - 3, - 1) == ");") {
// we have a complete insert on one line
list($before, $after) = explode(" VALUES ", $line, 2);
list ($before, $after) = explode(" VALUES ", $line, 2);
// we only replace the " with ` in what comes BEFORE the VALUES
// (ie, field names, like INSERT INTO table ("bla","bla2") VALUES ('s:4:"test"','bladata2');
// should convert to INSERT INTO table (`bla`,`bla2`) VALUES ('s:4:"test"','bladata2');
@@ -424,13 +424,13 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$after = str_replace(", E'", ", '", $after);
$output .= $before . " VALUES " . $after;
$linenumber++;
$linenumber ++;
continue;
} else {
// this insert spans multiple lines, so keep dumping the lines until we reach a line
// that ends with ");"
list($before, $after) = explode(" VALUES ", $line, 2);
list ($before, $after) = explode(" VALUES ", $line, 2);
// we only replace the " with ` in what comes BEFORE the VALUES
// (ie, field names, like INSERT INTO table ("bla","bla2") VALUES ('s:4:"test"','bladata2');
// should convert to INSERT INTO table (`bla`,`bla2`) VALUES ('s:4:"test"','bladata2');
@@ -453,7 +453,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$output .= $before . " VALUES " . $after;
do {
$linenumber++;
$linenumber ++;
// in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string')
// ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character
@@ -477,7 +477,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
}
// echo "inquotes=$inquotes\n";
}
} while (substr($lines[$linenumber], -3, -1) != ");" || $inquotes);
} while (substr($lines[$linenumber], - 3, - 1) != ");" || $inquotes);
}
}
if (substr($line, 0, 16) == "ALTER TABLE ONLY") {
@@ -486,14 +486,14 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$line = str_replace("public.", "", $line);
$pkey = $line;
$linenumber++;
$linenumber ++;
if (!empty($lines[$linenumber])) {
$line = $lines[$linenumber];
} else {
$line = '';
}
if (strstr($line, " PRIMARY KEY ") && substr($line, -3, -1) == ");") {
if (strstr($line, " PRIMARY KEY ") && substr($line, - 3, - 1) == ");") {
$reg2 = array();
if (preg_match('/ALTER TABLE ([^\s]+)/', $pkey, $reg2)) {
if (empty($arrayofprimaryalreadyintabledef[$reg2[1]])) {
@@ -580,7 +580,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
}
}
$linenumber++;
$linenumber ++;
}
return array('output' => $output,'outputatend' => $outputatend);

View File

@@ -10,21 +10,21 @@
# Syntax
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
then
echo "This script detect or clean files with CR+LF into files with LF only. All source files are included, including files into includes."
echo "This script detect or clean files with CR+LF into files with LF only. All source files are included, also files into includes."
echo "Usage: fixdosfiles.sh [list|fix]"
fi
# To detec
if [ "x$1" = "xlist" ]
then
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF
# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep -v 'htdocs\/includes' | grep CRLF
fi
# To convert
if [ "x$1" = "xfix" ]
then
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF | awk -F':' '{ print $1 }' `
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF | awk -F':' '{ print $1 }' `
do
echo "Fix file $fic"
dos2unix "$fic"

View File

@@ -1,11 +1,10 @@
#!/bin/sh
#
# Count number of different contributors and number of commits for a given year.
# Can be used for statistics (for example to generate the inforgraphy of the year)
#
if [ "x$1" = "x" ]; then
echo "Usage: $0 YEARSTART [YEAREND]"
echo "Usage: $0 YEAR"
exit
fi
@@ -13,15 +12,10 @@ fi
FROM=$1-01-01
TO=$1-12-31
if [ "x$2" != "x" ]; then
TO=$2-12-31
fi
echo "--- Number of contributors for the year"
echo "git log --since $FROM --before $TO | grep ^Author | awk -F'<' '{ print $1 }' | iconv -f UTF-8 -t ASCII//TRANSLIT | sort -u -f -i -b | wc -l"
git log --since $FROM --before $TO | grep '^Author' | awk -F"<" '{ print $1 }' | iconv -f UTF-8 -t ASCII//TRANSLIT | sort -u -f -i -b | wc -l
echo "Number of contributors for the year"
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
echo "--- Number of commit for the year"
echo "git log --pretty='format:%cd' --date=format:'%Y' | sort | uniq -c | awk '{ if (\$2 >= '"$1"') { print \"Year: \"\$2\", commits: \"\$1 } }'"
git log --pretty='format:%cd' --date=format:'%Y' | sort | uniq -c | awk '{ if ($2 >= '$1') { print "Year: "$2", commits: "$1 } }'
echo "Number of commit for the year"
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$1}' | grep "Year: $1"

View File

@@ -3,47 +3,16 @@
# Count number of commits per user and per versions (using date for version detection)
#
Releases=("3.9" "4.0" "5.0" "6.0" "7.0" "8.0" "9.0" "10.0" "11.0" "12.0" "13.0" "14.0" "15.0" "16.0" "17.0" "18.0" "develop")
let "counter = 0"
Releases=("17.0" "18.0" "develop")
Dates=("2023-02-01" "2023-08-31" "2050-01-01")
let "counter = 1"
echo "Copy script into /tmp/github_commits_perversion.sh"
cp $0 /tmp/github_commits_perversion.sh
echo "Delete /tmp/git"
rm -fr /tmp/git
echo "Create and go into /tmp/git"
mkdir /tmp/git
cd /tmp/git
git clone https://github.com/Dolibarr/dolibarr.git
cd /tmp/git/dolibarr
firstline=1
for i in "${Releases[@]}"
do
if [ $firstline -eq 1 ]; then
firstline=0
continue
fi
#echo "=== Version $i (counter $counter):"
echo "=== Version $i (counter $counter):"
echo "Get common commit ID between origin/${Releases[counter]} and origin/${Releases[counter+1]}"
echo "git merge-base origin/${Releases[counter]} origin/${Releases[counter+1]}"
commitidcommon=`git merge-base origin/${Releases[counter]} origin/${Releases[counter+1]}`
echo "Found commitid=$commitidcommon"
echo "Checkout into version $i"
git checkout $i
#git shortlog -s -n --after=YYYY-MM-DD --before=YYYY-MM-DD | tr '[:lower:]' '[:upper:]' > /tmp/github_commits_perversion.txt
git shortlog -s -n $commitidcommon.. | tr '[:lower:]' '[:upper:]' > /tmp/github_commits_perversion.txt
#cat /tmp/github_commits_perversion.txt
echo "Total for version $i:"
echo -n "- Nb of commits: "
git log $commitidcommon.. --pretty=oneline | tr '[:lower:]' '[:upper:]' > /tmp/github_commits_perversion2.txt
cat /tmp/github_commits_perversion2.txt | wc -l
echo -n "- Nb of different authors: "
awk ' { print $2 } ' < /tmp/github_commits_perversion.txt | sort -u | wc -l
echo "=== $counter git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}"
git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}
echo -n "Total $i: "
git log --pretty=oneline --after=${Dates[counter-1]} --before=${Dates[counter]} | wc -l
echo "======================="
echo
let "counter +=1"

View File

@@ -1,57 +0,0 @@
#!/bin/bash
# Based of: https://gist.github.com/jaymzcd/342399 and https://github.com/buren/flag-sprite-maker
# uses imagemagick to stich together all images in a folder and
# then writes a css file with the correct offsets along with a
# test html page for verification that its all good
# Usage:
# $ ./make_sprite.sh path class_name image_extension
set -euo pipefail
IFS=$'\n\t'
name='output'; # output will be placed in a folder named this
path="${1:-}" # Path to flag images
classname=${2:-flag}"-sprite"
ext="."${3:-png}; # the extension to iterate over for input files
css="$name/$classname.css";
html="$name/test.html";
rm -fr $name;
mkdir $name;
touch $css $html;
echo "Generating sprite file...";
convert $path*$ext -append $name/$classname$ext;
echo "Sprite complete! - Creating css & test output...";
echo -e "<html>\n<head>\n\t<link rel=\"stylesheet\" href=\"`basename $css`\" />\n</head>\n<body>\n\t<h1>Sprite test page</h1>\n" >> $html
echo -e ".$classname {\n\tbackground:url('$classname$ext') no-repeat top left; display:inline-block;\n}" >> $css;
counter=0;
offset=0;
for file in $path*$ext
do
width=`identify -format "%[fx:w]" "$file"`;
height=`identify -format "%[fx:h]" "$file"`;
idname=`basename "$file" $ext`;
clean=${idname// /-}
echo -e ".$classname.$clean {" >> $css;
echo -e "\tbackground-position:0 -${offset}px;" >> $css;
echo -e "\twidth: ${width}px;" >> $css;
echo -e "\theight: ${height}px;\n}" >> $css;
echo -e "<div style=\"display:inline-block;width:100px;\"><div style=\"overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;\">$clean</div> <a href=\"#\" class=\"$classname $clean\"></a></div>\n" >> $html;
let offset+=$height;
let counter+=1;
echo -e "\t#$counter done";
done
echo -e "<h2>Full sprite:</h2>\n<img src=\"$classname$ext\" />" >> $html;
echo -e "</body>\n</html>" >> $html;
echo -e "\nComplete! - $counter sprites created, css written & test page output.";

View File

@@ -1,3 +0,0 @@
/vendor/
/composer.json
/composer.lock

View File

@@ -1,80 +0,0 @@
#!/bin/bash
#
# Usage:
# Optionally set COMPOSER_CMD to the command to use to run composer.
# Optionally set COMPOSER_VENDOR_DIR to your vendor path for composer.
#
# Run php-cs-fixer by calling this script:
# ./run-php-cs-fixer.sh check # Only checks (not available with PHP 7.0)
# ./run-php-cs-fixer.sh fix # Fixes
#
# You can fix only a few files using
# ./run-php-cs-fixer.sh fix htdocs/path/to/myfile.php
#
# You can run this from the root directory of dolibarr
# dev/tools/run-php-cs-fixer.sh fix htdocs/path/to/myfile.php
#
# You can provide the environment variables on the CLI like this:
# COMPOSER_CMD="php ~/composer.phar" COMPOSER_VENDOR_DIR="~/vendor" ./run-php-cs-fixer.sh
#
# or export them:
# export COMPOSER_CMD="~/composer.phar"
# export COMPOSER_VENDOR_DIR="~/vendor"
# ./run-php-cs-fixer.sh
#
# Or some other method
#
MYDIR=$(dirname "$(realpath "$0")")
export COMPOSER_VENDOR_DIR=${COMPOSER_VENDOR_DIR:=$MYDIR/vendor}
COMPOSER_CMD=${COMPOSER_CMD:composer}
MINPHPVERSION="7.0"
echo "***** run-php-cs-fixer.sh *****"
if [ "x$1" = "x" ]; then
echo "Syntax: run-php-cs-fixer.sh check|fix [path_from_root_project]"
exit 1;
fi
#
# Check composer is available
#
if [ ! -r "${COMPOSER_CMD}" ] ; then
echo composer is not available or not in path. You can give the path of composer by setting COMPOSER_CMD=/pathto/composer
echo Example: export COMPOSER_CMD="~/composer.phar"
echo Example: export COMPOSER_CMD="/usr/local/bin/composer"
exit 1;
fi
#
# Install/update php-cs-fixer
#
echo Install php-cs-fixer
PHP_CS_FIXER="${COMPOSER_VENDOR_DIR}/bin/php-cs-fixer"
if [ ! -r "${PHP_CS_FIXER}" ] ; then
[[ ! -e "${COMPOSER_VENDOR_DIR}" ]] && ${COMPOSER_CMD} install
[[ -e "${COMPOSER_VENDOR_DIR}" ]] && ${COMPOSER_CMD} update
php${MINPHPVERSION} ${COMPOSER_CMD} require --dev friendsofphp/php-cs-fixer
echo
fi
# With PHP 7.0, php-cs-fixer is V2 (command check not supported)
# With PHP 8.2, php-cs-fixer is V3
(
echo cd "${MYDIR}/../../.."
cd "${MYDIR}/../../.." || exit
CMD=
# If no argument, run check by default
[[ "$1" == "" ]] && CMD=check
# shellcheck disable=SC2086
echo php${MINPHPVERSION} "${PHP_CS_FIXER}" $CMD "$@"
php${MINPHPVERSION} "${PHP_CS_FIXER}" $CMD "$@"
)

View File

@@ -1,2 +0,0 @@
/test.php
/vendor

View File

@@ -1,28 +0,0 @@
### Refactoring code with [rector](https://getrector.com)
#### Installation
Run in this folder
```shell
cd dev/tools/rector
```
Install rector with composer
```shell
composer install
```
#### Usage
##### To make changes (Add --dry-run for test mode only)
```shell
./vendor/bin/rector process --dry-run
```
##### To make changes on a given directory
```shell
./vendor/bin/rector process [--dry-run] [--clear-cache] ../../../htdocs/core/
```

View File

@@ -1,19 +0,0 @@
{
"name": "dolibarr/rector",
"type": "project",
"license": "GplV3",
"authors": [
{
"name": "Dev2a",
"email": "contact@dev2a.pro"
}
],
"require-dev": {
"rector/rector": "^0.18.5"
},
"autoload-dev": {
"psr-4": {
"Dolibarr\\Rector\\": "./src"
}
}
}

View File

@@ -1,137 +0,0 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f2998987cad52db5ab60d5ff0672ce05",
"packages": [],
"packages-dev": [
{
"name": "phpstan/phpstan",
"version": "1.10.38",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/5302bb402c57f00fb3c2c015bac86e0827e4b691",
"reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691",
"shasum": ""
},
"require": {
"php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
},
"bin": [
"phpstan",
"phpstan.phar"
],
"type": "library",
"autoload": {
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
"keywords": [
"dev",
"static analysis"
],
"support": {
"docs": "https://phpstan.org/user-guide/getting-started",
"forum": "https://github.com/phpstan/phpstan/discussions",
"issues": "https://github.com/phpstan/phpstan/issues",
"security": "https://github.com/phpstan/phpstan/security/policy",
"source": "https://github.com/phpstan/phpstan-src"
},
"funding": [
{
"url": "https://github.com/ondrejmirtes",
"type": "github"
},
{
"url": "https://github.com/phpstan",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
"type": "tidelift"
}
],
"time": "2023-10-06T14:19:14+00:00"
},
{
"name": "rector/rector",
"version": "0.18.5",
"source": {
"type": "git",
"url": "https://github.com/rectorphp/rector.git",
"reference": "2a3b82f317e431fc142d21f3303891a4e64c96eb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/rectorphp/rector/zipball/2a3b82f317e431fc142d21f3303891a4e64c96eb",
"reference": "2a3b82f317e431fc142d21f3303891a4e64c96eb",
"shasum": ""
},
"require": {
"php": "^7.2|^8.0",
"phpstan/phpstan": "^1.10.35"
},
"conflict": {
"rector/rector-doctrine": "*",
"rector/rector-downgrade-php": "*",
"rector/rector-phpunit": "*",
"rector/rector-symfony": "*"
},
"bin": [
"bin/rector"
],
"type": "library",
"autoload": {
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Instant Upgrade and Automated Refactoring of any PHP code",
"keywords": [
"automation",
"dev",
"migration",
"refactoring"
],
"support": {
"issues": "https://github.com/rectorphp/rector/issues",
"source": "https://github.com/rectorphp/rector/tree/0.18.5"
},
"funding": [
{
"url": "https://github.com/tomasvotruba",
"type": "github"
}
],
"time": "2023-10-05T11:25:40+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.2.0"
}

View File

@@ -1,62 +0,0 @@
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Rector\Set\ValueObject\LevelSetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->phpVersion(PhpVersion::PHP_71);
//$rectorConfig->indent(' ', 4);
// Traits seems not supported correctly by rector without declaring them as bootstrapFiles
$arrayoftraitfiles = array(
__DIR__ . '/../../../htdocs/core/class/commonincoterm.class.php',
__DIR__ . '/../../../htdocs/core/class/commonpeople.class.php',
__DIR__ . '/../../../htdocs/core/class/commonsocialnetworks.class.php'
);
$rectorConfig->bootstrapFiles($arrayoftraitfiles);
$rectorConfig->paths([
__DIR__ . '/../../../htdocs/',
__DIR__ . '/../../../scripts/',
__DIR__ . '/../../../test/phpunit/',
]);
$rectorConfig->skip([
'**/includes/**',
'**/custom/**',
'**/vendor/**',
'**/rector/**', // Disable this line to test the "test.php" file.
__DIR__ . '/../../../htdocs/custom/',
__DIR__ . '/../../../htdocs/install/doctemplates/*'
]);
$rectorConfig->parallel(240);
// Register rules
//$rectorConfig->rule(Rector\Php71\Rector\List_\ListToArrayDestructRector::class);
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\CreateFunctionToAnonymousFunctionRector::class);
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\GetClassOnNullRector::class);
//$rectorConfig->rule(Rector\Php72\Rector\Assign\ListEachRector::class);
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\ParseStrWithResultArgumentRector::class);
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\StringifyDefineRector::class);
//$rectorConfig->rule(ReplaceEachAssignmentWithKeyCurrentRector::class);
$rectorConfig->rule(Rector\CodeQuality\Rector\FuncCall\FloatvalToTypeCastRector::class);
$rectorConfig->rule(Rector\CodeQuality\Rector\FuncCall\BoolvalToTypeCastRector::class);
$rectorConfig->rule(Rector\CodeQuality\Rector\NotEqual\CommonNotEqualRector::class);
//$rectorconfig->rule(Rector\CodeQuality\Rector\If_\CompleteMissingIfElseBracketRector::class);
$rectorConfig->rule(Rector\CodeQuality\Rector\For_\ForRepeatedCountToOwnVariableRector::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\GlobalToFunction::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\UserRightsToFunction::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\EmptyGlobalToFunction::class);
// Add all predefined rules to migrate to up to php 71
// $rectorConfig->sets([
// LevelSetList::UP_TO_PHP_71
// ]);
};

View File

@@ -1,216 +0,0 @@
<?php
namespace Dolibarr\Rector\Renaming;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
use PhpParser\Node\Expr\BinaryOp\Concat;
use PhpParser\Node\Expr\BinaryOp\Equal;
use PhpParser\Node\Expr\BooleanNot;
use PhpParser\Node\Expr\Empty_;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Isset_;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\String_;
use Rector\Core\NodeManipulator\BinaryOpManipulator;
use Rector\Core\Rector\AbstractRector;
use Rector\Php71\ValueObject\TwoNodeMatch;
use Symplify\RuleDocGenerator\Exception\PoorDocumentationException;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector;
/**
* Class with Rector custom rule to fix code
*/
class EmptyGlobalToFunction extends AbstractRector
{
/**
* @var \Rector\Core\NodeManipulator\BinaryOpManipulator
*/
private $binaryOpManipulator;
/**
* Constructor
*
* @param BinaryOpManipulator $binaryOpManipulator The $binaryOpManipulator
*/
public function __construct(BinaryOpManipulator $binaryOpManipulator)
{
$this->binaryOpManipulator = $binaryOpManipulator;
}
/**
* getRuleDefinition
*
* @return RuleDefinition
* @throws PoorDocumentationException
*/
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Change $conf->global to getDolGlobal',
[new CodeSample(
'$conf->global->CONSTANT',
'getDolGlobalInt(\'CONSTANT\')'
)]
);
}
/**
* Return a node type from https://github.com/rectorphp/php-parser-nodes-docs/
*
* @return string[]
*/
public function getNodeTypes(): array
{
return [Node\Expr\BooleanNot::class, Node\Expr\Empty_::class];
}
/**
* refactor
*
* @param Node $node A node
* @return FuncCall|BooleanNot
*/
public function refactor(Node $node)
{
if ($node instanceof Node\Expr\BooleanNot) {
if (!$node->expr instanceof Node\Expr\Empty_) {
return null;
}
// node is !empty(...) so we set node to ...
$newnode = $node->expr->expr;
$tmpglobal = $newnode->var;
if (is_null($tmpglobal)) {
return null;
}
if (!$this->isName($tmpglobal, 'global')) {
return null;
}
$tmpconf = $tmpglobal->var;
if (!$this->isName($tmpconf, 'conf')) {
return null;
}
$nameforconst = $this->getName($newnode);
if (is_null($nameforconst)) {
return null;
}
$constName = new String_($nameforconst);
// We found a node !empty(conf->global->XXX)
return new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
);
}
if ($node instanceof Node\Expr\Empty_) {
// node is empty(...) so we set node to ...
$newnode = $node->expr;
$tmpglobal = $newnode->var;
if (is_null($tmpglobal)) {
return null;
}
if (!$this->isName($tmpglobal, 'global')) {
return null;
}
$tmpconf = $tmpglobal->var;
if (!$this->isName($tmpconf, 'conf')) {
return null;
}
$nameforconst = $this->getName($newnode);
if (is_null($nameforconst)) {
return null;
}
$constName = new String_($nameforconst);
return new BooleanNot(new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
));
}
return null;
}
/**
* Get nodes with check empty
*
* @param BooleanAnd $booleanAnd A BooleandAnd
* @return TwoNodeMatch|null
*/
private function resolveTwoNodeMatch(BooleanAnd $booleanAnd): ?TwoNodeMatch
{
return $this->binaryOpManipulator->matchFirstAndSecondConditionNode(
$booleanAnd,
// $conf->global == $value
function (Node $node): bool {
if (!$node instanceof Equal) {
return \false;
}
return $this->isGlobalVar($node->left);
},
// !empty(...) || isset(...)
function (Node $node): bool {
if ($node instanceof BooleanNot && $node->expr instanceof Empty_) {
return $this->isGlobalVar($node->expr->expr);
}
if (!$node instanceof Isset_) {
return $this->isGlobalVar($node);
}
return \true;
}
);
}
/**
* Check if node is a global access with format conf->global->XXX
*
* @param Node $node A node
* @return bool Return true if noe is conf->global->XXX
*/
private function isGlobalVar($node)
{
if (!$node instanceof PropertyFetch) {
return false;
}
if (!$this->isName($node->var, 'global')) {
return false;
}
$global = $node->var;
if (!$global instanceof PropertyFetch) {
return false;
}
if (!$this->isName($global->var, 'conf')) {
return false;
}
return true;
}
/**
* @param Node $node Node to be parsed
* @return Node|void Return the name of the constant
*/
private function getConstName($node)
{
if ($node instanceof PropertyFetch && $node->name instanceof Node\Expr) {
return $node->name;
}
$name = $this->getName($node);
if (empty($name)) {
return;
}
return new String_($name);
}
}

View File

@@ -1,391 +0,0 @@
<?php
namespace Dolibarr\Rector\Renaming;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
use PhpParser\Node\Expr\BinaryOp\Concat;
use PhpParser\Node\Expr\BinaryOp\Equal;
use PhpParser\Node\Expr\BooleanNot;
use PhpParser\Node\Expr\Empty_;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Isset_;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\String_;
use Rector\Core\NodeManipulator\BinaryOpManipulator;
use Rector\Core\Rector\AbstractRector;
use Rector\Php71\ValueObject\TwoNodeMatch;
use Symplify\RuleDocGenerator\Exception\PoorDocumentationException;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use PhpParser\Node\Expr\BinaryOp\NotEqual;
use PhpParser\Node\Expr\BinaryOp\Greater;
use PhpParser\Node\Expr\BinaryOp\GreaterOrEqual;
use PhpParser\Node\Expr\BinaryOp\Smaller;
use PhpParser\Node\Expr\BinaryOp\SmallerOrEqual;
use PhpParser\Node\Expr\BinaryOp\NotIdentical;
/**
* Class with Rector custom rule to fix code
*/
class GlobalToFunction extends AbstractRector
{
/**
* @var \Rector\Core\NodeManipulator\BinaryOpManipulator
*/
private $binaryOpManipulator;
/**
* Constructor
*
* @param BinaryOpManipulator $binaryOpManipulator The $binaryOpManipulator
*/
public function __construct(BinaryOpManipulator $binaryOpManipulator)
{
$this->binaryOpManipulator = $binaryOpManipulator;
}
/**
* getRuleDefinition
*
* @return RuleDefinition
* @throws PoorDocumentationException
*/
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Change $conf->global to getDolGlobal in context (1) conf->global Operator Value or (2) function(conf->global...)',
[new CodeSample(
'$conf->global->CONSTANT',
'getDolGlobalInt(\'CONSTANT\')'
)]
);
}
/**
* Return a node type from https://github.com/rectorphp/php-parser-nodes-docs/
*
* @return string[]
*/
public function getNodeTypes(): array
{
return [FuncCall::class, MethodCall::class, Equal::class, NotEqual::class, Greater::class, GreaterOrEqual::class, Smaller::class, SmallerOrEqual::class, NotIdentical::class, BooleanAnd::class, Concat::class, ArrayDimFetch::class];
}
/**
* refactor
*
* @param Node $node A node
* @return FuncCall|Equal|Concat|ArrayDimFetch|void
* return $node unchanged or void to do nothing
*/
public function refactor(Node $node)
{
if ($node instanceof Node\Expr\ArrayDimFetch) {
if (!isset($node->dim)) {
return;
}
if ($this->isGlobalVar($node->dim)) {
$constName = $this->getConstName($node->dim);
if (empty($constName)) {
return;
}
$node->dim = new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
);
}
return $node;
}
if ($node instanceof FuncCall) {
$tmpfunctionname = $this->getName($node);
// If function is ok. We must avoid a lot of cases like isset(), empty()
if (in_array($tmpfunctionname, array('dol_escape_htmltag', 'dol_hash', 'make_substitutions', 'min', 'max', 'explode'))) {
//print "tmpfunctionname=".$tmpfunctionname."\n";
$args = $node->getArgs();
$nbofparam = count($args);
if ($nbofparam >= 1) {
$tmpargs = $args;
foreach ($args as $key => $arg) { // only 1 element in this array
//var_dump($key);
//var_dump($arg->value);exit;
if ($this->isGlobalVar($arg->value)) {
$constName = $this->getConstName($arg->value);
if (empty($constName)) {
return;
}
$a = new FuncCall(new Name('getDolGlobalString'), [new Arg($constName)]);
$tmpargs[$key] = new Arg($a);
$r = new FuncCall(new Name($tmpfunctionname), $tmpargs);
return $r;
}
}
}
}
return $node;
}
if ($node instanceof MethodCall) {
$tmpmethodname = $this->getName($node->name);
// If function is ok. We must avoid a lot of cases
if (in_array($tmpmethodname, array('idate'))) {
//print "tmpmethodname=".$tmpmethodname."\n";
$expr = $node->var;
$args = $node->getArgs();
$nbofparam = count($args);
if ($nbofparam >= 1) {
$tmpargs = $args;
foreach ($args as $key => $arg) { // only 1 element in this array
//var_dump($key);
//var_dump($arg->value);exit;
if ($this->isGlobalVar($arg->value)) {
$constName = $this->getConstName($arg->value);
if (empty($constName)) {
return;
}
$a = new FuncCall(new Name('getDolGlobalString'), [new Arg($constName)]);
$tmpargs[$key] = new Arg($a);
$r = new MethodCall($expr, $tmpmethodname, $tmpargs);
return $r;
}
}
}
}
return $node;
}
if ($node instanceof Concat) {
if ($this->isGlobalVar($node->left)) {
$constName = $this->getConstName($node->left);
if (empty($constName)) {
return;
}
$leftConcat = new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
);
$rightConcat = $node->right;
}
if ($this->isGlobalVar($node->right)) {
$constName = $this->getConstName($node->right);
if (empty($constName)) {
return;
}
$rightConcat = new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
);
$leftConcat = $node->left;
}
if (!isset($leftConcat, $rightConcat)) {
return;
}
return new Concat($leftConcat, $rightConcat);
}
if ($node instanceof BooleanAnd) {
$nodes = $this->resolveTwoNodeMatch($node);
if (!isset($nodes)) {
return;
}
/** @var Equal $node */
$node = $nodes->getFirstExpr();
}
// Now process all comparison like:
// $conf->global->... Operator Value
$typeofcomparison = '';
if ($node instanceof Equal) {
$typeofcomparison = 'Equal';
}
if ($node instanceof NotEqual) {
$typeofcomparison = 'NotEqual';
}
if ($node instanceof Greater) {
$typeofcomparison = 'Greater';
}
if ($node instanceof GreaterOrEqual) {
$typeofcomparison = 'GreaterOrEqual';
}
if ($node instanceof Smaller) {
$typeofcomparison = 'Smaller';
}
if ($node instanceof SmallerOrEqual) {
$typeofcomparison = 'SmallerOrEqual';
}
if ($node instanceof NotIdentical) {
$typeofcomparison = 'NotIdentical';
//var_dump($node->left);
}
if (empty($typeofcomparison)) {
return;
}
if (!$this->isGlobalVar($node->left)) {
return;
}
// Test the type after the comparison conf->global->xxx to know the name of function
$typeright = $node->right->getType();
switch ($typeright) {
case 'Scalar_LNumber':
$funcName = 'getDolGlobalInt';
break;
case 'Scalar_String':
$funcName = 'getDolGlobalString';
break;
default:
return;
}
$constName = $this->getConstName($node->left);
if (empty($constName)) {
return;
}
if ($typeofcomparison == 'Equal') {
return new Equal(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'NotEqual') {
return new NotEqual(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'Greater') {
return new Greater(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'GreaterOrEqual') {
return new GreaterOrEqual(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'Smaller') {
return new Smaller(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'SmallerOrEqual') {
return new SmallerOrEqual(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'NotIdentical') {
return new NotIdentical(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
}
/**
* Get nodes with check empty
*
* @param BooleanAnd $booleanAnd A BooleandAnd
* @return TwoNodeMatch|null
*/
private function resolveTwoNodeMatch(BooleanAnd $booleanAnd): ?TwoNodeMatch
{
return $this->binaryOpManipulator->matchFirstAndSecondConditionNode(
$booleanAnd,
// Function to check if we are in the case $conf->global->... == $value
function (Node $node): bool {
if (!$node instanceof Equal) {
return \false;
}
return $this->isGlobalVar($node->left);
},
// !empty(...) || isset(...)
function (Node $node): bool {
if ($node instanceof BooleanNot && $node->expr instanceof Empty_) {
return $this->isGlobalVar($node->expr->expr);
}
if (!$node instanceof Isset_) {
return $this->isGlobalVar($node);
}
return \true;
}
);
}
/**
* Check if node is a global access with format conf->global->XXX
*
* @param Node $node A node
* @return bool Return true if node is conf->global->XXX
*/
private function isGlobalVar($node)
{
if (!$node instanceof PropertyFetch) {
return false;
}
if (!$this->isName($node->var, 'global')) {
return false;
}
$global = $node->var;
if (!$global instanceof PropertyFetch) {
return false;
}
if (!$this->isName($global->var, 'conf')) {
return false;
}
return true;
}
/**
* @param Node $node Node to be parsed
* @return Node|void Return the name of the constant
*/
private function getConstName($node)
{
if ($node instanceof PropertyFetch && $node->name instanceof Node\Expr) {
return $node->name;
}
$name = $this->getName($node);
if (empty($name)) {
return;
}
return new String_($name);
}
}

View File

@@ -1,153 +0,0 @@
<?php
namespace Dolibarr\Rector\Renaming;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Scalar\String_;
use PhpParser\NodeTraverser;
use Rector\Core\PhpParser\Node\NodeFactory;
use Rector\Core\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* Class to refactor User rights
*/
class UserRightsToFunction extends AbstractRector
{
/**
* @param \Rector\Core\PhpParser\Node\NodeFactory $nodeFactory node factory
*/
public function __construct(NodeFactory $nodeFactory)
{
$this->nodeFactory = $nodeFactory;
}
/**
* @throws \Symplify\RuleDocGenerator\Exception\PoorDocumentationException
* @return RuleDefinition
*/
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Change \$user->rights->module->permission to \$user->hasRight(\'module\', \'permission\')',
[new CodeSample(
'$user->rights->module->permission',
'$user->hasRight(\'module\', \'permission\')'
)]
);
}
/**
* Return a node type from https://github.com/rectorphp/php-parser-nodes-docs/
*
* @return string[]
*/
public function getNodeTypes(): array
{
return [
Node\Expr\Assign::class,
Node\Expr\PropertyFetch::class,
Node\Expr\BooleanNot::class,
Node\Expr\Empty_::class,
Node\Expr\Isset_::class,
Node\Stmt\ClassMethod::class
];
}
/**
* @param \PhpParser\Node $node node to be changed
* @return \PhpParser\Node|\PhpParser\Node[]|\PhpParser\Node\Expr\MethodCall|void|null| int
*/
public function refactor(Node $node)
{
if ($node instanceof Node\Stmt\ClassMethod) {
$excludeMethods = ['getrights', 'hasRight'];
/** @var \PHPStan\Analyser\MutatingScope $scope */
$scope = $node->getAttribute('scope');
$class = $scope->getClassReflection();
$classes = ['UserGroup', 'User'];
if (isset($class) && in_array($class->getName(), $classes)) {
if (in_array($this->getName($node), $excludeMethods)) {
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
}
}
}
if ($node instanceof Node\Expr\Assign) {
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
}
$isInverse = false;
if ($node instanceof Node\Expr\BooleanNot) {
if (!$node->expr instanceof Node\Expr\Empty_) {
return null;
}
$node = $node->expr->expr;
}
if ($node instanceof Node\Expr\Empty_) {
$node = $node->expr;
$isInverse = true;
}
if ($node instanceof Node\Expr\Isset_) {
// Take first arg for isset (No code found with multiple isset).
$node = $node->vars[0];
}
if (!$node instanceof Node\Expr\PropertyFetch) {
return;
}
$data = $this->getRights($node);
if (!isset($data)) {
return;
}
$args = [new Arg($data['module']), new Arg($data['perm1'])];
if (!empty($data['perm2'])) {
$args[] = new Arg($data['perm2']);
}
$method = $this->nodeFactory->createMethodCall($data['user'], 'hasRight', $args);
if ($isInverse) {
return new Node\Expr\BooleanNot($method);
}
return $method;
}
/**
* @param \PhpParser\Node\Expr\PropertyFetch $node node
* @return array|null
*/
private function getRights(Node\Expr\PropertyFetch $node)
{
$perm2 = '';
if (!$node->var instanceof Node\Expr\PropertyFetch) {
return null;
}
// Add a test to avoid rector error on html.formsetup.class.php
if (!$node->name instanceof Node\Expr\Variable && is_null($this->getName($node))) {
//var_dump($node);
return null;
//exit;
}
$perm1 = $node->name instanceof Node\Expr\Variable ? $node->name : new String_($this->getName($node));
$moduleNode = $node->var;
if (!$moduleNode instanceof Node\Expr\PropertyFetch) {
return null;
}
if (!$moduleNode->var instanceof Node\Expr\PropertyFetch) {
return null;
}
if (!$this->isName($moduleNode->var, 'rights')) {
$perm2 = $perm1;
$perm1 = $moduleNode->name instanceof Node\Expr\Variable ? $moduleNode->name : new String_($this->getName($moduleNode));
$moduleNode = $moduleNode->var;
}
$module = $moduleNode->name instanceof Node\Expr\Variable ? $moduleNode->name : new String_($this->getName($moduleNode));
$rights = $moduleNode->var;
if (!$this->isName($rights, 'rights') || !isset($perm1) || !isset($module)) {
return null;
}
if (!$rights->var instanceof Node\Expr\Variable) {
return null;
}
$user = $rights->var;
return compact('user', 'module', 'perm1', 'perm2');
}
}

146
dev/tools/spider.php Normal file
View File

@@ -0,0 +1,146 @@
#!/usr/bin/env php
<?php
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file dev/tools/spider.php
* \brief Script to spider Dolibarr app.
*
* To use it:
* - Disable module "bookmark"
* - Exclude param optioncss, token, sortfield, sortorder
*/
$crawledLinks=array();
const MAX_DEPTH=2;
/**
* @param string $url URL
* @param string $depth Depth
* @return string String
*/
function followLink($url, $depth = 0)
{
global $crawledLinks;
$crawling=array();
if ($depth>MAX_DEPTH) {
echo "<div style='color:red;'>The Crawler is giving up!</div>";
return;
}
$options=array(
'http'=>array(
'method'=>"GET",
'user-agent'=>"gfgBot/0.1\n"
)
);
$context=stream_context_create($options);
$doc=new DomDocument();
@$doc->loadHTML(file_get_contents($url, false, $context));
$links=$doc->getElementsByTagName('a');
$pageTitle=getDocTitle($doc, $url);
$metaData=getDocMetaData($doc);
foreach ($links as $i) {
$link=$i->getAttribute('href');
if (ignoreLink($link)) continue;
$link=convertLink($url, $link);
if (!in_array($link, $crawledLinks)) {
$crawledLinks[]=$link;
$crawling[]=$link;
insertIntoDatabase($link, $pageTitle, $metaData, $depth);
}
}
foreach ($crawling as $crawlURL)
followLink($crawlURL, $depth+1);
}
/**
* @param string $site Site
* @param string $path Path
* @return string String
*/
function convertLink($site, $path)
{
if (substr_compare($path, "//", 0, 2)==0)
return parse_url($site)['scheme'].$path;
elseif (substr_compare($path, "http://", 0, 7)==0
or substr_compare($path, "https://", 0, 8)==0
or substr_compare($path, "www.", 0, 4)==0
)
return $path;
else return $site.'/'.$path;
}
/**
* @param string $url URL
* @return boolean
*/
function ignoreLink($url)
{
return $url[0]=="#" or substr($url, 0, 11) == "javascript:";
}
/**
* @param string $link URL
* @param string $title Title
* @param string $metaData Array
* @param int $depth Depth
* @return void
*/
function insertIntoDatabase($link, $title, &$metaData, $depth)
{
//global $crawledLinks;
echo "Inserting new record {URL= ".$link.", Title = '$title', Description = '".$metaData['description']."', Keywords = ' ".$metaData['keywords']."'}<br/><br/><br/>";
//²$crawledLinks[]=$link;
}
/**
* @param string $doc Doc
* @param string $url URL
* @return string URL/Title
*/
function getDocTitle(&$doc, $url)
{
$titleNodes=$doc->getElementsByTagName('title');
if (count($titleNodes)==0 or !isset($titleNodes[0]->nodeValue))
return $url;
$title=str_replace('', '\n', $titleNodes[0]->nodeValue);
return (strlen($title)<1)?$url:$title;
}
/**
* @param string $doc Doc
* @return array Array
*/
function getDocMetaData(&$doc)
{
$metaData=array();
$metaNodes=$doc->getElementsByTagName('meta');
foreach ($metaNodes as $node)
$metaData[$node->getAttribute("name")] = $node->getAttribute("content");
if (!isset($metaData['description']))
$metaData['description']='No Description Available';
if (!isset($metaData['keywords'])) $metaData['keywords']='';
return array(
'keywords'=>str_replace('', '\n', $metaData['keywords']),
'description'=>str_replace('', '\n', $metaData['description'])
);
}
followLink("http://localhost/dolibarr_dev/htdocs");

Some files were not shown because too many files have changed in this diff Show More