2
0
forked from Wavyzz/dolibarr

Compare commits

..

181 Commits
20.0.1 ... 17.0

Author SHA1 Message Date
Marc de Lima Lucio
a3969c1d2c FIX: php 8+ warnings when creating deposits (#35582) 2025-10-01 16:21:05 +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
Dylan Bourdere
65a3b0893d fix undefined properties (#35435) 2025-09-22 20:31:50 +02:00
Dylan Bourdere
92454d671f rename tab name in comment of modulebuilder (#35431) 2025-09-22 12:11:32 +02:00
Frédéric FRANCE
f43f2909ff rule is deprecated (#35410) 2025-09-20 16:02:39 +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
atm-lucas
7d898184b5 Modify condition display button (#35257) 2025-09-09 19:30:14 +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
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
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
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
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
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
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
Laurent Destailleur
53cf9f0bf1 Doc 2025-07-05 00:40:19 +02:00
ldestailleur
c0161ccead Fix CI 2025-06-28 18:54:53 +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
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
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
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
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
ldestailleur
ef159f919e Backport fix in v20 #33536 2025-03-19 16:10:25 +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
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
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
Florian Mortgat
f7fe6c4f1a FIX warnings (#33423)
* FIX warnings

* fix: empty({function call})
2025-03-12 19:15:24 +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 (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
bbb8b0f01f Merge pull request #32830 from hregis/17.0
FIX compatibility with multicompany
2025-01-30 13:25:07 +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
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
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
Irvine Fleith
bdcd7b5ef3 fix(services-list): added missing hook printFieldListWhere 2025-01-28 14:47:10 +01:00
Regis Houssin
f9ec70f1db FIX compatibility with multicompany 2025-01-28 14:05:59 +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
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
db47ce3bb1 FIX delete supplier order line when linked to customer order line 2025-01-20 11:33:24 +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
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
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
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)
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
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
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
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
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
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
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
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
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
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)
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
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
Etienne BENDER
6aee2db1d4 Remove use of getDolGlobalInt() 2024-12-17 09:01:04 +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
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
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
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
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
Frédéric FRANCE
7b16039084 fix test (#32110) 2024-11-27 18:02:59 +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
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
c5ebc9b7bd Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-11-19 03:33:15 +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
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
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
Florian Mortgat
723c8278ce FIX 17.0 fatal when updating recurring supplier invoice line with php8 ($remise_percent is '' instead of 0) (#31713) 2024-11-06 19:20:38 +01:00
atm-jonathan
7133c6529b FIX show preview pdf list expensereport (#31694)
* show preview pdf list expensereport

* conditions added
2024-11-05 13:51:26 +01:00
lvessiller-opendsi
e0a3756c6e FIX update status on create supplier order for trigger (#31642) 2024-10-30 23:35:39 +01:00
Laurent Destailleur
1987ea2eb7 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-10-29 15:47:51 +01:00
Laurent Destailleur
6a4ee18380 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-10-29 15:47:17 +01:00
Laurent Destailleur
b3a2908b48 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-10-29 15:46:43 +01:00
Laurent Destailleur
910f7e8564 Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0 2024-10-29 15:46:12 +01:00
Laurent Destailleur
7cf1a97673 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0 2024-10-29 15:44:55 +01:00
Laurent Destailleur
cf57e7e88b Merge 2024-10-29 15:44:25 +01:00
Laurent Destailleur
8b4dcb1194 FIX email templates for expense report not visible 2024-10-29 15:43:16 +01:00
Laurent Destailleur
a186e16568 Backport fix for mysql 8 export 2024-10-29 15:32:54 +01:00
Frédéric FRANCE
1d197e42bb fix shippable tooltip value overwritten (#31468) 2024-10-20 00:11:04 +02:00
Florian Mortgat
abefce7ae2 FIX 17.0: supplier invoice template card: buyer and seller swapped in VAT-related function calls (probably a copy-paste from customer invoice templates) (#31446) 2024-10-19 01:55:58 +02:00
atm-irvine
352bdaf9c4 FIX : Extrafield following between rec invoice and classic invoice (#31445) 2024-10-19 01:33:31 +02:00
Laurent Destailleur
111e3fcd32 Revert "NEW - Add a new hook on order list (#31315)"
This reverts commit 1e64870a9e.
2024-10-17 00:52:42 +02:00
Laurent Destailleur
278eea6fae Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-10-14 20:18:22 +02:00
Laurent Destailleur
fa22ebd893 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-10-14 19:31:08 +02:00
Laurent Destailleur
793e77bc5f Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-10-14 19:21:00 +02:00
thomas-Ngr
70a453a5c2 FIX: substitutions THIRDPARTY_XXX are not available for actioncomm reminders (#31385) 2024-10-14 11:57:55 +02:00
atm-lucas
1e64870a9e NEW - Add a new hook on order list (#31315)
* Add a new hook on order list

* pr correction
2024-10-11 15:53:43 +02:00
Laurent Destailleur
9509929f5d Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-10-07 15:11:42 +02:00
thomas-Ngr
336d3ad8e5 finish fix (#31203) 2024-10-03 21:03:13 +02:00
thomas-Ngr
e71631abe0 fix : missing update for extrafields on holidays (#31256) 2024-10-03 19:33:33 +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
10930 changed files with 549797 additions and 753665 deletions

View File

@@ -4,10 +4,10 @@ languages:
JavaScript: true
PHP: true
engines:
phpcodesniffer: true
phpcodesniffer: true
exclude_paths:
- 'build/*'
- 'dev/*'
- 'doc/*'
- 'test/*'
- 'htdocs/includes/*'
- 'htdocs/includes/*'

View File

@@ -22,7 +22,3 @@ indent_style = tab
indent_style = tab
[*.md]
trim_trailing_whitespace = false
[*.sql]
indent_style = tab
trim_trailing_whitespace = true
indent_size = 4

3
.gitattributes vendored
View File

@@ -3,7 +3,7 @@
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.php text eol=lf
*.pl text eol=lf
@@ -21,7 +21,6 @@
*.yml text eol=lf
*.yaml text eol=lf
*.conf text eol=lf
*.neon text eol=lf
.bash_aliases text eol=lf

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
@@ -30,30 +30,25 @@ Default **language here is English**. So please prepare your contributions in En
5. Commit and push your changes.
6. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
<span id="branches" name="branches"></span>
### Branches
Unless you're fixing a bug, all pull requests should be made against the *develop* branch.
If you're fixing a bug, it is preferred that you cook your fix and pull request it against 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.
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.
We officially support versions N, N 1 and N 2 for N the latest version available.
Choose your base branch accordingly.
### General rules
Please don't edit the ChangeLog file. 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
@@ -71,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.
@@ -98,24 +90,22 @@ 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
Pull Request (PR) process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules to know and
a process to follow to optimize the chance to have PRs merged efficiently...
@@ -125,13 +115,11 @@ a process to follow to optimize the chance to have PRs merged efficiently...
* When submitting a pull request, use same rule as [Commits](#commits) for the message. If your pull request only contains 1 commit, GitHub will be smart enough to fill it for you. Otherwise, please be a bit verbose about what you're providing.
* A screenshot will be always required for any PR of change/addition of a GUI behaviour.
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).
@@ -142,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
@@ -157,7 +144,7 @@ All other translations are managed online at [Transifex](https://www.transifex.c
Translations done on transifex are available in the next major release.
Note: Sometimes, the source text (English) is modified. In such a case, the translation is reset. Transifex assume that if the original source
Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
to retrieve all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.

2
.github/FUNDING.yml vendored
View File

@@ -2,4 +2,4 @@
open_collective: dolibarr
custom: https://wiki.dolibarr.org/index.php/Subscribe
github: [eldy]
github: [eldy]

View File

@@ -7,7 +7,7 @@ body:
attributes:
value: |
This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.
- type: textarea
id: bug
attributes:
@@ -19,30 +19,53 @@ body:
- type: input
id: environment-version
attributes:
label: Dolibarr Version
label: Environment Version
description: Affected Dolibarr version(s)
placeholder: 19.0, develop, ...
- type: input
id: environment-os
attributes:
label: Environment OS
description: Server OS type and version
- type: input
id: environment-webserver
attributes:
label: Environment Web server
description: Webserver type and version
- type: input
id: environment-php
attributes:
label: Environment PHP
description: PHP version
- type: input
id: environment-database
attributes:
label: Environment Database
description: Database type and version
- type: input
id: environment-urls
attributes:
label: Environment URL(s)
description: Affected URL(s)
- type: textarea
id: expected-behaviour
attributes:
label: Expected and actual behavior
description: Verbose description
- type: textarea
id: reproduce
attributes:
label: Steps to reproduce the behavior and expected behavior
label: Steps to reproduce the behavior
description: Verbose description
- type: textarea
id: files
attributes:
label: Attached files
description: Screenshots, screencasts, dolibarr.log, debugging information
description: Screenshots, screencasts, dolibarr.log, debugging informations

View File

@@ -21,7 +21,7 @@ body:
attributes:
label: Use case
description: Verbose description
- type: textarea
id: suggested-implementation
attributes:

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

@@ -1,16 +0,0 @@
# Workflow run order
To reduce run minutes, the following order is put in place:
On PR & Merge, always run:
- pre-commit;
- phan.
When both succeed, start:
- phpstan;
- Windows-ci;
- travis.
See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow

View File

@@ -1,36 +0,0 @@
---
name: Cleanup caches of a closed branch
# See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#force-deletion-of-caches-overriding-default-cache-eviction-policy
on:
pull_request:
types: [closed]
workflow_dispatch:
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
# `actions:write` permission is required to delete caches
# See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id
actions: write
contents: read
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,40 +0,0 @@
name: "CI"
on: [push, pull_request]
jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml
secrets: inherit
with:
gh_event: ${{ github.event_name }}
phan:
uses: ./.github/workflows/phan.yml
secrets: inherit
with:
gh_event: ${{ github.event_name }}
phpstan:
uses: ./.github/workflows/phpstan.yml
secrets: inherit
needs: [pre-commit, phan]
with:
gh_event: ${{ github.event_name }}
windows-ci:
needs: [pre-commit, phan]
secrets: inherit
uses: ./.github/workflows/windows-ci.yml
with:
gh_event: ${{ github.event_name }}
gh-travis: # Runs travis script on github runner (not on travis)
if: false
# needs: [pre-commit, phan]
# needs: [windows-ci]
secrets: inherit
uses: ./.github/workflows/gh-travis.yml
with:
gh_event: ${{ github.event_name }}
# Note (not tested, from https://github.com/orgs/community/discussions/38361)
# To cancel jobs if one failes, the following action may help
# - if: "failure()"
# uses: "andymckay/cancel-action@0.3"

View File

@@ -1,28 +0,0 @@
name: Qodana
on:
schedule:
- cron: "0 20 * * 1,3,5"
workflow_dispatch:
branches:
- develop
# push:
# branches:
# - develop
permissions:
contents: read
jobs:
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
#php-version: '7.1'
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2.1
#with:
# php-version: '7.1'
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

View File

@@ -1,38 +0,0 @@
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Doxygen
on:
schedule:
- cron: "0 15 * * *"
workflow_dispatch:
branches:
- develop
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Build
uses: DenverCoder1/doxygen-github-pages-action@v1.2.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: build/html
config_file: build/doxygen/dolibarr-doxygen.doxyfile
# - name: Deploy
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# branch: gh-pages
# folder: build/html # The folder the action should deploy.
# target-folder: docs/html2
#jobs:
# doxygen:
# runs-on: ubuntu-latest
# steps:
# - name: 'Doxygen'
# uses: mattnotmitt/doxygen-action@1.9.5
# with:
# doxyfile-path: build/doxygen

View File

@@ -2,12 +2,8 @@
name: "Exakat analysis"
on:
# execute once a month, the 1st
schedule:
- cron: "0 20 1 * *"
workflow_dispatch:
branches:
- develop
- cron: "0 20 * * *"
permissions:
contents: read
@@ -16,13 +12,9 @@ jobs:
exakat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/checkout@v3
- name: Exakat
uses: docker://exakat/exakat-ga
with:
ignore_rules: 'Classes/UseInstanceof,Constants/ConstantStrangeNames,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

@@ -1,49 +0,0 @@
---
# This runs a travis script inside a github runner
name: Travis
# Controls when the workflow will run
on:
# push:
# pull_request:
workflow_call:
inputs:
gh_event:
required: true
type: string
workflow_dispatch:
concurrency:
group: travis-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
}}
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job
gh-travis:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
fail-fast: false
# matrix:
# php-version:
# # PHPStan requires PHP >= 7.2.
# #- "7.2"
# - "8.2"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout travis file
uses: actions/checkout@v4
- name: Run .travis.yml build script
uses: ktomk/run-travis-yml@v1
with:
# run-job: travis # name of a job in travis file
allow-failure: false
# file: .travis.yml
# steps: | # Default: setup, before_install, install, before_script, script, after_script, before_deploy
# install
# script
# env:
# TRAVIS_PHP_VERSION: ${{ matrix.php-version }}

View File

@@ -116,19 +116,18 @@ jobs:
mysql --version | head -
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head -
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
echo "Drop and create database"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
echo "Init postgresql database"
#psql -c 'create database travis;' -U postgres
#psql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
#pgloader mysql://root:pass@127.0.0.1:32574/dolibarr_src postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dest
ps fauxww | grep postgres
ls /etc/postgresql/14/main/
sudo chmod -R a+rwx /etc/postgresql/14/main/pg_hba.conf
@@ -144,12 +143,10 @@ jobs:
sudo mkdir -p /tmp/pgloader
sudo chmod -R a+rwx /tmp/pgloader/
echo sudo pgloader mysql://root:password@127.0.0.1:32574/travis postgresql://postgres:postgres@127.0.0.1:5432/travis
sudo pgloader mysql://root:password@127.0.0.1:32574/travis postgresql://postgres:postgres@127.0.0.1:5432/travis
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql postgresql://postgres:postgres@127.0.0.1:5432/travis
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql postgresql://postgres:postgres@127.0.0.1:5432/travis
# Create pgsql compatibility functions
psql postgresql://postgres:postgres@127.0.0.1:5432/travis < htdocs/install/pgsql/functions/functions.sql
@@ -163,11 +160,11 @@ jobs:
echo '$'dolibarr_main_data_root=\'/var/www/html/documents\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_user=\'postgres\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_pass=\'postgres\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_user=\'root\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_pass=\'password\'';' >> $CONF_FILE
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=\'32574\'';' >> $CONF_FILE
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
cat $CONF_FILE
- name: Generate install.forced.php file to test installation
@@ -178,11 +175,13 @@ jobs:
set +e
echo '<?php' > $INSTALL_FORCED_FILE
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
#echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databaselogin=\'postgres\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databasepass=\'postgres\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databaselogin=\'root\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databasepass=\'password\'';' >> $INSTALL_FORCED_FILE
#echo '$'force_install_port=\'32574\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
@@ -235,7 +234,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
@@ -261,7 +260,6 @@ jobs:
sudo chmod -R a+rwx /var/www
ls -l /var/www
cd /var/www/html/install
echo Execute upgrade, upgrade2 and step5 for each major version
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade350360.log
php upgrade2.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-2.log
@@ -287,10 +285,6 @@ jobs:
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade600700.log
php upgrade2.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-2.log
php step5.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-3.log
echo "\dt llx_c_paiement" | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
echo "\dt llx_c_payment_term" | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade700800.log
php upgrade2.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-2.log
php step5.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-3.log
@@ -321,9 +315,6 @@ jobs:
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade16001700.log
php upgrade2.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-2.log
php step5.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-3.log
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log
- name: Result of migration scripts
if: always()

View File

@@ -46,8 +46,6 @@ jobs:
sudo update-alternatives --set php /usr/bin/php8.1
php -i | head -
cd $GITHUB_WORKSPACE
ls $GITHUB_WORKSPACE
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
php-parallel-lint/php-parallel-lint ^1.2 \
php-parallel-lint/php-console-highlighter ^0 \
@@ -96,18 +94,14 @@ jobs:
mysql --version | head -
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head -
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
echo "Drop and create database"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
- name: Generate Dolibarr conf file
run: |
export CONF_FILE=$GITHUB_WORKSPACE/htdocs/conf/conf.php
@@ -133,12 +127,16 @@ jobs:
set +e
echo '<?php' > $INSTALL_FORCED_FILE
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
# For mysql
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
#echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databaselogin=\'root\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databasepass=\'password\'';' >> $INSTALL_FORCED_FILE
# For mysql
echo '$'force_install_port=\'32574\'';' >> $INSTALL_FORCED_FILE
#echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
@@ -190,7 +188,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
@@ -271,9 +269,6 @@ jobs:
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade16001700.log
php upgrade2.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-2.log
php step5.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-3.log
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log
- name: Result of migration scripts
if: always()

View File

@@ -1,58 +0,0 @@
---
on:
# pull_request:
# push:
# schedule:
# # execute once a day, the 1st
# - cron: 10 9 * * *
workflow_call:
inputs:
gh_event:
required: true
type: string
workflow_dispatch:
concurrency:
group: phan-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
PHAN_CONFIG: >
${{ 'dev/tools/phan/config.php' }}
PHAN_BASELINE: dev/tools/phan/baseline.txt
PHAN_MIN_PHP: 7.0
PHAN_QUICK: ${{ github.event.schedule && '' || '--quick' }}
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
name: phan
jobs:
phan:
name: Run phan
runs-on: ubuntu-latest
# Do not run schedule on forks
if: |
github.repository == 'Dolibarr/dolibarr'
|| github.event.schedule == false
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none # disable xdebug, pcov
tools: cs2pr,phan
- name: Run Phan analysis
run: |
phan $PHAN_QUICK -k $PHAN_CONFIG -B $PHAN_BASELINE --analyze-twice --minimum-target-php-version $PHAN_MIN_PHP --output-mode=checkstyle -o _phan.xml
- name: Add results to PR
if: ${{ always() }}
run: |
cs2pr --prepend-filename --prepend-source --notices-as-warnings _phan.xml
- name: Provide phan log as artifact
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: phan-srcrt
# path: ${{ github.workspace }}/phan.log
path: ${{ github.workspace }}/_phan.xml
retention-days: 2

View File

@@ -1,32 +0,0 @@
name: "PHPCS"
on:
push:
pull_request:
paths:
- "**.php"
- "phpcs.xml"
- ".github/workflows/phpcs.yml"
jobs:
phpcs:
runs-on: ubuntu-latest
steps:
# Get git sources
- uses: actions/checkout@v4
with:
fetch-depth: 50 # important!
# we may use whatever way to install phpcs, just specify the path on the next step
# however, curl seems to be the fastest
- name: Install PHP_CodeSniffer
run: |
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
php phpcs.phar --version
- uses: thenabeel/action-phpcs@v8
with:
files: "**.php" # you may customize glob as needed
phpcs_path: php phpcs.phar
standard: dev/setup/codesniffer/ruleset.xml
fail_on_warnings: false

View File

@@ -1,88 +0,0 @@
---
# This is a basic workflow to check code with PHPSTAN tool
name: PHPStan
# Controls when the workflow will run
on:
# push:
# pull_request:
workflow_call:
inputs:
gh_event:
required: true
type: string
workflow_dispatch:
concurrency:
group: stan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
}}
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job
php-stan:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
# PHPStan requires PHP >= 7.2.
#- "7.2"
- '8.2'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Get PHP and addons
- name: Setup PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: phpstan, cs2pr
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap,
mysql, pgsql, sqlite3, ldap, xml, mcrypt
# Restore old cache
- name: Restore phpstan cache
id: cache
uses: actions/cache/restore@v4
with:
path: ./.github/tmp
key: phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-${{
github.run_id }}
restore-keys: |
phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-
phpstan-cache-${{ matrix.php-version }}-${{ github.head_ref }}-
phpstan-cache-${{ matrix.php-version }}-${{ github.base_ref }}-
phpstan-cache-${{ matrix.php-version }}-
- name: Show debug into
run: cd ./.github/tmp && ls -al
# Run PHPStan
- name: Run PHPStan
id: phpstan
run: |
phpstan -vvv analyse --error-format=checkstyle --memory-limit 7G -a build/phpstan/bootstrap_action.php | tee _stan.xml | cs2pr --graceful-warnings
# continue-on-error: true
# Save cache
- name: Save phpstan cache
uses: actions/cache/save@v4
if: ${{ success() || ( ! cancelled() && steps.cache.outputs.cache-hit != 'true' ) }}
with:
path: ./.github/tmp
key: phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-${{
github.run_id }}
- name: Provide phpstan log as artifact
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: phpstan-srcrt
path: ${{ github.workspace }}/_stan.xml
retention-days: 2

View File

@@ -1,21 +1,8 @@
---
name: pre-commit
on:
# pull_request:
# push:
workflow_call:
inputs:
gh_event:
required: true
type: string
workflow_dispatch:
concurrency:
group: pre-commit-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
}}
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
pull_request:
push:
jobs:
pre-commit:
runs-on: ubuntu-latest
@@ -27,19 +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.
# It sets the variable steps.changed-php.outputs.all_changed_files for other steps
# This is faster for a big repo.
- name: Get all changed php files (if PR)
id: changed-php
uses: tj-actions/changed-files@v44
if: env.gh_event == 'pull_request'
with:
files: |
**.php
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
@@ -51,19 +37,32 @@ jobs:
cache: pip
python-version: "3.11"
- run: python -m pip install pre-commit
# Restore previous cache of precommit
- uses: actions/cache/restore@v4
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
# Run all the precommit tools (defined in 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
env:
# SKIP is used by pre-commit to not execute certain hooks
SKIP: no-commit-to-branch,php-cs,php-cbf,trailing-whitespace,end-of-file-fixer
SKIP: no-commit-to-branch,php-cs,php-cbf,trailing-whitespace,end-of-file-fixer,check-json,check-executables-have-shebangs,check-shebang-scripts-are-executable,beautysh,yamllint,shellcheck
run: |
set -o pipefail
pre-commit gc
@@ -72,35 +71,14 @@ jobs:
# The next uses git, which is slow for a bit repo.
# - name: Get all changed php files (if PR)
# id: changed-php
# uses: tj-actions/changed-files@v44
# if: env.gh_event == 'pull_request'
# uses: tj-actions/changed-files@v42
# if: github.event_name == 'pull_request'
# with:
# files: |
# **.php
- name: Setup PHPCS
uses: shivammathur/setup-php@v2
# Install when we're going to run phpcs
if: |
! cancelled() &&
(
steps.changed-php.outputs.any_changed == 'true'
||
(
env.gh_event == '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: "! cancelled() && steps.changed-php.outputs.any_changed == 'true'"
if: steps.changed-php.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-php.outputs.all_changed_files }}
run: |
@@ -109,7 +87,7 @@ jobs:
- name: Run some pre-commit hooks on all files on push to "main" branches
if: |
env.gh_event == 'push'
github.event_name == 'push'
&& (
github.event.ref == 'refs/heads/develop'
|| endsWith(github.event.ref, '.0')
@@ -118,11 +96,10 @@ jobs:
set -o pipefail
ln -sf ~/.cache .cache # Absolute path in .pre-commit-config.yaml
pre-commit run --hook-stage manual -a php-cs-with-cache | tee -a ${RAW_LOG}
pre-commit run --hook-stage manual -a sqlfluff-lint | tee -a ${RAW_LOG}
ls -l ~/.cache/pre-commit/
- name: Convert Raw Log to Annotations
uses: mdeweerd/logToCheckStyle@v2024.3.5
uses: mdeweerd/logToCheckStyle@v2024.2.9
if: ${{ failure() }}
with:
in: ${{ env.RAW_LOG }}
@@ -142,3 +119,4 @@ jobs:
path: |
${{ env.RAW_LOG }}
${{ env.CS_XML }}
retention-days: 2

View File

@@ -6,8 +6,7 @@ on:
- cron: "0 21 * * *"
issue_comment:
types: [created]
workflow_dispatch:
permissions: {} # none
jobs:
@@ -26,3 +25,4 @@ jobs:
days-before-close: 10
operations-per-run: 100
dry-run: false

View File

@@ -1,194 +0,0 @@
---
name: Win CI
# yamllint disable-line rule:truthy
on:
# push:
# pull_request:
workflow_call:
inputs:
gh_event:
required: true
type: string
workflow_dispatch:
concurrency:
group: win-ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
}}
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
PHPUNIT_LOG: phpunit_tests.log
DOLIBARR_LOG: documents/dolibarr.log
PHPSERVER_LOG: phpserver.log
PHPSERVER_DOMAIN_PORT: 127.0.0.1:8000 # could be 127.0.0.1:8000 if config modified
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
PHP_INI_SCAN_DIR: C:\myphpini
CKEY: win-ci-2
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
jobs:
win-test:
strategy:
matrix:
os: [windows-latest]
# php_version: [7.4, 8.0] # Add more versions if needed
php_version: [7.4] # Add more versions if needed
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
# ini-values: post_max_size=256M, max_execution_time=180
extensions: >
calendar, gd, imagick, imap, intl, json, ldap, mbstring,
mcrypt, mysql, mysqli, opcache, pgsql, sqlite3, xml, zip
tools: >
composer,
phpunit:9.5
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# phpts: ts # ts for thread-safe, default nts
# Restore cache
- name: Restore cache
id: cache
uses: actions/cache/restore@v4
env:
HASH: ${{ hashFiles('htdocs/install/**') }}
KEY_ROOT: ${{ matrix.os }}-${{ env.ckey }}-${{ matrix.php_version }}
with:
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
enableCrossOsArchive: true
path: |
./db_init.sql
./db_init.sql.md5
./.cache/mariadb
key: ${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ env.CACHE_KEY_PART }}-${{ github.run_id }}
restore-keys: |
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ env.CACHE_KEY_PART }}-
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ github.head_ref }}-
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ github.base_ref }}-
${{ env.KEY_ROOT }}-${{ env.HASH }}-
${{ env.KEY_ROOT }}-
- name: Setup MariaDB
uses: frederic34/setup-mariadb@v1
with:
# mariadb-version: ${{ matrix.mariadb-version }}
database: travis # Specify your database name
- name: Create local php.ini with open_basedir restrictions
shell: cmd
# Objective: separate step, and before database initialisation to verify open_basedir restrictions
run: |-
echo "BASEDIR=%CD%" >> %GITHUB_ENV%
ECHO "==== Show INI file usage before our configuration ==="
php --ini
ECHO "==== Set PHP_INI_SCAN_DIR to include the INI File we create ==="
mkdir %PHP_INI_SCAN_DIR%
SET INIFILE="%PHP_INI_SCAN_DIR%\dolibarr.ini"
SET HTDOCS_DIR=%CD%\htdocs
SET DATA_DIR=%CD%\documents
SET TEST_DIR=%CD%\test
SET INITDEMO_DIR=%CD%\dev\initdemo
ECHO "==== Create INI file to set open_basedir ==="
echo [php] > %INIFILE%
echo open_basedir^="%HTDOCS_DIR%;%DATA_DIR%;%TEST_DIR%;%INITDEMO_DIR%;%PHPROOT%" >> %INIFILE%
REM Unset PHP_INI_SCAN_DIR to disable open_basedir restritions (to limit debug effort)
REM SET PHP_INI_SCAN_DIR=
ECHO "==== Show contents of INI file to set open_basedir ==="
type %INIFILE%
ECHO "==== Verify it is used by PHP ==="
php --ini
REM TEST OPEN_BASEDIR restriction is not limiting wrongly
REM THE DATA_DIR MUST BE CREATED HERE - open_base does not allow it's creation
mkdir "%DATA_DIR%"
mkdir "%DATA_DIR%\mytest"
php -r "$d=implode(DIRECTORY_SEPARATOR,[__DIR__,'documents','mytest']);echo 'IS_DIR '.$d.' '.((int) is_dir($d)).PHP_EOL;"
php -r "$d=__DIR__.'\documents/mytest';echo 'TEST PATH IS SHOWN: '.$d.PHP_EOL;"
php -r "$d=__DIR__.'\documents/mytest';echo 'IS_DIR '.$d.' '.((int) is_dir($d)).PHP_EOL;"
ECHO "The above should show 2 successful tests"
- name: Run Bash script that Initialises the database
# Note this is bash (MSYS) on Windows
shell: bash
run: |
ECHO "#[group]Directory contents to verify cache files, ..."
ls -l
ECHO "#[endgroup]"
ECHO "==== Verify openbase_dir restriction"
php --ini
# Run bash script to initialise database
ECHO "==== Start 'setup_conf.sh' to setup database"
${SHELL} -xv dev/setup/phpunit/setup_conf.sh
## Updating test configuration to not stop on first failure (to see all errors) - need sed
sed -i -e 's/stopOnFailure="[^"]*"/stopOnFailure="false"/' test/phpunit/phpunittest.xml
ECHO "#[group]Directory contents after database setup to verify cache files, ..."
ls -l
ECHO "#[endgroup]"
# Export some tool paths to reuse the from CMD shell.
echo "TAIL=$(cygpath -w "$(which tail)")" >> "$GITHUB_ENV"
echo "GREP=$(cygpath -w "$(which grep)")" >> "$GITHUB_ENV"
echo "TEE=$(cygpath -w "$(which tee)")" >> "$GITHUB_ENV"
echo "BASEDIR=$(realpath .)" >> "$GITHUB_ENV"
- name: Run PHPUnit tests
# continue-on-error: true
shell: cmd
# setting up php.ini, starting the php server are currently in this step
run: |-
ECHO "==== Visually verify our dolibarr.INI file usage ==="
php --ini
ECHO "==== Add our web server information to the config file ==="
echo $dolibarr_main_url_root="http://${{ env.PHPSERVER_DOMAIN_PORT }}"; >> htdocs/conf/conf.php
ECHO "#[group]==== Dolibarr config file contents"
cat htdocs/conf/conf.php
ECHO "#[endgroup]"
ECHO "==== START PHP server"
start /B php -S %PHPSERVER_DOMAIN_PORT% -t htdocs >> %PHPSERVER_LOG% 2>&1
ECHO "#[group]==== Output from curl on PHP server"
curl "http://${{ env.PHPSERVER_DOMAIN_PORT }}"
ECHO "#[endgroup]"
ECHO "==== START PHPUNIT TESTS"
REM 'DOSKEY' USED to recover error code (no pipefile equivalent in windows?)
( php "%PHPROOT%\phpunit" -d memory_limit=-1 -c %CD%\test\phpunit\phpunittest.xml "test\phpunit\AllTests.php" --exclude-group WindowsWaitingForFix & call doskey /exename=err err=%%^^errorlevel%% ) | "${{ env.TEE }}" "${{ env.PHPUNIT_LOG }}"
echo ""
echo "Ensure that PHPUNIT completed (no early exit from code)"
"${{ env.TAIL }}" -5 "${{ env.PHPUNIT_LOG }}" | "${{ env.GREP }}" -qE "(OK .*[0-9]+ tests.*[0-9]+ assertions|Tests: [0-9]+)" || EXIT /B 1
echo "PHPUNIT seems to have completed with a test result, reuse the exit code"
for /f "tokens=2 delims==" %%A in ('doskey /m:err') do EXIT /B %%A
- name: Convert Raw Log to Annotations
uses: mdeweerd/logToCheckStyle@v2024.3.5
if: ${{ failure() }}
with:
in: ${{ env.PHPUNIT_LOG }}
- name: Provide dolibarr and phpunit logs as artifact
uses: actions/upload-artifact@v4
if: ${{ ! cancelled() }}
with:
name: win-ci-logs
path: |
${{ env.PHPUNIT_LOG }}
${{ env.DOLIBARR_LOG }}
${{ env.PHPSERVER_LOG }}
db_init.sql
db_init.sql.md5
retention-days: 2
# Save cache
- name: Save cache
uses: actions/cache/save@v4
if: ${{ ! cancelled() }}
with:
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
enableCrossOsArchive: true
key: ${{ steps.cache.outputs.cache-primary-key }}
path: |
./db_init.sql
./db_init.sql.md5
./.cache/mariadb

34
.gitignore vendored
View File

@@ -14,11 +14,11 @@ default.properties
/.pydevproject
/.vscode
.DS_Store
.idea
*.iml
*.orig
Thumbs.db
/dolibarr_genesis.mp4
.phpunit.result.cache
# Log files
dolibarr_install.log
upgrade.log
@@ -50,9 +50,6 @@ build/yarn-error.log
build/node_modules/
node_modules/
vendor/
tmp/
#yarn
yarn.lock
@@ -60,32 +57,3 @@ yarn.lock
package-lock.json
doc/install.lock
/.asciidoctorconfig.adoc
.idea
/composer.json
/composer.lock
# Local script, executed during pre-commit
/local.sh
# Local phpstan configuration
/phpstan.neon
/phpstan-baseline.neon
# Logs
/*.log
# Vim swap files
*.sw?
# Generated by PHPUNIT.BAT
/INI_PHPUNIT
# ignore cache builds
/build/phpstan/phpstan
/build/phpstan/bootstrap_custom.php
phpstan_custom.neon
/.php-cs-fixer.cache
/.php_cs.cache
/.cache

View File

@@ -89,9 +89,3 @@ Baffir Abbes <bafbes@users.noreply.github.com> bafbes <bafbes@users.noreply.gith
Kevin Guerrier <guerrier.k@gmail.com> GUERRIER Kevin <guerrier.k@gmail.com>
Remy Younes <ryounes@gmail.com> remy <ryounes@gmail.com>
Estephe Loridan <github@estephe.me> Estephe L. <github@estephe.me>
Anthony Berton <anthony.berton@bb2a.fr> Anthony Berton <anthony.berton@bb2a.fr>
Anthony Berton <anthony.berton@bb2a.fr> Berton Anthony <anthony.berton@bb2a.fr>
Anthony Berton <anthony.berton@bb2a.fr> BB2A-Anthony <anthony.berton@bb2a.fr>
Anthony Berton <anthony.berton@bb2a.fr> Anthony Berton <bertonanthony@gmail.com>
Anthony Berton <anthony.berton@bb2a.fr> Berton Anthony <bertonanthony@gmail.com>
Anthony Berton <anthony.berton@bb2a.fr> BB2A-Anthony <bertonanthony@gmail.com>

View File

@@ -1,4 +0,0 @@
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*/
return include __DIR__ . "/../dev/tools/phan/config.php";

View File

@@ -1,131 +1,60 @@
---
exclude: (?x)^( htdocs/includes/ckeditor/.*|(\.[^/]*/.*))$
exclude: (?x)^( htdocs/includes/ckeditor/.* )
repos:
# Several miscellaneous checks and fix (on yaml files, end of files fix)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
# This hook tests the name of the branch and return an error if the name is
# 'develop' or an official version 'x.y'
# So you can't commit if your branch name is not a custom branch name.
# Using a custom branch name is good practice that makes it easier to manage PRs.
# You can skip this:
# - Permanently:
# export SKIP=no-commit-to-branch # In your .bashrc or session.
# - Only this for one commit:
# SKIP=no-commit-to-branch git commit -a -m "My message"
# - Skipping all checks for a commit:
# git commit -a -m "My message" --no-verify
# (Recommendation: run git commit -a .. once, then with `--no-verify`)
- id: no-commit-to-branch
args: [--branch, develop, --pattern, \d+.0]
# This checks that xml files are correct
- id: check-xml
exclude: |
(?x)^(htdocs/includes/.*)$
# This checks that yaml files are correct
args: [--branch, develop, --pattern, \d+.0$]
- id: check-yaml
args: [--unsafe]
# This checks that json files are correct
- id: check-json
# Fixes Fix files that have DOS end of line endings
- id: mixed-line-ending
# alternative for dev/tools/fixdosfiles.sh
exclude: |
(?x)^(htdocs/includes/tecnickcom/tcpdf/fonts/.*
|.*/CRLF.*.php # Files in swiftmailer
)$
args: [--fix=lf]
# Remove trailing whitespace
exclude: (?x)^(htdocs/includes/tecnickcom/tcpdf/fonts/.*)$
- id: trailing-whitespace
exclude_types: [markdown]
# Fix the end of file
- id: end-of-file-fixer
# Check that there are no completely merged file conflicts
- id: check-merge-conflict
stages: [pre-commit, pre-rebase, pre-commit, pre-merge-commit]
# Check that files with shebangs have the executable bit set (in git)
- id: check-executables-have-shebangs
# Check that shell files are executables
- id: check-shebang-scripts-are-executable
exclude:
(?x)^( dev/tools/dolibarr-postgres2mysql.php |test/other/test_serialize.php
|test/phpunit/textutf8.txt |test/phpunit/textiso.txt |htdocs/includes/.*
|htdocs/modulebuilder/template/.* |build/debian/dolibarr.postrm |build/debian/dolibarr.postinst
|build/debian/dolibarr.config )$
# Fix the first UTF8 byte
- id: fix-byte-order-marker
# Check that there are no files that have are the same when uppercased (conflict on windows)
- 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
hooks:
- id: beautysh
exclude: |
(?x)^(dev/setup/git/hooks/pre-commit
)$
exclude: (?x)^(dev/setup/git/hooks/pre-commit)$
args: [--tab]
# Run local script
#
# For example, to update the license in edited files, you could add to local.sh:
# For instance to update the license in edited files, you could add to local.sh:
#
# ```shell
# #!/bin/bash
# #!/bin/bash
# MYDIR=$(dirname "$0")
# git diff HEAD --name-only | grep -v includes | \
# xargs "$MYDIR/dev/tools/updatelicense.php"
# CHANGED_INTERNALS=$(git diff --name-only | grep -v includes)
# "$MYDIR/dev/tools/updatelicense.php" $CHANGED_INTERNALS
# ```
- repo: local
hooks:
- name: Find missing/unused/duplicate language keys
id: check-translations
files: (?x)^(htdocs/langs/en_US/.*\.lang)
language: script
entry: ./dev/translation/sanity_check_trans_missing_unused.sh
pass_filenames: false
args: [list]
- id: local-precommit-script
name: Run local script before commit if it exists
language: system
entry: bash -c '[ ! -x local.sh ] || ./local.sh'
pass_filenames: false
- id: duplicate-lang-lines
stages: [manual]
name: Find duplicate language lines
files: (?x)^(htdocs/langs/en_US/.*\.lang)
language: script
entry: ./dev/tools/fixduplicatelanglines.sh
pass_filenames: false
args: [list]
- id: duplicate-lang-keys
stages: [manual]
name: Find duplicate language keys
files: (?x)^(htdocs/langs/en_US/.*\.lang)
language: script
entry: ./dev/tools/fixduplicatelangkey.sh
pass_filenames: false
args: [list]
- id: fix-alt-languages
stages: [manual]
name: Fix alt languages
# Selection: see fixaltlanguages.sh script
files: (?x)^(htdocs/langs/(e[lnstu]|k[akmno]|s[lqrv]|b[nrs]|c[asy]|n[bel]|[ip]t|a[mr]|d[ae]|f[ar]|h[ei]|m[sy]|t[ag]|u[kr]|gl|ja|lo|ru|vi|zh)_[^/]*/.*\.lang)
language: script
entry: ./dev/tools/fixaltlanguages_pre-commit.sh
pass_filenames: true
# Check PHP syntax
- repo: https://github.com/mdeweerd/pre-commit-php
rev: v1.6.8
rev: v1.6.5
hooks:
- id: php-cbf
files: \.(php)$
@@ -137,7 +66,6 @@ repos:
--standard=dev/setup/codesniffer/ruleset.xml,
--report=emacs,
--severity=5,
--no-colors,
]
- alias: php-cs-with-cache
id: php-cs
@@ -148,7 +76,6 @@ repos:
--standard=dev/setup/codesniffer/ruleset.xml,
--report=emacs,
--severity=5,
--no-colors,
--cache=.cache/pre-commit/dolibarr-php-cs.cache,
.,
]
@@ -209,6 +136,8 @@ repos:
- dev/tools/codespell/codespell-ignore.txt
- -x
- dev/tools/codespell/codespell-lines-ignore.txt
- --uri-ignore-words-list
- ned
exclude_types: [image]
exclude: (?x)^(.phan/stubs/.*)$
additional_dependencies: [tomli]
@@ -240,26 +169,3 @@ repos:
hooks:
- id: shellcheck
args: [-W, "100"]
- repo: https://github.com/sqlfluff/sqlfluff
rev: 3.0.4
hooks:
- id: sqlfluff-lint
stages: [pre-commit, manual] # manual needed for ci
exclude: (?x)^
(htdocs/includes/.*
|htdocs/install/doctemplates/websites/.*_template
|htdocs/core/menus/init_menu_auguria\.sql
|htdocs/install/doctemplates/websites/website_template-.*\.sql
|(htdocs/install/mysql/data/(llx_20_c_departements\.sql
|llx_accounting_account_.*\.sql)
|(htdocs/install/mysql/migration/3\.[256]\.0-.*\.sql)
)
|htdocs/install/mysql/migration/(1[0-5]|[456789])\.0\.0-.*\.sql
|htdocs/install/mysql/migration/3\.([0134789])\.0-.*\.sql
|htdocs/install/mysql/migration/repair\.sql
|htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal\.sql
|htdocs/install/mysql/tables/llx_categorie(_(account|actioncomm|contact|fournisseur|knowledgemanagement-knowledgemanagement|member|product|project|societe|ticket-ticket|user|warehouse|website_page-website)?\.key\.sql)
|htdocs/install/mysql/tables/llx_rights_def\.key\.sql
|htdocs/install/pgsql/functions/functions(-(don|loan|mailing|opensurvey|partnership|recruitment|website))?\.sql
)$

231
.scrutinizer.yml Normal file
View File

@@ -0,0 +1,231 @@
# .scrutinizer.yml
#build:
# - php-scrutinizer-run
build:
nodes:
analysis:
tests:
override:
- command: php-scrutinizer-run
idle_timeout: 8000
imports:
- javascript
- php
filter:
excluded_paths:
- build/*
- dev/*
- doc/*
- documents/*
- node_modules/*
- test/*
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/includes/*
- 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: 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:
@@ -29,34 +29,27 @@ env:
# Set to true for very verbose output
- DEBUG=true
cache:
directories:
- ~/.cache
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:
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:
php: '8.1'
env:
- DB=mysql
- TRAVIS_PHP_VERSION=8.2
- stage: PHP 8.3
if: type = push AND branch = develop
php: '8.3'
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:
@@ -82,18 +75,15 @@ before_install:
- |
echo Install packages for PHP
sudo apt-get install -y pgloader memcached
if [ "$TRAVIS_PHP_VERSION" = '7.0' ]; then
sudo apt install unzip apache2 php7.0 php7.0-cli php7.0-curl php7.0-mysql php7.0-pgsql php7.0-gd php7.0-imap php7.0-intl php7.0-ldap php7.0-xml php7.0-mbstring php7.0-xml php7.0-zip libapache2-mod-php7.0
fi
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
sudo apt install unzip apache2 php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-pgsql php7.1-gd php7.1-imap php7.1-intl php7.1-ldap php7.1-xml php7.1-mbstring php7.1-xml php7.1-zip libapache2-mod-php7.1
fi
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
@@ -119,17 +109,17 @@ 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
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
fi
php -i | head -
- |
echo "Updating Composer config"
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
@@ -138,15 +128,22 @@ 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
- |
echo "Update Composer version and Install tools - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION"
echo "(composer version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)"
if [ "$TRAVIS_PHP_VERSION" = '7.0' ]; then
sudo composer self-update 2.2.18
composer -n require phpunit/phpunit ^6.0 \
php-parallel-lint/php-parallel-lint ^1 \
php-parallel-lint/php-console-highlighter ^0 \
php-parallel-lint/php-var-dump-check ~0.4 \
squizlabs/php_codesniffer ^3
fi
if [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
sudo composer self-update 2.2.18
composer -n require phpunit/phpunit ^7.5 \
@@ -164,7 +161,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 \
@@ -211,8 +208,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
@@ -234,7 +231,7 @@ before_script:
#sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa
sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa &
sleep 3
sudo ps fauxww
sudo ps fauxww
echo "MySQL set root password"
sudo mysql -u root -h 127.0.0.1 -e "FLUSH PRIVILEGES; CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8'; ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'password'; CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON travis.* TO root@127.0.0.1; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;"
echo "MySQL grant"
@@ -243,7 +240,7 @@ before_script:
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'use mysql; select * from user;'
echo "List pid file"
sudo mysql -u root -h 127.0.0.1 -ppassword -e "show variables like '%pid%';"
#sudo kill `cat /var/lib/mysqld/mysqld.pid`
#sudo systemctl start mariadb
@@ -251,7 +248,7 @@ before_script:
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
echo "MySQL flush"
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES;'
echo "MySQL load sql"
sudo mysql -u root -h 127.0.0.1 -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
fi
@@ -273,9 +270,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
@@ -340,55 +336,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 .
set +e
echo
- |
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
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 coding style (only for 1 version to not overload travis and avoid duplicate tests)"
# Ensure we catch errors
set -e
CACHE_OPT="--cache=${HOME}/.cache/dolibarr-phpcs-${TRAVIS_PHP_VERSION}.cache"
# 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 --severity=1 ${CACHE_OPT} --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 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
fi
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --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
@@ -400,7 +367,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
@@ -420,13 +386,12 @@ 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"
# Ensure we catch errors with -e. Set this to +e if you want to go to the end to see log files.
# Note: We keep +e because with pgsql, one of upgrade process fails even if migration seems ok, so
# I disable stop on error to be able to continue.
# I disable stop on error to be able to continue.
set +e
cd htdocs/install
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log
@@ -483,29 +448,15 @@ script:
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade16001700.log
php upgrade2.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-2.log
php step5.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-3.log
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
php upgrade.php 19.0.0 20.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade19002000.log || cat $TRAVIS_BUILD_DIR/upgrade19002000.log
php upgrade2.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-2.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-2.log
php step5.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-3.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-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
cat $TRAVIS_BUILD_DIR/upgrade19002000.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)"
@@ -517,14 +468,12 @@ script:
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KnowledgeManagement,MAIN_MODULE_EventOrganization,MAIN_MODULE_PARTNERSHIP >> $TRAVIS_BUILD_DIR/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_EmailCollector >> $TRAVIS_BUILD_DIR/enablemodule.log
echo $?
cd -
set +e
echo
#cat /tmp/dolibarr_install.log
cat $TRAVIS_BUILD_DIR/enablemodule.log
echo
- |
echo "Unit testing"
@@ -534,7 +483,6 @@ script:
phpunitresult=$?
echo "Phpunit return code = $phpunitresult"
set +e
echo
after_script:
- |
@@ -557,18 +505,18 @@ after_failure:
# Show upgrade log files
#for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
#do
#echo "Debugging information for file $ficlog"
#echo "Debugging informations for file $ficlog"
#cat $ficlog
#done
# Show Apache log file
echo "Debugging information for file apache error.log"
echo "Debugging informations for file apache error.log"
sudo tail -n 200 /var/log/apache2/travis_error_log
if [ "$DEBUG" = true ]; then
# Dolibarr log file
echo "Debugging information for file dolibarr.log (latest 50 lines)"
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
tail -n 200 $TRAVIS_BUILD_DIR/documents/dolibarr.log
# Database log file
echo "Debugging information for file mysql error.log"
echo "Debugging informations for file mysql error.log"
sudo tail -n 200 /var/log/mysql/error.log
# TODO: PostgreSQL log file
echo

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
@@ -428,3 +434,9 @@ source_file = htdocs/langs/en_US/workflow.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:zapier]
file_filter = htdocs/langs/<lang>/zapier.lang
source_file = htdocs/langs/en_US/zapier.lang
source_lang = en_US
type = MOZILLAPROPERTIES

View File

@@ -23,40 +23,35 @@ 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 ?
Escpos-php 3.0 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
EvalMath 1.0 BSD Yes Safe math expressions evaluation
Escpos-php 2.2 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
GeoPHP 1.2 Modified BSD License Yes Lib to make geo 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
Mobiledetect 2.8.39 MIT License Yes Detect mobile devices browsers
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
ParseDown 1.7.4 MIT License Yes Markdown parser
ParseDown 1.6 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
PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers
PHP-Imap 2.7.2 MIT License Yes Library to use IMAP with OAuth
PHPSpreadSheet 1.8.2 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)
Sabre 4.6.0 BSD Yes DAV support
Sabre 3.2.2 BSD Yes DAV support
Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP
Symfony/var-dumper ??? MIT License Yes Library to make var dump (used by DebugBar)
Stripe 10.7.0 MIT Licence Yes Library for Stripe module
Stripe 7.67.0 MIT Licence Yes Library for Stripe module
TCPDF 6.3.2 LGPL-3+ Yes PDF generation
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
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
jQuery 3.6.4 MIT License Yes JS library
CKEditor 4.18 LGPL-2.1+ Yes Editor WYSIWYG
jQuery 3.6.0 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
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
@@ -69,7 +64,8 @@ jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for filetree
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
jsGanttImproved 2.8.10 BSD License Yes JS library (to build Gantt reports)
jsGanttImproved 2.7.3 BSD License Yes JS library (to build Gantt reports)
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
SwaggerUI 2.2.10 GPL-2+ Yes JS library to offer the REST API explorer
Image libraries:
@@ -79,7 +75,7 @@ Font libraries:
Fontawesome 5.13 Font Awesome Free Licence Yes
For more licenses compatibility information: https://www.gnu.org/licenses/licenses.en.html
For more licenses compatibility informations: https://www.gnu.org/licenses/licenses.en.html
Authors

1921
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,7 @@
# DOLIBARR ERP & CRM
![Downloads per day](https://img.shields.io/sourceforge/dw/dolibarr.svg)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.1-8892BF.svg?style=flat-square)](https://php.net/)
[![GitHub release](https://img.shields.io/github/v/release/Dolibarr/dolibarr)](https://github.com/Dolibarr/dolibarr)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5521/badge)](https://bestpractices.coreinfrastructure.org/projects/5521)
![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg)
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
@@ -72,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
@@ -90,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
@@ -109,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.
@@ -129,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
@@ -141,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
@@ -170,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

@@ -1,17 +1,18 @@
# DOLIBARR ERP & CRM
![Downloads per day](https://img.shields.io/sourceforge/dw/dolibarr.svg)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.1-8892BF.svg?style=flat-square)](https://php.net/)
![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.0-8892BF.svg?style=flat-square)](https://php.net/)
[![GitHub release](https://img.shields.io/github/v/release/Dolibarr/dolibarr)](https://github.com/Dolibarr/dolibarr)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5521/badge)](https://bestpractices.coreinfrastructure.org/projects/5521)
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activities (contacts, suppliers, invoices, orders, stocks, agenda…).
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
It's an Open-Source Software suite (written in PHP with JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
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 from a LAN.
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
Dolibarr has a large community ready to help you, free forums and [preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
@@ -19,7 +20,7 @@ Dolibarr has a large community ready to help you, free forums and [preferred par
## LICENSE
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either Version 3 of the License, or (at your option) any later version (GPL-3+).
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version (GPL-3+).
See the [COPYING](https://github.com/Dolibarr/dolibarr/blob/develop/COPYING) file for a full copy of the license.
@@ -29,34 +30,35 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
### Simple setup
If you have low technical skills and you're looking to install Dolibarr ERP/CRM with just a few clicks, you can use one of the packaged versions:
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions:
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp))
- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian)
- DoliRpm for Red Hat, Fedora, OpenSuse, Mandriva or Mageia
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
Releases can be downloaded from [official website](https://www.dolibarr.org/).
### Recommended setup
### Advanced setup
You can use any web server supporting PHP (Apache, Nginx, ...) and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
You can use a web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
On GNU/Linux, first check if your distribution has already packaged Dolibarr.
#### Generic install steps
- Verify that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
- 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 9.0, 19.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 already define a directory to point to.
- 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.
- Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished)
- From your browser, go to the dolibarr "install/" page
The URL will depend on how your web configuration directs 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/`
@@ -70,20 +72,18 @@ You can use any web server supporting PHP (Apache, Nginx, ...) and a supported d
- Follow the installer instructions
### SaaS/Cloud Setup
### Saas/Cloud setup
If you lack the time to install it yourself, consider exploring commercial 'ready-to-use' Cloud offerings (refer to https://saas.dolibarr.org). Keep in mind that this third option comes with associated costs.
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.
## UPGRADING
Dolibarr supports upgrading, usually without the need for any (commercial) support (depending on if you use any commercial extensions). It supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
Follow these step-by-step instructions to seamlessly upgrade Dolibarr to the latest version:
- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
- Verify 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 in the new version's package.
- At your next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
- 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 '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*").
## WHAT'S NEW
@@ -99,13 +99,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
@@ -115,8 +115,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)
@@ -124,10 +123,10 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
Supplier/Purchase Management
- Suppliers/Vendors + Contacts
- Supplier (pricing) requests
- Supplier (price) requests
- Purchase Orders management
- Delivery/Reception
- Supplier Invoices/Credit notes and payment management
- Delivery/Receiption
- Supplier Invoices/credit notes and payment management
- INCOTERMS
Finance/Accounting
@@ -143,18 +142,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 leave management
- Employee's leaves management
- Expense reports
- Recruitment management
- Employee/staff management
- Timesheets
### Other application/modules
@@ -172,29 +169,28 @@ 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 an external module)
- Very user-friendly and easy to use
- Multi-Company (by adding of an external module)
- 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:
- Spanish Tax RE and IRPF
- 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
- Tunisian tax stamp
- Argentina invoice numbering using A,B,C...
- Greece fetch customer vat details from AADE, all invoice types, MyData(external free module)
- 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's GDPR, ...)
- Compatible with data privacy rules (europe GDPR, ...)
- ...
- Flexible PDF & ODT generation for invoices, proposals, orders...
- ...
@@ -209,7 +205,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
@@ -217,19 +213,19 @@ These are features that Dolibarr does **not** yet fully support:
- Tasks dependencies in projects
- Payroll module
- Native embedded Webmail, but you can send email 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, ...) [[Contributing](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)
@@ -244,7 +240,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

@@ -2,22 +2,17 @@
This file contains some policies about the security reports on Dolibarr ERP CRM project, one of the most popular Open Source ERP and CRM in the world.
## Supported Versions for security reports
Security report are valid only on current stable version (see https://dolibarr.org web site to get current stable version) or on development version (branch "develop" on https://github.com/Dolibarr/dolibarr).
Security report are valid only on current stable version (see dolibarr.org web site to get current stable version) or on development version (branch "develop" on https://github.com/Dolibarr/dolibarr).
## Reporting a Vulnerability
To report a vulnerability, for a private report, you can:
- Send your report on Vulnerability Disclosure Program (VDP) [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody)
<!--
- Send your report on [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody)
- Or if you have permissions, use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new)
-->
- Or send an email to security@dolibarr.org with clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary.
- Or send by email to security@dolibarr.org a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary
## Hunting vulnerabilities on Dolibarr
@@ -25,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
@@ -35,8 +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
@@ -44,44 +38,36 @@ 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.
Reports are processed around once a month.
## Scope for qualified vulnerabilities
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)
* $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
- MAIN_DISALLOW_URL_INTO_DESCRIPTIONS = 1 (only relative links are allowed in descriptions/notes), or 2 (no links are allowed in descriptions/notes)
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)
* 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 and directory listing is not allowed. The directory path htdocs/ must be read-only.
* 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.
* CSRF attacks are accepted but double check that you have set MAIN_SECURITY_CSRF_WITH_TOKEN to value 3.
* The modules DebugBar and ModuleBuilder must NOT be enabled. (by default, these modules are not enabled. They are developer tools)
* 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".
Scope is the web application (backoffice) and the APIs.
* 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 (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
@@ -89,27 +75,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)
* 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.
* 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.
* Any vulnerabilities due to a configuration different than the one defined in chapter "Scope for qualified vulnerabilities".
* Directory Listing (this is a bad setup of the web server, not a problem into the application)
* "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.
* 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
* Vulnerabilities of type XSS exploited by using javascript into a website page (with permission to edit website pages) or by using php code into a website page
using the permission to edit php code are not qualified, except if this allow to get higher privileges (being able to set javascript or php code is the expected behaviour).
* 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

@@ -34,7 +34,7 @@ See makepack-howto.txt for prerequisites.
--------------------------------------------------------------------------------------------------
- To build developer documentation, launch the script
- To build developper documentation, launch the script
> perl dolibarr-doxygen-build.pl

View File

@@ -1,40 +1,19 @@
--- HOW TO USE COMPOSER
* Switch to the minimal version of PHP
update-alternatives --config php
* To list packages
cd htdocs/includes/diroflib
composer install
composer show -i
composer show -i
* To upgrade a lib with composer using the composer.json of the library only:
* To test upgrade of a lib with composer:
Remove entry in composer.lock
cd htdocs/includes/diroflib
rm composer.lock
Edit composer.json to change version to "x.y.z"
composer -v update --root-reqs --no-dev --no-autoloader --dry-run ccampbell/chromephp
composer -v update --root-reqs --no-dev --ignore-platform-reqs
composer -v update --root-reqs --no-dev --ignore-platform-reqs [--no-autoloader] [--dry-run] ccampbell/chromephp
* To upgrade a lib with composer using the composer.json of Dolibarr:
* To upgrade a lib with composer:
Remove entry in composer.lock
cd /
mv composer.json.disabled composer.json
rm composer.lock
Edit composer.json to change version to "x.y.z"
composer -v update --root-reqs --no-dev --no-autoloader ccampbell/chromephp
composer -v update --root-reqs --no-dev --ignore-platform-reqs
composer -v update --root-reqs --no-dev --ignore-platform-reqs [--no-autoloader] [--dry-run] ccampbell/chromephp

View File

@@ -81,7 +81,7 @@ export QUILT_PATCHES=debian/patches
# dpkg -l List all packages
# dpkg -b To build binary only package
# dpkg -c package.deb List content of package
# dpkg -I package.deb Give information on package
# dpkg -I package.deb Give informations on package
# dpkg -i package.deb Install a package
# dpkg-reconfigure -plow package Reconfigure package
# dpkg -L packagename List content of installed package
@@ -173,7 +173,7 @@ or
> ls /srv/chroot
Puis pour se connecter et préparer l'environnement
> schroot -c name_of_chroot (example schroot -c unstable-amd64-sbuild)
> schroot -c name_of_chroot (exemple schroot -c unstable-amd64-sbuild)
> cat /etc/debian_chroot to check which debian branch we are into
> apt-get install vim dialog
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
@@ -249,7 +249,7 @@ ou
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-x.y.z]
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x]
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommitted file
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
Note: Package is built into directory ../build-area
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
@@ -345,7 +345,7 @@ To update dolibarr debian package when only files not into debian has changed:
* Checkout the branch you want to work on: master of debian/...
* Manually, add patches into debian/patches and update the file debian/series, or do the 2 steps with "quilt import filepatch.patch"
* You can test patching of series with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
* Update the debian/changelog to add entry of change.
Once files has been prepared, it's time to test:
@@ -357,7 +357,7 @@ ou
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommitted file
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
Note: Package is built into directory ../build-area
Note: To compare 2 packages: debdiff package1.dsc package2.dsc

View File

@@ -8,7 +8,7 @@ Denied from all
</IfVersion>
# OPTIMIZE: To use cache on static pages (A259200 = 1 month, A7200 = 2 hours, A691600 = 8 days = recommended for static resources).
# OPTIMIZE: To use cache on static pages (A259200 = 1 month, A7200 = 2 hours, A691600 = 8 days = recommanded for static resources).
# Note that you must also enable the module mod_expires.
#ExpiresActive On
#ExpiresByType image/x-icon A2592000

0
build/debian/control Normal file → Executable file
View File

View File

@@ -64,7 +64,7 @@ License: GPL-3+
Files: htdocs/includes/ckeditor/*
Copyright: 2003-2012 CKSource - Frederico Knabben
License: GPL-2+
The ckeditor is triple licensed under the GNU General Public License (GPL),
The ckeditor is tripple licensed under the GNU General Public License (GPL),
GNU Lesser General Public License (LGPL), and Mozilla Public License (MPL).
In Debian, it is distributed under the GNU General Public License (GPL).
.

View File

@@ -2,8 +2,6 @@
# Debian install package run: config, preinst, prerm, postinst, postrm
#
# shellcheck disable=1091,2034
set -e
@@ -50,7 +48,7 @@ echo "Ask for web server to setup"
db_input critical dolibarr/reconfigure-webserver || true
if db_go ; then
okcancel="1"
okcancel="1"
else
okcancel="0"
fi

View File

@@ -1,8 +1,6 @@
#!/bin/sh
# postinst script for dolibarr
# shellcheck disable=1091,2086,2154
set -e
# summary of how this script can be called:
@@ -21,25 +19,25 @@ if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
fi
setup_empty_conf() {
echo Create empty file $config
mkdir -p /etc/dolibarr
touch /etc/dolibarr/conf.php
chown root:www-data /etc/dolibarr/conf.php
chmod 660 /etc/dolibarr/conf.php
echo Create empty file $config
mkdir -p /etc/dolibarr
touch /etc/dolibarr/conf.php
chown root:www-data /etc/dolibarr/conf.php
chmod 660 /etc/dolibarr/conf.php
}
is_new_upstream_version() {
# $1 can be empty (not installed) and will result in a true value
# for the check
old_version=$(echo "$1" | sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
new_version=$(dpkg-query -f '${Version}' -W dolibarr | \
sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
test "$old_version" != "$new_version"
# $1 can be empty (not installed) and will result in a true value
# for the check
old_version=$(echo "$1" | sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
new_version=$(dpkg-query -f '${Version}' -W dolibarr | \
sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
test "$old_version" != "$new_version"
}
enable_install_upgrade_wizard() {
echo Enable install wizard by removing install.lock file if present
rm -f /var/lib/dolibarr/documents/install.lock
rm -f /var/lib/dolibarr/documents/install.lock
}
@@ -48,24 +46,24 @@ php_install() {
# php5endmod exists for ubuntu only
echo "Enable php module mysqli with php5enmod"
php5enmod mysqli
fi
fi
}
apache_install() {
webserver=$1
# Enable Apache 2 alias module
if which a2enmod >/dev/null 2>&1 ;then
echo "Enable apache module alias with a2enmod"
a2enmod alias
fi
# Enable dolibarr conf
if which a2enconf >/dev/null 2>&1 ;then
# a2enconf exists for ubuntu only
echo "Enable link for Apache config file with a2enconf"
a2enconf dolibarr
else
else
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
echo "Add link for Apache config file"
ln -s /etc/$webserver/conf-available/dolibarr.conf /etc/$webserver/conf.d/dolibarr.conf
@@ -103,7 +101,7 @@ case "$1" in
configure)
if [ -z "$2" ]; then
echo First install
#setup_empty_conf
#setup_empty_conf
else
echo This is not a first install
fi
@@ -111,17 +109,17 @@ case "$1" in
php_install
apache_install
lighttpd_install
# Remove lock file
if is_new_upstream_version "$2"; then
enable_install_upgrade_wizard
enable_install_upgrade_wizard
fi
# Create document directory for uploaded data files
mkdir -p $docdir
chown -R www-data:www-data $docdir
chmod -R 775 $docdir
chmod -R g+s $docdir
# Create document directory for uploaded data files
mkdir -p $docdir
chown -R www-data:www-data $docdir
chmod -R 775 $docdir
chmod -R g+s $docdir
# Copy install config file (with matching Debian values) into target directory
superuserlogin=''
@@ -138,14 +136,14 @@ case "$1" in
cat $installfileorig | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $installconfig
fi
chown -R root:www-data $installconfig
chmod -R 660 $installconfig
chmod -R 660 $installconfig
# If a conf already exists and its content was already completed by installer
if [ ! -s $config ] || ! grep -q "File generated by" $config
then
# Create an empty conf.php with permission to web server
setup_empty_conf
#else
#else
# File already exist. We add params not found.
#echo Add new params to overwrite path to use shared libraries/fonts
##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
@@ -156,18 +154,18 @@ case "$1" in
#grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
#grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
#grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
#grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
#grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
fi
db_get dolibarr/reconfigure-webserver
webservers="$RET"
# Set up web server.
for webserver in $webservers ; do
webserver=${webserver%,}
echo Complete config of server $webserver
# Detect webuser and webgroup
webuser=
webgroup=
@@ -183,7 +181,7 @@ case "$1" in
# Set permissions to web server
chown -R $webuser:$webgroup /usr/share/dolibarr
chown -R root:$webgroup $config
chown -R root:$webgroup $config
done
# Restart web server.
@@ -195,33 +193,33 @@ case "$1" in
apache_install $webserver
fi
# Reload webserver in any case, configuration might have changed
# Redirection of 3 is needed because Debconf uses it and it might
# Redirection of 3 is needed because Debconf uses it and it might
# be inherited by webserver. See bug #446324.
if [ -f /etc/init.d/$webserver ] ; then
if [ -x /usr/sbin/invoke-rc.d ]; then
echo Restart web server $server using invoke-rc.d
# This works with Debian (5.05,...) and Ubuntu (9.10,10.04,...)
invoke-rc.d $webserver reload 3>/dev/null || true
else
echo Restart web server $server using $server reload
/etc/init.d/$webserver reload 3>/dev/null || true
fi
fi
if [ -f /etc/init.d/$webserver ] ; then
if [ -x /usr/sbin/invoke-rc.d ]; then
echo Restart web server $server using invoke-rc.d
# This works with Debian (5.05,...) and Ubuntu (9.10,10.04,...)
invoke-rc.d $webserver reload 3>/dev/null || true
else
echo Restart web server $server using $server reload
/etc/init.d/$webserver reload 3>/dev/null || true
fi
fi
done
echo ----------
echo "Call Dolibarr page http://localhost/dolibarr/ to complete the setup and use Dolibarr."
echo ----------
;;
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
;;
*)
echo "postinst called with unknown argument $1" >&2
exit 0
;;
;;
esac
#DEBHELPER#

View File

@@ -3,8 +3,6 @@
#
# see: dh_installdeb(1)
# shellcheck disable=1091,2006,2034,2086,2089,2090
#set -e
set +e
@@ -32,8 +30,8 @@ lighttpd_remove() {
fi
# See bug #448682
if [ -h /etc/lighttpd/conf-enabled/50-dolibarr.conf ] ; then
echo "postrm Manually deleting lighttpd/dolibarr configuration link"
rm /etc/lighttpd/conf-enabled/50-dolibarr.conf
echo "postrm Manually deleting lighttpd/dolibarr configuration link"
rm /etc/lighttpd/conf-enabled/50-dolibarr.conf
fi
fi
}
@@ -48,7 +46,7 @@ apache_remove() {
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
. /usr/share/debconf/confmodule
fi
db_version 2.0
@@ -64,12 +62,12 @@ lockfile="$docdir/install.lock"
case "$1" in
# Call when we upgrade
# Call when we upgrade
upgrade)
echo "postrm upgrade"
;;
;;
# Call when we uninstall
# Call when we uninstall
remove)
echo "postrm remove"
rm -f $lockfile
@@ -87,7 +85,7 @@ case "$1" in
else
apache_remove $webserver
fi
# Redirection of 3 is needed because Debconf uses it and it might
# Redirection of 3 is needed because Debconf uses it and it might
# be inherited by webserver. See bug #446324.
if [ -f /etc/init.d/$webserver ] ; then
if [ -x /usr/sbin/invoke-rc.d ]; then
@@ -97,9 +95,9 @@ case "$1" in
fi
fi
done
;;
;;
# Call when we uninstall and purge
# Call when we uninstall and purge
purge)
echo "postrm purge"
@@ -113,7 +111,7 @@ case "$1" in
set +e
db_get dolibarr/postrm
set -e
if [ "$RET" = "true" ] ; then
echo postrm Mysql database deletion
# Get database configuration
@@ -133,7 +131,7 @@ case "$1" in
dbadmin="$superuserlogin"
dbadmpass="$superuserpassword"
dbtype="mysql"
# To delete a mysql user (disabled)
# Needs: $dbuser - the user name to create (or replace).
# $dballow - what hosts to allow (defaults to %).
@@ -146,7 +144,7 @@ case "$1" in
# mysql
# /usr/share/wwwconfig-coomon/mysql.get
#. /usr/share/wwwconfig-common/${dbtype}-dropuser.sh
# To delete database
# Needs: $dbname - the database that user should have access to.
# $dbserver - the server to connect to.
@@ -160,85 +158,85 @@ case "$1" in
# Define mysqlcmd
if [ -z "$dbserver" ] || [ "$dbserver" = "localhost" ]; then
hostopt=""
dbserver=localhost
dbserver=localhost
else
case "$dbserver" in
:*)
dbsocket=`echo $dbserver | sed -e 's/^://'`
hostopt="-S $dbsocket"
;;
*)
hostopt="-h $dbserver"
;;
esac
case "$dbserver" in
:*)
dbsocket=`echo $dbserver | sed -e 's/^://'`
hostopt="-S $dbsocket"
;;
*)
hostopt="-h $dbserver"
;;
esac
fi
if [ -z "$dbadmpass" ] ; then
log="${log}No password used."
passopt=""
log="${log}No password used."
passopt=""
else
passopt="--password='"`echo "$dbadmpass" | sed -e "s/'/'"'"'"'"'"'"'/g"`"'"
passopt="--password='"`echo "$dbadmpass" | sed -e "s/'/'"'"'"'"'"'"'/g"`"'"
fi
mysqlcmd="mysql $hostopt $passopt -u $dbadmin"
mysqlcmdnopass="mysql $hostopt -u $dbadmin"
# Now run the drop user
# Now run the drop user
if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'localhost';\"" ; then
echo postrm Database login $dbuser@localhost removed
else
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'localhost';\""
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'localhost';\""
echo postrm $error
fi
if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'%';\"" ; then
echo postrm Database login $dbuser@% removed
else
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'%';\""
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'%';\""
echo postrm $error
fi
# Now run the drop commands
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
log="${log}Dropping database $dbname."
# Now run the drop commands
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
log="${log}Droping database $dbname."
if eval $mysqlcmd -f -e "\"DROP DATABASE $dbname;\"" ; then
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
error="Database $dbname NOT successfully dropped. You have to do it manually."
echo postrm $error
else
status=drop
fi
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
error="Database $dbname NOT successfully droped. You have to do it manually."
echo postrm $error
else
status=drop
fi
else
error="Unable to run the drop database script."
error="Unable to run the drop database script."
echo postrm $error
fi
else
else
status=nothing
log="${log}Database $dbname already not exists."
fi
echo "postrm Remove directory $docdir"
rm -rf $docdir ;
fi
echo "postrm Remove directory $docdir"
rm -rf $docdir ;
else
echo "postrm Delete of dolibarr database and uploaded files not wanted"
echo "postrm Delete of dolibarr database and uploaded files not wanted"
fi
rm -rf /etc/dolibarr
# We clean variable (we ignore errors because db_reset can fails if var was never set)
set +e
set +e
db_reset dolibarr/reconfigure-webserver
db_reset dolibarr/postrm
set -e
set -e
#db_purge
;;
;;
failed-upgrade|abort-install|abort-upgrade|disappear)
;;
;;
*)
echo "postrm called with unknown argument $1" >&2
exit 0
;;
;;
esac
#DEBHELPER#

View File

@@ -1,13 +1,11 @@
#!/bin/sh
# shellcheck disable=2034,2086,2103,2164
tmpdir=$(mktemp -d)
# Download source file
if [ -n "$1" ]; then
uscan_opts="--download-version=$1"
uscan_opts="--download-version=$1"
fi
#uscan --noconf --force-download --no-symlink --verbose --destdir=$tmpdir $uscan_opts

View File

@@ -33,5 +33,5 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+$conffile = "/etc/dolibarr/conf.php";
+$conffiletoshow = "/etc/dolibarr/conf.php";
$short_options = "c:h";
$long_options = array(
// Load conf file if it is already defined

View File

@@ -4,7 +4,7 @@
export DH_VERBOSE=1
export DH_OPTIONS=-v
#export DH_COMPAT=7 # This is the debhelper compatibility version to use, now defined into compat file
#export DH_COMPAT=7 # This is the debhelper compatability version to use, now defined into compat file
%:

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,61 +0,0 @@
FROM php:8.1-apache-bullseye
ENV PHP_INI_DATE_TIMEZONE 'UTC'
ENV PHP_INI_MEMORY_LIMIT 256M
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg62-turbo-dev \
libjpeg62-turbo \
libpng-dev \
libpng16-16 \
libldap2-dev \
libxml2-dev \
libzip-dev \
zlib1g-dev \
libicu-dev \
g++ \
default-mysql-client \
unzip \
curl \
apt-utils \
msmtp \
msmtp-mta \
mailutils \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install -j$(nproc) ldap && \
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
RUN mkdir /var/documents
RUN chown www-data:www-data /var/documents
COPY docker-run.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-run.sh
RUN pecl install xdebug && docker-php-ext-enable xdebug
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
# set up sendmail config, to use maildev
RUN echo "account default" > /etc/msmtprc
RUN echo "auth off" >> /etc/msmtprc
RUN echo "port 1025" >> /etc/msmtprc
RUN echo "host mail" >> /etc/msmtprc
RUN echo "from local@localdomain.com" >> /etc/msmtprc
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
EXPOSE 80
ENTRYPOINT ["docker-run.sh"]

View File

@@ -1,34 +0,0 @@
# 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.
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:
export HOST_USER_ID=$(id -u)
Go in repository build/docker :
cd build/docker
And then, you can run :
docker-compose up
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
The URL to go to the Dolibarr is :
http://0.0.0.0
The URL to go to PhpMyAdmin is (login/password is root/root) :
http://0.0.0.0:8080
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
http://0.0.0.0:8081
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
Setup documents folder, during the installation process, to /var/documents

View File

@@ -1,62 +0,0 @@
version: '3'
networks:
internal-pod:
internal: true
external-pod:
internal: false
services:
mariadb:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: rootpassfordev
MYSQL_DATABASE: dolibarr
ports:
- "3306:3306"
networks:
- internal-pod
- external-pod
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: mariadb
depends_on:
- mariadb
ports:
- "8080:80"
networks:
- internal-pod
- external-pod
web:
build: .
environment:
HOST_USER_ID: $HOST_USER_ID
PHP_INI_DATE_TIMEZONE: $PHP_INI_DATE_TIMEZONE
PHP_INI_MEMORY_LIMIT: $PHP_INI_MEMORY_LIMIT
volumes:
- ../../htdocs:/var/www/html/
- ../../documents:/var/documents
ports:
- "80:80"
- "9000:9000"
depends_on:
- mariadb
- mail
networks:
- internal-pod
- external-pod
extra_hosts:
- "localhost.localdomain:127.0.0.1"
- "host.docker.internal:host-gateway"
mail:
image: maildev/maildev
ports:
- "8081:1080"
- "25:1025"
networks:
- internal-pod
- external-pod

View File

@@ -1,24 +0,0 @@
#!/bin/bash
# Script used by the Dockerfile.
# See README.md to know how to create a Dolibarr env with docker
usermod -u "${HOST_USER_ID}" www-data
groupmod -g "${HOST_USER_ID}" www-data
chgrp -hR www-data /var/www/html
chmod g+rwx /var/www/html/conf
if [ ! -d /var/documents ]; then
echo "[docker-run] => create volume directory /var/documents ..."
mkdir -p /var/documents
fi
echo "[docker-run] => Set Permission to www-data for /var/documents"
chown -R www-data:www-data /var/documents
echo "[docker-run] => update '${PHP_INI_DIR}/conf.d/dolibarr-php.ini'"
cat <<EOF > "${PHP_INI_DIR}/conf.d/dolibarr-php.ini"
date.timezone = ${PHP_INI_DATE_TIMEZONE:-UTC}
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
EOF
exec apache2-foreground

View File

@@ -1,3 +0,0 @@
FROM mariadb:latest
# Enable commented out UTF8 charset/collation options
RUN sed '/utf8/ s/^#//' /etc/mysql/mariadb.cnf >/tmp/t && mv /tmp/t /etc/mysql/mariadb.cnf

View File

@@ -1,36 +0,0 @@
name: build
on:
push:
branches:
- master
schedule:
- cron: '0 0 * * 6'
jobs:
build-docker-images:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- env:
DOCKER_BUILD: 1
DOCKER_PUSH: 1
run: |
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
./update.sh
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
docker run --rm -t \
-v $(pwd):/src \
-e DOCKER_USER=${{ secrets.DOCKER_HUB_USERNAME }} \
-e DOCKER_PASS=${{ secrets.DOCKER_HUB_PASSWORD }} \
-e PUSHRM_PROVIDER=dockerhub \
-e PUSHRM_FILE=/src/README.md \
-e PUSHRM_SHORT='Docker image for Dolibarr with auto installer on first boot.' \
-e PUSHRM_TARGET=docker.io/tuxgasy/dolibarr \
-e PUSHRM_DEBUG=1 \
chko/docker-pushrm:1

View File

@@ -1,27 +0,0 @@
name: test
on:
push:
branches:
- master
pull_request:
jobs:
check-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
./update.sh
git diff --exit-code
check-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- env:
DOLI_INSTALL_AUTO: 0
run: |
./update.sh
docker build -t tuxgasy/dolibarr:develop images/develop
docker run -d -p 127.0.0.1:80:80 --name dolibarr tuxgasy/dolibarr:develop
docker ps | grep -q dolibarr

View File

@@ -1,3 +0,0 @@
.idea/
.volumes/
docker-compose-links/

View File

@@ -1,43 +1,61 @@
FROM php:8.2-apache-bookworm
LABEL maintainer="Yann Le Doaré <services@linuxconsole.org>"
FROM php:7.3-apache
ENV PHP_INI_DATE_TIMEZONE 'UTC'
ENV PHP_INI_MEMORY_LIMIT 256M
ENV PHP_INI_UPLOAD_MAX_FILESIZE 2M
ENV PHP_INI_POST_MAX_SIZE 8M
ENV PHP_INI_ALLOW_URL_FOPEN 0
RUN apt-get update -y \
&& apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
libc-client-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libkrb5-dev \
libldap2-dev \
libjpeg62-turbo \
libpng-dev \
libpq-dev \
libpng16-16 \
libldap2-dev \
libxml2-dev \
libzip-dev \
zlib1g-dev \
libicu-dev \
g++ \
default-mysql-client \
postgresql-client \
cron \
unzip \
curl \
apt-utils \
msmtp \
msmtp-mta \
mailutils \
&& apt-get autoremove -y \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
&& docker-php-ext-configure pgsql -with-pgsql \
&& docker-php-ext-install pdo_pgsql pgsql \
&& docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ \
&& docker-php-ext-install -j$(nproc) ldap \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install imap \
&& mv ${PHP_INI_DIR}/php.ini-production ${PHP_INI_DIR}/php.ini \
&& rm -rf /var/lib/apt/lists/*
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install -j$(nproc) ldap && \
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
RUN mkdir /var/documents
RUN chown www-data:www-data /var/documents
COPY docker-run.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-run.sh
RUN pecl install xdebug && docker-php-ext-enable xdebug
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
# set up sendmail config, to use maildev
RUN echo "account default" > /etc/msmtprc
RUN echo "auth off" >> /etc/msmtprc
RUN echo "port 25" >> /etc/msmtprc
RUN echo "host mail" >> /etc/msmtprc
RUN echo "from local@localdomain.com" >> /etc/msmtprc
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
EXPOSE 80
COPY docker-run.sh /usr/local/bin/
ENTRYPOINT ["docker-run.sh"]
CMD ["apache2-foreground"]

View File

@@ -1,6 +1,34 @@
# How to use it ?
export HOST_USER_ID=$(id -u)
export MYSQL_ROOT_PWD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13; echo)
The docker-compose.yml file is used to build and run Dolibarr in the current workspace.
This docker image intended for developpement usage.
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
docker-compose up -d
Before build/run, define the variable HOST_USER_ID as following:
export HOST_USER_ID=$(id -u)
Go in repository build/docker :
cd build/docker
And then, you can run :
docker-compose up
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
The URL to go to the Dolibarr is :
http://0.0.0.0
The URL to go to PhpMyAdmin is (login/password is root/root) :
http://0.0.0.0:8080
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
http://0.0.0.0:8081
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
Setup documents folder, during the installation process, to /var/documents

View File

@@ -1,38 +1,60 @@
# This docker-compose.yml file is used to build and test quickly
# a specific version of Dolibarr
#
# Before build, define the variable DOLI_VERSION as following:
# $ export DOLI_VERSION=4.0.4
# And then, you can run :
# $ docker-compose up
#
# More information about Docker-compose : https://docs.docker.com/compose/
version: '3'
version: "3"
networks:
internal-pod:
internal: true
external-pod:
internal: false
services:
mariadb:
container_name: dolibarr-mariadb-dev
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PWD
MYSQL_DATABASE: "dolibarr-prod"
web:
container_name: dolibarr-web-dev
build: .
volumes:
- ../../htdocs:/var/www/html/
- ../../documents:/var/www/html/documents
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dolibarr
ports:
- "3306:3306"
networks:
- internal-pod
- external-pod
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: mariadb
depends_on:
- mariadb
environment:
WWW_USER_ID: 1000
WWW_GROUP_ID: 1000
DOLI_ROOT_PASSWORD: $MYSQL_ROOT_PWD
DOLI_DATABASE: "dolibarr-prod"
DOLI_DB_SERVER: "mariadb"
ports:
- "8080:80"
networks:
- internal-pod
- external-pod
web:
build: .
environment:
HOST_USER_ID: $HOST_USER_ID
volumes:
- ../../htdocs:/var/www/html/
- ../../documents:/var/documents
ports:
- "80:80"
- "9000:9000"
depends_on:
- mariadb
- mail
networks:
- internal-pod
- external-pod
extra_hosts:
- "localhost.localdomain:127.0.0.1"
- "host.docker.internal:host-gateway"
mail:
image: maildev/maildev
ports:
- "8081:80"
- "25:25"
networks:
- internal-pod
- external-pod

18
build/docker/docker-run.sh Executable file → Normal file
View File

@@ -1,26 +1,24 @@
#!/bin/bash
# Script used by the Dockerfile.
# See README.md to know how to create a Dolibarr env with docker
# See README.md to know how to create a Dolibarr env with docker
usermod -u "${HOST_USER_ID}" www-data
groupmod -g "${HOST_USER_ID}" www-data
usermod -u ${HOST_USER_ID} www-data
groupmod -g ${HOST_USER_ID} www-data
chgrp -hR www-data /var/www/html
chmod g+rwx /var/www/html/conf
if [ ! -d /var/documents ]; then
echo "[docker-run] => create volume directory /var/documents ..."
mkdir -p /var/documents
mkdir -p /var/documents
fi
echo "[docker-run] => Set Permission to www-data for /var/documents"
chown -R www-data:www-data /var/documents
echo "[docker-run] => update '${PHP_INI_DIR}/conf.d/dolibarr-php.ini'"
cat <<EOF > "${PHP_INI_DIR}/conf.d/dolibarr-php.ini"
date.timezone = ${PHP_INI_DATE_TIMEZONE:-UTC}
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
if [ ! -f /usr/local/etc/php/php.ini ]; then
cat <<EOF > /usr/local/etc/php/php.ini
date.timezone = $PHP_INI_DATE_TIMEZONE
EOF
cp /var/www/html/install/install.forced.docker.php /var/www/html/install/install.forced.php
fi
exec apache2-foreground

View File

@@ -0,0 +1,3 @@
FROM mariadb:latest
# Enable comented out UTF8 charset/collation options
RUN sed '/utf8/ s/^#//' /etc/mysql/mariadb.cnf >/tmp/t && mv /tmp/t /etc/mysql/mariadb.cnf

View File

@@ -1,9 +1,9 @@
#!/usr/bin/perl
#--------------------------------------------------------------------
# Start the generation of the development documentation with doxygen
# Lance la generation de la doc dev doxygen
#--------------------------------------------------------------------
# Determine the patho of this script
# Detecte repertoire du script
($DIR=$0) =~ s/([^\/\\]+)$//;
$DIR||='.';
$DIR =~ s/([^\/\\])[\\\/]+$/$1/;

View File

@@ -220,8 +220,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
#EXTENSION_MAPPING = example=PHP
EXTENSION_MAPPING =
EXTENSION_MAPPING =
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
# to include (a tag file for) the STL sources as input, then you should
@@ -283,10 +282,10 @@ TYPEDEF_HIDES_STRUCT = NO
# For small to medium size projects (<1000 input files) the default value is
# probably good enough. For larger projects a too small cache size can cause
# doxygen to be busy swapping symbols to and from disk most of the time
# causing a significant performance penalty.
# causing a significant performance penality.
# If the system has enough physical memory increasing the cache will improve the
# performance by keeping more symbols in memory. Note that the value works on
# a logarithmic scale so increasing the size by one will roughly double the
# a logarithmic scale so increasing the size by one will rougly double the
# memory usage. The cache size is given by this formula:
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols
@@ -603,7 +602,6 @@ INPUT_ENCODING = UTF-8
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
#FILE_PATTERNS = *.php *.pl *.sql *.example
FILE_PATTERNS = *.php *.pl
# The RECURSIVE tag can be used to turn specify whether or not subdirectories

View File

@@ -160,7 +160,7 @@ html {
--toc-background: var(--side-nav-background);
--toc-foreground: var(--side-nav-foreground);
/* height of an item in any tree / collapsible table */
/* height of an item in any tree / collapsable table */
--tree-item-height: 30px;
--memname-font-size: var(--code-font-size);

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

@@ -11,38 +11,38 @@ LaunchProgram=Launch %1
AssocFileExtension=&Associate %1 with the %2 file extension
AssocingFileExtension=Associating %1 with the %2 file extension...
YouWillInstallDoliWamp=You will install DoliWamp (so Dolibarr plus all required third-party software like Apache, MySQL and PHP) on your computer.
ThisAssistantInstallOrUpgrade=WARNING: Using an ERP CRM installed on a local computer can be dangerous: if your computer breaks down, you can lose all your data. Do this if you are ready to manage backups yourself seriously. If not, use an installation in SaaS instead (see https://saas.dolibarr.org).
IfYouHaveTechnicalKnowledge=Moreover, if you have technical knowledge and want to manage Apache, MySQL and PHP yourself, you should not use this assistant and instead make a manual installation of Dolibarr on your existing server with Apache, MySQL and PHP.
ButIfYouLook=But if you are looking for an automatic setup on your local computer, you're on the right path...
DoYouWantToStart=Do you want to start the installation process?
YouWillInstallDoliWamp=You will install DoliWamp (so Dolibarr + all required third party software like Apache, Mysql and PHP) on your computer.
ThisAssistantInstallOrUpgrade=WARNING: Using an ERP CRM installed on a local computer can be dangerous: if your computer break down, you can lose all your data. Do this if you are ready to manage backup yourself seriously. If not, use an installation in Saas instead (see https://saas.dolibarr.org).
IfYouHaveTechnicalKnowledge=Moreover, if you have technical knowledges and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing server with Apache, Mysql and PHP.
ButIfYouLook=But if you look for an automatic setup on your local computer, you''re on the good way...
DoYouWantToStart=Do you want to start installation process ?
TechnicalParameters=Technical parameters
IfFirstInstall=If this is the first install, please specify some technical parameters. If you don't understand, are not sure, or are doing an upgrade, just keep the default values.
IfFirstInstall=If first install, please specify some technical parameters. If you don't understand, are not sure, or are doing an upgrade, just leave the default values.
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
SMTPServer=SMTP server (your own or ISP SMTP server, first install only):
ApachePort=Apache port (first install only, common choice is 80):
MySqlPort=MySQL port (first install only, common choice is 3306):
MySqlPassword=MySQL server and database password you want for root (first install only):
SMTPServer=SMTP server (your own or ISP SMTP server, first install only) :
ApachePort=Apache port (first install only, common choice is 80) :
MySqlPort=MySql port (first install only, common choice is 3306) :
MySqlPassword=MySql server and database password you want for root (first install only):
FailedToDeleteLock=Failed to delete the file %1/www/dolibarr/install.lock. You can ignore this warning but you may have to remove the file manually later when asked. Click OK to continue...
FailedToDeleteLock=Failed to delete the file %1/www/dolibarr/install.lock. You can ignore warning but you may have to remove it manually later when asked. Click OK to continue...
PortAlreadyInUse=Port %1 seems to already be in use. You should cancel to go back and choose another value for %2 port. Cancel choice and choose another value?
PortAlreadyInUse=Port %1 seems to be already in use. You should cancel to go back and choose another value for %2 port. Cancel choice and choose another value ?
FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr?
ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr?
MicrosoftEdgeDetected=Microsoft Edge has been detected on your computer. Would you like to use it as the default browser for Dolibarr?
ChooseDefaultBrowser=Please choose your default browser (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). If you are not sure, just click Open:
FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
MicrosoftEdgeDetected=Microsoft Edge has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
ChooseDefaultBrowser=Please choose your default browser (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). If you are not sure, just click Open :
LaunchNow=Launch Dolibarr now
ProgramHasBeenRemoved=Dolibarr's program files have been removed. However, all your data files are still in directory %1. You must remove this directory manually for a complete uninstall.
ProgramHasBeenRemoved=Dolibarr program files have been removed. However, all your data files are still in directory %1. You must remove this directory manually for a complete uninstall.
DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache and MySQL. This may take from several seconds to one minute. Start to install or upgrade the web and database server required by Dolibarr?
DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache and Mysql, this may last from several seconds to one minute after this confirmation. Start to install or upgrade the web and database server required by Dolibarr ?
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
OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by new Dolibarr version
OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with 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.
ContinueAnyway=Continue anyway (install process may fail without this prerequisite)
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=Continue anyway (install process may fails 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

@@ -3,7 +3,7 @@
// Page created by Shepard [Fabian Pijcke] <Shepard8@laposte.net>
// Arno Esterhuizen <arno.esterhuizen@gmail.com>
// and Romain Bourdon <romain@anaska.com>
//
//
// icones by Mark James <http://www.famfamfam.com/lab/icons/silk/>
//
// Modified from WampServer project by Laurent Destailleur (NLTechno)
@@ -260,7 +260,7 @@ if (isset($_GET['askhelp']))
// Show PHPInfo
if (isset($_GET['phpinfo']))
{
phpinfo(INFO_GENERAL|INFO_MODULES);
phpinfo();
exit();
}
@@ -274,27 +274,27 @@ if (isset($_GET['img']))
header("Content-type: image/png");
echo base64_decode($pngFolder);
exit();
case 'pngFolderGo' :
header("Content-type: image/png");
echo base64_decode($pngFolderGo);
exit();
case 'pngLogo' :
header("Content-type: image/png");
echo base64_decode($pngLogo);
exit();
case 'pngPlugin' :
header("Content-type: image/png");
echo base64_decode($pngPlugin);
exit();
case 'pngWrench' :
header("Content-type: image/png");
echo base64_decode($pngWrench);
exit();
case 'favicon' :
header("Content-type: image/x-icon");
echo base64_decode($favicon);
@@ -304,15 +304,22 @@ if (isset($_GET['img']))
// Definition of language and texts
// Definition de la langue et des textes
if (isset ($_GET['lang'])) {
$langue = preg_replace('/[^a-z_]/i', '', $_GET['lang']);
} elseif (preg_match("/^fr/", $_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
if (isset ($_GET['lang']))
{
$langue = $_GET['lang'];
}
elseif (preg_match("/^fr/", $_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
$langue = 'fr';
} elseif (preg_match("/^es/", $_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
}
elseif (preg_match("/^es/", $_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
$langue = 'es';
} else {
}
else
{
$langue = 'en';
}
@@ -320,27 +327,31 @@ if (isset ($_GET['lang'])) {
// Read PHP extensions
$loaded_extensions = get_loaded_extensions();
$phpExtContents='';
foreach ($loaded_extensions as $extension) {
foreach ($loaded_extensions as $extension)
$phpExtContents .= "<li>${extension}</li>";
}
// Read alias directory
$listoffile=array();
$aliasarray=array();
$aliasContents='';
if (is_dir($aliasDir)) {
if (is_dir($aliasDir))
{
$handle=opendir($aliasDir);
if (is_resource($handle)) {
while ($file = readdir($handle)) {
if (is_resource($handle))
{
while ($file = readdir($handle))
{
$listoffiles[]=$file;
}
}
sort($listoffiles);
foreach($listoffiles as $file) {
foreach($listoffiles as $file)
{
if (is_file($aliasDir.$file) && preg_match('/\.conf/',$file))
{
{
$msg = '';
$aliasContents.='<tr><td><ul class="aliases">';
@@ -350,7 +361,7 @@ if (is_dir($aliasDir)) {
if (preg_match('/dolibarr/i',$file)) $aliasContents .= $file.'</a></li></ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td><td>http://<i>ipofyourserver</i>'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td></tr>';
elseif (preg_match('/phpmyadmin/i',$file)) $aliasContents .= $file.'</a></li></ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
else $aliasContents .= $file.'</a></li></ul></td> <td> </td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
$aliasarray[]=$file;
}
}
@@ -358,35 +369,37 @@ if (is_dir($aliasDir)) {
}
if (!isset($aliasContents))
$aliasContents = '<tr><td colspan="3">'.$langues[$langue]['txtNoAlias'].'</td></tr>';
// Read projects in www dir
$listoffiles=array();
$handle=opendir(".");
if (is_resource($handle)) {
while ($file = readdir($handle))
if (is_resource($handle))
{
while ($file = readdir($handle))
{
$listoffiles[]=$file;
}
closedir($handle);
}
foreach($listoffiles as $file) {
if (is_dir($file) && !in_array($file,$projectsListIgnore) && !in_array($file,$aliasarray))
{
foreach($listoffiles as $file)
{
if (is_dir($file) && !in_array($file,$projectsListIgnore) && !in_array($file,$aliasarray))
{
$projectContents .= '<tr><td><ul class="projects">';
$projectContents .= '<li><a href="'.$file.'/">';
$projectContents .= $file.'</a>';
$projectContents .= '</li>';
$projectContents .= '</ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/)'.'</td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
}
}
if (!isset($projectContents)) {
if (!isset($projectContents))
$projectContents = '<tr><td colspan="3">'.$langues[$langue]['txtNoProjet'].'</td></tr>';
}
$nameServer=getenv("COMPUTERNAME");
@@ -509,7 +522,7 @@ a:hover {
font-size: 0.85em;
}
</style>
<link rel="shortcut icon" href="index.php?img=favicon" type="image/ico" />
</head>
@@ -533,7 +546,7 @@ a:hover {
<dd>${apacheVersion} &nbsp;</dd>
<dt>{$langues[$langue]['versp']}</dt>
<dd>${phpVersion} &nbsp;</dd>
<dt>{$langues[$langue]['phpExt']}</dt>
<dt>{$langues[$langue]['phpExt']}</dt>
<dd>
<ul>
${phpExtContents}
@@ -554,8 +567,8 @@ a:hover {
</td><td valign="middle">
{$langues[$langue]['FromInternet']}
</td></tr>
${aliasContents}
${projectContents}
${aliasContents}
${projectContents}
</table>
<h2>{$langues[$langue]['titrePage']}</h2>

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|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

@@ -49,7 +49,7 @@ If you want to build/test package locally:
Use URL pattern (stable):
For stable: http://www.dolibarr.org/files/lastbuild/package_debian-ubuntu/dolibarr_x.z.*.tar.gz
- For Dev, you can also add link series to GIT HEAD.
- For Dev, you can also add link serie to GIT HEAD.
- For stable, you can init from command line
cd bzr/dolibarr-stable
bzr init

View File

@@ -2,7 +2,7 @@
#----------------------------------------------------------------------------
# \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:
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
@@ -369,12 +369,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)
@@ -538,8 +538,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`;
@@ -583,7 +581,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*`;
@@ -630,21 +627,15 @@ 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

View File

@@ -258,7 +258,7 @@ foreach my $target (keys %CHOOSEDTARGET) {
if ($CHOOSEDTARGET{$target} < 0) {
print "Package $target not built (bad requirement).\n";
} else {
print "Package $target built successfully in $DESTI\n";
print "Package $target built succeessfully in $DESTI\n";
}
}

View File

@@ -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 recommended),
> 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 committed.
- Update version/info in ChangeLog, for this you can:
- Check all files are commited.
- 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,11 +67,10 @@ 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 committed.
- Check all files are commited.
- 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 pn branch x.y), 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"
@@ -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

@@ -54,5 +54,5 @@ OBS:QualityCategory Stable|Testing|Development|Private
For example: https://bugzilla.novell.com/show_bug.cgi?id=848083 to be a maintener of category
https://build.opensuse.org/project/show/Application:ERP
- Once done, go into project, category, subproject and enter a subproject for your application.
For example: Dolibarr
Fo example: Dolibarr
- Then go onto project into your home and ask a publish to the category/you project your created.

View File

@@ -58,8 +58,8 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
</Italian>
</Program_Descriptions>
<Web_Info>

View File

@@ -53,8 +53,8 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
</Italian>
<French>
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>

View File

@@ -95,8 +95,8 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
</Italian>
</Program_Descriptions>
<Web_Info>

View File

@@ -95,8 +95,8 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
</Italian>
</Program_Descriptions>
<Web_Info>

View File

@@ -88,8 +88,8 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
</Italian>
</Program_Descriptions>
<Web_Info>

View File

@@ -88,8 +88,8 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
</Italian>
</Program_Descriptions>
<Web_Info>

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 submitted 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,4 +1,4 @@
#!/bin/bash
#/bin/ksh
#----------------------------------------------------------------------------
# \file build/patch/buildpatch.sh
# \brief Create patch files
@@ -6,18 +6,16 @@
#----------------------------------------------------------------------------
# This script can be used to build a patch after a developer has made
# changes on files in its Dolibarr tree.
# The output patch file can then be submitted on Dolibarr dev mailing-list,
# The output patch file can then be submited on Dolibarr dev mailing-list,
# with explanation on its goal, for inclusion in main branch.
#----------------------------------------------------------------------------
# shellcheck disable=2086,2291
echo ----- Building patch file mypatch.patch -----
if [ -z "$1" ] || [ -z "$2" ];
then
echo Usage: buildpatch.sh original_dir_path modified_dir_path
echo Example: buildpatch.sh /mydirA/dolibarrold /mydirB/dolibarrnew
then
echo Usage: buildpatch.sh original_dir_path modified_dir_path
echo Example: buildpatch.sh /mydirA/dolibarrold /mydirB/dolibarrnew
else
echo Build patch between \"$1\" and \"$2\"
diff -BNaur --exclude=CVS --exclude="*.patch" --exclude=".#*" --exclude="*~" --exclude="*.rej" --exclude="*.orig" --exclude="*.bak" --exclude=conf.php --exclude=documents $1 $2 > mypatch.patch
echo Build patch between \"$1\" and \"$2\"
diff -BNaur --exclude=CVS --exclude="*.patch" --exclude=".#*" --exclude="*~" --exclude="*.rej" --exclude="*.orig" --exclude="*.bak" --exclude=conf.php --exclude=documents $1 $2 > mypatch.patch
fi

View File

@@ -1,26 +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
= Installation =
cd ./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 --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,20 +1,10 @@
<?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("NOSESSION")) {
define("NOSESSION", '1');
}
if (!defined("NOHTTPSREDIRECT")) {
define("NOHTTPSREDIRECT", '1');
}
global $conf, $db, $langs, $user;
if (! defined("NOLOGIN")) define("NOLOGIN", '1');
global $conf, $langs, $user, $db;
include_once __DIR__ . '/../../htdocs/main.inc.php';

View File

@@ -1,22 +0,0 @@
<?php
// Load the main.inc.php file to have functions env defined
if (!defined("NOLOGIN")) {
define("NOLOGIN", '1');
}
if (!defined("NOSESSION")) {
define("NOSESSION", '1');
}
if (!defined("NOHTTPSREDIRECT")) {
define("NOHTTPSREDIRECT", '1');
}
// 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', '/');
define('DOL_MAIN_URL_ROOT', '/');
define('MAIN_DB_PREFIX', 'llx_');
global $conf, $db, $langs, $user;
// include_once DOL_DOCUMENT_ROOT . '/../../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

@@ -24,5 +24,5 @@ diff -up htdocs/install/inc.php.patch htdocs/install/inc.php
+$conffile = "/etc/dolibarr/conf.php";
+$conffiletoshow = "/etc/dolibarr/conf.php";
$short_options = "c:h";
$long_options = array(
// Load conf file if it is already defined

52
build/rpm/dolibarr_fedora.spec Normal file → Executable file
View File

@@ -1,15 +1,15 @@
#---------------------------------------------------------
# Spec file to build a rpm file
#
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# edit it if you need to match your rules.
# --------------------------------------------------------
Name: dolibarr
Version: __VERSION__
Release: __RELEASE__%{?dist}
Summary: ERP and CRM software for small and medium companies or foundations
Summary: ERP and CRM software for small and medium companies or foundations
Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones o autónomos
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
@@ -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)
@@ -34,24 +34,24 @@ AutoReqProv: no
%description
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities.
Dolibarr was designed to provide only features you need and be easy to
Dolibarr was designed to provide only features you need and be easy to
use.
%description -l es
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
o autónomos. Incluye diferentes funcionalidades para la Planificación
o autónomos. Incluye diferentes funcionalidades para la Planificación
de Recursos Empresariales (ERP) y Gestión de la Relación con los
Clientes (CRM) así como para para otras diferentes actividades.
Clientes (CRM) así como para para otras diferentes actividades.
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
que necesita y haciendo hincapié en su facilidad de uso.
%description -l fr
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
fournisseurs, devis, factures, comptes bancaires, agenda, campagnes mailings
et bien d'autres choses dans une interface pensée pour la simplicité.
@@ -59,9 +59,9 @@ et bien d'autres choses dans une interface pensée pour la simplicité.
Un programmo gestionale per piccole e medie
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
attività. Progettato per poter fornire solo ciò di cui hai bisogno
attività. Progettato per poter fornire solo ciò di cui hai bisogno
ed essere facile da usare.
Programmo web, progettato per poter fornire solo ciò di
Programmo web, progettato per poter fornire solo ciò di
cui hai bisogno ed essere facile da usare.
@@ -103,7 +103,7 @@ cui hai bisogno ed essere facile da usare.
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
@@ -113,8 +113,8 @@ echo "%dir %{_datadir}/%{name}/htdocs/langs" >> %{name}.lang
for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_*
do
lang=$(basename $i)
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
if [ "$lang1" = "$lang2" ] ; then
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
@@ -158,7 +158,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/accountancy
%_datadir/dolibarr/htdocs/adherents
%_datadir/dolibarr/htdocs/admin
%_datadir/dolibarr/htdocs/ai
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asset
%_datadir/dolibarr/htdocs/asterisk
@@ -229,7 +228,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webportal
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation
@@ -263,7 +261,7 @@ export apachegroup='apache';
# Remove dolibarr install/upgrade lock file if it exists
%{__rm} -f $docdir/install.lock
# Create empty directory for uploaded files and generated documents
# Create empty directory for uploaded files and generated documents
echo Create document directory $docdir
%{__mkdir} -p $docdir
@@ -273,7 +271,7 @@ echo Create document directory $docdir
# If a conf already exists and its content was already completed by installer
export config=%{_sysconfdir}/dolibarr/conf.php
if [ -s $config ] && grep -q "File generated by" $config
then
then
# File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
@@ -323,9 +321,9 @@ echo Restart mysql server
echo
echo "----- Dolibarr %version-%release - (c) Dolibarr dev team -----"
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
echo "To finish installation and use Dolibarr, click on the menu"
echo "To finish installation and use Dolibarr, click on the menu"
echo "entry Dolibarr ERP-CRM or call the following page from your"
echo "web browser:"
echo "web browser:"
echo "http://localhost/dolibarr/"
echo "-------------------------------------------------------"
echo
@@ -341,7 +339,7 @@ then
# Define vars
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
# Remove apache link
if [ -L $apachelink ] ;
then
@@ -349,7 +347,7 @@ then
%{__rm} -f $apachelink
status=purge
fi
# Restart web servers if required
if [ "x$status" = "xpurge" ] ;
then

58
build/rpm/dolibarr_generic.spec Normal file → Executable file
View File

@@ -1,8 +1,8 @@
#---------------------------------------------------------
# Spec file to build a rpm file
#
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# edit it if you need to match your rules.
# --------------------------------------------------------
@@ -13,7 +13,7 @@ Release: __RELEASE__%{?dist}
%else
Release: __RELEASE__
%endif
Summary: ERP and CRM software for small and medium companies or foundations
Summary: ERP and CRM software for small and medium companies or foundations
Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones o autónomos
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
@@ -46,26 +46,26 @@ 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}
Group: Applications/Productivity
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
Requires: mysql, mysql-client
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
Requires: mysql, mysql-client
%else
%if 0%{?suse_version}
# Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
Group: Productivity/Office/Management
Requires: apache2, apache2-mod_php, php >= 5.3.0, php-gd, php-ldap, php-imap, php-mysql, php-openssl, dejavu
Requires: mysql-community-server, mysql-community-server-client
Requires: mysql-community-server, mysql-community-server-client
BuildRequires: update-desktop-files fdupes
%else
Group: Applications/Productivity
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mbstring, php-xml
Requires: mysql-server, mysql
Requires: php-mysqli >= 4.1.0
Requires: mysql-server, mysql
Requires: php-mysqli >= 4.1.0
%endif
%endif
@@ -76,24 +76,24 @@ AutoReqProv: no
%description
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities.
Dolibarr was designed to provide only features you need and be easy to
Dolibarr was designed to provide only features you need and be easy to
use.
%description -l es
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
o autónomos. Incluye diferentes funcionalidades para la Planificación
o autónomos. Incluye diferentes funcionalidades para la Planificación
de Recursos Empresariales (ERP) y Gestión de la Relación con los
Clientes (CRM) así como para para otras diferentes actividades.
Clientes (CRM) así como para para otras diferentes actividades.
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
que necesita y haciendo hincapié en su facilidad de uso.
%description -l fr
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
fournisseurs, devis, factures, comptes bancaires, agenda, campagnes mailings
et bien d'autres choses dans une interface pensée pour la simplicité.
@@ -101,9 +101,9 @@ et bien d'autres choses dans une interface pensée pour la simplicité.
Un programmo gestionale per piccole e medie
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
attività. Progettato per poter fornire solo ciò di cui hai bisogno
attività. Progettato per poter fornire solo ciò di cui hai bisogno
ed essere facile da usare.
Programmo web, progettato per poter fornire solo ciò di
Programmo web, progettato per poter fornire solo ciò di
cui hai bisogno ed essere facile da usare.
@@ -167,7 +167,7 @@ cui hai bisogno ed essere facile da usare.
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
@@ -187,8 +187,8 @@ echo "%dir %{_datadir}/%{name}/htdocs/langs" >> %{name}.lang
for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_*
do
lang=$(basename $i)
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
if [ "$lang1" = "$lang2" ] ; then
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
@@ -239,7 +239,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/accountancy
%_datadir/dolibarr/htdocs/adherents
%_datadir/dolibarr/htdocs/admin
%_datadir/dolibarr/htdocs/ai
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asset
%_datadir/dolibarr/htdocs/asterisk
@@ -310,7 +309,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webportal
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation
@@ -395,7 +393,7 @@ echo OS detected: $os
# Remove dolibarr install/upgrade lock file if it exists
%{__rm} -f $docdir/install.lock
# Create empty directory for uploaded files and generated documents
# Create empty directory for uploaded files and generated documents
echo Create document directory $docdir
%{__mkdir} -p $docdir
@@ -526,9 +524,9 @@ fi
echo
echo "----- Dolibarr %version-%release - (c) Dolibarr dev team -----"
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
echo "To finish installation and use Dolibarr, click on the menu"
echo "To finish installation and use Dolibarr, click on the menu"
echo "entry Dolibarr ERP-CRM or call the following page from your"
echo "web browser:"
echo "web browser:"
echo "http://localhost/dolibarr/"
echo "-------------------------------------------------------"
echo
@@ -569,7 +567,7 @@ then
fi
%endif
%endif
# Remove apache link
if [ -L $apachelink ] ;
then
@@ -577,7 +575,7 @@ then
%{__rm} -f $apachelink
status=purge
fi
# Restart web servers if required
if [ "x$status" = "xpurge" ] ;
then

52
build/rpm/dolibarr_mandriva.spec Normal file → Executable file
View File

@@ -1,15 +1,15 @@
#---------------------------------------------------------
# Spec file to build a rpm file
#
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# edit it if you need to match your rules.
# --------------------------------------------------------
Name: dolibarr
Version: __VERSION__
Release: __RELEASE__
Summary: ERP and CRM software for small and medium companies or foundations
Summary: ERP and CRM software for small and medium companies or foundations
Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones o autónomos
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
@@ -25,32 +25,32 @@ BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Applications/Productivity
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
Requires: mysql, mysql-client
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
Requires: mysql, mysql-client
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
AutoReqProv: no
%description
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities.
Dolibarr was designed to provide only features you need and be easy to
Dolibarr was designed to provide only features you need and be easy to
use.
%description -l es
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
o autónomos. Incluye diferentes funcionalidades para la Planificación
o autónomos. Incluye diferentes funcionalidades para la Planificación
de Recursos Empresariales (ERP) y Gestión de la Relación con los
Clientes (CRM) así como para para otras diferentes actividades.
Clientes (CRM) así como para para otras diferentes actividades.
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
que necesita y haciendo hincapié en su facilidad de uso.
%description -l fr
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
fournisseurs, devis, factures, comptes bancaires, agenda, campagnes mailings
et bien d'autres choses dans une interface pensée pour la simplicité.
@@ -58,9 +58,9 @@ et bien d'autres choses dans une interface pensée pour la simplicité.
Un programmo gestionale per piccole e medie
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
attività. Progettato per poter fornire solo ciò di cui hai bisogno
attività. Progettato per poter fornire solo ciò di cui hai bisogno
ed essere facile da usare.
Programmo web, progettato per poter fornire solo ciò di
Programmo web, progettato per poter fornire solo ciò di
cui hai bisogno ed essere facile da usare.
@@ -102,7 +102,7 @@ cui hai bisogno ed essere facile da usare.
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
# Lang
@@ -111,8 +111,8 @@ echo "%dir %{_datadir}/%{name}/htdocs/langs" >> %{name}.lang
for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_*
do
lang=$(basename $i)
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
if [ "$lang1" = "$lang2" ] ; then
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
@@ -156,7 +156,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/accountancy
%_datadir/dolibarr/htdocs/adherents
%_datadir/dolibarr/htdocs/admin
%_datadir/dolibarr/htdocs/ai
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asset
%_datadir/dolibarr/htdocs/asterisk
@@ -227,7 +226,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webportal
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation
@@ -261,7 +259,7 @@ export apachegroup='apache';
# Remove dolibarr install/upgrade lock file if it exists
%{__rm} -f $docdir/install.lock
# Create empty directory for uploaded files and generated documents
# Create empty directory for uploaded files and generated documents
echo Create document directory $docdir
%{__mkdir} -p $docdir
@@ -271,7 +269,7 @@ echo Create document directory $docdir
# If a conf already exists and its content was already completed by installer
export config=%{_sysconfdir}/dolibarr/conf.php
if [ -s $config ] && grep -q "File generated by" $config
then
then
# File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
@@ -323,9 +321,9 @@ fi
echo
echo "----- Dolibarr %version-%release - (c) Dolibarr dev team -----"
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
echo "To finish installation and use Dolibarr, click on the menu"
echo "To finish installation and use Dolibarr, click on the menu"
echo "entry Dolibarr ERP-CRM or call the following page from your"
echo "web browser:"
echo "web browser:"
echo "http://localhost/dolibarr/"
echo "-------------------------------------------------------"
echo
@@ -341,7 +339,7 @@ then
# Define vars
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
# Remove apache link
if [ -L $apachelink ] ;
then
@@ -349,7 +347,7 @@ then
%{__rm} -f $apachelink
status=purge
fi
# Restart web servers if required
if [ "x$status" = "xpurge" ] ;
then

54
build/rpm/dolibarr_opensuse.spec Normal file → Executable file
View File

@@ -1,15 +1,15 @@
#---------------------------------------------------------
# Spec file to build a rpm file
#
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# edit it if you need to match your rules.
# --------------------------------------------------------
Name: dolibarr
Version: __VERSION__
Release: __RELEASE__
Summary: ERP and CRM software for small and medium companies or foundations
Summary: ERP and CRM software for small and medium companies or foundations
Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones o autónomos
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
@@ -26,7 +26,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Productivity/Office/Management
Requires: apache2, apache2-mod_php, php >= 5.3.0, php-gd, php-ldap, php-imap, php-mysql, php-openssl, dejavu
Requires: mysql-community-server, mysql-community-server-client
Requires: mysql-community-server, mysql-community-server-client
%if 0%{?suse_version}
BuildRequires: update-desktop-files fdupes
%endif
@@ -36,24 +36,24 @@ AutoReqProv: no
%description
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities.
Dolibarr was designed to provide only features you need and be easy to
Dolibarr was designed to provide only features you need and be easy to
use.
%description -l es
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
o autónomos. Incluye diferentes funcionalidades para la Planificación
o autónomos. Incluye diferentes funcionalidades para la Planificación
de Recursos Empresariales (ERP) y Gestión de la Relación con los
Clientes (CRM) así como para para otras diferentes actividades.
Clientes (CRM) así como para para otras diferentes actividades.
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
que necesita y haciendo hincapié en su facilidad de uso.
%description -l fr
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
fournisseurs, devis, factures, comptes bancaires, agenda, campagnes mailings
et bien d'autres choses dans une interface pensée pour la simplicité.
@@ -61,9 +61,9 @@ et bien d'autres choses dans une interface pensée pour la simplicité.
Un programmo gestionale per piccole e medie
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
attività. Progettato per poter fornire solo ciò di cui hai bisogno
attività. Progettato per poter fornire solo ciò di cui hai bisogno
ed essere facile da usare.
Programmo web, progettato per poter fornire solo ciò di
Programmo web, progettato per poter fornire solo ciò di
cui hai bisogno ed essere facile da usare.
@@ -102,7 +102,7 @@ cui hai bisogno ed essere facile da usare.
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
# Lang
@@ -111,8 +111,8 @@ echo "%dir %{_datadir}/%{name}/htdocs/langs" >> %{name}.lang
for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_*
do
lang=$(basename $i)
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
if [ "$lang1" = "$lang2" ] ; then
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
@@ -166,7 +166,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/accountancy
%_datadir/dolibarr/htdocs/adherents
%_datadir/dolibarr/htdocs/admin
%_datadir/dolibarr/htdocs/ai
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asset
%_datadir/dolibarr/htdocs/asterisk
@@ -237,7 +236,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webportal
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation
@@ -271,7 +269,7 @@ export apachegroup='www';
# Remove dolibarr install/upgrade lock file if it exists
%{__rm} -f $docdir/install.lock
# Create empty directory for uploaded files and generated documents
# Create empty directory for uploaded files and generated documents
echo Create document directory $docdir
%{__mkdir} -p $docdir
@@ -281,7 +279,7 @@ echo Create document directory $docdir
# If a conf already exists and its content was already completed by installer
export config=%{_sysconfdir}/dolibarr/conf.php
if [ -s $config ] && grep -q "File generated by" $config
then
then
# File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
@@ -293,7 +291,7 @@ then
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf'; ?>" >> $config
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf'; ?>" >> $config
fi
# Create a config link dolibarr.conf
@@ -333,9 +331,9 @@ fi
echo
echo "----- Dolibarr %version-%release - (c) Dolibarr dev team -----"
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
echo "To finish installation and use Dolibarr, click on the menu"
echo "To finish installation and use Dolibarr, click on the menu"
echo "entry Dolibarr ERP-CRM or call the following page from your"
echo "web browser:"
echo "web browser:"
echo "http://localhost/dolibarr/"
echo "-------------------------------------------------------"
echo
@@ -348,10 +346,10 @@ if [ "x$1" = "x0" ] ;
then
# Remove
echo "Removed package"
# Define vars
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
# Remove apache link
if [ -L $apachelink ] ;
then
@@ -359,7 +357,7 @@ then
%{__rm} -f $apachelink
status=purge
fi
# Restart web servers if required
if [ "x$status" = "xpurge" ] ;
then

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