Merge branch 'develop' into ScrutinizerPrice
This commit is contained in:
commit
69c077cc9a
2
.github/workflows/code_quality.yml
vendored
2
.github/workflows/code_quality.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
fetch-depth: 1
|
||||
#php-version: '7.1'
|
||||
- name: 'Qodana Scan'
|
||||
uses: JetBrains/qodana-action@v2022.3.2
|
||||
uses: JetBrains/qodana-action@v2022.3.4
|
||||
#with:
|
||||
# php-version: '7.1'
|
||||
env:
|
||||
|
||||
294
.tx/config
294
.tx/config
@ -1,442 +1,442 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
host = https://www.transifex.com
|
||||
lang_map = uz: uz_UZ, sw: sw_SW, sr@latin: sr_RS
|
||||
|
||||
[dolibarr.accountancy]
|
||||
[o:dolibarr-association:p:dolibarr:r:accountancy]
|
||||
file_filter = htdocs/langs/<lang>/accountancy.lang
|
||||
source_file = htdocs/langs/en_US/accountancy.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.admin]
|
||||
[o:dolibarr-association:p:dolibarr:r:admin]
|
||||
file_filter = htdocs/langs/<lang>/admin.lang
|
||||
source_file = htdocs/langs/en_US/admin.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.agenda]
|
||||
[o:dolibarr-association:p:dolibarr:r:agenda]
|
||||
file_filter = htdocs/langs/<lang>/agenda.lang
|
||||
source_file = htdocs/langs/en_US/agenda.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.assets]
|
||||
[o:dolibarr-association:p:dolibarr:r:assets]
|
||||
file_filter = htdocs/langs/<lang>/assets.lang
|
||||
source_file = htdocs/langs/en_US/assets.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.banks]
|
||||
[o:dolibarr-association:p:dolibarr:r:banks]
|
||||
file_filter = htdocs/langs/<lang>/banks.lang
|
||||
source_file = htdocs/langs/en_US/banks.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.bills]
|
||||
[o:dolibarr-association:p:dolibarr:r:bills]
|
||||
file_filter = htdocs/langs/<lang>/bills.lang
|
||||
source_file = htdocs/langs/en_US/bills.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.blockedlog]
|
||||
[o:dolibarr-association:p:dolibarr:r:blockedlog]
|
||||
file_filter = htdocs/langs/<lang>/blockedlog.lang
|
||||
source_file = htdocs/langs/en_US/blockedlog.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.bookmarks]
|
||||
[o:dolibarr-association:p:dolibarr:r:bookmarks]
|
||||
file_filter = htdocs/langs/<lang>/bookmarks.lang
|
||||
source_file = htdocs/langs/en_US/bookmarks.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.boxes]
|
||||
[o:dolibarr-association:p:dolibarr:r:boxes]
|
||||
file_filter = htdocs/langs/<lang>/boxes.lang
|
||||
source_file = htdocs/langs/en_US/boxes.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.cashdesk]
|
||||
[o:dolibarr-association:p:dolibarr:r:cashdesk]
|
||||
file_filter = htdocs/langs/<lang>/cashdesk.lang
|
||||
source_file = htdocs/langs/en_US/cashdesk.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.categories]
|
||||
[o:dolibarr-association:p:dolibarr:r:categories]
|
||||
file_filter = htdocs/langs/<lang>/categories.lang
|
||||
source_file = htdocs/langs/en_US/categories.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.commercial]
|
||||
[o:dolibarr-association:p:dolibarr:r:commercial]
|
||||
file_filter = htdocs/langs/<lang>/commercial.lang
|
||||
source_file = htdocs/langs/en_US/commercial.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.companies]
|
||||
[o:dolibarr-association:p:dolibarr:r:companies]
|
||||
file_filter = htdocs/langs/<lang>/companies.lang
|
||||
source_file = htdocs/langs/en_US/companies.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.compta]
|
||||
[o:dolibarr-association:p:dolibarr:r:compta]
|
||||
file_filter = htdocs/langs/<lang>/compta.lang
|
||||
source_file = htdocs/langs/en_US/compta.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.contracts]
|
||||
[o:dolibarr-association:p:dolibarr:r:contracts]
|
||||
file_filter = htdocs/langs/<lang>/contracts.lang
|
||||
source_file = htdocs/langs/en_US/contracts.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.cron]
|
||||
[o:dolibarr-association:p:dolibarr:r:cron]
|
||||
file_filter = htdocs/langs/<lang>/cron.lang
|
||||
source_file = htdocs/langs/en_US/cron.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.datapolicy]
|
||||
[o:dolibarr-association:p:dolibarr:r:datapolicy]
|
||||
file_filter = htdocs/langs/<lang>/datapolicy.lang
|
||||
source_file = htdocs/langs/en_US/datapolicy.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.deliveries]
|
||||
[o:dolibarr-association:p:dolibarr:r:deliveries]
|
||||
file_filter = htdocs/langs/<lang>/deliveries.lang
|
||||
source_file = htdocs/langs/en_US/deliveries.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.dict]
|
||||
[o:dolibarr-association:p:dolibarr:r:dict]
|
||||
file_filter = htdocs/langs/<lang>/dict.lang
|
||||
source_file = htdocs/langs/en_US/dict.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.donations]
|
||||
[o:dolibarr-association:p:dolibarr:r:donations]
|
||||
file_filter = htdocs/langs/<lang>/donations.lang
|
||||
source_file = htdocs/langs/en_US/donations.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ecm]
|
||||
[o:dolibarr-association:p:dolibarr:r:ecm]
|
||||
file_filter = htdocs/langs/<lang>/ecm.lang
|
||||
source_file = htdocs/langs/en_US/ecm.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.errors]
|
||||
[o:dolibarr-association:p:dolibarr:r:errors]
|
||||
file_filter = htdocs/langs/<lang>/errors.lang
|
||||
source_file = htdocs/langs/en_US/errors.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.eventorganization]
|
||||
[o:dolibarr-association:p:dolibarr:r:eventorganization]
|
||||
file_filter = htdocs/langs/<lang>/eventorganization.lang
|
||||
source_file = htdocs/langs/en_US/eventorganization.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.exports]
|
||||
[o:dolibarr-association:p:dolibarr:r:exports]
|
||||
file_filter = htdocs/langs/<lang>/exports.lang
|
||||
source_file = htdocs/langs/en_US/exports.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.help]
|
||||
[o:dolibarr-association:p:dolibarr:r:help]
|
||||
file_filter = htdocs/langs/<lang>/help.lang
|
||||
source_file = htdocs/langs/en_US/help.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.holiday]
|
||||
[o:dolibarr-association:p:dolibarr:r:holiday]
|
||||
file_filter = htdocs/langs/<lang>/holiday.lang
|
||||
source_file = htdocs/langs/en_US/holiday.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.hrm]
|
||||
[o:dolibarr-association:p:dolibarr:r:hrm]
|
||||
file_filter = htdocs/langs/<lang>/hrm.lang
|
||||
source_file = htdocs/langs/en_US/hrm.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.install]
|
||||
[o:dolibarr-association:p:dolibarr:r:install]
|
||||
file_filter = htdocs/langs/<lang>/install.lang
|
||||
source_file = htdocs/langs/en_US/install.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.interventions]
|
||||
[o:dolibarr-association:p:dolibarr:r:interventions]
|
||||
file_filter = htdocs/langs/<lang>/interventions.lang
|
||||
source_file = htdocs/langs/en_US/interventions.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.intracommreport]
|
||||
[o:dolibarr-association:p:dolibarr:r:intracommreport]
|
||||
file_filter = htdocs/langs/<lang>/intracommreport.lang
|
||||
source_file = htdocs/langs/en_US/intracommreport.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.knowledgemanagement]
|
||||
[o:dolibarr-association:p:dolibarr:r:knowledgemanagement]
|
||||
file_filter = htdocs/langs/<lang>/knowledgemanagement.lang
|
||||
source_file = htdocs/langs/en_US/knowledgemanagement.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.languages-not-res]
|
||||
[o:dolibarr-association:p:dolibarr:r:languages-not-res]
|
||||
file_filter = htdocs/langs/<lang>/languages.lang
|
||||
source_file = htdocs/langs/en_US/languages.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ldap]
|
||||
[o:dolibarr-association:p:dolibarr:r:ldap]
|
||||
file_filter = htdocs/langs/<lang>/ldap.lang
|
||||
source_file = htdocs/langs/en_US/ldap.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.link]
|
||||
[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
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.loan]
|
||||
[o:dolibarr-association:p:dolibarr:r:loan]
|
||||
file_filter = htdocs/langs/<lang>/loan.lang
|
||||
source_file = htdocs/langs/en_US/loan.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.mailmanspip]
|
||||
[o:dolibarr-association:p:dolibarr:r:mailmanspip]
|
||||
file_filter = htdocs/langs/<lang>/mailmanspip.lang
|
||||
source_file = htdocs/langs/en_US/mailmanspip.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.mails]
|
||||
[o:dolibarr-association:p:dolibarr:r:mails]
|
||||
file_filter = htdocs/langs/<lang>/mails.lang
|
||||
source_file = htdocs/langs/en_US/mails.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.main]
|
||||
[o:dolibarr-association:p:dolibarr:r:main]
|
||||
file_filter = htdocs/langs/<lang>/main.lang
|
||||
source_file = htdocs/langs/en_US/main.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.margins]
|
||||
[o:dolibarr-association:p:dolibarr:r:margins]
|
||||
file_filter = htdocs/langs/<lang>/margins.lang
|
||||
source_file = htdocs/langs/en_US/margins.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.members]
|
||||
[o:dolibarr-association:p:dolibarr:r:members]
|
||||
file_filter = htdocs/langs/<lang>/members.lang
|
||||
source_file = htdocs/langs/en_US/members.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.modulebuilder]
|
||||
[o:dolibarr-association:p:dolibarr:r:modulebuilder]
|
||||
file_filter = htdocs/langs/<lang>/modulebuilder.lang
|
||||
source_file = htdocs/langs/en_US/modulebuilder.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.mrp]
|
||||
[o:dolibarr-association:p:dolibarr:r:mrp]
|
||||
file_filter = htdocs/langs/<lang>/mrp.lang
|
||||
source_file = htdocs/langs/en_US/mrp.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.multicurrency]
|
||||
[o:dolibarr-association:p:dolibarr:r:multicurrency]
|
||||
file_filter = htdocs/langs/<lang>/multicurrency.lang
|
||||
source_file = htdocs/langs/en_US/multicurrency.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.oauth]
|
||||
[o:dolibarr-association:p:dolibarr:r:oauth]
|
||||
file_filter = htdocs/langs/<lang>/oauth.lang
|
||||
source_file = htdocs/langs/en_US/oauth.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.opensurvey]
|
||||
[o:dolibarr-association:p:dolibarr:r:opensurvey]
|
||||
file_filter = htdocs/langs/<lang>/opensurvey.lang
|
||||
source_file = htdocs/langs/en_US/opensurvey.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.orders]
|
||||
[o:dolibarr-association:p:dolibarr:r:orders]
|
||||
file_filter = htdocs/langs/<lang>/orders.lang
|
||||
source_file = htdocs/langs/en_US/orders.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.other]
|
||||
[o:dolibarr-association:p:dolibarr:r:other]
|
||||
file_filter = htdocs/langs/<lang>/other.lang
|
||||
source_file = htdocs/langs/en_US/other.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.partnership]
|
||||
[o:dolibarr-association:p:dolibarr:r:partnership]
|
||||
file_filter = htdocs/langs/<lang>/partnership.lang
|
||||
source_file = htdocs/langs/en_US/partnership.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.paybox]
|
||||
[o:dolibarr-association:p:dolibarr:r:paybox]
|
||||
file_filter = htdocs/langs/<lang>/paybox.lang
|
||||
source_file = htdocs/langs/en_US/paybox.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.paypal]
|
||||
[o:dolibarr-association:p:dolibarr:r:paypal]
|
||||
file_filter = htdocs/langs/<lang>/paypal.lang
|
||||
source_file = htdocs/langs/en_US/paypal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.printing]
|
||||
[o:dolibarr-association:p:dolibarr:r:printing]
|
||||
file_filter = htdocs/langs/<lang>/printing.lang
|
||||
source_file = htdocs/langs/en_US/printing.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.productbatch]
|
||||
[o:dolibarr-association:p:dolibarr:r:productbatch]
|
||||
file_filter = htdocs/langs/<lang>/productbatch.lang
|
||||
source_file = htdocs/langs/en_US/productbatch.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.products]
|
||||
[o:dolibarr-association:p:dolibarr:r:products]
|
||||
file_filter = htdocs/langs/<lang>/products.lang
|
||||
source_file = htdocs/langs/en_US/products.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.projects]
|
||||
[o:dolibarr-association:p:dolibarr:r:projects]
|
||||
file_filter = htdocs/langs/<lang>/projects.lang
|
||||
source_file = htdocs/langs/en_US/projects.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.propal]
|
||||
[o:dolibarr-association:p:dolibarr:r:propal]
|
||||
file_filter = htdocs/langs/<lang>/propal.lang
|
||||
source_file = htdocs/langs/en_US/propal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.receiptprinter]
|
||||
[o:dolibarr-association:p:dolibarr:r:receiptprinter]
|
||||
file_filter = htdocs/langs/<lang>/receiptprinter.lang
|
||||
source_file = htdocs/langs/en_US/receiptprinter.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.receptions]
|
||||
[o:dolibarr-association:p:dolibarr:r:receptions]
|
||||
file_filter = htdocs/langs/<lang>/receptions.lang
|
||||
source_file = htdocs/langs/en_US/receptions.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.recruitment]
|
||||
[o:dolibarr-association:p:dolibarr:r:recruitment]
|
||||
file_filter = htdocs/langs/<lang>/recruitment.lang
|
||||
source_file = htdocs/langs/en_US/recruitment.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.resource]
|
||||
[o:dolibarr-association:p:dolibarr:r:resource]
|
||||
file_filter = htdocs/langs/<lang>/resource.lang
|
||||
source_file = htdocs/langs/en_US/resource.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.salaries]
|
||||
[o:dolibarr-association:p:dolibarr:r:salaries]
|
||||
file_filter = htdocs/langs/<lang>/salaries.lang
|
||||
source_file = htdocs/langs/en_US/salaries.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.sendings]
|
||||
[o:dolibarr-association:p:dolibarr:r:sendings]
|
||||
file_filter = htdocs/langs/<lang>/sendings.lang
|
||||
source_file = htdocs/langs/en_US/sendings.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.sms]
|
||||
[o:dolibarr-association:p:dolibarr:r:sms]
|
||||
file_filter = htdocs/langs/<lang>/sms.lang
|
||||
source_file = htdocs/langs/en_US/sms.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.stocks]
|
||||
[o:dolibarr-association:p:dolibarr:r:stocks]
|
||||
file_filter = htdocs/langs/<lang>/stocks.lang
|
||||
source_file = htdocs/langs/en_US/stocks.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.stripe]
|
||||
[o:dolibarr-association:p:dolibarr:r:stripe]
|
||||
file_filter = htdocs/langs/<lang>/stripe.lang
|
||||
source_file = htdocs/langs/en_US/stripe.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.supplier_proposal]
|
||||
[o:dolibarr-association:p:dolibarr:r:supplier_proposal]
|
||||
file_filter = htdocs/langs/<lang>/supplier_proposal.lang
|
||||
source_file = htdocs/langs/en_US/supplier_proposal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.suppliers]
|
||||
[o:dolibarr-association:p:dolibarr:r:suppliers]
|
||||
file_filter = htdocs/langs/<lang>/suppliers.lang
|
||||
source_file = htdocs/langs/en_US/suppliers.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ticket]
|
||||
[o:dolibarr-association:p:dolibarr:r:ticket]
|
||||
file_filter = htdocs/langs/<lang>/ticket.lang
|
||||
source_file = htdocs/langs/en_US/ticket.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.trips]
|
||||
[o:dolibarr-association:p:dolibarr:r:trips]
|
||||
file_filter = htdocs/langs/<lang>/trips.lang
|
||||
source_file = htdocs/langs/en_US/trips.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.users]
|
||||
[o:dolibarr-association:p:dolibarr:r:users]
|
||||
file_filter = htdocs/langs/<lang>/users.lang
|
||||
source_file = htdocs/langs/en_US/users.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.website]
|
||||
[o:dolibarr-association:p:dolibarr:r:website]
|
||||
file_filter = htdocs/langs/<lang>/website.lang
|
||||
source_file = htdocs/langs/en_US/website.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.withdrawals]
|
||||
[o:dolibarr-association:p:dolibarr:r:withdrawals]
|
||||
file_filter = htdocs/langs/<lang>/withdrawals.lang
|
||||
source_file = htdocs/langs/en_US/withdrawals.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.workflow]
|
||||
[o:dolibarr-association:p:dolibarr:r:workflow]
|
||||
file_filter = htdocs/langs/<lang>/workflow.lang
|
||||
source_file = htdocs/langs/en_US/workflow.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.zapier]
|
||||
[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
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
|
||||
85
ChangeLog
85
ChangeLog
@ -15,7 +15,7 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* The method "nb_expedition()" has been renamed into "countNbOfShipments()"
|
||||
* Revert default type of hooks. Default is now 'addreplace' hooks (and exception become 'output' hooks, that become deprecated).
|
||||
* Deprecated property libelle removed from entrepot class.
|
||||
|
||||
* The type 'text' in ->fields property dos not accept html content anymore. Use the type 'html' for that.
|
||||
|
||||
|
||||
***** ChangeLog for 17.0.0 compared to 16.0.0 *****
|
||||
@ -30,20 +30,20 @@ NEW: #21000 Added columns 'alias_name' on project, supplier invoice, supplier or
|
||||
NEW: #21780 Add pid field to Cronjob class and store PID on job execution
|
||||
NEW: #21395 Added option for dark theme mode in display - color and theme
|
||||
NEW: #21397 added option to auto define barcode numbers for third-parties in barcode module setup
|
||||
NEW: #21399
|
||||
NEW: #21399 add image for event_array
|
||||
NEW: #21442 Enhancement of module builder init
|
||||
NEW: #21654 add bank account number used on invoices for debit
|
||||
NEW: #22048 Added notes to productlot module
|
||||
NEW: #22048 added notes to productlot module
|
||||
NEW: #22298 Bank - Add salaries & vat in the tab of planned entries of a bank account
|
||||
NEW: #22328
|
||||
NEW: #22424
|
||||
NEW: #22328 OAuth admin
|
||||
NEW: #22424 online signature for contracts
|
||||
NEW: #22500 member module set up made easier
|
||||
NEW: #22527 projects and thirdparties can be viewed as conversation ("Message" view), like events/agenda.
|
||||
NEW: #22546 can now set user supervisors using mass action in htdocs/user
|
||||
NEW: #22594 can chose if VAT ID is unique or not for third parties
|
||||
NEW: #22622 all partnerships displayed on tab partnership of a thirdparty and member
|
||||
NEW: #22676 massaction for updating product prices
|
||||
NEW: #22735 Massaction to affect users on projects
|
||||
NEW: #22735 massaction to affect users on projects
|
||||
NEW: #25594 can chose if VAT ID is unique or not for third parties
|
||||
NEW: #4482 adding js to hide/show advanced option on the export data page
|
||||
|
||||
@ -57,27 +57,17 @@ NEW: Add max size send for "backup and link to mail" option
|
||||
NEW: Add method httponly_accessforbidden()
|
||||
NEW: Add more advices into the Setup security page
|
||||
NEW: Add new global variable for keeping the previous signature information on proposale (case of reopen a proposale)
|
||||
NEW: Add objectLink on expedition
|
||||
NEW: Add oldcopy to Ticket so triggers intercepting TICKET_MODIFY have access to old values of the updated properties
|
||||
NEW: Add option --force on CLI cron_run_jobs.php
|
||||
NEW: Add option "Show price on the generated documents for receptions"
|
||||
NEW: invoice export : add accounting affectation
|
||||
NEW: label on products categories filter
|
||||
NEW: manage no email with thirdparties (better for GDPR)
|
||||
NEW: Manage VAT on all lines on purchases cycle
|
||||
NEW: On a bank reconciled line, we can modify the bank receipt
|
||||
NEW: parent company column and filter in invoice and order list
|
||||
NEW: possibility to select scopes with checkbox for Oauth tokens
|
||||
NEW: private and public note on user, thirdparty and contact list
|
||||
NEW: private and public note columns on user, thirdparty and contact lists
|
||||
NEW: Public counters feature
|
||||
NEW: Saved token of OAUTH module are now encrypted into llx_oauth_token
|
||||
NEW: Save one click to select on delivery ack, on emails.
|
||||
NEW: scheduled job to send unpaid invoice reminder can now use the cc and bcc from email template
|
||||
NEW: experimental SMTP using PhpImap allowing OAuth2 authentication (need to add option MAIN_IMAP_USE_PHPIMAP)
|
||||
NEW: can substitue project title in mail template
|
||||
NEW: The purge of files can purge only if older than a number of seconds
|
||||
NEW: Update ActionComm type_code on email message ticket
|
||||
NEW: Finance - VAT - Admin - Add information on deadline day for submission of VAT declaration
|
||||
NEW: Add the target to select attendees of event for emailings
|
||||
NEW: add redirect on action confirm addconsumedline and addproduceline
|
||||
NEW: Add the referrer-policy to "same-origin" by default on all public pages.
|
||||
@ -87,17 +77,18 @@ NEW: Can enter the unit price including the VAT
|
||||
NEW: Can invoice task time per different services
|
||||
NEW: Can set a commercial discount by entering amount including VAT
|
||||
NEW: Can set start and end dates and comment on button "Activate all services"
|
||||
NEW: can sort and preselected best supplier price
|
||||
NEW: show date delivery planned on orders linked to company and product
|
||||
NEW: filter on reception dates (from / to) in cheque paiement card
|
||||
|
||||
NEW: Accountancy - Add a graphic option to enable lettering function - FPC21
|
||||
NEW: Accountancy - Add a way to clean some words when you generate thirdparty accounting account
|
||||
NEW: Accountancy - Added an option during export to export or not the lettering FPC21
|
||||
NEW: Accountancy - add a graphic option to enable lettering function - FPC21
|
||||
NEW: Accountancy - add a way to clean some words when you generate thirdparty accounting account
|
||||
NEW: Accountancy - added an option during export to export or not the lettering FPC21
|
||||
NEW: Accountancy - Invoice export : add accounting affectation
|
||||
NEW: Accountancy - Manage supplier deposit with specific account
|
||||
NEW: Accountancy - Model Digitaria - Add a way to clean some words when you generate thirdparty accounting account FPC22
|
||||
NEW: Agenda - start a simple support of recurrent events on agenda
|
||||
NEW: Bank - add salaries & VAT in tab planned entries
|
||||
NEW: Bank - on a bank reconciled line, we can modify the bank receipt
|
||||
NEW: Contracts - add a method doAutoRenewContracts that can be used as a cron task
|
||||
NEW: Contracts - default template of contract is not mandatory
|
||||
NEW: Contracts - Manage Position (Rank) on Contract Lines
|
||||
@ -108,22 +99,29 @@ NEW: EMail - can send an email on scheduled job error
|
||||
NEW: EMail - on a form to send an email, we show all emails of all contacts of object
|
||||
NEW: EMail - add the SMTP header References on ticket email created by email
|
||||
NEW: EMail - add substitution key __SENDEREMAIL_SIGNATURE__
|
||||
NEW: EMail - experimental SMTP using PhpImap allowing OAuth2 authentication (need to add option MAIN_IMAP_USE_PHPIMAP)
|
||||
NEW: EMail-Collector - add IMAP port setting
|
||||
NEW: EMail-Collector - add a button "Test collect"
|
||||
NEW: Export - Add " as enclosure by default for CSV export. Keep removing CR/LF.
|
||||
NEW: Event-Organization - add date event (!= date project) and location on event organization
|
||||
NEW: Expedition - add objectLink on expedition
|
||||
NEW: Export - Add " as enclosure by default for CSV export. Keep removing CR/LF.
|
||||
NEW: Extrafields - add badge in admin extrafields setup
|
||||
NEW: Extrafields - can edit property css, cssview, csslist on extrafields
|
||||
NEW: Extrafields - default values in extrafields are not more limited to 255 char.
|
||||
NEW: Extrafields - field price with currency
|
||||
NEW: Extrafields - support IP type to store IP addresses
|
||||
NEW: Finance - VAT - Admin - Add information on deadline day for submission of VAT declaration
|
||||
NEW: Interventions - enable online signature for interventions
|
||||
NEW: Invoice - Add french mention on pdf when vat debit option is on
|
||||
NEW: Invoice - add french mention on PDF when VAT debit option is on
|
||||
NEW: Members - default_lang for members
|
||||
NEW: Members - Table of membership types
|
||||
NEW: Members - table of membership types
|
||||
NEW: Members - add free membership amounts at the membership type level
|
||||
NEW: OAuth - possibility to select scopes with checkbox for OAuth tokens
|
||||
NEW: OAuth - saved token of OAUTH module are now encrypted into llx_oauth_token
|
||||
NEW: Orders - resize parent company column in order list
|
||||
NEW: Products supplier price - autofill default supplier VAT
|
||||
NEW: Products - Categories - label on products categories filter
|
||||
NEW: Products - Supplier price - autofill default supplier VAT
|
||||
NEW: Products - Supplier price - can sort and preselected best supplier price
|
||||
NEW: Projects - add author on list
|
||||
NEW: Projects - add thirdparty column to the time list (projet/tasks/time.php)
|
||||
NEW: Proposals - show delivery mode on PDF for proposals
|
||||
@ -144,8 +142,10 @@ NEW: TakePOS - display currency in TakePOS menu
|
||||
NEW: TakePOS - Header Scroll in TakePOS
|
||||
NEW: TakePOS - Receipt preview in TakePOS setup
|
||||
NEW: TakePOS - support of Stripe Terminal with TakePOS
|
||||
NEW: Thirdparty - manage no email with thirdparties (better for GDPR)
|
||||
NEW: Thirdparty - set thirdparty type with company modify trigger
|
||||
NEW: Tickets - change filter type on tickets list into a multiselect combo
|
||||
NEW: Tickets - add oldcopy to Ticket so triggers intercepting TICKET_MODIFY have access to old values of the updated properties
|
||||
NEW: Website - can delete a whole website if disabled
|
||||
NEW: Website - can remove a website template
|
||||
NEW: Website - can set header "Strict-Transport-Security" in web sites.
|
||||
@ -176,11 +176,16 @@ NEW: Security: add fail2ban rules examples to limit access to /public pages
|
||||
|
||||
Option / Const for System:
|
||||
NEW: FICHINTER_ALLOW_EXTERNAL_DOWNLOAD
|
||||
NEW: MAIN_CHECKBOX_LEFT_COLUMN
|
||||
NEW: MAIN_EMAIL_SUPPORT_ACK
|
||||
NEW: MAIN_IMAP_USE_PHPIMAP
|
||||
NEW: MAIN_SEARCH_CATEGORY_PRODUCT_ON_LISTS - const to show category customer filter
|
||||
NEW: PRODUCT_ALLOW_EXTERNAL_DOWNLOAD
|
||||
NEW: PRODUCTBATCH_SHOW_WAREHOUSE_ON_SHIPMENT - showing warehouse on PDF
|
||||
NEW: PRODUIT_DESC_IN_FORM accept - desktop only or +smartphone
|
||||
NEW: PROPAL_BYPASS_VALIDATED_STATUS
|
||||
NEW: PROPAL_NEW_AS_SIGNED
|
||||
NEW: PROPAL_SKIP_ACCEPT_REFUSE
|
||||
NEW: TIMESPENT_ALWAYS_UPDATE_THM - when it's on we always check current thm of user to update it in task time line
|
||||
|
||||
Localisation:
|
||||
@ -235,41 +240,59 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Deprecated method set_billed() on shipment and reception class has been removed. Use setBilled() instead.
|
||||
* Tables llx_prelevement_facture and llx_prelevement_facture_demande have been renamed into llx_prelevement and llx_prelevement_demande.
|
||||
* Rename MAIN_LIST_ALLOW_NOTES into MAIN_LIST_HIDE_NOTES and rename MAIN_LIST_ALLOW_PRIVATE_NOTES into MAIN_LIST_HIDE_PRIVATE_NOTES
|
||||
* Rename the substitution for project label instead of project title in substitution variables
|
||||
* Rename the substitution for "project label" instead of "project title" in substitution variables
|
||||
* You must use "$objectoffield" to manipulate the current object inside the formulare of computed custom extrafields instead of $obj/$object.
|
||||
* Making a global search is sending the parameter using always the name search_all (instead of sometimes sall and search_all)
|
||||
|
||||
|
||||
***** ChangeLog for 16.0.4 compared to 16.0.2 *****
|
||||
|
||||
***** ChangeLog for 16.0.4 compared to 16.0.3 *****
|
||||
|
||||
FIX: Amount of localtax1 and 2 not correctly save on purchase order (the rate was saved instead)
|
||||
FIX: #20415
|
||||
FIX: #21280
|
||||
FIX: #23008
|
||||
FIX: #22271
|
||||
FIX: #22524
|
||||
FIX: #22837
|
||||
FIX: #22964
|
||||
FIX: #23008
|
||||
FIX: #23012
|
||||
FIX: #23019 Impossible to add task times to an existing draft invoice
|
||||
FIX: #23072
|
||||
FIX: #23075
|
||||
FIX: #23087
|
||||
FIX: #23115
|
||||
FIX: #23116
|
||||
FIX: #23117
|
||||
FIX: #23281
|
||||
FIX: #23420 : wrong check on $search_categ value causing FATAL ERROR
|
||||
FIX: Accountancy - Quadra export
|
||||
FIX: add border left on image product when conf activated
|
||||
FIX: Add missing token when deleting template inn order_supplier admin menu
|
||||
FIX: API access for deactivated users
|
||||
FIX: bad selection of barcode numbering module
|
||||
FIX: Can't see all time spent by all user
|
||||
FIX: CI
|
||||
FIX: CommonObject - showOptionals - Display blank td when MAIN_VIEW_LINE_NUMBER is enabled and action is confirm_valid
|
||||
FIX: Documents API inconsistency
|
||||
FIX: #23075
|
||||
FIX: #23117
|
||||
FIX: Empty FormSetup emailTemplate type IF empty fieldvalue
|
||||
FIX: Errors Handling for CreateFrom Hooks
|
||||
FIX: error with dol_banner_tab, ref is needed
|
||||
FIX: ExpenseReport card was not reloaded after addline
|
||||
FIX: get multicurrency infos of propal when create order from propal with "WORKFLOW_PROPAL_AUTOCREATE_ORDER" conf
|
||||
FIX: Give predictable order to inventory lines
|
||||
FIX: include class multicurrency
|
||||
FIX: methods declaration (backport fix 67b9a7dc07d708231d12b5e58800334d4a01ef98)
|
||||
FIX: multicurrency_tx and not currency_tx
|
||||
FIX: PGSQL Integer type does not have a free length
|
||||
FIX: on public ticket list, only the page 1 was accessible. Other pages were 404 error.
|
||||
FIX: PGSQL Integer type does not have a free lenght
|
||||
FIX: Product list in setup.php in new Module
|
||||
FIX: propal and order stats broken on Tag+User(retricted customer list)
|
||||
FIX: saving of numbering module for jobs
|
||||
FIX: Stickler
|
||||
FIX: travis
|
||||
FIX: wrong check on $search_categ value causing fatal error
|
||||
FIX: wrong stock list with multicompany and without stock sharing
|
||||
|
||||
***** ChangeLog for 16.0.3 compared to 16.0.2 *****
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
7
|
||||
10
|
||||
@ -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 + 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 ?
|
||||
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?
|
||||
|
||||
TechnicalParameters=Technical parameters
|
||||
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.
|
||||
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.
|
||||
|
||||
; 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 warning but you may have to remove it manually later when asked. Click OK to continue...
|
||||
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...
|
||||
|
||||
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 ?
|
||||
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?
|
||||
|
||||
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 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'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.
|
||||
|
||||
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 ?
|
||||
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?
|
||||
|
||||
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
|
||||
OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by the new Dolibarr version
|
||||
OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with the new Dolibarr version
|
||||
|
||||
DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2012" 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)
|
||||
DLLMissing=Your Windows installation is missing the "Microsoft Visual C++ Redistributable for Visual Studio 2012" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
|
||||
ContinueAnyway=Continue anyway (install process may fail without this prerequisite)
|
||||
|
||||
@ -524,12 +524,13 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ansible`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/dbmodel`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/examples/ldap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/examples/zapier`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/initdata`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/initdemo`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/iso-normes`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ldap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/licence`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/resources/dbmodel`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/resources/iso-normes`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/resources/licence`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/multitail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/phpcheckstyle`;
|
||||
@ -894,7 +895,7 @@ if ($nboftargetok) {
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build`;
|
||||
|
||||
|
||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$PROJECT.tmp\n";
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$PROJECT.tmp\"";
|
||||
$ret=`$cmd`;
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
*~
|
||||
.#*
|
||||
.git
|
||||
.gitignore
|
||||
.scrutinizer.yml
|
||||
Thumbs.db
|
||||
build/exe
|
||||
build/html
|
||||
dev/dbmodel
|
||||
dev/fpdf
|
||||
dev/examples/zapier
|
||||
dev/initdemo
|
||||
dev/initdata
|
||||
dev/iso-normes
|
||||
dev/licence
|
||||
dev/load
|
||||
dev/resources/dbmodel
|
||||
dev/resources/iso-normes
|
||||
dev/resources/licence
|
||||
htdocs/conf/conf.php
|
||||
htdocs/conf/conf.php.mysql
|
||||
htdocs/conf/conf.php.old
|
||||
|
||||
@ -212,7 +212,7 @@ with
|
||||
* Fix by replacing
|
||||
if ($res[0] == PDF_TYPE_OBJECT)
|
||||
with
|
||||
if ($res && $res[0] == PDF_TYPE_OBJECT)
|
||||
if (isset($res[0]) && $res[0] == PDF_TYPE_OBJECT)
|
||||
|
||||
|
||||
|
||||
|
||||
@ -22,8 +22,7 @@ https://www.tecklenborgh.com/post/ksa-zatca-publishes-guide-on-how-to-develop-a-
|
||||
Method to encode/decode ZATCA string is available in test/phpunit/BarcodeTest.php
|
||||
|
||||
|
||||
* FOR QR-Bill in switzerland
|
||||
----------------------------
|
||||
Syntax of QR Code https://www.swiss-qr-invoice.org/fr/
|
||||
* FOR QR-Bill in switzerland - Facture-QR
|
||||
Syntax of QR Code - See file ig-qr-bill-v2.2-fr.pdf (more doc on https://www.swiss-qr-invoice.org/downloads/)
|
||||
Syntax of complentary field named "structured information of invoice S1": https://www.swiss-qr-invoice.org/downloads/qr-bill-s1-syntax-fr.pdf
|
||||
To test/validate: https://www.swiss-qr-invoice.org/validator/
|
||||
|
||||
71291
dev/resources/iso-normes/qr-bar-codes/ig-qr-bill-v2.2-fr.pdf
Normal file
71291
dev/resources/iso-normes/qr-bar-codes/ig-qr-bill-v2.2-fr.pdf
Normal file
File diff suppressed because one or more lines are too long
@ -12,6 +12,7 @@
|
||||
</IfModule>
|
||||
|
||||
|
||||
# The URLs of the web site
|
||||
ServerName myvirtualalias
|
||||
ServerAlias myvirtualalias
|
||||
|
||||
@ -23,8 +24,13 @@
|
||||
|
||||
AddDefaultCharset UTF-8
|
||||
|
||||
DocumentRoot "/home/.../htdocs"
|
||||
|
||||
# Detect if we are using DoliDroid
|
||||
#SetEnvIf User-Agent DoliDroid dolidroid
|
||||
|
||||
|
||||
# The directory and permissions for the web site
|
||||
DocumentRoot "/home/.../htdocs"
|
||||
<Directory /home/.../htdocs/>
|
||||
AllowOverride None
|
||||
Options -Indexes -MultiViews +FollowSymLinks -ExecCGI
|
||||
@ -40,39 +46,43 @@
|
||||
# Leaving /public and /api, /dav, .well_known but also wrappers for document, viewimage and public json/img accessible to everyone
|
||||
<Directory /home/admin/wwwroot/dolibarr/htdocs/public/>
|
||||
AuthType None
|
||||
Require all granted
|
||||
Satisfy any
|
||||
Require all granted
|
||||
</Directory>
|
||||
<Directory /home/admin/wwwroot/dolibarr/htdocs/api/>
|
||||
AuthType None
|
||||
Require all granted
|
||||
Satisfy any
|
||||
Require all granted
|
||||
</Directory>
|
||||
<Directory /home/admin/wwwroot/dolibarr/htdocs/dav/>
|
||||
AuthType None
|
||||
Require all granted
|
||||
Satisfy any
|
||||
Require all granted
|
||||
</Directory>
|
||||
<Directory /home/admin/wwwroot/dolibarr/htdocs/.well-known/>
|
||||
AuthType None
|
||||
Require all granted
|
||||
Satisfy any
|
||||
Require all granted
|
||||
</Directory>
|
||||
<Files ~ "(document\.php|viewimage\.php|\.js\.php|\.json\.php|\.js|\.css\.php|\.css|\.gif|\.png|\.svg|\.woff2|favicon\.ico)$">
|
||||
AuthType None
|
||||
Require all granted
|
||||
Satisfy any
|
||||
Require all granted
|
||||
</Files>
|
||||
|
||||
|
||||
|
||||
# Log directoves
|
||||
ErrorLog /var/log/apache2/myvirtualalias_error_log
|
||||
TransferLog /var/log/apache2/myvirtualalias_access_log
|
||||
|
||||
# Compress returned resources of type php pages, text file export, css and javascript
|
||||
|
||||
# Compress is done on resources of type php pages, text file export, css and javascript
|
||||
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
|
||||
|
||||
AddType text/javascript .jgz
|
||||
AddEncoding gzip .jgz
|
||||
|
||||
|
||||
# Add cach performance directives
|
||||
ExpiresActive On
|
||||
ExpiresByType image/x-icon A2592000
|
||||
ExpiresByType image/gif A2592000
|
||||
@ -83,19 +93,20 @@
|
||||
ExpiresByType application/x-javascript A2592000
|
||||
ExpiresByType application/javascript A2592000
|
||||
|
||||
SSLEngine On
|
||||
|
||||
# A self-signed (snakeoil) certificate can be created by installing
|
||||
# the ssl-cert package. See
|
||||
# /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
|
||||
# If both key and certificate are stored in the same file, only the
|
||||
# SSLCertificateFile directive is needed.
|
||||
#SSLCertificateFile /etc/letsencrypt/live/www.mydomain.com/cert.pem
|
||||
#SSLCertificateKeyFile /etc/letsencrypt/live/www.mydomain.com/privkey.pem
|
||||
#SSLCertificateChainFile /etc/letsencrypt/live/www.mydomain.com/chain.pem
|
||||
# To enable the SSL if the certificate file exists
|
||||
<IfFile "/etc/letsencrypt/live/www.mydomain.com/cert.pem">
|
||||
SSLEngine On
|
||||
|
||||
# If both key and certificate are stored in the same file, only the
|
||||
# SSLCertificateFile directive is needed.
|
||||
SSLCertificateFile /etc/letsencrypt/live/www.mydomain.com/cert.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/www.mydomain.com/privkey.pem
|
||||
SSLCertificateChainFile /etc/letsencrypt/live/www.mydomain.com/chain.pem
|
||||
|
||||
#RewriteEngine on
|
||||
#RewriteCond %{SERVER_PORT} ^80$
|
||||
#RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
|
||||
</IfFile>
|
||||
|
||||
#RewriteEngine on
|
||||
#RewriteCond %{SERVER_PORT} ^80$
|
||||
#RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
@ -36,7 +36,7 @@ then
|
||||
echo "tx pull -a"
|
||||
tx pull -a
|
||||
|
||||
echo "Remove some language directories (not enough translated)"
|
||||
echo "Remove some language directories (not enough translated) like ach, br_FR, en, frp, fy_NL, ..."
|
||||
rm -fr htdocs/langs/ach
|
||||
rm -fr htdocs/langs/br_FR
|
||||
rm -fr htdocs/langs/en
|
||||
|
||||
@ -504,8 +504,8 @@ if ($id) {
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
print '</td>';
|
||||
print '<td style="min-width: 26px;"></td>';
|
||||
print '<td style="min-width: 26px;"></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Line to enter new values
|
||||
|
||||
@ -42,7 +42,7 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
|
||||
$account_number = GETPOST('account_number', 'string');
|
||||
$account_number = GETPOST('account_number', 'alphanohtml');
|
||||
$label = GETPOST('label', 'alpha');
|
||||
|
||||
// Security check
|
||||
|
||||
@ -545,9 +545,9 @@ if ($tabname[$id]) {
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
print '</td>';
|
||||
print '<td style="min-width: 26px;"></td>';
|
||||
print '<td style="min-width: 26px;"></td>';
|
||||
print '<td style="min-width: 26px;"></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Line to enter new values
|
||||
|
||||
@ -431,9 +431,9 @@ if ($id) {
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
print '</td>';
|
||||
print '<td style="min-width: 26px;"></td>';
|
||||
print '<td style="min-width: 26px;"></td>';
|
||||
print '<td style="min-width: 26px;"></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Line to enter new values
|
||||
|
||||
@ -194,7 +194,7 @@ if ($action == 'update') {
|
||||
}
|
||||
if ($result <= 0) {
|
||||
// setEventMessages(null, $accounting->errors, 'errors');
|
||||
$msg .= '<div><span style="color:red">'.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.'<br> <pre>'.$sql.'</pre></span></div>';
|
||||
$msg .= '<div><span class="error">'.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.'<br> <pre>'.$sql.'</pre></span></div>';
|
||||
$ko++;
|
||||
} else {
|
||||
$sql = '';
|
||||
@ -203,7 +203,7 @@ if ($action == 'update') {
|
||||
$sql_exists .= " WHERE fk_product = " . ((int) $productid) . " AND entity = " . ((int) $conf->entity);
|
||||
$resql_exists = $db->query($sql_exists);
|
||||
if (!$resql_exists) {
|
||||
$msg .= '<div><span style="color:red">'.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.'<br> <pre>'.$resql_exists.'</pre></span></div>';
|
||||
$msg .= '<div><span class="error">'.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.'<br> <pre>'.$resql_exists.'</pre></span></div>';
|
||||
$ko++;
|
||||
} else {
|
||||
$nb_exists = $db->num_rows($resql_exists);
|
||||
|
||||
@ -527,7 +527,7 @@ if (!empty($object->piece_num)) {
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div style="clear:both"></div>';
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -505,7 +505,7 @@ if (empty($reshook)) {
|
||||
$objectlabel = 'Bookkeeping';
|
||||
$permissiontoread = $user->hasRight('societe', 'lire');
|
||||
$permissiontodelete = $user->hasRight('societe', 'supprimer');
|
||||
$permissiontoadd = $user->rights->societe->creer;
|
||||
$permissiontoadd = $user->hasRight('societe', 'creer');
|
||||
$uploaddir = $conf->societe->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
|
||||
@ -1006,7 +1006,7 @@ if (empty($reshook)) {
|
||||
$newcardbutton .= '<span class="valignmiddle marginrightonly paddingleft">'.$langs->trans("ClickToHideAlreadyExportedLines").'</span>';
|
||||
$newcardbutton .= '</a>';
|
||||
} else {
|
||||
$newcardbutton .= '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=setreexport&token='.newToken().'&value=1'.($param ? '&'.$param : '').'">'.img_picto($langs->trans("DocsAlreadyExportedAreExcluded"), 'switch_on', 'class="warning size15x valignmiddle"').'';
|
||||
$newcardbutton .= '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=setreexport&token='.newToken().'&value=1'.($param ? '&'.$param : '').'">'.img_picto($langs->trans("DocsAlreadyExportedAreExcluded"), 'switch_on', 'class="warning size15x valignmiddle"');
|
||||
$newcardbutton .= '<span class="valignmiddle marginrightonly paddingleft">'.$langs->trans("DocsAlreadyExportedAreExcluded").'</span>';
|
||||
$newcardbutton .= '</a>';
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@ if (empty($reshook)) {
|
||||
$objectlabel = 'Bookkeeping';
|
||||
$permissiontoread = $user->hasRight('societe', 'lire');
|
||||
$permissiontodelete = $user->hasRight('societe', 'supprimer');
|
||||
$permissiontoadd = $user->rights->societe->creer;
|
||||
$permissiontoadd = $user->hasRight('societe', 'creer');
|
||||
$uploaddir = $conf->societe->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
|
||||
|
||||
@ -839,20 +839,29 @@ class AccountancyCategory // extends CommonObject
|
||||
exit();
|
||||
}
|
||||
|
||||
$pcgverid = $conf->global->CHARTOFACCOUNTS;
|
||||
$pcgvercode = dol_getIdFromCode($this->db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version');
|
||||
if (empty($pcgvercode)) {
|
||||
$pcgvercode = $pcgverid;
|
||||
}
|
||||
|
||||
if (!empty($cat_id)) {
|
||||
$sql = "SELECT t.rowid, t.account_number, t.label as account_label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as t";
|
||||
$sql .= " WHERE t.fk_accounting_category = ".((int) $cat_id);
|
||||
$sql .= " AND t.entity = ".$conf->entity;
|
||||
$sql .= " AND t.active = 1";
|
||||
$sql .= " AND t.fk_pcg_version = '".$this->db->escape($pcgvercode)."'";
|
||||
$sql .= " ORDER BY t.account_number";
|
||||
} else {
|
||||
$sql = "SELECT t.rowid, t.account_number, t.label as account_label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as t";
|
||||
$sql .= " WHERE ".$predefinedgroupwhere;
|
||||
$sql .= " AND t.entity = ".$conf->entity;
|
||||
$sql .= ' AND t.active = 1';
|
||||
$sql .= " AND t.fk_pcg_version = '".$this->db->escape($pcgvercode)."'";
|
||||
$sql .= " ORDER BY t.account_number";
|
||||
}
|
||||
//echo $sql;
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
|
||||
@ -2130,14 +2130,16 @@ class AccountancyExport
|
||||
//Calcul de la longueur des numéros de comptes
|
||||
$taille_numero = strlen(length_accountg($line->numero_compte));
|
||||
|
||||
//Création du numéro de client générique
|
||||
//Création du numéro de client et fournisseur générique
|
||||
$numero_cpt_client = '411';
|
||||
$numero_cpt_fourn = '401';
|
||||
for ($i = 1; $i <= ($taille_numero - 3); $i++) {
|
||||
$numero_cpt_client .= '0';
|
||||
$numero_cpt_fourn .= '0';
|
||||
}
|
||||
|
||||
//Création des comptes auxiliaire des clients
|
||||
if (length_accountg($line->numero_compte) == $numero_cpt_client) {
|
||||
//Création des comptes auxiliaire des clients et fournisseur
|
||||
if (length_accountg($line->numero_compte) == $numero_cpt_client || length_accountg($line->numero_compte) == $numero_cpt_fourn) {
|
||||
$tab[] = rtrim(length_accounta($line->subledger_account), "0");
|
||||
} else {
|
||||
$tab[] = length_accountg($line->numero_compte);
|
||||
|
||||
@ -159,7 +159,6 @@ if (empty($reshook)) {
|
||||
if ($massaction == 'ventil' && $user->rights->accounting->bind->write) {
|
||||
$msg = '';
|
||||
|
||||
//print '<div><span style="color:red">' . $langs->trans("Processing") . '...</span></div>';
|
||||
if (!empty($mesCasesCochees)) {
|
||||
$msg = '<div>'.$langs->trans("SelectedLines").': '.count($mesCasesCochees).'</div>';
|
||||
$msg .= '<div class="detail">';
|
||||
@ -173,7 +172,7 @@ if ($massaction == 'ventil' && $user->rights->accounting->bind->write) {
|
||||
$monCompte = GETPOST('codeventil'.$monId);
|
||||
|
||||
if ($monCompte <= 0) {
|
||||
$msg .= '<div><span style="color:red">'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NoAccountSelected").'</span></div>';
|
||||
$msg .= '<div><span class="error">'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NoAccountSelected").'</span></div>';
|
||||
$ko++;
|
||||
} else {
|
||||
$sql = " UPDATE ".MAIN_DB_PREFIX."expensereport_det";
|
||||
@ -185,10 +184,10 @@ if ($massaction == 'ventil' && $user->rights->accounting->bind->write) {
|
||||
|
||||
dol_syslog('accountancy/expensereport/list.php:: sql='.$sql, LOG_DEBUG);
|
||||
if ($db->query($sql)) {
|
||||
$msg .= '<div><span style="color:green">'.$langs->trans("LineOfExpenseReport").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'</span></div>';
|
||||
$msg .= '<div><span class="green">'.$langs->trans("LineOfExpenseReport").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'</span></div>';
|
||||
$ok++;
|
||||
} else {
|
||||
$msg .= '<div><span style="color:red">'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'<br> <pre>'.$sql.'</pre></span></div>';
|
||||
$msg .= '<div><span class="error">'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'<br> <pre>'.$sql.'</pre></span></div>';
|
||||
$ko++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -434,7 +434,7 @@ if ($result) {
|
||||
$tabpay[$obj->rowid]["paymentsalid"] = $paymentsalstatic->id;
|
||||
|
||||
// This part of code is no more required. it is here to solve case where a link were missing (ith v14.0.0) and keep writing in accountancy complete.
|
||||
// Note: A better way to fix this is to delete payement of salary and recreate it, or to fix the bookkeeping table manually after.
|
||||
// Note: A better way to fix this is to delete payment of salary and recreate it, or to fix the bookkeeping table manually after.
|
||||
if (!empty($conf->global->ACCOUNTANCY_AUTOFIX_MISSING_LINK_TO_USEr_ON_SALARY_BANK_PAYMENT)) {
|
||||
$tmpsalary = new Salary($db);
|
||||
$tmpsalary->fetch($paymentsalstatic->id);
|
||||
|
||||
@ -170,7 +170,6 @@ if (empty($reshook)) {
|
||||
if ($massaction == 'ventil' && $user->rights->accounting->bind->write) {
|
||||
$msg = '';
|
||||
|
||||
//print '<div><span style="color:red">' . $langs->trans("Processing") . '...</span></div>';
|
||||
if (!empty($mesCasesCochees)) {
|
||||
$msg = '<div>'.$langs->trans("SelectedLines").': '.count($mesCasesCochees).'</div>';
|
||||
$msg .= '<div class="detail">';
|
||||
@ -184,7 +183,7 @@ if ($massaction == 'ventil' && $user->rights->accounting->bind->write) {
|
||||
$monCompte = GETPOST('codeventil'.$monId);
|
||||
|
||||
if ($monCompte <= 0) {
|
||||
$msg .= '<div><span style="color:red">'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NoAccountSelected").'</span></div>';
|
||||
$msg .= '<div><span class="error">'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NoAccountSelected").'</span></div>';
|
||||
$ko++;
|
||||
} else {
|
||||
$sql = " UPDATE ".MAIN_DB_PREFIX."facture_fourn_det";
|
||||
@ -196,10 +195,10 @@ if ($massaction == 'ventil' && $user->rights->accounting->bind->write) {
|
||||
|
||||
dol_syslog('accountancy/supplier/list.php', LOG_DEBUG);
|
||||
if ($db->query($sql)) {
|
||||
$msg .= '<div><span style="color:green">'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'</span></div>';
|
||||
$msg .= '<div><span class="green">'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'</span></div>';
|
||||
$ok++;
|
||||
} else {
|
||||
$msg .= '<div><span style="color:red">'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'<br> <pre>'.$sql.'</pre></span></div>';
|
||||
$msg .= '<div><span class="error">'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'<br> <pre>'.$sql.'</pre></span></div>';
|
||||
$ko++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
|
||||
$textobject = $langs->transnoentitiesnoconv("Members");
|
||||
|
||||
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
|
||||
llxHeader('', $langs->trans("MembersSetup"), $help_url);
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ if ($action == 'setMEMBER_ENABLE_PUBLIC') {
|
||||
if ($action == 'update') {
|
||||
$public = GETPOST('MEMBER_ENABLE_PUBLIC');
|
||||
$amount = price2num(GETPOST('MEMBER_NEWFORM_AMOUNT'), 'MT', 2);
|
||||
$editamount = GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
||||
$minamount = GETPOST('MEMBER_MIN_AMOUNT');
|
||||
$publiccounters = GETPOST('MEMBER_COUNTERS_ARE_PUBLIC');
|
||||
$payonline = GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
||||
$forcetype = GETPOST('MEMBER_NEWFORM_FORCETYPE', 'int');
|
||||
@ -66,7 +66,7 @@ if ($action == 'update') {
|
||||
|
||||
$res = dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC", $public, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT", $amount, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT", $editamount, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "MEMBER_MIN_AMOUNT", $minamount, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "MEMBER_COUNTERS_ARE_PUBLIC", $publiccounters, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE", $payonline, 'chaine', 0, '', $conf->entity);
|
||||
if ($forcetype < 0) {
|
||||
@ -99,7 +99,7 @@ if ($action == 'update') {
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans("MembersSetup");
|
||||
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
|
||||
@ -232,11 +232,11 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
||||
print '<input type="text" class="right width50" id="MEMBER_NEWFORM_AMOUNT" name="MEMBER_NEWFORM_AMOUNT" value="'.(!empty($conf->global->MEMBER_NEWFORM_AMOUNT) ? $conf->global->MEMBER_NEWFORM_AMOUNT : '').'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Can edit
|
||||
// Min amount
|
||||
print '<tr class="oddeven" id="tredit"><td>';
|
||||
print $langs->trans("CanEditAmountDetail");
|
||||
print $langs->trans("MinimumAmount");
|
||||
print '</td><td>';
|
||||
print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT", (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) ? $conf->global->MEMBER_NEWFORM_EDITAMOUNT : 0), 1);
|
||||
print '<input type="text" class="right width50" id="MEMBER_MIN_AMOUNT" name="MEMBER_MIN_AMOUNT" value="'.(!empty($conf->global->MEMBER_MIN_AMOUNT) ? $conf->global->MEMBER_MIN_AMOUNT : '').'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
// SHow counter of validated members publicly
|
||||
|
||||
@ -66,11 +66,15 @@ if (GETPOST('actioncode', 'array')) {
|
||||
} else {
|
||||
$actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT'));
|
||||
}
|
||||
$search_rowid = GETPOST('search_rowid');
|
||||
$search_agenda_label = GETPOST('search_agenda_label');
|
||||
|
||||
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
|
||||
$objcanvas = null;
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('memberagenda'));
|
||||
|
||||
// Security check
|
||||
$result = restrictedArea($user, 'adherent', $id);
|
||||
|
||||
@ -105,6 +109,7 @@ if (empty($reshook)) {
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers
|
||||
$actioncode = '';
|
||||
$search_rowid = '';
|
||||
$search_agenda_label = '';
|
||||
}
|
||||
}
|
||||
@ -184,6 +189,7 @@ if ($object->id > 0) {
|
||||
// List of all actions
|
||||
$filters = array();
|
||||
$filters['search_agenda_label'] = $search_agenda_label;
|
||||
$filters['search_rowid'] = $search_rowid;
|
||||
|
||||
// TODO Replace this with same code than into list.php
|
||||
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder);
|
||||
|
||||
@ -674,7 +674,7 @@ if (empty($reshook)) {
|
||||
|
||||
$moreinheader = 'X-Dolibarr-Info: send_an_email by adherents/card.php'."\r\n";
|
||||
|
||||
$result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader);
|
||||
$result = $object->sendEmail($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
@ -745,7 +745,7 @@ if (empty($reshook)) {
|
||||
|
||||
$moreinheader = 'X-Dolibarr-Info: send_an_email by adherents/card.php'."\r\n";
|
||||
|
||||
$result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader);
|
||||
$result = $object->sendEmail($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
@ -816,7 +816,7 @@ if (empty($reshook)) {
|
||||
|
||||
$moreinheader = 'X-Dolibarr-Info: send_an_email by adherents/card.php'."\r\n";
|
||||
|
||||
$result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader);
|
||||
$result = $object->sendEmail($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
@ -1873,7 +1873,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print "</table>\n";
|
||||
|
||||
print "</div></div>\n";
|
||||
print '<div style="clear:both"></div>';
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
@ -440,11 +440,37 @@ class Adherent extends CommonObject
|
||||
* @param int $msgishtml 1=String IS already html, 0=String IS NOT html, -1=Unknown need autodetection
|
||||
* @param string $errors_to erros to
|
||||
* @param string $moreinheader Add more html headers
|
||||
* @deprecated since V18
|
||||
* @see sendEmail
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function send_an_email($text, $subject, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $addr_cc = "", $addr_bcc = "", $deliveryreceipt = 0, $msgishtml = -1, $errors_to = '', $moreinheader = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
dol_syslog('Warning using deprecated Adherent::send_an_email', LOG_WARNING);
|
||||
|
||||
return $this->sendEmail($text, $subject, $filename_list, $mimetype_list, $mimefilename_list, $addr_cc, $addr_bcc, $deliveryreceipt, $msgishtml, $errors_to, $moreinheader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function sending an email to the current member with the text supplied in parameter.
|
||||
*
|
||||
* @param string $text Content of message (not html entities encoded)
|
||||
* @param string $subject Subject of message
|
||||
* @param array $filename_list Array of attached files
|
||||
* @param array $mimetype_list Array of mime types of attached files
|
||||
* @param array $mimefilename_list Array of public names of attached files
|
||||
* @param string $addr_cc Email cc
|
||||
* @param string $addr_bcc Email bcc
|
||||
* @param int $deliveryreceipt Ask a delivery receipt
|
||||
* @param int $msgishtml 1=String IS already html, 0=String IS NOT html, -1=Unknown need autodetection
|
||||
* @param string $errors_to erros to
|
||||
* @param string $moreinheader Add more html headers
|
||||
* @since V18
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function sendEmail($text, $subject, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $addr_cc = "", $addr_bcc = "", $deliveryreceipt = 0, $msgishtml = -1, $errors_to = '', $moreinheader = '')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
// Detect if message is HTML
|
||||
@ -2250,6 +2276,63 @@ class Adherent extends CommonObject
|
||||
return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civility", "code", "label", $code);
|
||||
}
|
||||
|
||||
/**
|
||||
* getTooltipContentArray
|
||||
* @param array $params params to construct tooltip data
|
||||
* @since v18
|
||||
* @return array
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$datas = [];
|
||||
$langs->loadLangs(['members', 'companies']);
|
||||
|
||||
$nofetch = empty($params['nofetch']) ? false : true;
|
||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$langs->load("users");
|
||||
return ['optimize' => $langs->trans("ShowUser")];
|
||||
}
|
||||
if (!empty($this->photo)) {
|
||||
$photo = '<div class="photointooltip floatright">';
|
||||
$photo .= Form::showphoto('memberphoto', $this, 80, 0, 0, 'photoref photowithmargin photologintooltip', 'small', 0, 1);
|
||||
$photo .= '</div>';
|
||||
$datas['photo'] = $photo;
|
||||
}
|
||||
|
||||
$datas['divopen'] = '<div class="centpercent">';
|
||||
$datas['picto'] = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Member").'</u> '.$this->getLibStatut(4);
|
||||
if (!empty($this->morphy)) {
|
||||
$datas['picto'] .= ' ' . $this->getmorphylib('', 1);
|
||||
}
|
||||
if (!empty($this->ref)) {
|
||||
$datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
}
|
||||
if (!empty($this->login)) {
|
||||
$datas['login'] = '<br><b>'.$langs->trans('Login').':</b> '.$this->login;
|
||||
}
|
||||
if (!empty($this->firstname) || !empty($this->lastname)) {
|
||||
$datas['name'] = '<br><b>'.$langs->trans('Name').':</b> '.$this->getFullName($langs);
|
||||
}
|
||||
if (!empty($this->company)) {
|
||||
$datas['company'] = '<br><b>'.$langs->trans('Company').':</b> '.$this->company;
|
||||
}
|
||||
if (!empty($this->email)) {
|
||||
$datas['email'] = '<br><b>'.$langs->trans("EMail").':</b> '.$this->email;
|
||||
}
|
||||
$datas['address'] = '<br><b>'.$langs->trans("Address").':</b> '.dol_format_address($this, 1, ' ', $langs);
|
||||
// show categories for this record only in ajax to not overload lists
|
||||
if (isModEnabled('categorie') && !$nofetch) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$form = new Form($this->db);
|
||||
$datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_MEMBER, 1);
|
||||
}
|
||||
$datas['divclose'] = '</div>';
|
||||
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return clicable name (with picto eventually)
|
||||
*
|
||||
@ -2272,33 +2355,22 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
$result = '';
|
||||
$label = '';
|
||||
$linkstart = '';
|
||||
$linkend = '';
|
||||
|
||||
if (!empty($this->photo)) {
|
||||
$label .= '<div class="photointooltip floatright">';
|
||||
$label .= Form::showphoto('memberphoto', $this, 80, 0, 0, 'photoref photowithmargin photologintooltip', 'small', 0, 1);
|
||||
$label .= '</div>';
|
||||
//$label .= '<div style="clear: both;"></div>';
|
||||
$classfortooltip = 'classfortooltip';
|
||||
$dataparams = '';
|
||||
$params = [
|
||||
'id' => $this->id,
|
||||
'objecttype' => $this->element,
|
||||
'option' => $option,
|
||||
'nofetch' => 1,
|
||||
];
|
||||
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
||||
$classfortooltip = 'classforajaxtooltip';
|
||||
$dataparams = ' data-params='.json_encode($params);
|
||||
// $label = $langs->trans('Loading');
|
||||
}
|
||||
|
||||
$label .= '<div class="centpercent">';
|
||||
$label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Member").'</u>';
|
||||
$label .= ' '.$this->getLibStatut(4);
|
||||
if (!empty($this->ref)) {
|
||||
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
}
|
||||
if (!empty($this->login)) {
|
||||
$label .= '<br><b>'.$langs->trans('Login').':</b> '.$this->login;
|
||||
}
|
||||
if (!empty($this->firstname) || !empty($this->lastname)) {
|
||||
$label .= '<br><b>'.$langs->trans('Name').':</b> '.$this->getFullName($langs);
|
||||
}
|
||||
if (!empty($this->company)) {
|
||||
$label .= '<br><b>'.$langs->trans('Company').':</b> '.$this->company;
|
||||
}
|
||||
$label .= '</div>';
|
||||
$label = implode($this->getTooltipContentArray($params));
|
||||
|
||||
$url = DOL_URL_ROOT.'/adherents/card.php?rowid='.((int) $this->id);
|
||||
if ($option == 'subscription') {
|
||||
@ -2325,7 +2397,7 @@ class Adherent extends CommonObject
|
||||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"';
|
||||
$linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
|
||||
}
|
||||
|
||||
$linkstart .= $linkclose.'>';
|
||||
@ -2338,12 +2410,12 @@ class Adherent extends CommonObject
|
||||
if ($withpictoimg) {
|
||||
$paddafterimage = '';
|
||||
if (abs($withpictoimg) == 1) {
|
||||
$paddafterimage = 'style="margin-right: 3px;"';
|
||||
$morecss .= ' paddingrightonly';
|
||||
}
|
||||
// Only picto
|
||||
if ($withpictoimg > 0) {
|
||||
$picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'">'.
|
||||
img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : 'class="classfortooltip"'), 0, 0, $notooltip ? 0 : 1).'</span>';
|
||||
img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams.' class="'.$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1).'</span>';
|
||||
} else {
|
||||
// Picto must be a photo
|
||||
$picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'"'.($paddafterimage ? ' '.$paddafterimage : '').'>';
|
||||
|
||||
@ -688,6 +688,40 @@ class AdherentType extends CommonObject
|
||||
//return $morphy;
|
||||
}
|
||||
|
||||
/**
|
||||
* getTooltipContentArray
|
||||
* @param array $params params to construct tooltip data
|
||||
* @since v18
|
||||
* @return array
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
|
||||
$langs->load('members');
|
||||
|
||||
$datas = [];
|
||||
$datas['picto'] = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("MemberType").'</u> '.$this->getLibStatut(4);
|
||||
$datas['label'] = '<br>'.$langs->trans("Label").': '.$this->label;
|
||||
if (isset($this->subscription)) {
|
||||
$datas['subscription'] = '<br>'.$langs->trans("SubscriptionRequired").': '.yn($this->subscription);
|
||||
}
|
||||
if (isset($this->vote)) {
|
||||
$datas['vote'] = '<br>'.$langs->trans("VoteAllowed").': '.yn($this->vote);
|
||||
}
|
||||
if (isset($this->duration)) {
|
||||
$datas['duration'] = '<br>'.$langs->trans("Duration").': '.$this->duration_value;
|
||||
if ($this->duration_value > 1) {
|
||||
$dur = array("i"=>$langs->trans("Minutes"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years"));
|
||||
} elseif ($this->duration_value > 0) {
|
||||
$dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year"));
|
||||
}
|
||||
$datas['duration'] .= " " . (!empty($this->duration_unit) && isset($dur[$this->duration_unit]) ? $langs->trans($dur[$this->duration_unit]) : '');
|
||||
}
|
||||
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return clicable name (with picto eventually)
|
||||
*
|
||||
@ -703,18 +737,25 @@ class AdherentType extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result = '';
|
||||
|
||||
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("MemberType").'</u>';
|
||||
$label .= ' '.$this->getLibStatut(4);
|
||||
$label .= '<br>'.$langs->trans("Label").': '.$this->label;
|
||||
if (isset($this->subscription)) {
|
||||
$label .= '<br>'.$langs->trans("SubscriptionRequired").': '.yn($this->subscription);
|
||||
}
|
||||
|
||||
$option = '';
|
||||
|
||||
$url = DOL_URL_ROOT.'/adherents/type.php?rowid='.((int) $this->id);
|
||||
$classfortooltip = 'classfortooltip';
|
||||
$dataparams = '';
|
||||
$params = [
|
||||
'id' => $this->id,
|
||||
'objecttype' => $this->element,
|
||||
'option' => $option,
|
||||
'nofetch' => 1,
|
||||
];
|
||||
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
||||
$classfortooltip = 'classforajaxtooltip';
|
||||
$dataparams = ' data-params='.json_encode($params);
|
||||
// $label = $langs->trans('Loading');
|
||||
}
|
||||
|
||||
$label = implode($this->getTooltipContentArray($params));
|
||||
|
||||
$url = DOL_URL_ROOT.'/adherents/type.php?rowid='.((int) $this->id);
|
||||
if ($option != 'nolink') {
|
||||
// Add param to save lastsearch_values or not
|
||||
$add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
|
||||
@ -725,13 +766,12 @@ class AdherentType extends CommonObject
|
||||
$url .= '&save_lastsearch_values=1';
|
||||
}
|
||||
}
|
||||
|
||||
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'"'.$dataparams.' class="'.$classfortooltip.'">';
|
||||
$linkend = '</a>';
|
||||
|
||||
$result .= $linkstart;
|
||||
if ($withpicto) {
|
||||
$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
||||
$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1);
|
||||
}
|
||||
if ($withpicto != 2) {
|
||||
$result .= ($maxlen ?dol_trunc($this->label, $maxlen) : $this->label);
|
||||
@ -741,7 +781,6 @@ class AdherentType extends CommonObject
|
||||
return $result;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return label of status (activity, closed)
|
||||
*
|
||||
@ -753,6 +792,7 @@ class AdherentType extends CommonObject
|
||||
return $this->LibStatut($this->status, $mode);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return the label of a given status
|
||||
*
|
||||
|
||||
@ -109,7 +109,7 @@ class Subscription extends CommonObject
|
||||
'datef' =>array('type'=>'datetime', 'label'=>'DateEndSubscription', 'enabled'=>1, 'visible'=>-1, 'position'=>35),
|
||||
'subscription' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>-1, 'position'=>40, 'isameasure'=>1),
|
||||
'fk_bank' =>array('type'=>'integer', 'label'=>'BankId', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
|
||||
'note' =>array('type'=>'text', 'label'=>'Note', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
|
||||
'note' =>array('type'=>'html', 'label'=>'Note', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
|
||||
'fk_type' =>array('type'=>'integer', 'label'=>'MemberType', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
|
||||
'fk_user_creat' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'position'=>60),
|
||||
'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
|
||||
|
||||
@ -77,7 +77,7 @@ $form = new Form($db);
|
||||
// Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
|
||||
$resultboxes = FormOther::getBoxesArea($user, "2");
|
||||
|
||||
llxHeader('', $langs->trans("Members"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||
llxHeader('', $langs->trans("Members"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder');
|
||||
|
||||
$staticmember = new Adherent($db);
|
||||
$statictype = new AdherentType($db);
|
||||
|
||||
@ -104,7 +104,7 @@ if ($action == 'dolibarr2ldap') {
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('', $langs->trans("Member"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||
llxHeader('', $langs->trans("Member"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder');
|
||||
|
||||
$head = member_prepare_head($object);
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("members", "companies"));
|
||||
$langs->loadLangs(array("members", "companies", "categories"));
|
||||
|
||||
|
||||
// Get parameters
|
||||
@ -325,7 +325,7 @@ $membertypestatic = new AdherentType($db);
|
||||
$memberstatic = new Adherent($db);
|
||||
|
||||
// Page Header
|
||||
$title = $langs->trans("Members")." - ".$langs->trans("List");;
|
||||
$title = $langs->trans("Members")." - ".$langs->trans("List");
|
||||
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
@ -1051,7 +1051,7 @@ while ($i < min($num, $limit)) {
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="12">';
|
||||
print '<div class="box-flex-container">';
|
||||
print '<div class="box-flex-container kanban">';
|
||||
}
|
||||
$membertypestatic->id = $obj->type_id;
|
||||
$membertypestatic->label = $obj->type;
|
||||
|
||||
@ -225,7 +225,7 @@ print '</td></tr></table>';
|
||||
|
||||
|
||||
print '</div></div>';
|
||||
print '<div style="clear:both"></div>';
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
@ -405,7 +405,7 @@ if ($user->hasRight('adherent', 'cotisation', 'creer') && $action == 'subscripti
|
||||
|
||||
$moreinheader = 'X-Dolibarr-Info: send_an_email by adherents/subscription.php'."\r\n";
|
||||
|
||||
$result = $object->send_an_email($texttosend, $subjecttosend, $listofpaths, $listofmimes, $listofnames, "", "", 0, -1, '', $moreinheader);
|
||||
$result = $object->sendEmail($texttosend, $subjecttosend, $listofpaths, $listofmimes, $listofnames, "", "", 0, -1, '', $moreinheader);
|
||||
if ($result < 0) {
|
||||
$errmsg = $object->error;
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
@ -664,7 +664,7 @@ if ($rowid > 0) {
|
||||
print "</table>\n";
|
||||
|
||||
print "</div></div>\n";
|
||||
print '<div style="clear:both"></div>';
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
@ -160,7 +160,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->hasRight('adheren
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
|
||||
llxHeader('', $langs->trans("SubscriptionCard"), $help_url);
|
||||
|
||||
|
||||
@ -375,8 +375,8 @@ if ($rowid && $action != 'edit') {
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $object->id;
|
||||
$genallowed = $user->rights->facture->lire;
|
||||
$delallowed = $user->rights->facture->creer;
|
||||
$genallowed = $user->hasRight('facture', 'lire');
|
||||
$delallowed = $user->hasRight('facture', 'creer');
|
||||
|
||||
print $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
|
||||
$somethingshown = $formfile->numoffiles;
|
||||
|
||||
@ -249,7 +249,7 @@ if (!empty($date_select)) {
|
||||
$title .= ' ('.$langs->trans("Year").' '.$date_select.')';
|
||||
}
|
||||
|
||||
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$i = 0;
|
||||
@ -342,7 +342,7 @@ if ($sall) {
|
||||
$moreforfilter = '';
|
||||
|
||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
|
||||
if ($massactionbutton) {
|
||||
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||
}
|
||||
@ -353,7 +353,13 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit
|
||||
|
||||
// Line for filters fields
|
||||
print '<tr class="liste_titre_filter">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto = $form->showFilterButtons('left');
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
}
|
||||
// Line numbering
|
||||
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
|
||||
print '<td class="liste_titre"> </td>';
|
||||
@ -431,15 +437,19 @@ if (!empty($arrayfields['c.tms']['checked'])) {
|
||||
}
|
||||
|
||||
// Action column
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
}
|
||||
if (!empty($arrayfields['d.ref']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['d.ref']['label'], $_SERVER["PHP_SELF"], "c.rowid", $param, "", "", $sortfield, $sortorder);
|
||||
}
|
||||
@ -484,7 +494,9 @@ if (!empty($arrayfields['c.datec']['checked'])) {
|
||||
if (!empty($arrayfields['c.tms']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
}
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -520,7 +532,7 @@ while ($i < min($num, $limit)) {
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="12">';
|
||||
print '<div class="box-flex-container">';
|
||||
print '<div class="box-flex-container kanban">';
|
||||
}
|
||||
|
||||
//fetch informations needs on this mode
|
||||
@ -540,7 +552,21 @@ while ($i < min($num, $limit)) {
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($obj->crowid, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
print '<input id="cb'.$obj->crowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->crowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
// Ref
|
||||
if (!empty($arrayfields['d.ref']['checked'])) {
|
||||
print '<td>'.$subscription->getNomUrl(1).'</td>';
|
||||
@ -662,19 +688,20 @@ while ($i < min($num, $limit)) {
|
||||
}
|
||||
}
|
||||
// Action column
|
||||
print '<td class="center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($obj->crowid, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($obj->crowid, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
print '<input id="cb'.$obj->crowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->crowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
print '<input id="cb'.$obj->crowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->crowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
$i++;
|
||||
|
||||
@ -37,10 +37,12 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("members");
|
||||
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
@ -55,13 +57,15 @@ $type = GETPOST('type', 'intcomma');
|
||||
$status = GETPOST('status', 'alpha');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
if (empty($page) || $page == -1) {
|
||||
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
|
||||
// If $page is not defined, or '' or -1 or if we click on clear filters
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
}
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
@ -84,14 +88,12 @@ $comment = GETPOST("comment", 'restricthtml');
|
||||
$mail_valid = GETPOST("mail_valid", 'restricthtml');
|
||||
$caneditamount = GETPOSTINT("caneditamount");
|
||||
|
||||
// Security check
|
||||
$result = restrictedArea($user, 'adherent', $rowid, 'adherent_type');
|
||||
|
||||
// Initialize technical objects
|
||||
$object = new AdherentType($db);
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$hookmanager->initHooks(array('membertypecard', 'globalcard'));
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
// Fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
|
||||
@ -103,14 +105,22 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter_x'
|
||||
}
|
||||
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('membertypecard', 'globalcard'));
|
||||
// Security check
|
||||
$result = restrictedArea($user, 'adherent', $rowid, 'adherent_type');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel', 'alpha')) {
|
||||
$action = 'list';
|
||||
$massaction = '';
|
||||
}
|
||||
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
|
||||
$massaction = '';
|
||||
}
|
||||
|
||||
if ($cancel) {
|
||||
$action = '';
|
||||
|
||||
@ -289,6 +299,9 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<th> </th>';
|
||||
}
|
||||
print '<th>'.$langs->trans("Ref").'</th>';
|
||||
print '<th>'.$langs->trans("Label").'</th>';
|
||||
print '<th class="center">'.$langs->trans("MembersNature").'</th>';
|
||||
@ -297,7 +310,9 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
print '<th class="center">'.$langs->trans("CanEditAmountShort").'</th>';
|
||||
print '<th class="center">'.$langs->trans("VoteAllowed").'</th>';
|
||||
print '<th class="center">'.$langs->trans("Status").'</th>';
|
||||
print '<th> </th>';
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<th> </th>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
$membertype = new AdherentType($db);
|
||||
@ -322,7 +337,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="12">';
|
||||
print '<div class="box-flex-container">';
|
||||
print '<div class="box-flex-container kanban">';
|
||||
}
|
||||
//output kanban
|
||||
$membertype->label = $objp->label;
|
||||
@ -333,6 +348,11 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven">';
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
if ($user->rights->adherent->configurer) {
|
||||
print '<td class="center"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
|
||||
}
|
||||
}
|
||||
print '<td class="nowraponall">';
|
||||
print $membertype->getNomUrl(1);
|
||||
//<a href="'.$_SERVER["PHP_SELF"].'?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowType"),'group').' '.$objp->rowid.'</a>
|
||||
@ -352,10 +372,10 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
print '<td class="center">'.yn($objp->caneditamount).'</td>';
|
||||
print '<td class="center">'.yn($objp->vote).'</td>';
|
||||
print '<td class="center">'.$membertype->getLibStatut(5).'</td>';
|
||||
if ($user->rights->adherent->configurer) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
|
||||
} else {
|
||||
print '<td class="right"> </td>';
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
if ($user->rights->adherent->configurer) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
|
||||
}
|
||||
}
|
||||
print "</tr>";
|
||||
}
|
||||
@ -370,7 +390,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
$colspan++;
|
||||
}
|
||||
}*/
|
||||
$colspan = 8;
|
||||
$colspan = 9;
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
|
||||
@ -508,7 +528,7 @@ if ($rowid > 0) {
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Duration").'</td><td colspan="2">'.$object->duration_value.' ';
|
||||
if ($object->duration_value > 1) {
|
||||
$dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years"));
|
||||
$dur = array("i"=>$langs->trans("Minutes"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years"));
|
||||
} elseif ($object->duration_value > 0) {
|
||||
$dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year"));
|
||||
}
|
||||
@ -708,13 +728,18 @@ if ($rowid > 0) {
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
}
|
||||
print_liste_field_titre("NameSlashCompany", $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Login", $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("MemberNature", $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "d.email", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "d.statut,d.datefin", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("EndSubscription", $_SERVER["PHP_SELF"], "d.datefin", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
$adh = new Adherent($db);
|
||||
@ -732,7 +757,17 @@ if ($rowid > 0) {
|
||||
$adh->statut = $objp->status;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Actions
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="center">';
|
||||
if ($user->hasRight('adherent', 'creer')) {
|
||||
print '<a class="editfielda marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=edit&token='.newToken().'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.img_edit().'</a>';
|
||||
}
|
||||
if ($user->hasRight('adherent', 'supprimer')) {
|
||||
print '<a class="marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=resiliate&token='.newToken().'">'.img_picto($langs->trans("Resiliate"), 'disable.png').'</a>';
|
||||
}
|
||||
print "</td>";
|
||||
}
|
||||
// Lastname
|
||||
if ($objp->company != '') {
|
||||
print '<td><a href="card.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"), "user", 'class="paddingright"').$adh->getFullName($langs, 0, -1, 20).' / '.dol_trunc($objp->company, 12).'</a></td>'."\n";
|
||||
@ -785,15 +820,16 @@ if ($rowid > 0) {
|
||||
}
|
||||
|
||||
// Actions
|
||||
print '<td class="center">';
|
||||
if ($user->hasRight('adherent', 'creer')) {
|
||||
print '<a class="editfielda marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=edit&token='.newToken().'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.img_edit().'</a>';
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="center">';
|
||||
if ($user->hasRight('adherent', 'creer')) {
|
||||
print '<a class="editfielda marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=edit&token='.newToken().'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.img_edit().'</a>';
|
||||
}
|
||||
if ($user->hasRight('adherent', 'supprimer')) {
|
||||
print '<a class="marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=resiliate&token='.newToken().'">'.img_picto($langs->trans("Resiliate"), 'disable.png').'</a>';
|
||||
}
|
||||
print "</td>";
|
||||
}
|
||||
if ($user->hasRight('adherent', 'supprimer')) {
|
||||
print '<a class="marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=resiliate&token='.newToken().'">'.img_picto($langs->trans("Resiliate"), 'disable.png').'</a>';
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ if ($action == "save" && empty($cancel)) {
|
||||
|
||||
// $wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
|
||||
$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung';
|
||||
|
||||
llxHeader('', $langs->trans("AgendaSetup"), $help_url);
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
|
||||
$textobject = $langs->transnoentitiesnoconv("Agenda");
|
||||
|
||||
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung';
|
||||
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp);
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
@ -185,7 +185,7 @@ $formother = new FormOther($db);
|
||||
$arrayofjs = array();
|
||||
$arrayofcss = array();
|
||||
|
||||
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung';
|
||||
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp, '', 0, 0, $arrayofjs, $arrayofcss);
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
@ -182,7 +182,7 @@ if ($action == 'set') {
|
||||
$formactions = new FormActions($db);
|
||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung';
|
||||
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp);
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
@ -70,7 +70,7 @@ if (!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) {
|
||||
$conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY = 100;
|
||||
}
|
||||
|
||||
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung';
|
||||
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp);
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
@ -32,10 +32,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
|
||||
// Load translation files required by the page
|
||||
$langs->load("admin");
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$entity = GETPOST('entity', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
@ -44,7 +40,6 @@ $consts = GETPOST('const', 'array');
|
||||
$constname = GETPOST('constname', 'alphanohtml');
|
||||
$constvalue = GETPOST('constvalue', 'restricthtml'); // We should be able to send everything here
|
||||
$constnote = GETPOST('constnote', 'alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
@ -63,12 +58,30 @@ if (empty($sortorder)) {
|
||||
$sortorder = 'ASC';
|
||||
}
|
||||
|
||||
if ($action == 'add' && GETPOST('update')) { // Click on button update must be used in priority before param $action
|
||||
$action = 'update';
|
||||
}
|
||||
if ($action == 'add' && GETPOST('delete')) { // Click on button update must be used in priority before param $action
|
||||
$action = 'delete';
|
||||
}
|
||||
if ($action == 'update' && GETPOST('add')) { // Click on button add must be used in priority before param $action
|
||||
$action = 'add';
|
||||
}
|
||||
if ($action == 'delete' && GETPOST('add')) { // Click on button add must be used in priority before param $action
|
||||
$action = 'add';
|
||||
}
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'add' || (GETPOST('add') && $action != 'update')) {
|
||||
// Add a new record
|
||||
if ($action == 'add') {
|
||||
$error = 0;
|
||||
|
||||
if (empty($constname)) {
|
||||
@ -157,13 +170,12 @@ jQuery(document).ready(function() {
|
||||
jQuery("#delconst").hide();
|
||||
jQuery(".checkboxfordelete").click(function() {
|
||||
jQuery("#delconst").show();
|
||||
jQuery("#action").val('delete');
|
||||
});
|
||||
jQuery(".inputforupdate").keyup(function() { // keypress does not support back
|
||||
var field_id = jQuery(this).attr("id");
|
||||
var row_num = field_id.split("_");
|
||||
jQuery("#updateconst").show();
|
||||
jQuery("#action").val('update');
|
||||
jQuery("#action").val('update'); // so default action if we type enter will be update, but correct action is also detected correctly without that when clicking on "Update" button.
|
||||
jQuery("#check_" + row_num[1]).prop("checked",true);
|
||||
});
|
||||
});
|
||||
@ -180,7 +192,7 @@ $param = '';
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug) ? '?debug=1' : '').'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" id="action" name="action" value="">';
|
||||
print '<input type="hidden" id="action" name="action" value="add">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
|
||||
@ -147,12 +147,12 @@ if (($action == 'add' || (GETPOST('add') && $action != 'update')) || GETPOST('ac
|
||||
$object->value=$defaultvalue;
|
||||
$object->entity=$conf->entity;
|
||||
$result=$object->create($user);
|
||||
if ($result<0) {
|
||||
if ($result < 0) {
|
||||
$action = '';
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
|
||||
$action = "";
|
||||
$action = '';
|
||||
$defaulturl = '';
|
||||
$defaultkey = '';
|
||||
$defaultvalue = '';
|
||||
@ -324,16 +324,16 @@ print "\n";
|
||||
print '<tr class="oddeven">';
|
||||
// Page
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat minwidth200 maxwidthonsmartphone" name="defaulturl" value="'.dol_escape_htmltag(GETPOST('defaulturl', 'alphanohtml')).'">';
|
||||
print '<input type="text" class="flat minwidth200 maxwidthonsmartphone" name="defaulturl" value="'.dol_escape_htmltag($defaulturl).'">';
|
||||
print '</td>'."\n";
|
||||
// Field
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat maxwidth100onsmartphone" name="defaultkey" value="'.dol_escape_htmltag(GETPOST('defaultkey', 'alphanohtml')).'">';
|
||||
print '<input type="text" class="flat maxwidth100onsmartphone" name="defaultkey" value="'.dol_escape_htmltag($defaultkey).'">';
|
||||
print '</td>';
|
||||
// Value
|
||||
if ($mode != 'focus' && $mode != 'mandatory') {
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat maxwidth100onsmartphone" name="defaultvalue" value="">';
|
||||
print '<input type="text" class="flat maxwidth100onsmartphone" name="defaultvalue" value="'.dol_escape_htmltag($defaultvalue).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Limit to superadmin
|
||||
|
||||
@ -329,7 +329,6 @@ class Dolistore
|
||||
$html .= '</small></h2>';
|
||||
$html .= '<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.dol_escape_htmltag($product->reference).' - '.dol_escape_htmltag($langs->trans('Id')).': '.((int) $product->id).'</small><br><br>'.dol_escape_htmltag($product->description_short->language[$this->lang - 1]).'</td>';
|
||||
// do not load if display none
|
||||
//$html .= '<td style="display:none;" class="long_description">'.$product->description->language[$this->lang - 1].'</td>';
|
||||
$html .= '<td class="margeCote center">';
|
||||
$html .= $price;
|
||||
$html .= '</td>';
|
||||
|
||||
@ -107,6 +107,7 @@ $permissiondellink = $user->admin; // Used by the include of actions_dellink.inc
|
||||
$permissiontoadd = $user->admin; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
|
||||
$debuginfo = '';
|
||||
$error = 0;
|
||||
|
||||
|
||||
/*
|
||||
@ -121,8 +122,6 @@ if ($reshook < 0) {
|
||||
}
|
||||
|
||||
if (empty($reshook)) {
|
||||
$error = 0;
|
||||
|
||||
$permissiontoadd = 1;
|
||||
$permissiontodelete = 1;
|
||||
if (empty($backtopage)) {
|
||||
@ -184,8 +183,8 @@ if (GETPOST('addoperation', 'alpha')) {
|
||||
|
||||
if (in_array($emailcollectoroperation->type, array('loadthirdparty', 'loadandcreatethirdparty'))
|
||||
&& empty($emailcollectoroperation->actionparam)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorAParameterIsRequiredForThisOperation"), null, 'errors');
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorAParameterIsRequiredForThisOperation"), null, 'errors');
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
@ -208,8 +207,8 @@ if ($action == 'updateoperation') {
|
||||
|
||||
if (in_array($emailcollectoroperation->type, array('loadthirdparty', 'loadandcreatethirdparty'))
|
||||
&& empty($emailcollectoroperation->actionparam)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorAParameterIsRequiredForThisOperation"), null, 'errors');
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorAParameterIsRequiredForThisOperation"), null, 'errors');
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
@ -397,104 +396,128 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$connectstringsource = '';
|
||||
$connectstringtarget = '';
|
||||
|
||||
if (function_exists('imap_open')) {
|
||||
// Note: $object->host has been loaded by the fetch
|
||||
$usessl = 1;
|
||||
// Note: $object->host has been loaded by the fetch
|
||||
$usessl = 1;
|
||||
|
||||
$connectstringserver = $object->getConnectStringIMAP($usessl);
|
||||
$connectstringserver = $object->getConnectStringIMAP($usessl);
|
||||
|
||||
if ($action == 'scan') {
|
||||
$nbemail = '';
|
||||
if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) {
|
||||
if ($object->acces_type == 1) {
|
||||
// Mode OAUth2 with PHP-IMAP
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/oauth.lib.php'; // define $supportedoauth2array
|
||||
$keyforsupportedoauth2array = $object->oauth_service;
|
||||
if (preg_match('/^.*-/', $keyforsupportedoauth2array)) {
|
||||
$keyforprovider = preg_replace('/^.*-/', '', $keyforsupportedoauth2array);
|
||||
} else {
|
||||
$keyforprovider = '';
|
||||
}
|
||||
$keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array);
|
||||
$keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME';
|
||||
|
||||
$OAUTH_SERVICENAME = (empty($supportedoauth2array[$keyforsupportedoauth2array]['name']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['name'].($keyforprovider ? '-'.$keyforprovider : ''));
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||
//$debugtext = "Host: ".$this->host."<br>Port: ".$this->port."<br>Login: ".$this->login."<br>Password: ".$this->password."<br>access type: ".$this->acces_type."<br>oauth service: ".$this->oauth_service."<br>Max email per collect: ".$this->maxemailpercollect;
|
||||
//dol_syslog($debugtext);
|
||||
|
||||
$storage = new DoliStorage($db, $conf);
|
||||
|
||||
try {
|
||||
$tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME);
|
||||
$expire = true;
|
||||
// Is token expired or will token expire in the next 30 seconds
|
||||
// if (is_object($tokenobj)) {
|
||||
// $expire = ($tokenobj->getEndOfLife() !== -9002 && $tokenobj->getEndOfLife() !== -9001 && time() > ($tokenobj->getEndOfLife() - 30));
|
||||
// }
|
||||
// Token expired so we refresh it
|
||||
if (is_object($tokenobj) && $expire) {
|
||||
$credentials = new Credentials(
|
||||
getDolGlobalString('OAUTH_'.$object->oauth_service.'_ID'),
|
||||
getDolGlobalString('OAUTH_'.$object->oauth_service.'_SECRET'),
|
||||
getDolGlobalString('OAUTH_'.$object->oauth_service.'_URLAUTHORIZE')
|
||||
);
|
||||
$serviceFactory = new \OAuth\ServiceFactory();
|
||||
$oauthname = explode('-', $OAUTH_SERVICENAME);
|
||||
// ex service is Google-Emails we need only the first part Google
|
||||
$apiService = $serviceFactory->createService($oauthname[0], $credentials, $storage, array());
|
||||
// We have to save the token because Google give it only once
|
||||
$refreshtoken = $tokenobj->getRefreshToken();
|
||||
$tokenobj = $apiService->refreshAccessToken($tokenobj);
|
||||
$tokenobj->setRefreshToken($refreshtoken);
|
||||
$storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj);
|
||||
}
|
||||
$tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME);
|
||||
if (is_object($tokenobj)) {
|
||||
$token = $tokenobj->getAccessToken();
|
||||
} else {
|
||||
$object->error = "Token not found";
|
||||
return -1;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
print $e->getMessage();
|
||||
}
|
||||
|
||||
$cm = new ClientManager();
|
||||
$client = $cm->make([
|
||||
'host' => $object->host,
|
||||
'port' => $object->port,
|
||||
'encryption' => 'ssl',
|
||||
'validate_cert' => true,
|
||||
'protocol' => 'imap',
|
||||
'username' => $object->login,
|
||||
'password' => $token,
|
||||
'authentication' => "oauth",
|
||||
]);
|
||||
if ($action == 'scan') {
|
||||
if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) {
|
||||
if ($object->acces_type == 1) {
|
||||
// Mode OAUth2 with PHP-IMAP
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/oauth.lib.php'; // define $supportedoauth2array
|
||||
$keyforsupportedoauth2array = $object->oauth_service;
|
||||
if (preg_match('/^.*-/', $keyforsupportedoauth2array)) {
|
||||
$keyforprovider = preg_replace('/^.*-/', '', $keyforsupportedoauth2array);
|
||||
} else {
|
||||
// Mode login/pass with PHP-IMAP
|
||||
$cm = new ClientManager();
|
||||
$client = $cm->make([
|
||||
'host' => $object->host,
|
||||
'port' => $object->port,
|
||||
'encryption' => 'ssl',
|
||||
'validate_cert' => true,
|
||||
'protocol' => 'imap',
|
||||
'username' => $object->login,
|
||||
'password' => $object->password,
|
||||
'authentication' => "login",
|
||||
]);
|
||||
$keyforprovider = '';
|
||||
}
|
||||
$keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array);
|
||||
$keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME';
|
||||
|
||||
$OAUTH_SERVICENAME = (empty($supportedoauth2array[$keyforsupportedoauth2array]['name']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['name'].($keyforprovider ? '-'.$keyforprovider : ''));
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||
//$debugtext = "Host: ".$this->host."<br>Port: ".$this->port."<br>Login: ".$this->login."<br>Password: ".$this->password."<br>access type: ".$this->acces_type."<br>oauth service: ".$this->oauth_service."<br>Max email per collect: ".$this->maxemailpercollect;
|
||||
//dol_syslog($debugtext);
|
||||
|
||||
$token = '';
|
||||
|
||||
$storage = new DoliStorage($db, $conf, $keyforprovider);
|
||||
|
||||
try {
|
||||
$client->connect();
|
||||
} catch (ConnectionFailedException $e) {
|
||||
print $e->getMessage();
|
||||
$tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME);
|
||||
|
||||
$expire = true;
|
||||
// Is token expired or will token expire in the next 30 seconds
|
||||
// if (is_object($tokenobj)) {
|
||||
// $expire = ($tokenobj->getEndOfLife() !== -9002 && $tokenobj->getEndOfLife() !== -9001 && time() > ($tokenobj->getEndOfLife() - 30));
|
||||
// }
|
||||
// Token expired so we refresh it
|
||||
if (is_object($tokenobj) && $expire) {
|
||||
$credentials = new Credentials(
|
||||
getDolGlobalString('OAUTH_'.$object->oauth_service.'_ID'),
|
||||
getDolGlobalString('OAUTH_'.$object->oauth_service.'_SECRET'),
|
||||
getDolGlobalString('OAUTH_'.$object->oauth_service.'_URLAUTHORIZE')
|
||||
);
|
||||
$serviceFactory = new \OAuth\ServiceFactory();
|
||||
$oauthname = explode('-', $OAUTH_SERVICENAME);
|
||||
|
||||
// ex service is Google-Emails we need only the first part Google
|
||||
$apiService = $serviceFactory->createService($oauthname[0], $credentials, $storage, array());
|
||||
|
||||
// We have to save the token because Google give it only once
|
||||
$refreshtoken = $tokenobj->getRefreshToken();
|
||||
//var_dump($tokenobj);
|
||||
$tokenobj = $apiService->refreshAccessToken($tokenobj);
|
||||
|
||||
$tokenobj->setRefreshToken($refreshtoken);
|
||||
$storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj);
|
||||
}
|
||||
$tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME);
|
||||
if (is_object($tokenobj)) {
|
||||
$token = $tokenobj->getAccessToken();
|
||||
} else {
|
||||
$error++;
|
||||
$morehtml .= "Token not found";
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$error++;
|
||||
$morehtml .= $e->getMessage();
|
||||
}
|
||||
|
||||
$f = $client->getFolders(false, $object->source_directory);
|
||||
$nbemail = $f[0]->examine()["exists"];
|
||||
if (empty($object->login)) {
|
||||
$error++;
|
||||
$morehtml .= 'Error: Login is empty. Must be email owner when using MAIN_IMAP_USE_PHPIMAP and OAuth.';
|
||||
}
|
||||
|
||||
$cm = new ClientManager();
|
||||
$client = $cm->make([
|
||||
'host' => $object->host,
|
||||
'port' => $object->port,
|
||||
'encryption' => 'ssl',
|
||||
'validate_cert' => true,
|
||||
'protocol' => 'imap',
|
||||
'username' => $object->login,
|
||||
'password' => $token,
|
||||
'authentication' => "oauth",
|
||||
]);
|
||||
} else {
|
||||
// Mode login/pass with PHP-IMAP
|
||||
$cm = new ClientManager();
|
||||
$client = $cm->make([
|
||||
'host' => $object->host,
|
||||
'port' => $object->port,
|
||||
'encryption' => 'ssl',
|
||||
'validate_cert' => true,
|
||||
'protocol' => 'imap',
|
||||
'username' => $object->login,
|
||||
'password' => $object->password,
|
||||
'authentication' => "login",
|
||||
]);
|
||||
}
|
||||
if (!$error) {
|
||||
try {
|
||||
// To emulate the command connect, you can run
|
||||
// openssl s_client -crlf -connect outlook.office365.com:993
|
||||
// TAG1 AUTHENTICATE XOAUTH2 dXN...
|
||||
// TO Get debug log, you can set protected $debug = true; in Protocol.php file
|
||||
//
|
||||
// A MS bug make this not working !
|
||||
// See https://github.com/MicrosoftDocs/office-developer-exchange-docs/issues/100
|
||||
// See github.com/MicrosoftDocs/office-developer-exchange-docs/issues/87
|
||||
// See github.com/Webklex/php-imap/issues/81
|
||||
$client->connect();
|
||||
|
||||
$f = $client->getFolders(false, $object->source_directory);
|
||||
$nbemail = $f[0]->examine()["exists"];
|
||||
$morehtml .= $nbemail;
|
||||
} catch (ConnectionFailedException $e) {
|
||||
$morehtml .= 'ConnectionFailedException '.$e->getMessage();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (function_exists('imap_open')) {
|
||||
try {
|
||||
if ($sourcedir) {
|
||||
//$connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir);
|
||||
@ -521,38 +544,34 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
//dol_syslog("end imap_open connection=".var_export($connection, true));
|
||||
} catch (Exception $e) {
|
||||
print $e->getMessage();
|
||||
$morehtml .= $e->getMessage();
|
||||
}
|
||||
|
||||
if (!$connection) {
|
||||
$nbemail .= 'Failed to open IMAP connection '.$connectstringsource;
|
||||
$morehtml .= 'Failed to open IMAP connection '.$connectstringsource;
|
||||
if (function_exists('imap_last_error')) {
|
||||
$nbemail .= '<br>'.imap_last_error();
|
||||
$morehtml .= '<br>'.imap_last_error();
|
||||
}
|
||||
dol_syslog("Error ".$morehtml, LOG_WARNING);
|
||||
//var_dump(imap_errors())
|
||||
} else {
|
||||
dol_syslog("Imap connected. Now we call imap_num_msg()");
|
||||
$nbemail .= imap_num_msg($connection);
|
||||
$morehtml .= imap_num_msg($connection);
|
||||
}
|
||||
|
||||
if ($connection) {
|
||||
dol_syslog("Imap close");
|
||||
imap_close($connection);
|
||||
}
|
||||
} else {
|
||||
$morehtml .= 'IMAP functions not available on your PHP. ';
|
||||
}
|
||||
}
|
||||
|
||||
$morehtml .= $form->textwithpicto($langs->trans("NbOfEmailsInInbox"), 'connect string '.$connectstringserver).': ';
|
||||
|
||||
$morehtml .= ($nbemail != '' ? $nbemail : '?');
|
||||
|
||||
$morehtml .= ' <a class="flat paddingleft marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=scan&token='.newToken().'">'.img_picto('', 'refresh', 'class="paddingrightonly"').$langs->trans("Refresh").'</a>';
|
||||
} else {
|
||||
$morehtml .= $langs->trans("NbOfEmailsInInbox").': ';
|
||||
$morehtml .= 'IMAP functions not available on your PHP. ';
|
||||
}
|
||||
|
||||
$morehtml = $form->textwithpicto($langs->trans("NbOfEmailsInInbox"), 'connect string '.$connectstringserver).': '.($morehtml ? $morehtml : '?');
|
||||
$morehtml .= '<a class="flat paddingleft marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=scan&token='.newToken().'">'.img_picto('', 'refresh', 'class="paddingrightonly"').$langs->trans("Refresh").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref.'<div class="refidno">'.$morehtml.'</div>', '', 0, '', '', 0, '');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
@ -627,10 +646,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
jQuery("#rulevalue").attr("placeholder", (jQuery("#filtertype option:selected").attr("data-placeholder")));
|
||||
';
|
||||
/*$noparam = array();
|
||||
foreach ($arrayoftypes as $key => $value)
|
||||
{
|
||||
if ($value['noparam']) $noparam[] = $key;
|
||||
}*/
|
||||
foreach ($arrayoftypes as $key => $value)
|
||||
{
|
||||
if ($value['noparam']) $noparam[] = $key;
|
||||
}*/
|
||||
print '})';
|
||||
print '</script>'."\n";
|
||||
|
||||
@ -671,7 +690,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$arrayoftypes = array(
|
||||
'loadthirdparty' => $langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")),
|
||||
'loadandcreatethirdparty' => $langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")),
|
||||
'loadandcreatecontact' => $langs->trans('LoadContactFromEmailOrCreate', $langs->transnoentities("Email")),
|
||||
'recordjoinpiece' => 'AttachJoinedDocumentsToObject',
|
||||
'recordevent' => 'RecordEvent'
|
||||
);
|
||||
@ -704,7 +722,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
// Add operation
|
||||
print '<tr class="oddeven nodrag nodrop">';
|
||||
print '<td>';
|
||||
print $form->selectarray('operationtype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', 'maxwidth300', 1);
|
||||
print $form->selectarray('operationtype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', 'minwidth150 maxwidth300', 1);
|
||||
print '</td><td>';
|
||||
//print '<input type="text" name="operationparam">';
|
||||
$htmltext = $langs->transnoentitiesnoconv("OperationParamDesc");
|
||||
|
||||
@ -273,25 +273,6 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
|
||||
/* If a group by is required
|
||||
$sql.= " GROUP BY ";
|
||||
foreach ($object->fields as $key => $val) {
|
||||
$sql .= "t.".$db->escape($key).", ";
|
||||
}
|
||||
// Add fields from extrafields
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : '');
|
||||
}
|
||||
}
|
||||
// Add where from hooks
|
||||
$parameters=array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
$sql = preg_replace('/,\s*$/', '', $sql);
|
||||
*/
|
||||
|
||||
// Count total nb of records
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||
@ -333,6 +314,22 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
|
||||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', '');
|
||||
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($title, $linkback, 'title_setup');
|
||||
|
||||
|
||||
$head = array();
|
||||
$h = 0;
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/emailcollector_list.php";
|
||||
$head[$h][1] = $langs->trans("Setup");
|
||||
$head[$h][2] = 'common';
|
||||
$h++;
|
||||
|
||||
print dol_get_fiche_head($head, 'common', '', -1);
|
||||
|
||||
|
||||
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
|
||||
$param = '';
|
||||
@ -388,11 +385,9 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'emailcollector_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'email', 0, $newcardbutton.' '.$linkback, '', $limit, 0, 0, 1);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'email', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
/*$topicmail="";
|
||||
@ -557,7 +552,7 @@ while ($i < $imaxinloop) {
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="'.$savnbfield.'">';
|
||||
print '<div class="box-flex-container">';
|
||||
print '<div class="box-flex-container kanban">';
|
||||
}
|
||||
// Output Kanban
|
||||
print $object->getKanbanView('');
|
||||
@ -699,7 +694,22 @@ print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Hide e-mail headers from collected messages
|
||||
// MAIN_IMAP_USE_PHPIMAP: Enable use of the PHP Imap library
|
||||
print '<tr class="oddeven"><td>';
|
||||
//print $form->textwithpicto($langs->trans("MAIN_IMAP_USE_PHPIMAP"), $langs->transnoentitiesnoconv("MAIN_IMAP_USE_PHPIMAPDesc"));
|
||||
print $langs->trans("MAIN_IMAP_USE_PHPIMAP");
|
||||
print '</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_IMAP_USE_PHPIMAP');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_IMAP_USE_PHPIMAP", $arrval, $conf->global->MAIN_IMAP_USE_PHPIMAP);
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER: Hide e-mail headers from collected messages
|
||||
print '<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans("EmailCollectorHideMailHeaders"), $langs->transnoentitiesnoconv("EmailCollectorHideMailHeadersHelp")).'</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
@ -738,6 +748,10 @@ if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $n
|
||||
print $formfile->showdocuments('massfilesarea_emailcollector', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
|
||||
}
|
||||
|
||||
|
||||
dol_get_fiche_end();
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -296,9 +296,13 @@ if ($resql) {
|
||||
$imageurl = $rssparser->getImageUrl();
|
||||
$linkrss = $rssparser->getLink();
|
||||
if (!preg_match('/^http/', $imageurl)) {
|
||||
$imageurl = $linkrss.$imageurl;
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
if (image_format_supported($imageurl) >= 0) {
|
||||
// If we are sure imageurl is a path to an image file, and if it does not start with http, we append root url to it.
|
||||
$imageurl = $linkrss.$imageurl;
|
||||
}
|
||||
}
|
||||
if ($imageurl) {
|
||||
if ($imageurl && preg_match('/^http', $imageurl)) {
|
||||
print '<img height="32" src="'.$imageurl.'">';
|
||||
} else {
|
||||
print $langs->trans("None");
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
|
||||
* Copyright (C) 2023 Eric Seigne <eric.seigne@cap-rel.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -245,6 +246,7 @@ if ($action == 'update') {
|
||||
|
||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_CHECKBOX_LEFT_COLUMN", GETPOST("MAIN_CHECKBOX_LEFT_COLUMN", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
//dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", GETPOST("MAIN_DISABLE_JAVASCRIPT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
//dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", GETPOST("MAIN_BUTTON_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
@ -297,13 +299,19 @@ if ($action == 'update') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode == 'css') {
|
||||
//file_put_contents(DOL_DATA_ROOT.'/admin/customcss.css', $data);
|
||||
//dol_chmod(DOL_DATA_ROOT.'/admin/customcss.css');
|
||||
dolibarr_set_const($db, "MAIN_IHM_CUSTOM_CSS", GETPOST('MAIN_IHM_CUSTOM_CSS', 'restricthtml'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$_SESSION["mainmenu"] = ""; // The menu manager may have changed
|
||||
|
||||
if (GETPOST('dol_resetcache')) {
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", ((int) $conf->global->MAIN_IHM_PARAMS_REV) + 1, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup".'&mode='.$mode.(GETPOSTISSET('page_y') ? '&page_y='.GETPOST('page_y', 'int') : ''));
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup&mode=".$mode.(GETPOSTISSET('page_y') ? '&page_y='.GETPOST('page_y', 'int') : ''));
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -313,7 +321,13 @@ if ($action == 'update') {
|
||||
*/
|
||||
|
||||
$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
|
||||
llxHeader('', $langs->trans("Setup"), $wikihelp);
|
||||
|
||||
llxHeader('', $langs->trans("Setup"), $wikihelp, '', 0, 0,
|
||||
array(
|
||||
'/includes/ace/src/ace.js',
|
||||
'/includes/ace/src/ext-statusbar.js',
|
||||
'/includes/ace/src/ext-language_tools.js',
|
||||
), array());
|
||||
|
||||
$form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
@ -408,6 +422,12 @@ if ($mode == 'other') {
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeShortList") . '</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Max size of lists
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("MAIN_CHECKBOX_LEFT_COLUMN") . '</td><td>';
|
||||
print ajax_constantonoff("MAIN_CHECKBOX_LEFT_COLUMN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// show input border
|
||||
/*
|
||||
print '<tr><td>'.$langs->trans("showInputBorder").'</td><td>';
|
||||
@ -672,8 +692,27 @@ if ($mode == 'login') {
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if ($mode == 'css') {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">';
|
||||
|
||||
//$customcssValue = file_get_contents(DOL_DATA_ROOT.'/admin/customcss.css');
|
||||
$customcssValue = getDolGlobalString('MAIN_IHM_CUSTOM_CSS');
|
||||
|
||||
$doleditor = new DolEditor('MAIN_IHM_CUSTOM_CSS', $customcssValue, '80%', 400, 'Basic', 'In', true, false, 'ace', 10, '90%');
|
||||
$doleditor->Create(0, '', true, 'css', 'css');
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
|
||||
print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
|
||||
print '<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -105,10 +105,15 @@ print '<br>';
|
||||
|
||||
print '<section class="setupsection">';
|
||||
|
||||
$nbmodulesnotautoenabled = count($conf->modules);
|
||||
if (in_array('fckeditor', $conf->modules)) $nbmodulesnotautoenabled--;
|
||||
if (in_array('export', $conf->modules)) $nbmodulesnotautoenabled--;
|
||||
if (in_array('import', $conf->modules)) $nbmodulesnotautoenabled--;
|
||||
|
||||
// Show info setup module
|
||||
print img_picto('', 'cog', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules"));
|
||||
print '<br><br>'.$langs->trans("SetupDescription4b");
|
||||
if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) { // If only minimal initial modules enabled
|
||||
if ($nbmodulesnotautoenabled <= getDolGlobalInt('MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING', 1)) { // If only minimal initial modules enabled
|
||||
$langs->load("errors");
|
||||
$warnpicto = img_warning($langs->trans("WarningEnableYourModulesApplications"), 'style="padding-right: 6px;"');
|
||||
print '<br><div class="warning"><a href="'.DOL_URL_ROOT.'/admin/modules.php?mainmenu=home">'.$warnpicto.$langs->trans("WarningEnableYourModulesApplications").'</a></div>';
|
||||
|
||||
137
htdocs/admin/mails_ingoing.php
Normal file
137
htdocs/admin/mails_ingoing.php
Normal file
@ -0,0 +1,137 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 Jonathan TISSEAU <jonathan.tisseau@86dev.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/mails_ingoing.php
|
||||
* \brief Page to setup emails entry
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies", "products", "admin", "mails", "other", "errors"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
|
||||
$trackid = GETPOST('trackid');
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'update' && !$cancel) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$linuxlike = 1;
|
||||
if (preg_match('/^win/i', PHP_OS)) {
|
||||
$linuxlike = 0;
|
||||
}
|
||||
if (preg_match('/^mac/i', PHP_OS)) {
|
||||
$linuxlike = 0;
|
||||
}
|
||||
|
||||
|
||||
//$wikihelp = 'EN:Setup_EMails|FR:Paramétrage_EMails|ES:Configuración_EMails';
|
||||
$wikihelp = '';
|
||||
llxHeader('', $langs->trans("Setup"), $wikihelp);
|
||||
|
||||
print load_fiche_titre($langs->trans("EMailsSetup"), '', 'title_setup');
|
||||
|
||||
$head = email_admin_prepare_head();
|
||||
|
||||
// List of sending methods
|
||||
$listofmethods = array();
|
||||
$listofmethods['mail'] = 'PHP mail function';
|
||||
$listofmethods['smtps'] = 'SMTP/SMTPS socket library';
|
||||
if (version_compare(phpversion(), '7.0', '>=')) {
|
||||
$listofmethods['swiftmailer'] = 'Swift Mailer socket library';
|
||||
}
|
||||
|
||||
// List of oauth services
|
||||
$oauthservices = array();
|
||||
|
||||
foreach ($conf->global as $key => $val) {
|
||||
if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) {
|
||||
$key = preg_replace('/^OAUTH_/', '', $key);
|
||||
$key = preg_replace('/_ID$/', '', $key);
|
||||
if (preg_match('/^.*-/', $key)) {
|
||||
$name = preg_replace('/^.*-/', '', $key);
|
||||
} else {
|
||||
$name = $langs->trans("NoName");
|
||||
}
|
||||
$provider = preg_replace('/-.*$/', '', $key);
|
||||
$provider = ucfirst(strtolower($provider));
|
||||
|
||||
$oauthservices[$key] = $name." (".$provider.")";
|
||||
}
|
||||
}
|
||||
|
||||
print dol_get_fiche_head($head, 'common_ingoing', '', -1);
|
||||
|
||||
print '<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsInGoingDesc", $langs->transnoentitiesnoconv("EmailCollector"))."</span><br>\n";
|
||||
print "<br><br>\n";
|
||||
|
||||
/*
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
// SMTPS oauth service
|
||||
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') === "XOAUTH2") {
|
||||
$text = $oauthservices[$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE];
|
||||
if (empty($text)) {
|
||||
$text = $langs->trans("Undefined").img_warning();
|
||||
}
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").'</td><td>'.$text.'</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
*/
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@ -680,17 +680,27 @@ if (!empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu
|
||||
}
|
||||
|
||||
|
||||
// Confirmation de la suppression de la ligne
|
||||
// Confirm deletion of record
|
||||
if ($action == 'delete') {
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.((int) $rowid).'&code='.urlencode($code).'&id='.((int) $id), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$fieldlist = explode(',', $tabfield[$id]);
|
||||
|
||||
if ($action == 'create') {
|
||||
// If data was already input, we define them in obj to populate input fields.
|
||||
$obj = new stdClass();
|
||||
$obj->label = GETPOST('label');
|
||||
$obj->lang = GETPOST('lang');
|
||||
$obj->type_template = GETPOST('type_template');
|
||||
$obj->fk_user = GETPOST('fk_user', 'int');
|
||||
$obj->private = GETPOST('private', 'int');
|
||||
$obj->position = GETPOST('position');
|
||||
$obj->topic = GETPOST('topic');
|
||||
$obj->joinfiles = GETPOST('joinfiles');
|
||||
$obj->content = GETPOST('content', 'restricthtml');
|
||||
|
||||
// Form to add a new line
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
@ -769,16 +779,6 @@ if ($action == 'create') {
|
||||
print '</th>';
|
||||
print '</tr>';
|
||||
|
||||
$obj = new stdClass();
|
||||
// If data was already input, we define them in obj to populate input fields.
|
||||
if (GETPOST('actionadd')) {
|
||||
foreach ($fieldlist as $key => $val) {
|
||||
if (GETPOST($val) != '') {
|
||||
$obj->$val = GETPOST($val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$tmpaction = 'create';
|
||||
$parameters = array(
|
||||
'fieldlist' => $fieldlist,
|
||||
@ -836,7 +836,6 @@ if ($action == 'create') {
|
||||
if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) {
|
||||
$okforextended = false;
|
||||
}
|
||||
|
||||
$doleditor = new DolEditor($tmpfieldlist, (!empty($obj->$tmpfieldlist) ? $obj->$tmpfieldlist : ''), '', 180, 'dolibarr_mailings', 'In', false, $acceptlocallinktomedia, $okforextended, ROWS_4, '90%');
|
||||
print $doleditor->Create(1);
|
||||
}
|
||||
@ -856,7 +855,7 @@ if ($action == 'create') {
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
print '<br><br>';
|
||||
} // END IF not edit
|
||||
}
|
||||
|
||||
// List of available record in database
|
||||
dol_syslog("htdocs/admin/dict", LOG_DEBUG);
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2021-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -251,7 +251,15 @@ if ($action == 'install') {
|
||||
}
|
||||
|
||||
if ($action == 'set' && $user->admin) {
|
||||
$checkOldValue = getDolGlobalInt('CHECKLASTVERSION_EXTERNALMODULE');
|
||||
$csrfCheckOldValue = getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN');
|
||||
$resarray = activateModule($value);
|
||||
if ($checkOldValue != getDolGlobalInt('CHECKLASTVERSION_EXTERNALMODULE')) {
|
||||
setEventMessage($langs->trans('WarningModuleHasChangedLastVersionCheckParameter', $value), 'warnings');
|
||||
}
|
||||
if ($csrfCheckOldValue != getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN')) {
|
||||
setEventMessage($langs->trans('WarningModuleHasChangedSecurityCsrfParameter', $value), 'warnings');
|
||||
}
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
|
||||
if (!empty($resarray['errors'])) {
|
||||
setEventMessages('', $resarray['errors'], 'errors');
|
||||
@ -371,99 +379,95 @@ foreach ($modulesdir as $dir) {
|
||||
try {
|
||||
$res = include_once $dir.$file; // A class already exists in a different file will send a non catchable fatal error.
|
||||
if (class_exists($modName)) {
|
||||
try {
|
||||
$objMod = new $modName($db);
|
||||
$modNameLoaded[$modName] = $dir;
|
||||
if (!$objMod->numero > 0 && $modName != 'modUser') {
|
||||
dol_syslog('The module descriptor '.$modName.' must have a numero property', LOG_ERR);
|
||||
}
|
||||
$j = $objMod->numero;
|
||||
$objMod = new $modName($db);
|
||||
$modNameLoaded[$modName] = $dir;
|
||||
if (!$objMod->numero > 0 && $modName != 'modUser') {
|
||||
dol_syslog('The module descriptor '.$modName.' must have a numero property', LOG_ERR);
|
||||
}
|
||||
$j = $objMod->numero;
|
||||
|
||||
$modulequalified = 1;
|
||||
$modulequalified = 1;
|
||||
|
||||
// We discard modules according to features level (PS: if module is activated we always show it)
|
||||
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
|
||||
if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
if (preg_match('/deprecated/', $objMod->version) && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL >= 0))) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
// We discard modules according to features level (PS: if module is activated we always show it)
|
||||
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
|
||||
if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
if (preg_match('/deprecated/', $objMod->version) && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL >= 0))) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
|
||||
// We discard modules according to property ->hidden
|
||||
if (!empty($objMod->hidden)) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
// We discard modules according to property ->hidden
|
||||
if (!empty($objMod->hidden)) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
|
||||
if ($modulequalified > 0) {
|
||||
$publisher = dol_escape_htmltag($objMod->getPublisher());
|
||||
$external = ($objMod->isCoreOrExternalModule() == 'external');
|
||||
if ($external) {
|
||||
if ($publisher) {
|
||||
$arrayofnatures['external_'.$publisher] = $langs->trans("External").' - '.$publisher;
|
||||
} else {
|
||||
$arrayofnatures['external_'] = $langs->trans("External").' - '.$langs->trans("UnknownPublishers");
|
||||
}
|
||||
}
|
||||
ksort($arrayofnatures);
|
||||
|
||||
// Define array $categ with categ with at least one qualified module
|
||||
$filename[$i] = $modName;
|
||||
$modules[$modName] = $objMod;
|
||||
|
||||
// Gives the possibility to the module, to provide his own family info and position of this family
|
||||
if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) {
|
||||
$familyinfo = array_merge($familyinfo, $objMod->familyinfo);
|
||||
$familykey = key($objMod->familyinfo);
|
||||
if ($modulequalified > 0) {
|
||||
$publisher = dol_escape_htmltag($objMod->getPublisher());
|
||||
$external = ($objMod->isCoreOrExternalModule() == 'external');
|
||||
if ($external) {
|
||||
if ($publisher) {
|
||||
$arrayofnatures['external_'.$publisher] = $langs->trans("External").' - '.$publisher;
|
||||
} else {
|
||||
$familykey = $objMod->family;
|
||||
$arrayofnatures['external_'] = $langs->trans("External").' - '.$langs->trans("UnknownPublishers");
|
||||
}
|
||||
}
|
||||
ksort($arrayofnatures);
|
||||
|
||||
$moduleposition = ($objMod->module_position ? $objMod->module_position : '50');
|
||||
if ($objMod->isCoreOrExternalModule() == 'external' && $moduleposition < 100000) {
|
||||
// an external module should never return a value lower than '80'.
|
||||
$moduleposition = '80'; // External modules at end by default
|
||||
}
|
||||
// Define array $categ with categ with at least one qualified module
|
||||
$filename[$i] = $modName;
|
||||
$modules[$modName] = $objMod;
|
||||
|
||||
// Add list of warnings to show into arrayofwarnings and arrayofwarningsext
|
||||
if (!empty($objMod->warnings_activation)) {
|
||||
$arrayofwarnings[$modName] = $objMod->warnings_activation;
|
||||
}
|
||||
if (!empty($objMod->warnings_activation_ext)) {
|
||||
$arrayofwarningsext[$modName] = $objMod->warnings_activation_ext;
|
||||
}
|
||||
|
||||
$familyposition = (empty($familyinfo[$familykey]['position']) ? 0 : $familyinfo[$familykey]['position']);
|
||||
$listOfOfficialModuleGroups = array('hr', 'technic', 'interface', 'technic', 'portal', 'financial', 'crm', 'base', 'products', 'srm', 'ecm', 'projects', 'other');
|
||||
if ($external && !in_array($familykey, $listOfOfficialModuleGroups)) {
|
||||
// If module is extern and into a custom group (not into an official predefined one), it must appear at end (custom groups should not be before official groups).
|
||||
if (is_numeric($familyposition)) {
|
||||
$familyposition = sprintf("%03d", (int) $familyposition + 100);
|
||||
}
|
||||
}
|
||||
|
||||
$orders[$i] = $familyposition."_".$familykey."_".$moduleposition."_".$j; // Sort by family, then by module position then number
|
||||
|
||||
// Set categ[$i]
|
||||
$specialstring = 'unknown';
|
||||
if ($objMod->version == 'development' || $objMod->version == 'experimental') {
|
||||
$specialstring = 'expdev';
|
||||
}
|
||||
if (isset($categ[$specialstring])) {
|
||||
$categ[$specialstring]++; // Array of all different modules categories
|
||||
} else {
|
||||
$categ[$specialstring] = 1;
|
||||
}
|
||||
$j++;
|
||||
$i++;
|
||||
// Gives the possibility to the module, to provide his own family info and position of this family
|
||||
if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) {
|
||||
$familyinfo = array_merge($familyinfo, $objMod->familyinfo);
|
||||
$familykey = key($objMod->familyinfo);
|
||||
} else {
|
||||
dol_syslog("Module ".get_class($objMod)." not qualified");
|
||||
$familykey = $objMod->family;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
|
||||
|
||||
$moduleposition = ($objMod->module_position ? $objMod->module_position : '50');
|
||||
if ($objMod->isCoreOrExternalModule() == 'external' && $moduleposition < 100000) {
|
||||
// an external module should never return a value lower than '80'.
|
||||
$moduleposition = '80'; // External modules at end by default
|
||||
}
|
||||
|
||||
// Add list of warnings to show into arrayofwarnings and arrayofwarningsext
|
||||
if (!empty($objMod->warnings_activation)) {
|
||||
$arrayofwarnings[$modName] = $objMod->warnings_activation;
|
||||
}
|
||||
if (!empty($objMod->warnings_activation_ext)) {
|
||||
$arrayofwarningsext[$modName] = $objMod->warnings_activation_ext;
|
||||
}
|
||||
|
||||
$familyposition = (empty($familyinfo[$familykey]['position']) ? 0 : $familyinfo[$familykey]['position']);
|
||||
$listOfOfficialModuleGroups = array('hr', 'technic', 'interface', 'technic', 'portal', 'financial', 'crm', 'base', 'products', 'srm', 'ecm', 'projects', 'other');
|
||||
if ($external && !in_array($familykey, $listOfOfficialModuleGroups)) {
|
||||
// If module is extern and into a custom group (not into an official predefined one), it must appear at end (custom groups should not be before official groups).
|
||||
if (is_numeric($familyposition)) {
|
||||
$familyposition = sprintf("%03d", (int) $familyposition + 100);
|
||||
}
|
||||
}
|
||||
|
||||
$orders[$i] = $familyposition."_".$familykey."_".$moduleposition."_".$j; // Sort by family, then by module position then number
|
||||
|
||||
// Set categ[$i]
|
||||
$specialstring = 'unknown';
|
||||
if ($objMod->version == 'development' || $objMod->version == 'experimental') {
|
||||
$specialstring = 'expdev';
|
||||
}
|
||||
if (isset($categ[$specialstring])) {
|
||||
$categ[$specialstring]++; // Array of all different modules categories
|
||||
} else {
|
||||
$categ[$specialstring] = 1;
|
||||
}
|
||||
$j++;
|
||||
$i++;
|
||||
} else {
|
||||
dol_syslog("Module ".get_class($objMod)." not qualified");
|
||||
}
|
||||
} else {
|
||||
print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)<br>";
|
||||
@ -515,12 +519,10 @@ asort($orders);
|
||||
|
||||
$nbofactivatedmodules = count($conf->modules);
|
||||
|
||||
//$conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING = 1000;
|
||||
/*$moreinfo = $langs->trans("TitleNumberOfActivatedModules");
|
||||
$moreinfo2 = '<b class="largenumber">'.($nbofactivatedmodules - 1).'</b> / <b class="largenumber">'.count($modules).'</b>';
|
||||
if ($nbofactivatedmodules <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) {
|
||||
$moreinfo2 .= ' '.img_warning($langs->trans("YouMustEnableOneModule"));
|
||||
}*/
|
||||
$nbmodulesnotautoenabled = count($conf->modules);
|
||||
if (in_array('fckeditor', $conf->modules)) $nbmodulesnotautoenabled--;
|
||||
if (in_array('export', $conf->modules)) $nbmodulesnotautoenabled--;
|
||||
if (in_array('import', $conf->modules)) $nbmodulesnotautoenabled--;
|
||||
|
||||
print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup');
|
||||
|
||||
@ -531,7 +533,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
||||
$desc .= ' '.$langs->trans("ModulesDesc2", '{picto2}');
|
||||
$desc = str_replace('{picto}', img_picto('', 'switch_off', 'class="size15x"'), $desc);
|
||||
$desc = str_replace('{picto2}', img_picto('', 'setup', 'class="size15x"'), $desc);
|
||||
if (!count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) { // If only minimal initial modules enabled
|
||||
if ($nbmodulesnotautoenabled <= getDolGlobalInt('MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING', 1)) { // If only minimal initial modules enabled
|
||||
$deschelp = '<div class="info hideonsmartphone">'.$desc."<br></div><br>\n";
|
||||
}
|
||||
}
|
||||
@ -545,7 +547,7 @@ if ($mode == 'develop') {
|
||||
$deschelp = '<div class="info hideonsmartphone">'.$langs->trans("ModulesDevelopDesc")."<br></div><br>\n";
|
||||
}
|
||||
|
||||
$head = modules_prepare_head($nbofactivatedmodules, count($modules));
|
||||
$head = modules_prepare_head($nbofactivatedmodules, count($modules), $nbmodulesnotautoenabled);
|
||||
|
||||
|
||||
if ($mode == 'common' || $mode == 'commonkanban') {
|
||||
@ -580,8 +582,6 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
||||
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', ($mode == 'commonkanban' ? 2 : 1), array('morecss'=>'reposition'));
|
||||
$moreforfilter .= '</li></ul></div>';
|
||||
|
||||
//$moreforfilter .= '<div class="floatright center marginrightonly hideonsmartphone" style="padding-top: 3px"><span class="paddingright">'.$moreinfo.'</span> '.$moreinfo2.'</div>';
|
||||
|
||||
$moreforfilter .= '<div class="divfilteralone colorbacktimesheet float valignmiddle">';
|
||||
$moreforfilter .= '<div class="divsearchfield paddingtop paddingbottom valignmiddle inline-block">';
|
||||
$moreforfilter .= img_picto($langs->trans("Filter"), 'filter', 'class="paddingright opacityhigh hideonsmartphone"').'<input type="text" id="search_keyword" name="search_keyword" class="maxwidth125" value="'.dol_escape_htmltag($search_keyword).'" placeholder="'.dol_escape_htmltag($langs->trans('Keyword')).'">';
|
||||
@ -759,7 +759,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
||||
print load_fiche_titre($familytext, '', '', 0, '', 'modulefamilygroup');
|
||||
|
||||
if ($mode == 'commonkanban') {
|
||||
print '<div class="box-flex-container">';
|
||||
print '<div class="box-flex-container kanban">';
|
||||
} else {
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste" summary="list_of_modules">'."\n";
|
||||
@ -796,9 +796,9 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
||||
if ($objMod->isCoreOrExternalModule() == 'external'
|
||||
&& (
|
||||
$action == 'checklastversion'
|
||||
// This is a bad practice to activate a synch external access during building of a page. 1 external module can hang the application.
|
||||
// Adding a cron job could be a good idea see DolibarrModules::checkForUpdate()
|
||||
|| !empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)
|
||||
// This is a bad practice to activate a check on an external access during the building of the admin page. 1 external module can hang the application.
|
||||
// Adding a cron job could be a good idea: see DolibarrModules::checkForUpdate()
|
||||
|| !empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)
|
||||
)
|
||||
) {
|
||||
$checkRes = $objMod->checkForUpdate();
|
||||
@ -1099,7 +1099,7 @@ if ($mode == 'marketplace') {
|
||||
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">';
|
||||
|
||||
print '<form method="POST" class="centpercent" id="searchFormList" action="'.urlencode($dolistore->url).'">';
|
||||
print '<form method="POST" class="centpercent" id="searchFormList" action="'.$dolistore->url.'">';
|
||||
?>
|
||||
<input type="hidden" name="token" value="<?php echo newToken(); ?>">
|
||||
<input type="hidden" name="mode" value="marketplace">
|
||||
|
||||
@ -95,6 +95,11 @@ if ($action == 'update') {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
if (GETPOSTISSET($constvalue.'_TENANT')) {
|
||||
if (!dolibarr_set_const($db, $constvalue.'_TENANT', GETPOST($constvalue.'_TENANT'), 'chaine', 0, '', $conf->entity)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
if (GETPOSTISSET($constvalue.'_SCOPE')) {
|
||||
if (is_array(GETPOST($constvalue.'_SCOPE'))) {
|
||||
$scopestring = implode(',', GETPOST($constvalue.'_SCOPE'));
|
||||
@ -171,6 +176,8 @@ if ($action == 'confirm_delete') {
|
||||
$callbacktodel .= '/core/modules/oauth/stripelive_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
|
||||
} elseif ($label == 'OAUTH_STRIPE_TEST') {
|
||||
$callbacktodel .= '/core/modules/oauth/stripetest_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
|
||||
} elseif ($label == 'OAUTH_MICROSOFT') {
|
||||
$callbacktodel .= '/core/modules/oauth/microsoft_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
|
||||
} elseif ($label == 'OAUTH_OTHER') {
|
||||
$callbacktodel .= '/core/modules/oauth/generic_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
|
||||
}
|
||||
@ -285,8 +292,10 @@ if (count($listinsetup) > 0) {
|
||||
$keyforsupportedoauth2array = preg_replace('/^OAUTH_/', '', $keyforsupportedoauth2array);
|
||||
$keyforsupportedoauth2array = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array);
|
||||
if (preg_match('/^.*-/', $keyforsupportedoauth2array)) {
|
||||
$keybeforeprovider = preg_replace('/-.*$/', '', $keyforsupportedoauth2array);
|
||||
$keyforprovider = preg_replace('/^.*-/', '', $keyforsupportedoauth2array);
|
||||
} else {
|
||||
$keybeforeprovider = $keyforsupportedoauth2array;
|
||||
$keyforprovider = '';
|
||||
}
|
||||
$keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array);
|
||||
@ -385,6 +394,16 @@ if (count($listinsetup) > 0) {
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Tenant
|
||||
if ($keybeforeprovider == 'MICROSOFT') {
|
||||
print '<tr class="oddeven value">';
|
||||
print '<td><label for="'.$key[2].'">'.$langs->trans("OAUTH_TENANT").'</label></td>';
|
||||
print '<td><input type="text" size="100" id="OAUTH_'.$keybeforeprovider.($keyforprovider ? '-'.$keyforprovider : '').'_TENANT" name="OAUTH_'.$keybeforeprovider.($keyforprovider ? '-'.$keyforprovider : '').'_TENANT" value="'.getDolGlobalString('OAUTH_'.$keybeforeprovider.($keyforprovider ? '-'.$keyforprovider : '').'_TENANT').'">';
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// TODO Move this into token generation ?
|
||||
if ($supported) {
|
||||
if ($keyforsupportedoauth2array == 'OAUTH_OTHER_NAME') {
|
||||
@ -434,7 +453,7 @@ if (count($listinsetup) > 0) {
|
||||
|
||||
print '</div>';
|
||||
|
||||
print $form->buttonsSaveCancel("Modify", '');
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
@ -162,8 +162,10 @@ if ($mode == 'setup' && $user->admin) {
|
||||
$keyforsupportedoauth2array = preg_replace('/^OAUTH_/', '', $keyforsupportedoauth2array);
|
||||
$keyforsupportedoauth2array = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array);
|
||||
if (preg_match('/^.*-/', $keyforsupportedoauth2array)) {
|
||||
$keybeforeprovider = preg_replace('/-.*$/', '', $keyforsupportedoauth2array);
|
||||
$keyforprovider = preg_replace('/^.*-/', '', $keyforsupportedoauth2array);
|
||||
} else {
|
||||
$keybeforeprovider = $keyforsupportedoauth2array;
|
||||
$keyforprovider = '';
|
||||
}
|
||||
$keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array);
|
||||
@ -179,13 +181,12 @@ if ($mode == 'setup' && $user->admin) {
|
||||
$state = $shortscope; // TODO USe a better state
|
||||
|
||||
// Define $urltorenew, $urltodelete, $urltocheckperms
|
||||
// TODO Use array $supportedoauth2array
|
||||
if ($keyforsupportedoauth2array == 'OAUTH_GITHUB_NAME') {
|
||||
// List of keys that will be converted into scopes (from constants 'SCOPE_state_in_uppercase' in file of service).
|
||||
// We pass this param list in to 'state' because we need it before and after the redirect.
|
||||
|
||||
// Note: github does not accept csrf key inside the state parameter (only known values)
|
||||
$urltorenew = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||
$urltorenew = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode($shortscope).'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||
$urltodelete = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||
$urltocheckperms = 'https://github.com/settings/applications/';
|
||||
} elseif ($keyforsupportedoauth2array == 'OAUTH_GOOGLE_NAME') {
|
||||
@ -195,17 +196,9 @@ if ($mode == 'setup' && $user->admin) {
|
||||
$urltorenew = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode($state).'-'.$oauthstateanticsrf.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||
$urltodelete = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||
$urltocheckperms = 'https://security.google.com/settings/security/permissions';
|
||||
} elseif ($keyforsupportedoauth2array == 'OAUTH_STRIPE_TEST_NAME') {
|
||||
$urltorenew = $urlwithroot.'/core/modules/oauth/stripetest_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode($state).'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||
$urltodelete = '';
|
||||
$urltocheckperms = '';
|
||||
} elseif ($keyforsupportedoauth2array == 'OAUTH_STRIPE_LIVE_NAME') {
|
||||
$urltorenew = $urlwithroot.'/core/modules/oauth/stripelive_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode($state).'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||
$urltodelete = '';
|
||||
$urltocheckperms = '';
|
||||
} elseif ($keyforsupportedoauth2array = 'OAUTH_OTHER_NAME') {
|
||||
$urltorenew = $urlwithroot.'/core/modules/oauth/generic_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode($state).'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||
$urltodelete = '';
|
||||
} elseif (!empty($supportedoauth2array[$keyforsupportedoauth2array]['returnurl'])) {
|
||||
$urltorenew = $urlwithroot.$supportedoauth2array[$keyforsupportedoauth2array]['returnurl'].'?shortscope='.urlencode($shortscope).'&state='.urlencode($state).'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||
$urltodelete = $urlwithroot.$supportedoauth2array[$keyforsupportedoauth2array]['returnurl'].'?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||
$urltocheckperms = '';
|
||||
} else {
|
||||
$urltorenew = '';
|
||||
@ -220,17 +213,22 @@ if ($mode == 'setup' && $user->admin) {
|
||||
$urltodelete .= '&keyforprovider='.urlencode($keyforprovider);
|
||||
}
|
||||
|
||||
|
||||
// Show value of token
|
||||
$tokenobj = null;
|
||||
// Token
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||
// Dolibarr storage
|
||||
$storage = new DoliStorage($db, $conf);
|
||||
$storage = new DoliStorage($db, $conf, $keyforprovider);
|
||||
try {
|
||||
// $OAUTH_SERVICENAME is for example 'Google-keyforprovider'
|
||||
print '<!-- '.$OAUTH_SERVICENAME.' -->'."\n";
|
||||
$tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME);
|
||||
//print $storage->token.'<br>';
|
||||
//print $tokenobj->getExtraParams()['id_token'].'<br>';
|
||||
//print $tokenobj->getAccessToken().'<br>';
|
||||
} catch (Exception $e) {
|
||||
// Return an error if token not found
|
||||
//print $e->getMessage();
|
||||
}
|
||||
|
||||
// Set other properties
|
||||
@ -321,7 +319,11 @@ if ($mode == 'setup' && $user->admin) {
|
||||
// Links to delete/checks token
|
||||
if (is_object($tokenobj)) {
|
||||
//test on $storage->hasAccessToken($OAUTH_SERVICENAME) ?
|
||||
print '<a class="button smallpaddingimp" href="'.$urltodelete.'">'.$langs->trans('DeleteAccess').'</a><br>';
|
||||
if ($urltodelete) {
|
||||
print '<a class="button smallpaddingimp" href="'.$urltodelete.'">'.$langs->trans('DeleteAccess').'</a><br>';
|
||||
} else {
|
||||
print '<span class="opacitymedium">'.$langs->trans('GoOnTokenProviderToDeleteToken').'</span><br>';
|
||||
}
|
||||
}
|
||||
// Request remote token
|
||||
if ($urltorenew) {
|
||||
@ -343,7 +345,6 @@ if ($mode == 'setup' && $user->admin) {
|
||||
print '<td colspan="2">';
|
||||
|
||||
if (is_object($tokenobj)) {
|
||||
//var_dump($tokenobj);
|
||||
$tokentoshow = $tokenobj->getAccessToken();
|
||||
print '<span class="" title="'.dol_escape_htmltag($tokentoshow).'">'.showValueWithClipboardCPButton($tokentoshow, 1, dol_trunc($tokentoshow, 32)).'</span><br>';
|
||||
//print 'Refresh: '.$tokenobj->getRefreshToken().'<br>';
|
||||
|
||||
@ -32,10 +32,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('users', 'admin', 'other'));
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$sortfield = GETPOST('sortfield', 'aZ09');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09');
|
||||
@ -48,6 +44,12 @@ if (empty($sortorder)) {
|
||||
|
||||
$upload_dir = $conf->admin->dir_temp;
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$error = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -65,12 +67,36 @@ if ($action == 'updateform') {
|
||||
$antivircommand = dol_string_nospecial($antivircommand, '', array("|", ";", "<", ">", "&")); // Sanitize command
|
||||
$antivirparam = dol_string_nospecial($antivirparam, '', array("|", ";", "<", ">", "&")); // Sanitize params
|
||||
|
||||
$res3 = dolibarr_set_const($db, 'MAIN_UPLOAD_DOC', GETPOST('MAIN_UPLOAD_DOC', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res4 = dolibarr_set_const($db, "MAIN_UMASK", GETPOST('MAIN_UMASK', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res5 = dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", trim($antivircommand), 'chaine', 0, '', $conf->entity);
|
||||
$res6 = dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", trim($antivirparam), 'chaine', 0, '', $conf->entity);
|
||||
if ($res3 && $res4 && $res5 && $res6) {
|
||||
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
||||
if ($antivircommand && !empty($dolibarr_main_restrict_os_commands)) {
|
||||
$arrayofallowedcommand = explode(',', $dolibarr_main_restrict_os_commands);
|
||||
$arrayofallowedcommand = array_map('trim', $arrayofallowedcommand);
|
||||
dol_syslog("Command are restricted to ".$dolibarr_main_restrict_os_commands.". We check that one of this command is inside ".$antivircommand);
|
||||
$basenamecmddump = basename(str_replace('\\', '/', $antivircommand));
|
||||
if (!in_array($basenamecmddump, $arrayofallowedcommand)) { // the provided command $cmddump must be an allowed command
|
||||
$errormsg = $langs->trans('CommandIsNotInsideAllowedCommands');
|
||||
setEventMessages($errormsg, null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$tmpumask = GETPOST('MAIN_UMASK', 'alpha');
|
||||
$tmpumask = (octdec($tmpumask) & 0666);
|
||||
$tmpumask = decoct($tmpumask);
|
||||
if (!preg_match('/^0/', $tmpumask)) {
|
||||
$tmpumask = '0'.$tmpumask;
|
||||
}
|
||||
if (empty($tmpumask) || $tmpumask === '0') {
|
||||
$tmpumask = '0664';
|
||||
}
|
||||
|
||||
$res3 = dolibarr_set_const($db, 'MAIN_UPLOAD_DOC', GETPOST('MAIN_UPLOAD_DOC', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res4 = dolibarr_set_const($db, "MAIN_UMASK", $tmpumask, 'chaine', 0, '', $conf->entity);
|
||||
$res5 = dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", trim($antivircommand), 'chaine', 0, '', $conf->entity);
|
||||
$res6 = dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", trim($antivirparam), 'chaine', 0, '', $conf->entity);
|
||||
if ($res3 && $res4 && $res5 && $res6) {
|
||||
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
} elseif ($action == 'deletefile') {
|
||||
// Delete file
|
||||
@ -160,7 +186,7 @@ if (ini_get('safe_mode') && !empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) {
|
||||
dol_syslog("safe_mode is on, basedir is ".$basedir.", safe_mode_exec_dir is ".ini_get('safe_mode_exec_dir'), LOG_WARNING);
|
||||
}
|
||||
}
|
||||
print '<input type="text" '.((defined('MAIN_ANTIVIRUS_COMMAND') && !defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) ? 'disabled ' : '').'name="MAIN_ANTIVIRUS_COMMAND" class="minwidth500imp" value="'.(!empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ?dol_escape_htmltag($conf->global->MAIN_ANTIVIRUS_COMMAND) : '').'">';
|
||||
print '<input type="text" '.((defined('MAIN_ANTIVIRUS_COMMAND') && !defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) ? 'disabled ' : '').'name="MAIN_ANTIVIRUS_COMMAND" class="minwidth500imp" value="'.dol_escape_htmltag(GETPOSTISSET('MAIN_ANTIVIRUS_COMMAND') ? GETPOST('MAIN_ANTIVIRUS_COMMAND') : getDolGlobalString('MAIN_ANTIVIRUS_COMMAND')).'">';
|
||||
if (defined('MAIN_ANTIVIRUS_COMMAND') && !defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) {
|
||||
print '<br><span class="opacitymedium">'.$langs->trans("ValueIsForcedBySystem").'</span>';
|
||||
}
|
||||
|
||||
@ -82,14 +82,14 @@ print '<br>';
|
||||
// Module log
|
||||
print '<br>';
|
||||
print '<strong>'.$langs->trans("Syslog").'</strong>: ';
|
||||
$test = empty($conf->syslog->enabled);
|
||||
$test = !isModEnabled('syslog');
|
||||
if ($test) {
|
||||
print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' <span class="opacitymedium">'.$langs->trans("NotSlowedDownByThis").'</span>';
|
||||
} else {
|
||||
if ($conf->global->SYSLOG_LEVEL > LOG_NOTICE) {
|
||||
if (getDolGlobalInt('SYSLOG_LEVEL') > LOG_NOTICE) {
|
||||
print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedWithTooHighLogLevel", $langs->transnoentities("Syslog"));
|
||||
} else {
|
||||
print img_picto('', 'tick.png').' '.$langs->trans("ModuleSyslogActivatedButLevelNotTooVerbose", $langs->transnoentities("Syslog"), $conf->global->SYSLOG_LEVEL);
|
||||
print img_picto('', 'tick.png').' '.$langs->trans("ModuleSyslogActivatedButLevelNotTooVerbose", $langs->transnoentities("Syslog"), getDolGlobalInt('SYSLOG_LEVEL'));
|
||||
}
|
||||
//print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
|
||||
}
|
||||
|
||||
@ -453,14 +453,14 @@ print load_fiche_titre($langs->trans("Modules"), '', 'folder');
|
||||
|
||||
// Module log
|
||||
print '<strong>'.$langs->trans("Syslog").'</strong>: ';
|
||||
$test = empty($conf->syslog->enabled);
|
||||
$test = !isModEnabled('syslog');
|
||||
if ($test) {
|
||||
print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotRiskOfLeakWithThis");
|
||||
} else {
|
||||
if ($conf->global->SYSLOG_LEVEL > LOG_NOTICE) {
|
||||
if (getDolGlobalInt('SYSLOG_LEVEL') > LOG_NOTICE) {
|
||||
print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedWithTooHighLogLevel", $langs->transnoentities("Syslog"));
|
||||
} else {
|
||||
print img_picto('', 'tick.png').' '.$langs->trans("ModuleSyslogActivatedButLevelNotTooVerbose", $langs->transnoentities("Syslog"), $conf->global->SYSLOG_LEVEL);
|
||||
print img_picto('', 'tick.png').' '.$langs->trans("ModuleSyslogActivatedButLevelNotTooVerbose", $langs->transnoentities("Syslog"), getDolGlobalInt('SYSLOG_LEVEL'));
|
||||
}
|
||||
//print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
|
||||
}
|
||||
@ -565,6 +565,9 @@ if ($execmethod == 2) {
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
print '<strong>MAIN_SECURITY_MAXFILESIZE_DOWNLOADED</strong> = '.getDolGlobalString('MAIN_SECURITY_MAXFILESIZE_DOWNLOADED', '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 100000000)</span>')."<br>";
|
||||
print '<br>';
|
||||
|
||||
print '<strong>MAIN_RESTRICTHTML_ONLY_VALID_HTML</strong> = '.getDolGlobalString('MAIN_RESTRICTHTML_ONLY_VALID_HTML', '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)</span>')."<br>";
|
||||
print '<br>';
|
||||
|
||||
@ -574,14 +577,18 @@ print '<br>';
|
||||
print '<strong>MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL</strong> = '.getDolGlobalString('MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL', '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 0)</span>')."<br>";
|
||||
print '<br>';
|
||||
|
||||
print '<strong>MAIN_SECURITY_FORCECSP</strong> = '.getDolGlobalString('MAIN_SECURITY_FORCECSP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Example").": \"frame-ancestors 'self'; default-src 'self'; img-src *;\")</span><br>";
|
||||
print '<strong>MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED</strong> = '.getDolGlobalString('MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED', '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 0)</span>')."<br>";
|
||||
print '<br>';
|
||||
|
||||
print '<strong>MAIN_SECURITY_FORCECSP</strong> = '.getDolGlobalString('MAIN_SECURITY_FORCECSP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Example").": \"frame-ancestors 'self'; default-src *; img-src * data:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';\")</span><br>";
|
||||
print '<br>';
|
||||
|
||||
print '<strong>MAIN_SECURITY_FORCERP</strong> = '.getDolGlobalString('MAIN_SECURITY_FORCERP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or")." \"same-origin\" so browser doesn't send any referrer when going into another web site domain)</span><br>";
|
||||
print '<br>';
|
||||
|
||||
print '<strong>WEBSITE_MAIN_SECURITY_FORCECSP</strong> = '.getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCECSP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>');
|
||||
print ' <span class="opacitymedium">('.$langs->trans("Example").": \"frame-ancestors 'self'; default-src 'self'; style-src https://cdnjs.cloudflare.com https://fonts.googleapis.com; script-src https://cdn.transifex.com https://www.googletagmanager.com; object-src https://youtube.com; frame-src https://youtube.com; img-src *;\")</span><br>";
|
||||
print ' <span class="opacitymedium">('.$langs->trans("Example").": \"frame-ancestors 'self'; default-src 'self' 'unsafe-inline'; style-src https://cdnjs.cloudflare.com https://fonts.googleapis.com 'unsafe-inline'; script-src https://cdn.transifex.com https://www.googletagmanager.com 'unsafe-inline'; object-src https://youtube.com; frame-src https://youtube.com; img-src * data:;\")</span><br>";
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<strong>WEBSITE_MAIN_SECURITY_FORCERP</strong> = '.getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCERP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or")." \"strict-origin-when-cross-origin\")</span><br>";
|
||||
|
||||
@ -169,7 +169,7 @@ print '<td class="liste_titre">';
|
||||
print $langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b><br>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr class="oddeven nohover"><td style="class="nohover">';
|
||||
print '<tr class="oddeven nohover"><td class="nohover">';
|
||||
|
||||
print '<table class="centpercent noborderbottom">';
|
||||
|
||||
@ -202,45 +202,53 @@ print '</tr>';
|
||||
print '<tr>';
|
||||
print '<td class="tdtop nopaddingleftimp">';
|
||||
|
||||
print '<div class="centpercent center"><a id="lnk" href="javascript:hideoptions()"> '.$langs->trans("ShowAdvancedOptions").'...</a></div>';
|
||||
print '<div class="centpercent center margintoponly marginbottomonly">';
|
||||
print img_picto('', 'setup', 'class="pictofixedwidth"').'<a id="lnk">'.$langs->trans("ShowAdvancedOptions").'...</a>';
|
||||
print '</div>';
|
||||
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#lnk").click(function() {
|
||||
console.log("We click on link");
|
||||
hideoptions(this);
|
||||
});
|
||||
});
|
||||
|
||||
function hideoptions(){
|
||||
const lnk = document.getElementById("lnk");
|
||||
function hideoptions(domelem) {
|
||||
const div = document.getElementById("div_container_sub_exportoptions");
|
||||
|
||||
if (div.style.display === "none") {
|
||||
div.style.display = "block";
|
||||
lnk.innerText="'.dol_escape_js($langs->transnoentitiesnoconv("HideAdvancedoptions")).'";
|
||||
domelem.innerText="'.dol_escape_js($langs->transnoentitiesnoconv("HideAdvancedoptions")).'";
|
||||
} else {
|
||||
div.style.display = "none";
|
||||
lnk.innerText="'.dol_escape_js($langs->transnoentitiesnoconv("ShowAdvancedOptions")).'...";
|
||||
domelem.innerText="'.dol_escape_js($langs->transnoentitiesnoconv("ShowAdvancedOptions")).'...";
|
||||
}
|
||||
}
|
||||
</script>';
|
||||
|
||||
|
||||
print '<div id="div_container_sub_exportoptions" style="display: none;">';
|
||||
print '<br>';
|
||||
|
||||
if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
print "<!-- Fieldset mysqldump -->\n";
|
||||
print '<fieldset id="mysql_options"><legend>'.$langs->trans("MySqlExportParameters").'</legend>';
|
||||
print '<fieldset id="mysql_options">';
|
||||
|
||||
print '<div class="formelementrow">'.$langs->trans("FullPathToMysqldumpCommand");
|
||||
print '<fieldset class="formelementrow"><legend>'.$langs->trans("FullPathToMysqldumpCommand").'</legend>';
|
||||
if (empty($conf->global->SYSTEMTOOLS_MYSQLDUMP)) {
|
||||
$fullpathofmysqldump = $db->getPathOfDump();
|
||||
} else {
|
||||
$fullpathofmysqldump = $conf->global->SYSTEMTOOLS_MYSQLDUMP;
|
||||
}
|
||||
print '<br>';
|
||||
print '<input type="text" name="mysqldump" style="width: 80%" value="'.$fullpathofmysqldump.'" /></div>';
|
||||
print '<input type="text" name="mysqldump" style="width: 80%" value="'.$fullpathofmysqldump.'">';
|
||||
print '</fieldset>';
|
||||
|
||||
print '<br>';
|
||||
print '<fieldset><legend>'.$langs->trans("ExportOptions").'</legend>';
|
||||
|
||||
if (!empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) {
|
||||
print '<div class="formelementrow">';
|
||||
print '<input type="checkbox" name="disable_fk" value="yes" id="checkbox_disable_fk" checked />';
|
||||
print '<input type="checkbox" name="disable_fk" value="yes" id="checkbox_disable_fk" checked>';
|
||||
print '<label for="checkbox_disable_fk">'.$langs->trans("CommandsToDisableForeignKeysForImport").' '.img_info($langs->trans('CommandsToDisableForeignKeysForImportWarning')).'</label>';
|
||||
print '</div>';
|
||||
}
|
||||
@ -261,7 +269,7 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
print '<br><br>';
|
||||
|
||||
print '<div class="formelementrow">';
|
||||
print '<input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" checked="checked" />';
|
||||
print '<input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" checked="checked">';
|
||||
print '<label for="checkbox_use_transaction">'.$langs->trans("UseTransactionnalMode").'</label>';
|
||||
print '</div>';
|
||||
|
||||
@ -340,16 +348,19 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
|
||||
print '</fieldset>';
|
||||
print '</fieldset>';
|
||||
|
||||
// Export mysql bin
|
||||
print "<!-- Fieldset mysql_nobin -->\n";
|
||||
print '<fieldset id="mysql_nobin_options">';
|
||||
print '<legend>'.$langs->trans("MySqlExportParameters").'</legend>';
|
||||
|
||||
print '<fieldset>';
|
||||
print '<legend>'.$langs->trans("ExportOptions").'</legend>';
|
||||
|
||||
print '<div class="formelementrow">';
|
||||
print '<input type="checkbox" name="nobin_use_transaction" value="yes" id="checkbox_use_transaction" />';
|
||||
print '<label for="checkbox_use_transaction">'.$langs->trans("UseTransactionnalMode").'</label>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
if (!empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) {
|
||||
print '<div class="formelementrow">';
|
||||
print '<input type="checkbox" name="nobin_disable_fk" value="yes" id="checkbox_disable_fk" checked />';
|
||||
@ -391,16 +402,18 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
|
||||
if (in_array($type, array('pgsql'))) {
|
||||
print "<!-- Fieldset pg_dump -->\n";
|
||||
print '<fieldset id="postgresql_options"><legend>'.$langs->trans("PostgreSqlExportParameters").'</legend>';
|
||||
print '<fieldset id="postgresql_options">';
|
||||
|
||||
print '<div class="formelementrow">'.$langs->trans("FullPathToPostgreSQLdumpCommand");
|
||||
|
||||
print '<fieldset class="formelementrow"><legend>'.$langs->trans("FullPathToPostgreSQLdumpCommand").'</legend>';
|
||||
if (empty($conf->global->SYSTEMTOOLS_POSTGRESQLDUMP)) {
|
||||
$fullpathofpgdump = $db->getPathOfDump();
|
||||
} else {
|
||||
$fullpathofpgdump = $conf->global->SYSTEMTOOLS_POSTGRESQLDUMP;
|
||||
}
|
||||
print '<br>';
|
||||
print '<input type="text" name="postgresqldump" style="width: 80%" value="'.$fullpathofpgdump.'" /></div>';
|
||||
print '<input type="text" name="postgresqldump" style="width: 80%" value="'.$fullpathofpgdump.'" />';
|
||||
print '</fieldset>';
|
||||
|
||||
print '<br>';
|
||||
print '<fieldset>';
|
||||
@ -446,7 +459,7 @@ print '</table>';
|
||||
print '<!--<fieldset>';
|
||||
print '<legend>'.$langs->trans("Destination").'</legend> -->';
|
||||
print '<br>';
|
||||
print '<label for="filename_template" class="line-height-large">'.$langs->trans("FileNameToGenerate").'</label>';
|
||||
print '<label for="filename_template" class="line-height-large opacitymedium">'.$langs->trans("FileNameToGenerate").'</label>';
|
||||
print '<br>';
|
||||
$prefix = 'dump';
|
||||
$ext = '.sql';
|
||||
@ -614,7 +627,7 @@ print '<div id="backupfilesleft" class="fichehalfleft">';
|
||||
|
||||
print load_fiche_titre($title);
|
||||
|
||||
print '<label for="zipfilename_template" class="line-height-large paddingbottom">'.$langs->trans("FileNameToGenerate").'</label><br>';
|
||||
print '<label for="zipfilename_template" class="line-height-large paddingbottom opacitymedium">'.$langs->trans("FileNameToGenerate").'</label><br>';
|
||||
$prefix = 'documents';
|
||||
$ext = 'zip';
|
||||
$file = $prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.dol_print_date(dol_now('gmt'), "dayhourlogsmall", 'tzuser');
|
||||
|
||||
@ -123,8 +123,9 @@ if ($what == 'mysql') {
|
||||
|
||||
if (!empty($dolibarr_main_restrict_os_commands)) {
|
||||
$arrayofallowedcommand = explode(',', $dolibarr_main_restrict_os_commands);
|
||||
$arrayofallowedcommand = array_map('trim', $arrayofallowedcommand);
|
||||
dol_syslog("Command are restricted to ".$dolibarr_main_restrict_os_commands.". We check that one of this command is inside ".$cmddump);
|
||||
$basenamecmddump = basename($cmddump);
|
||||
$basenamecmddump = basename(str_replace('\\', '/', $cmddump));
|
||||
if (!in_array($basenamecmddump, $arrayofallowedcommand)) { // the provided command $cmddump must be an allowed command
|
||||
$errormsg = $langs->trans('CommandIsNotInsideAllowedCommands');
|
||||
}
|
||||
@ -160,8 +161,9 @@ if ($what == 'postgresql') {
|
||||
if (!empty($dolibarr_main_restrict_os_commands))
|
||||
{
|
||||
$arrayofallowedcommand=explode(',', $dolibarr_main_restrict_os_commands);
|
||||
$arrayofallowedcommand = array_map('trim', $arrayofallowedcommand);
|
||||
dol_syslog("Command are restricted to ".$dolibarr_main_restrict_os_commands.". We check that one of this command is inside ".$cmddump);
|
||||
$basenamecmddump=basename($cmddump);
|
||||
$basenamecmddump = basename(str_replace('\\', '/', $cmddump));
|
||||
if (! in_array($basenamecmddump, $arrayofallowedcommand)) // the provided command $cmddump must be an allowed command
|
||||
{
|
||||
$errormsg=$langs->trans('CommandIsNotInsideAllowedCommands');
|
||||
|
||||
@ -38,8 +38,8 @@ $nbsecondsold = GETPOSTINT('nbsecondsold');
|
||||
|
||||
// Define filelog to discard it from purge
|
||||
$filelog = '';
|
||||
if (!empty($conf->syslog->enabled)) {
|
||||
$filelog = $conf->global->SYSLOG_FILE;
|
||||
if (isModEnabled('syslog')) {
|
||||
$filelog = getDolGlobalString('SYSLOG_FILE');
|
||||
$filelog = preg_replace('/DOL_DATA_ROOT/i', DOL_DATA_ROOT, $filelog);
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ print '<table class="border centpercent">';
|
||||
|
||||
print '<tr class="border"><td style="padding: 4px">';
|
||||
|
||||
if (!empty($conf->syslog->enabled)) {
|
||||
if (isModEnabled('syslog')) {
|
||||
print '<input type="radio" name="choice" id="choicelogfile" value="logfile"';
|
||||
print ($choice && $choice == 'logfile') ? ' checked' : '';
|
||||
$filelogparam = $filelog;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2022 SuperAdmin <test@dolibarr.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -23,39 +22,7 @@
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
$res = 0;
|
||||
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
|
||||
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) {
|
||||
$res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
|
||||
}
|
||||
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
|
||||
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
|
||||
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
|
||||
$i--; $j--;
|
||||
}
|
||||
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) {
|
||||
$res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
|
||||
}
|
||||
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) {
|
||||
$res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
|
||||
}
|
||||
// Try main.inc.php using relative path
|
||||
if (!$res && file_exists("../main.inc.php")) {
|
||||
$res = @include "../main.inc.php";
|
||||
}
|
||||
if (!$res && file_exists("../../main.inc.php")) {
|
||||
$res = @include "../../main.inc.php";
|
||||
}
|
||||
if (!$res && file_exists("../../../main.inc.php")) {
|
||||
$res = @include "../../../main.inc.php";
|
||||
}
|
||||
if (!$res) {
|
||||
die("Include of main fails");
|
||||
}
|
||||
|
||||
global $langs, $user;
|
||||
|
||||
// Libraries
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT.'/webhook/lib/webhook.lib.php';
|
||||
|
||||
@ -80,65 +47,27 @@ $label = GETPOST('label', 'alpha');
|
||||
$scandir = GETPOST('scan_dir', 'alpha');
|
||||
$type = 'myobject';
|
||||
|
||||
$arrayofparameters = array(
|
||||
'WEBHOOK_MYPARAM1'=>array('type'=>'string', 'css'=>'minwidth500' ,'enabled'=>0),
|
||||
//'WEBHOOK_MYPARAM2'=>array('type'=>'textarea','enabled'=>1),
|
||||
//'WEBHOOK_MYPARAM3'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1),
|
||||
//'WEBHOOK_MYPARAM4'=>array('type'=>'emailtemplate:thirdparty', 'enabled'=>1),
|
||||
//'WEBHOOK_MYPARAM5'=>array('type'=>'yesno', 'enabled'=>1),
|
||||
//'WEBHOOK_MYPARAM5'=>array('type'=>'thirdparty_type', 'enabled'=>1),
|
||||
//'WEBHOOK_MYPARAM6'=>array('type'=>'securekey', 'enabled'=>1),
|
||||
//'WEBHOOK_MYPARAM7'=>array('type'=>'product', 'enabled'=>1),
|
||||
);
|
||||
|
||||
$error = 0;
|
||||
$setupnotempty = 0;
|
||||
|
||||
// Set this to 1 to use the factory to manage constants. Warning, the generated module will be compatible with version v15+ only
|
||||
$useFormSetup = 0;
|
||||
// Convert arrayofparameter into a formSetup object
|
||||
if ($useFormSetup && (float) DOL_VERSION >= 15) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsetup.class.php';
|
||||
$formSetup = new FormSetup($db);
|
||||
$useFormSetup = 1;
|
||||
|
||||
// you can use the param convertor
|
||||
$formSetup->addItemsFromParamsArray($arrayofparameters);
|
||||
|
||||
// or use the new system see exemple as follow (or use both because you can ;-) )
|
||||
|
||||
/*
|
||||
// Hôte
|
||||
$item = $formSetup->newItem('NO_PARAM_JUST_TEXT');
|
||||
$item->fieldOverride = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'];
|
||||
$item->cssClass = 'minwidth500';
|
||||
|
||||
// Setup conf WEBHOOK_MYPARAM1 as a simple string input
|
||||
$item = $formSetup->newItem('WEBHOOK_MYPARAM1');
|
||||
|
||||
// Setup conf WEBHOOK_MYPARAM1 as a simple textarea input but we replace the text of field title
|
||||
$item = $formSetup->newItem('WEBHOOK_MYPARAM2');
|
||||
$item->nameText = $item->getNameText().' more html text ';
|
||||
|
||||
// Setup conf WEBHOOK_MYPARAM3
|
||||
$item = $formSetup->newItem('WEBHOOK_MYPARAM3');
|
||||
$item->setAsThirdpartyType();
|
||||
|
||||
// Setup conf WEBHOOK_MYPARAM4 : exemple of quick define write style
|
||||
$formSetup->newItem('WEBHOOK_MYPARAM4')->setAsYesNo();
|
||||
|
||||
// Setup conf WEBHOOK_MYPARAM5
|
||||
$formSetup->newItem('WEBHOOK_MYPARAM5')->setAsEmailTemplate('thirdparty');
|
||||
|
||||
// Setup conf WEBHOOK_MYPARAM6
|
||||
$formSetup->newItem('WEBHOOK_MYPARAM6')->setAsSecureKey()->enabled = 0; // disabled
|
||||
|
||||
// Setup conf WEBHOOK_MYPARAM7
|
||||
$formSetup->newItem('WEBHOOK_MYPARAM7')->setAsProduct();
|
||||
*/
|
||||
|
||||
$setupnotempty = count($formSetup->items);
|
||||
if (!class_exists('FormSetup')) {
|
||||
// For retrocompatibility Dolibarr < 16.0
|
||||
if (floatval(DOL_VERSION) < 16.0 && !class_exists('FormSetup')) {
|
||||
require_once __DIR__.'/../backport/v16/core/class/html.formsetup.class.php';
|
||||
} else {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsetup.class.php';
|
||||
}
|
||||
}
|
||||
|
||||
$formSetup = new FormSetup($db);
|
||||
|
||||
|
||||
$setupnotempty = count($formSetup->items);
|
||||
|
||||
|
||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
@ -179,7 +108,7 @@ if ($action == 'updateMask') {
|
||||
$file = dol_buildpath($reldir."core/modules/webhook/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0);
|
||||
if (file_exists($file)) {
|
||||
$filefound = 1;
|
||||
$classname = "pdf_".$modele;
|
||||
$classname = "pdf_".$modele."_".strtolower($tmpobjectkey);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -190,7 +119,7 @@ if ($action == 'updateMask') {
|
||||
$module = new $classname($db);
|
||||
|
||||
if ($module->write_file($tmpobject, $langs) > 0) {
|
||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf");
|
||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=webhook-".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf");
|
||||
return;
|
||||
} else {
|
||||
setEventMessages($module->error, null, 'errors');
|
||||
@ -266,7 +195,7 @@ print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');
|
||||
|
||||
// Configuration header
|
||||
$head = webhookAdminPrepareHead();
|
||||
print dol_get_fiche_head($head, 'settings', $langs->trans($page_name), -1, "webhook@webhook");
|
||||
print dol_get_fiche_head($head, 'settings', $langs->trans($page_name), -1, "webhook");
|
||||
|
||||
// Setup page goes here
|
||||
echo '<span class="opacitymedium">'.$langs->trans("WebhookSetupPage").'</span><br><br>';
|
||||
|
||||
@ -43,10 +43,6 @@ $rowid = GETPOST('rowid', 'alpha');
|
||||
|
||||
$id = 1;
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$acts[0] = "activate";
|
||||
$acts[1] = "disable";
|
||||
$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off', 'class="size15x"');
|
||||
@ -125,6 +121,10 @@ $tabfieldcheck[1] = array();
|
||||
$elementList = array();
|
||||
$sourceList = array();
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -596,7 +596,9 @@ if ($id) {
|
||||
|
||||
print '<td colspan="7" class="right"><a name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"> </a>';
|
||||
print '<input type="submit" class="button button-edit small" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print ' <input type="submit" class="button button-cancel small" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button button-cancel small" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td>';
|
||||
} else {
|
||||
$tmpaction = 'view';
|
||||
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||
|
||||
@ -461,7 +461,7 @@ class Documents extends DolibarrApi
|
||||
} elseif ($modulepart == 'knowledgemanagement') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/knowledgemanagement/class/knowledgerecord.class.php';
|
||||
|
||||
if (!DolibarrApiAccess::$user->rights->knowledgemanagement->knowledgerecord->read && !DolibarrApiAccess::$user->rights->knowledgemanagement->knowledgerecord->read) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('knowledgemanagement', 'knowledgerecord', 'read') && !DolibarrApiAccess::$user->hasRight('knowledgemanagement', 'knowledgerecord', 'read')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
@ -746,7 +746,7 @@ class Documents extends DolibarrApi
|
||||
if ($fhandle) {
|
||||
$nbofbyteswrote = fwrite($fhandle, $newfilecontent);
|
||||
fclose($fhandle);
|
||||
@chmod($destfiletmp, octdec($conf->global->MAIN_UMASK));
|
||||
dolChmod($destfiletmp);
|
||||
} else {
|
||||
throw new RestException(500, "Failed to open file '".$destfiletmp."' for write");
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->asset->multidir_output[$object->entity] . "/" . $object->id;
|
||||
}
|
||||
|
||||
$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
if ($user->socid > 0) accessforbidden();
|
||||
|
||||
@ -48,6 +48,7 @@ if (GETPOST('actioncode', 'array')) {
|
||||
} else {
|
||||
$actioncode = GETPOST("actioncode", "alpha", 3) ? GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT'));
|
||||
}
|
||||
$search_rowid = GETPOST('search_rowid');
|
||||
$search_agenda_label = GETPOST('search_agenda_label');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
@ -81,7 +82,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->asset->multidir_output[$object->entity]."/".$object->id;
|
||||
}
|
||||
|
||||
$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
if ($user->socid > 0) accessforbidden();
|
||||
@ -125,7 +126,7 @@ $form = new Form($db);
|
||||
if ($object->id > 0) {
|
||||
$title = $langs->trans("Agenda");
|
||||
//if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
|
||||
$help_url = 'EN:Module_Agenda_En';
|
||||
$help_url = 'EN:Module_Agenda_En|DE:Modul_Terminplanung';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
if (isModEnabled('notification')) {
|
||||
@ -205,6 +206,7 @@ if ($object->id > 0) {
|
||||
// List of all actions
|
||||
$filters = array();
|
||||
$filters['search_agenda_label'] = $search_agenda_label;
|
||||
$filters['search_rowid'] = $search_rowid;
|
||||
|
||||
// TODO Replace this with same code than into list.php
|
||||
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module);
|
||||
|
||||
@ -69,11 +69,11 @@ if (empty($action) && empty($id) && empty($ref)) {
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
$permissiontoread = $user->rights->asset->read;
|
||||
$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->rights->asset->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissionnote = $user->rights->asset->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->rights->asset->write; // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoread = $user->hasRight('asset', 'read');
|
||||
$permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->hasRight('asset', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissionnote = $user->hasRight('asset', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->hasRight('asset', 'write'); // Used by the include of actions_dellink.inc.php
|
||||
$upload_dir = $conf->asset->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
@ -395,8 +395,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$relativepath = $objref.'/'.$objref.'.pdf';
|
||||
$filedir = $conf->asset->dir_output.'/'.$objref;
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed = $user->rights->asset->read; // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->rights->asset->write; // If you can create/edit, you can remove a file on card
|
||||
$genallowed = $user->hasRight('asset', 'read'); // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->hasRight('asset', 'write'); // If you can create/edit, you can remove a file on card
|
||||
print $formfile->showdocuments('asset:Asset', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
|
||||
}
|
||||
|
||||
|
||||
@ -157,6 +157,11 @@ class Asset extends CommonObject
|
||||
public $status;
|
||||
public $user_cloture_id;
|
||||
|
||||
/**
|
||||
* @var Asset object oldcopy
|
||||
*/
|
||||
public $oldcopy;
|
||||
|
||||
// /**
|
||||
// * @var string Field with ID of parent key if this object has a parent
|
||||
// */
|
||||
|
||||
@ -53,7 +53,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->asset->multidir_output[$object->entity] . "/" . $object->id;
|
||||
}
|
||||
|
||||
$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
if ($user->socid > 0) accessforbidden();
|
||||
|
||||
@ -51,8 +51,8 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->asset->multidir_output[$object->entity]."/".$object->id;
|
||||
}
|
||||
|
||||
$permissionnote = $user->rights->asset->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissionnote = $user->hasRight('asset', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
$permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
if ($user->socid > 0) accessforbidden();
|
||||
|
||||
@ -142,9 +142,9 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'asset';
|
||||
$permissiontoadd = $user->rights->asset->write;
|
||||
$permissiontoadd = $user->hasRight('asset', 'write');
|
||||
// $permissiontoadd = 1;
|
||||
$permtoedit = $user->rights->asset->write;
|
||||
$permtoedit = $user->hasRight('asset', 'write');
|
||||
// $permtoedit = 1;
|
||||
$param = '&id=' . $object->id;
|
||||
|
||||
|
||||
@ -120,9 +120,9 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||
$object->fields = dol_sort_array($object->fields, 'position');
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
$permissiontoread = $user->rights->asset->read;
|
||||
$permissiontoadd = $user->rights->asset->write;
|
||||
$permissiontodelete = $user->rights->asset->delete;
|
||||
$permissiontoread = $user->hasRight('asset', 'read');
|
||||
$permissiontoadd = $user->hasRight('asset', 'write');
|
||||
$permissiontodelete = $user->hasRight('asset', 'delete');
|
||||
|
||||
// Security check
|
||||
if (!isModEnabled('asset')) {
|
||||
|
||||
@ -48,7 +48,8 @@ if (GETPOST('actioncode', 'array')) {
|
||||
} else {
|
||||
$actioncode = GETPOST("actioncode", "alpha", 3) ? GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT'));
|
||||
}
|
||||
$search_agenda_label = GETPOST('search_agenda_label');
|
||||
//$search_rowid = GETPOST('search_rowid');
|
||||
//$search_agenda_label = GETPOST('search_agenda_label');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@ -127,7 +128,7 @@ $form = new Form($db);
|
||||
if ($object->id > 0) {
|
||||
$title = $langs->trans("Agenda");
|
||||
//if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
|
||||
$help_url = 'EN:Module_Agenda_En';
|
||||
$help_url = 'EN:Module_Agenda_En|DE:Modul_Terminplanung';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
if (isModEnabled('notification')) {
|
||||
@ -207,6 +208,7 @@ if ($object->id > 0) {
|
||||
// // List of all actions
|
||||
// $filters = array();
|
||||
// $filters['search_agenda_label'] = $search_agenda_label;
|
||||
// $filters['search_rowid'] = $search_rowid;
|
||||
//
|
||||
// // TODO Replace this with same code than into list.php
|
||||
// show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module);
|
||||
|
||||
@ -51,8 +51,8 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->asset->multidir_output[$object->entity]."/".$object->id;
|
||||
}
|
||||
|
||||
$permissionnote = $user->rights->asset->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissionnote = $user->hasRight('asset', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
$permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
if ($user->socid > 0) accessforbidden();
|
||||
|
||||
@ -116,6 +116,11 @@ if ($action == 'builddoc') {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BarcodeValue")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
$MAXLENGTH = 51200; // Limit set to 50Ko
|
||||
if (dol_strlen($forbarcode) > $MAXLENGTH) { // barcode value
|
||||
setEventMessages($langs->trans("ErrorFieldTooLong", $langs->transnoentitiesnoconv("BarcodeValue")).' ('.$langs->trans("RequireXStringMax", $MAXLENGTH).')', null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (empty($fk_barcode_type)) { // barcode type = barcode encoding
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BarcodeType")), null, 'errors');
|
||||
$error++;
|
||||
|
||||
@ -4,7 +4,7 @@ LOG INALTERABLE
|
||||
## Fonctionnalité
|
||||
|
||||
Ce module trace, en temps réel, certains évènements métiers dans une log inaltérable (que vous ne pouvez pas modifier une fois enregistrés) de type blockchain.
|
||||
Ce module est requis pour la compatibilité avec les exigences légales de certains pays (comme la France avec la loi Fincance 2016 - Norme NF535).
|
||||
Ce module est requis pour la compatibilité avec les exigences légales de certains pays (comme la France avec la loi Finance 2016 - Norme NF525).
|
||||
|
||||
|
||||
**Les évènements tracés de manière inaltérables sont:**
|
||||
|
||||
@ -4,7 +4,7 @@ BLOCKED LOG
|
||||
## Feature
|
||||
|
||||
This module tracks, in real time, some events into a non reversible log (that you can't modify once recorded) into a block chain.
|
||||
This module provides compatibility with requirements of laws of some countries (like France with the law Fincance 2016 - Norme NF535).
|
||||
This module provides compatibility with requirements of laws of some countries (like France with the law Finance 2016 - Norme NF525).
|
||||
|
||||
|
||||
**The tracked events are:**
|
||||
|
||||
@ -52,6 +52,7 @@ if (GETPOST('actioncode', 'array')) {
|
||||
$actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT'));
|
||||
}
|
||||
|
||||
$search_rowid = GETPOST('search_rowid');
|
||||
$search_agenda_label = GETPOST('search_agenda_label');
|
||||
|
||||
// Load variables for pagination
|
||||
@ -249,6 +250,7 @@ if ($object->id > 0) {
|
||||
// List of all actions
|
||||
$filters = array();
|
||||
$filters['search_agenda_label'] = $search_agenda_label;
|
||||
$filters['search_rowid'] = $search_rowid;
|
||||
|
||||
// TODO Replace this with same code than into list.php
|
||||
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder);
|
||||
|
||||
@ -87,10 +87,10 @@ $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
$result = restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft);
|
||||
|
||||
// Permissions
|
||||
$permissionnote = $user->rights->bom->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->rights->bom->write; // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoadd = $user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissionnote = $user->hasRight('bom', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->hasRight('bom', 'write'); // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoadd = $user->hasRight('bom', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->hasRight('bom', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$upload_dir = $conf->bom->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||
|
||||
|
||||
@ -768,8 +768,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$relativepath = $objref.'/'.$objref.'.pdf';
|
||||
$filedir = $conf->bom->dir_output.'/'.$objref;
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed = $user->rights->bom->read; // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->rights->bom->write; // If you can create/edit, you can remove a file on card
|
||||
$genallowed = $user->hasRight('bom', 'read'); // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->hasRight('bom', 'write'); // If you can create/edit, you can remove a file on card
|
||||
print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
|
||||
|
||||
// Show links to link elements
|
||||
|
||||
@ -85,7 +85,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft);
|
||||
|
||||
$permissiontoadd = $user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||
$permissiontoadd = $user->hasRight('bom', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||
|
||||
|
||||
/*
|
||||
@ -148,8 +148,8 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'bom';
|
||||
$permissiontoadd = $user->rights->bom->write;
|
||||
$permtoedit = $user->rights->bom->write;
|
||||
$permissiontoadd = $user->hasRight('bom', 'write');
|
||||
$permtoedit = $user->hasRight('bom', 'write');
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
//$relativepathwithnofile='bom/' . dol_sanitizeFileName($object->id).'/';
|
||||
|
||||
@ -121,9 +121,9 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||
$object->fields = dol_sort_array($object->fields, 'position');
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
$permissiontoread = $user->rights->bom->read;
|
||||
$permissiontoadd = $user->rights->bom->write;
|
||||
$permissiontodelete = $user->rights->bom->delete;
|
||||
$permissiontoread = $user->hasRight('bom', 'read');
|
||||
$permissiontoadd = $user->hasRight('bom', 'write');
|
||||
$permissiontodelete = $user->hasRight('bom', 'delete');
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0) {
|
||||
@ -175,8 +175,8 @@ if (empty($reshook)) {
|
||||
// Mass actions
|
||||
$objectclass = 'BOM';
|
||||
$objectlabel = 'BillOfMaterials';
|
||||
$permissiontoread = $user->rights->bom->read;
|
||||
$permissiontodelete = $user->rights->bom->delete;
|
||||
$permissiontoread = $user->hasRight('bom', 'read');
|
||||
$permissiontodelete = $user->hasRight('bom', 'delete');
|
||||
$uploaddir = $conf->bom->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
|
||||
@ -685,7 +685,7 @@ while ($i < $imaxinloop) {
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="'.$savnbfield.'">';
|
||||
print '<div class="box-flex-container">';
|
||||
print '<div class="box-flex-container kanban">';
|
||||
}
|
||||
// Output kanban
|
||||
print $object->getKanbanView('');
|
||||
|
||||
@ -84,10 +84,10 @@ $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
$result = restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft);
|
||||
|
||||
// Permissions
|
||||
$permissionnote = $user->rights->bom->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->rights->bom->write; // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoadd = $user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissionnote = $user->hasRight('bom', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->hasRight('bom', 'write'); // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoadd = $user->hasRight('bom', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->hasRight('bom', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$upload_dir = $conf->bom->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||
|
||||
|
||||
@ -214,22 +214,30 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<a id="hide_all" href="#">'.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").'</a> ';
|
||||
}
|
||||
print '</td>';
|
||||
if ($action == 'treeview') print '<td class="left">'.$langs->trans('ProducedBy').'</td>';
|
||||
print '<td class="linecolqty right">'.$langs->trans('Quantity').'</td>';
|
||||
print '<td class="linecolstock right">'.$form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1).'</td>';
|
||||
print '<td class="linecoltheoricalstock right">'.$form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc")).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</thead>';
|
||||
print '<tbody>';
|
||||
if (!empty($TChildBom)) {
|
||||
if ($action == 'treeview') {
|
||||
foreach ($TChildBom as $fk_bom => $TProduct) {
|
||||
$repeatChar = ' ';
|
||||
if (!empty($TProduct['bom'])) {
|
||||
$prod = new Product($db);
|
||||
$prod->fetch($TProduct['bom']->fk_product);
|
||||
if ($TProduct['parentid'] != $object->id) print '<tr class="sub_bom_lines oddeven" parentid="'.$TProduct['parentid'].'">';
|
||||
else print '<tr class="oddeven">';
|
||||
print '<td class="linecoldescription">'.str_repeat($repeatChar, $TProduct['level']).$TProduct['bom']->getNomUrl(1);
|
||||
if ($action == 'treeview') print '<td class="linecoldescription">'.str_repeat($repeatChar, $TProduct['level']).$prod->getNomUrl(1);
|
||||
else print '<td class="linecoldescription">'.str_repeat($repeatChar, $TProduct['level']).$TProduct['bom']->getNomUrl(1);
|
||||
print ' <a class="collapse_bom" id="collapse-'.$fk_bom.'" href="#">';
|
||||
print img_picto('', 'folder-open');
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
if ($action == 'treeview') print '<td class="left">'.$TProduct['bom']->getNomUrl(1).'</td>';
|
||||
print '<td class="linecolqty right">'.$TProduct['qty'].'</td>';
|
||||
print '<td class="linecolstock right"></td>';
|
||||
print '<td class="linecoltheoricalstock right"></td>';
|
||||
@ -244,6 +252,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
if ($fk_bom != $object->id) print '<tr class="sub_bom_lines oddeven" parentid="'.$fk_bom.'">';
|
||||
else print '<tr class="oddeven">';
|
||||
print '<td class="linecoldescription">'.str_repeat($repeatChar, $TInfos['level']).$prod->getNomUrl(1).'</td>';
|
||||
if ($action == 'treeview') print '<td></td>';
|
||||
print '<td class="linecolqty right">'.$TInfos['qty'].'</td>';
|
||||
print '<td class="linecolstock right">'.price2num($prod->stock_reel, 'MS').'</td>';
|
||||
print '<td class="linecoltheoricalstock right">'.$prod->stock_theorique.'</td>';
|
||||
@ -266,7 +275,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}
|
||||
}
|
||||
}
|
||||
print '</thead>';
|
||||
print '</tbody>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
@ -287,20 +296,30 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
$(document).ready(function() {
|
||||
// When clicking on collapse
|
||||
$(".collapse_bom").click(function() {
|
||||
console.log("We click on collapse");
|
||||
var id_bom_line = $(this).attr('id').replace('collapse-', '');
|
||||
console.log($(this).html().indexOf('folder-open'));
|
||||
if($(this).html().indexOf('folder-open') <= 0) {
|
||||
|
||||
function folderManage(element) {
|
||||
var id_bom_line = element.attr('id').replace('collapse-', '');
|
||||
let TSubLines = $('[parentid="'+ id_bom_line +'"]');
|
||||
|
||||
if(element.html().indexOf('folder-open') <= 0) {
|
||||
$('[parentid="'+ id_bom_line +'"]').show();
|
||||
$(this).html('<?php echo dol_escape_js(img_picto('', 'folder-open')); ?>');
|
||||
element.html('<?php echo dol_escape_js(img_picto('', 'folder-open')); ?>');
|
||||
}
|
||||
else {
|
||||
$('[parentid="'+ id_bom_line +'"]').hide();
|
||||
$(this).html('<?php echo dol_escape_js(img_picto('', 'folder')); ?>');
|
||||
for (let i = 0; i < TSubLines.length; i++) {
|
||||
let subBomFolder = $(TSubLines[i]).children('.linecoldescription').children('.collapse_bom');
|
||||
if (subBomFolder.length > 0) {
|
||||
folderManage(subBomFolder);
|
||||
}
|
||||
}
|
||||
TSubLines.hide();
|
||||
element.html('<?php echo dol_escape_js(img_picto('', 'folder')); ?>');
|
||||
}
|
||||
}
|
||||
|
||||
// When clicking on collapse
|
||||
$(".collapse_bom").click(function() {
|
||||
folderManage($(this));
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = (!empty($conf->bom->multidir_output[$object->entity]) ? $conf->bom->multidir_output[$object->entity] : $conf->bom->dir_output)."/".$object->id;
|
||||
}
|
||||
|
||||
$permissionnote = $user->rights->bom->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissionnote = $user->hasRight('bom', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->socid > 0) accessforbidden();
|
||||
|
||||
@ -370,7 +370,7 @@ class Boms extends DolibarrApi
|
||||
*
|
||||
* @url PUT {id}/lines/{lineid}
|
||||
*
|
||||
* @return array|bool
|
||||
* @return object|bool
|
||||
*/
|
||||
public function putLine($id, $lineid, $request_data = null)
|
||||
{
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -16,7 +17,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file bom/class/bom.class.php
|
||||
* \file htdocs/bom/class/bom.class.php
|
||||
* \ingroup bom
|
||||
* \brief This file is a CRUD class file for BOM (Create/Read/Update/Delete)
|
||||
*/
|
||||
@ -1064,6 +1065,43 @@ class BOM extends CommonObject
|
||||
return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'BOM_REOPEN');
|
||||
}
|
||||
|
||||
/**
|
||||
* getTooltipContentArray
|
||||
* @param array $params params to construct tooltip data
|
||||
* @since v18
|
||||
* @return array
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
|
||||
$langs->loadLangs(['product', 'mrp']);
|
||||
|
||||
$datas = [];
|
||||
|
||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
return ['optimize' => $langs->trans("ShowBillOfMaterials")];
|
||||
}
|
||||
$picto = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("BillOfMaterials").'</u>';
|
||||
if (isset($this->status)) {
|
||||
$picto .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
$datas['picto'] = $picto;
|
||||
$datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
if (isset($this->label)) {
|
||||
$datas['label'] = '<br><b>'.$langs->trans('Label').':</b> '.$this->label;
|
||||
}
|
||||
if (!empty($this->fk_product) && $this->fk_product > 0) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$product = new Product($this->db);
|
||||
$resultFetch = $product->fetch($this->fk_product);
|
||||
if ($resultFetch > 0) {
|
||||
$datas['product'] = "<br><b>".$langs->trans("Product").'</b>: '.$product->ref.' - '.$product->label;
|
||||
}
|
||||
}
|
||||
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a link to the object card (with optionaly the picto)
|
||||
@ -1084,24 +1122,20 @@ class BOM extends CommonObject
|
||||
}
|
||||
|
||||
$result = '';
|
||||
$params = [
|
||||
'id' => $this->id,
|
||||
'objecttype' => $this->element,
|
||||
'option' => $option,
|
||||
];
|
||||
$classfortooltip = 'classfortooltip';
|
||||
$dataparams = '';
|
||||
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
||||
$classfortooltip = 'classforajaxtooltip';
|
||||
$dataparams = ' data-params='.json_encode($params);
|
||||
// $label = $langs->trans('Loading');
|
||||
}
|
||||
|
||||
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("BillOfMaterials").'</u>';
|
||||
if (isset($this->status)) {
|
||||
$label .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
$label .= '<br>';
|
||||
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
if (isset($this->label)) {
|
||||
$label .= '<br><b>'.$langs->trans('Label').':</b> '.$this->label;
|
||||
}
|
||||
if (!empty($this->fk_product) && $this->fk_product > 0) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$product = new Product($db);
|
||||
$resultFetch = $product->fetch($this->fk_product);
|
||||
if ($resultFetch > 0) {
|
||||
$label .= "<br><b>".$langs->trans("Product").'</b>: '.$product->ref.' - '.$product->label;
|
||||
}
|
||||
}
|
||||
$label = implode($this->getTooltipContentArray($params));
|
||||
|
||||
|
||||
$url = DOL_URL_ROOT.'/bom/bom_card.php?id='.$this->id;
|
||||
@ -1124,7 +1158,7 @@ class BOM extends CommonObject
|
||||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"';
|
||||
$linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
|
||||
} else {
|
||||
$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
|
||||
}
|
||||
@ -1135,7 +1169,7 @@ class BOM extends CommonObject
|
||||
|
||||
$result .= $linkstart;
|
||||
if ($withpicto) {
|
||||
$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
||||
$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1);
|
||||
}
|
||||
if ($withpicto != 2) {
|
||||
$result .= $this->ref;
|
||||
@ -1365,7 +1399,11 @@ class BOM extends CommonObject
|
||||
$line->unit_cost = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : $tmpproduct->pmp);
|
||||
if (empty($line->unit_cost)) {
|
||||
if ($productFournisseur->find_min_price_product_fournisseur($line->fk_product) > 0) {
|
||||
$line->unit_cost = $productFournisseur->fourn_unitprice;
|
||||
if ($productFournisseur->fourn_remise_percent != "0") {
|
||||
$line->unit_cost = $productFournisseur->fourn_unitprice_with_discount;
|
||||
} else {
|
||||
$line->unit_cost = $productFournisseur->fourn_unitprice;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -301,6 +301,16 @@ if ($resql) {
|
||||
$sub_bom->calculateCosts();
|
||||
print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'"><span class="amount">'.price(price2num($sub_bom->total_cost * $sub_bom_line->qty * $line->qty, 'MT')).'</span></td>';
|
||||
$total_cost+= $sub_bom->total_cost * $sub_bom_line->qty * $line->qty;
|
||||
} elseif ($sub_bom_product->type == Product::TYPE_SERVICE && isModEnabled('workstation') && !empty($sub_bom_product->fk_default_workstation)) {
|
||||
//Convert qty to hour
|
||||
$unit = measuringUnitString($sub_bom_line->fk_unit, '', '', 1);
|
||||
$qty = convertDurationtoHour($sub_bom_line->qty, $unit);
|
||||
$workstation = new Workstation($this->db);
|
||||
$res = $workstation->fetch($sub_bom_product->fk_default_workstation);
|
||||
if ($res > 0) $sub_bom_line->total_cost = price2num($qty * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
|
||||
|
||||
print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'"><span class="amount">'.price(price2num($sub_bom_line->total_cost, 'MT')).'</span></td>';
|
||||
$this->total_cost += $line->total_cost;
|
||||
} elseif ($sub_bom_product->cost_price > 0) {
|
||||
print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'"><span class="amount">'.price(price2num($sub_bom_product->cost_price * $sub_bom_line->qty * $line->qty, 'MT')).'</span></td>';
|
||||
$total_cost+= $sub_bom_product->cost_price * $sub_bom_line->qty * $line->qty;
|
||||
|
||||
@ -2,85 +2,8 @@
|
||||
|
||||
## Features
|
||||
|
||||
Description of the module...
|
||||
Provide features to be able to record online booking.
|
||||
|
||||
<!--
|
||||
{imgmd}
|
||||
-->
|
||||
|
||||
Other external modules are available on [Dolistore.com](https://www.dolistore.com).
|
||||
|
||||
## Translations
|
||||
|
||||
Translations can be completed manually by editing files into directories *langs*.
|
||||
|
||||
<!--
|
||||
This module contains also a sample configuration for Transifex, under the hidden directory [.tx](.tx), so it is possible to manage translation using this service.
|
||||
|
||||
For more informations, see the [translator's documentation](https://wiki.dolibarr.org/index.php/Translator_documentation).
|
||||
|
||||
There is a [Transifex project](https://transifex.com/projects/p/dolibarr-module-template) for this module.
|
||||
-->
|
||||
|
||||
<!--
|
||||
|
||||
## Installation
|
||||
|
||||
### From the ZIP file and GUI interface
|
||||
|
||||
If the module is a ready to deploy zip file, so with a name module_xxx-version.zip (like when downloading it from a market place like [Dolistore](https://www.dolistore.com)),
|
||||
go into menu ```Home - Setup - Modules - Deploy external module``` and upload the zip file.
|
||||
|
||||
Note: If this screen tell you that there is no "custom" directory, check that your setup is correct:
|
||||
|
||||
- In your Dolibarr installation directory, edit the ```htdocs/conf/conf.php``` file and check that following lines are not commented:
|
||||
|
||||
```php
|
||||
//$dolibarr_main_url_root_alt ...
|
||||
//$dolibarr_main_document_root_alt ...
|
||||
```
|
||||
|
||||
- Uncomment them if necessary (delete the leading ```//```) and assign a sensible value according to your Dolibarr installation
|
||||
|
||||
For example :
|
||||
|
||||
- UNIX:
|
||||
```php
|
||||
$dolibarr_main_url_root_alt = '/custom';
|
||||
$dolibarr_main_document_root_alt = '/var/www/Dolibarr/htdocs/custom';
|
||||
```
|
||||
|
||||
- Windows:
|
||||
```php
|
||||
$dolibarr_main_url_root_alt = '/custom';
|
||||
$dolibarr_main_document_root_alt = 'C:/My Web Sites/Dolibarr/htdocs/custom';
|
||||
```
|
||||
|
||||
### From a GIT repository
|
||||
|
||||
Clone the repository in ```$dolibarr_main_document_root_alt/bookcal```
|
||||
|
||||
```sh
|
||||
cd ....../custom
|
||||
git clone git@github.com:gitlogin/bookcal.git bookcal
|
||||
```
|
||||
|
||||
### <a name="final_steps"></a>Final steps
|
||||
|
||||
From your browser:
|
||||
|
||||
- Log into Dolibarr as a super-administrator
|
||||
- Go to "Setup" -> "Modules"
|
||||
- You should now be able to find and enable the module
|
||||
|
||||
-->
|
||||
|
||||
## Licenses
|
||||
|
||||
### Main code
|
||||
|
||||
GPLv3 or (at your option) any later version. See file COPYING for more information.
|
||||
|
||||
### Documentation
|
||||
|
||||
All texts and readmes are licensed under GFDL.
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
@ -50,6 +49,8 @@ if (GETPOST('actioncode', 'array')) {
|
||||
} else {
|
||||
$actioncode = GETPOST("actioncode", "alpha", 3) ? GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
|
||||
}
|
||||
|
||||
$search_rowid = GETPOST('search_rowid');
|
||||
$search_agenda_label = GETPOST('search_agenda_label');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
@ -138,7 +139,7 @@ $form = new Form($db);
|
||||
if ($object->id > 0) {
|
||||
$title = $langs->trans("Agenda");
|
||||
//if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
|
||||
$help_url = 'EN:Module_Agenda_En';
|
||||
$help_url = 'EN:Module_Agenda_En|DE:Modul_Terminplanung';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
if (!empty($conf->notification->enabled)) {
|
||||
@ -255,6 +256,7 @@ if ($object->id > 0) {
|
||||
// List of all actions
|
||||
$filters = array();
|
||||
$filters['search_agenda_label'] = $search_agenda_label;
|
||||
$filters['search_rowid'] = $search_rowid;
|
||||
|
||||
// TODO Replace this with same code than into list.php
|
||||
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module);
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bookcal/class/availabilities.class.php';
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
@ -639,7 +638,7 @@ while ($i < $imaxinloop) {
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="'.$savnbfield.'">';
|
||||
print '<div class="box-flex-container">';
|
||||
print '<div class="box-flex-container kanban">';
|
||||
}
|
||||
// Output Kanban
|
||||
print $object->getKanbanView('');
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/bookcal/class/availabilities.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bookcal/lib/bookcal_availabilities.lib.php';
|
||||
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
@ -50,6 +49,8 @@ if (GETPOST('actioncode', 'array')) {
|
||||
} else {
|
||||
$actioncode = GETPOST("actioncode", "alpha", 3) ? GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
|
||||
}
|
||||
|
||||
$search_rowid = GETPOST('search_rowid');
|
||||
$search_agenda_label = GETPOST('search_agenda_label');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
@ -138,7 +139,7 @@ $form = new Form($db);
|
||||
if ($object->id > 0) {
|
||||
$title = $langs->trans("Agenda");
|
||||
//if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
|
||||
$help_url = 'EN:Module_Agenda_En';
|
||||
$help_url = 'EN:Module_Agenda_En|DE:Modul_Terminplanung';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
if (!empty($conf->notification->enabled)) {
|
||||
@ -255,6 +256,7 @@ if ($object->id > 0) {
|
||||
// List of all actions
|
||||
$filters = array();
|
||||
$filters['search_agenda_label'] = $search_agenda_label;
|
||||
$filters['search_rowid'] = $search_rowid;
|
||||
|
||||
// TODO Replace this with same code than into list.php
|
||||
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module);
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bookcal/class/booking.class.php';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user