mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Qual: Fix notices for htdocs/admin/* (#30982)
* Fix (Possibly)UndeclaredGlobalVariable * Update phan baseline * Fix (Possibly)UndeclaredGlobalVariable (2) * Qual: Fix notices for htdocs/admin/* # Qual: Fix notices for htdocs/admin/* Fixes most phan/phpstan noticies for files under htdocs/admin/* and ai.
This commit is contained in:
parent
9552b344cc
commit
099dbd9c1e
|
|
@ -10,41 +10,41 @@
|
|||
return [
|
||||
// # Issue statistics:
|
||||
// PhanPluginUnknownPropertyType : 1550+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 1070+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 1000+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 920+ occurrences
|
||||
// PhanUndeclaredProperty : 840+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 690+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 750+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 480+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 420+ occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 350+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 470+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 410+ occurrences
|
||||
// PhanPossiblyUndeclaredVariable : 350+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionReturnType : 230+ occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 330+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionReturnType : 220+ occurrences
|
||||
// PhanTypeMismatchProperty : 210+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionParamType : 170+ occurrences
|
||||
// PhanTypeMismatchArgumentNullableInternal : 120+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionParamType : 160+ occurrences
|
||||
// PhanTypeMismatchArgumentNullableInternal : 110+ occurrences
|
||||
// PhanPluginUnknownArrayPropertyType : 80+ occurrences
|
||||
// PhanPluginUndeclaredVariableIsset : 70+ occurrences
|
||||
// PhanPluginEmptyStatementIf : 65+ occurrences
|
||||
// PhanPluginEmptyStatementIf : 60+ occurrences
|
||||
// PhanRedefineFunction : 55+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccess : 50+ occurrences
|
||||
// PhanTypeSuspiciousNonTraversableForeach : 50+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 45+ occurrences
|
||||
// PhanPossiblyNullTypeMismatchProperty : 20+ occurrences
|
||||
// PhanEmptyForeach : 15+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 40+ occurrences
|
||||
// PhanPossiblyNullTypeMismatchProperty : 15+ occurrences
|
||||
// PhanTypeComparisonFromArray : 15+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccessButGotNull : 15+ occurrences
|
||||
// PhanUndeclaredConstant : 15+ occurrences
|
||||
// PhanEmptyForeach : 10+ occurrences
|
||||
// PhanPluginBothLiteralsBinaryOp : 10+ occurrences
|
||||
// PhanPluginConstantVariableNull : 10+ occurrences
|
||||
// PhanPluginDuplicateExpressionBinaryOp : 10+ occurrences
|
||||
// PhanPluginSuspiciousParamPosition : 10+ occurrences
|
||||
// PhanTypeMismatchDimFetchNullable : 10+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccessButGotNull : 9 occurrences
|
||||
// PhanUndeclaredMethod : 9 occurrences
|
||||
// PhanPluginDuplicateArrayKey : 8 occurrences
|
||||
// PhanUndeclaredMethod : 8 occurrences
|
||||
// PhanInvalidFQSENInClasslike : 4 occurrences
|
||||
// PhanEmptyFQSENInClasslike : 3 occurrences
|
||||
// PhanTypeMismatchDimFetchNullable : 7 occurrences
|
||||
// PhanInvalidFQSENInClasslike : 2 occurrences
|
||||
// PhanParamTooMany : 2 occurrences
|
||||
// PhanAccessMethodProtected : 1 occurrence
|
||||
// PhanEmptyFQSENInClasslike : 1 occurrence
|
||||
|
||||
// Currently, file_suppressions and directory_suppressions are the only supported suppressions
|
||||
'file_suppressions' => [
|
||||
|
|
@ -52,72 +52,10 @@ return [
|
|||
'htdocs/accountancy/class/accountancyexport.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/adherents/canvas/actions_adherentcard_common.class.php' => [/* Traverses Adherent as array, ignore */ 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/adherents/list.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/agenda_extsites.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/agenda_other.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/agenda_reminder.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/bank.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/bank_extrafields.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/bankline_extrafields.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/bom.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/chequereceipts.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/company.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/delais.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/admin/delivery.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/dict.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/admin/ecm.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/emailcollector_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/expensereport.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/expensereport_rules.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/external_rss.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull'],
|
||||
'htdocs/admin/dict.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/admin/fckeditor.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/fichinter.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/geoipmaxmind.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/ihm.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/invoice.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/invoice_situation.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/ldap_groups.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/ldap_users.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/admin/loan.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/mailman.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/mails.php' => ['PhanPluginEmptyStatementIf'],
|
||||
'htdocs/admin/mails_senderprofile_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/mails_templates.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/menus.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/menus/edit.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/modulehelp.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/modules.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/mrp.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/mrp_extrafields.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/multicurrency.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/pdf.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/propal.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/receiptprinter.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable'],
|
||||
'htdocs/admin/security.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/admin/mails_templates.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/admin/security_file.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/spip.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/admin/supplier_invoice.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/supplier_order.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/supplier_payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/supplier_proposal.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/syslog.php' => ['PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/admin/system/constall.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/system/database-tables.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/system/dbtable.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/system/dolibarr.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/system/modules.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/system/phpinfo.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/admin/system/security.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/taxes.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/tools/listsessions.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/translation.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/webhook.php' => ['PhanEmptyForeach'],
|
||||
'htdocs/admin/website.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/workstation.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/ai/lib/ai.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/api/class/api.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
|
|
@ -131,35 +69,27 @@ return [
|
|||
'htdocs/asset/class/assetmodel.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/asset/depreciation.php' => ['PhanPluginEmptyStatementIf'],
|
||||
'htdocs/asset/disposal.php' => ['PhanPluginEmptyStatementIf'],
|
||||
'htdocs/asset/document.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/asset/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/asset/model/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/asset/tpl/accountancy_codes_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/asset/tpl/depreciation_options_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/asset/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/asterisk/wrapper.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/barcode/codeinit.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/blockedlog/admin/blockedlog_list.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/barcode/codeinit.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/blockedlog/ajax/block-info.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/blockedlog/ajax/check_signature.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/blockedlog/class/blockedlog.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/blockedlog/lib/blockedlog.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bom/bom_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/bom/bom_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/bom/bom_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/bom/class/api_boms.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/bom/class/bom.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/bom/lib/bom.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bom/tpl/objectline_create.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/bom/tpl/objectline_edit.tpl.php' => ['PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/bom/tpl/objectline_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/bom/tpl/objectline_edit.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/bom/tpl/objectline_view.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/availabilities_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/availabilities_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/bookcal/availabilities_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/bookcal/booking_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/bookcal/booking_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/bookcal/calendar_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/calendar_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/bookcal/calendar_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/bookcal/class/availabilities.class.php' => ['PhanUndeclaredMethod', /* Missing getNextValue class, ignored */ 'PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/class/calendar.class.php' => ['PhanUndeclaredMethod', /* Missing getNextValue class, ignored */ 'PhanUndeclaredProperty'],
|
||||
|
|
@ -168,7 +98,6 @@ return [
|
|||
'htdocs/bookcal/lib/bookcal_calendar.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bookmarks/card.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/bookmarks/class/bookmark.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/categories/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/categories/class/categorie.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/categories/edit.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'],
|
||||
|
|
@ -176,36 +105,33 @@ return [
|
|||
'htdocs/categories/info.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/photos.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/traduction.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/categories/viewcat.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'],
|
||||
'htdocs/collab/index.php' => ['PhanParamTooMany', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull'],
|
||||
'htdocs/comm/action/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/categories/viewcat.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'],
|
||||
'htdocs/collab/index.php' => ['PhanParamTooMany', 'PhanUndeclaredProperty'],
|
||||
'htdocs/comm/action/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/comm/action/class/actioncommreminder.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/comm/action/class/api_agendaevents.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/comm/action/class/cactioncomm.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/comm/action/class/ical.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/comm/action/document.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/action/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/comm/action/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/comm/action/info.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/comm/action/list.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/comm/action/pertype.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/comm/action/peruser.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeComparisonFromArray'],
|
||||
'htdocs/comm/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/comm/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/comm/mailing/card.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/mailing/cibles.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/comm/action/peruser.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeComparisonFromArray'],
|
||||
'htdocs/comm/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/mailing/card.php' => ['PhanPluginSuspiciousParamPosition', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/mailing/cibles.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/comm/mailing/class/advtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/comm/mailing/class/html.formadvtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/comm/mailing/index.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/comm/propal/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/comm/propal/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/comm/propal/class/api_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/propal/class/propal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/comm/propal/class/propalestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/comm/propal/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/comm/propal/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/comm/propal/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/propal/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/commande/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/commande/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/commande/class/api_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/commande/class/commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/commande/class/commandestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
|
|
@ -241,7 +167,7 @@ return [
|
|||
'htdocs/compta/deplacement/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/facture/agenda-rec.php' => ['PhanPluginEmptyStatementIf'],
|
||||
'htdocs/compta/facture/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/facture/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/facture/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/facture/class/api_invoices.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/facture/class/facture-rec.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/facture/class/facture.class.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -332,7 +258,7 @@ return [
|
|||
'htdocs/core/actions_printing.inc.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_sendmails.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/core/ajax/ajaxdirpreview.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/ajax/ajaxdirpreview.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/core/ajax/ajaxdirtree.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/ajax/fileupload.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/ajax/onlineSign.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
|
|
@ -392,7 +318,7 @@ return [
|
|||
'htdocs/core/class/emailsenderprofile.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/evalmath.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/class/events.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/extrafields.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/class/extrafields.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/class/extralanguages.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/class/fediverseparser.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/core/class/fileupload.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch'],
|
||||
|
|
@ -442,7 +368,7 @@ return [
|
|||
'htdocs/core/lib/agenda.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/lib/ajax.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/lib/asset.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/bank.lib.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/bank.lib.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/categories.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/lib/contact.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
|
|
@ -616,10 +542,9 @@ return [
|
|||
'htdocs/core/tpl/contacts.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/document_actions_post_headers.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/extrafields_edit.tpl.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/core/tpl/extrafields_list_print_fields.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/extrafields_list_search_title.tpl.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/core/tpl/extrafields_view.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/filemanager.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/filemanager.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/formlayoutai.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/list_print_total.tpl.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/core/tpl/login.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -629,7 +554,7 @@ return [
|
|||
'htdocs/core/tpl/objectline_create.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/objectline_edit.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/objectline_title.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/objectline_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/objectline_view.tpl.php' => ['PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/onlinepaymentlinks.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/passwordforgotten.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/passwordreset.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -776,8 +701,7 @@ return [
|
|||
'htdocs/hrm/class/skilldet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/class/skillrank.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/compare.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/hrm/core/tpl/objectline_view.tpl.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/core/tpl/skilldet.fiche.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/hrm/core/tpl/objectline_view.tpl.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/evaluation_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/hrm/evaluation_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/hrm/index.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -878,7 +802,6 @@ return [
|
|||
'htdocs/product/class/productcustomerprice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/class/productfournisseurprice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/propalmergepdfproduct.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/composition/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/document.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/dynamic_price/class/price_global_variable.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/dynamic_price/class/price_global_variable_updater.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'],
|
||||
|
|
@ -964,7 +887,7 @@ return [
|
|||
'htdocs/public/company/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/cron/cron_run_jobs_by_url.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/public/demo/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction'],
|
||||
'htdocs/public/donations/donateurs_code.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/donations/donateurs_code.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/emailing/mailing-read.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/eventorganization/attendee_new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/eventorganization/subscriptionok.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -974,7 +897,7 @@ return [
|
|||
'htdocs/public/onlinesign/newonlinesign.php' => ['PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/public/opensurvey/studs.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/public/partnership/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction'],
|
||||
'htdocs/public/payment/newpayment.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/public/payment/newpayment.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/public/payment/paymentko.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/public/payment/paymentok.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/project/index.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -987,7 +910,7 @@ return [
|
|||
'htdocs/public/test/test_arrays.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/public/test/test_forms.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/public/ticket/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/ticket/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/ticket/view.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/webportal/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/webportal/tpl/hero-header-banner.tpl.php' => ['PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -1086,21 +1009,19 @@ return [
|
|||
'htdocs/takepos/pay.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/takepos/public/menu.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/takepos/split.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/theme/eldy/badges.inc.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/eldy/badges.inc.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/theme/eldy/btn.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/eldy/dropdown.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/eldy/flags-sprite.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/eldy/info-box.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/eldy/main_menu_fa_icons.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/eldy/progress.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/eldy/style.css.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/md/badges.inc.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/md/badges.inc.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/theme/md/btn.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/md/dropdown.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/md/flags-sprite.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/md/info-box.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/md/progress.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/md/style.css.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/ticket/card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/class/actions_ticket.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/class/api_tickets.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -1113,7 +1034,7 @@ return [
|
|||
'htdocs/ticket/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/user/agenda_extsites.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/user/bank.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/user/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/user/card.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/user/class/api_users.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/user/class/user.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/user/class/usergroup.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -1125,8 +1046,8 @@ return [
|
|||
'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition'],
|
||||
'htdocs/variants/combinations.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/variants/lib/variants.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/variants/tpl/productattributevalueline_edit.tpl.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/variants/tpl/productattributevalueline_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/variants/tpl/productattributevalueline_edit.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/variants/tpl/productattributevalueline_view.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/viewimage.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanRedefineFunction'],
|
||||
'htdocs/webhook/class/api_webhook.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/webhook/class/target.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty'],
|
||||
|
|
|
|||
|
|
@ -657,7 +657,7 @@ $db->close();
|
|||
* Show fields in insert/edit mode
|
||||
*
|
||||
* @param string[] $fieldlist Array of fields
|
||||
* @param stdClass $obj If we show a particular record, obj is filled with record fields
|
||||
* @param ?stdClass $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string $tabname Name of SQL table
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we don't want it to be rendered
|
||||
* @return void
|
||||
|
|
|
|||
|
|
@ -947,7 +947,7 @@ $db->close();
|
|||
* Show fields in insert/edit mode
|
||||
*
|
||||
* @param string[] $fieldlist Array of fields
|
||||
* @param stdClass $obj If we show a particular record, obj is filled with record fields
|
||||
* @param ?stdClass $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string $tabname Name of SQL table
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we don't want it to be rendered
|
||||
* @return void
|
||||
|
|
|
|||
|
|
@ -686,8 +686,8 @@ $db->close();
|
|||
/**
|
||||
* Show fields in insert/edit mode
|
||||
*
|
||||
* @param string[] $fieldlist Array of fields
|
||||
* @param Object $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string[] $fieldlist Array of fields
|
||||
* @param ?Object $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string $tabname Name of SQL table
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we don't want it to be rendered
|
||||
* @return void
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ while ($i <= $MAXAGENDA) {
|
|||
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ' . $key . '" value="' . (GETPOST('AGENDA_EXT_OFFSETTZ' . $key) ? GETPOST('AGENDA_EXT_OFFSETTZ' . $key) : getDolGlobalString($offsettz)) . '" size="2"></td>';
|
||||
// Color (Possible colors are limited by Google)
|
||||
print '<td class="nowraponall right">';
|
||||
print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR" . $key) ? GETPOST("AGENDA_EXT_COLOR" . $key) : getDolGlobalString($color)), "AGENDA_EXT_COLOR" . $key, 'extsitesconfig', 1, '', 'hideifnotset');
|
||||
print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR" . $key) ? GETPOST("AGENDA_EXT_COLOR" . $key) : getDolGlobalString($color)), "AGENDA_EXT_COLOR" . $key, 'extsitesconfig', 1, array(), 'hideifnotset');
|
||||
print '</td>';
|
||||
// Calendar active by default
|
||||
print '<td class="nowrap right">';
|
||||
|
|
|
|||
|
|
@ -120,6 +120,8 @@ if ($action == 'set') {
|
|||
|
||||
$commande = new CommandeFournisseur($db);
|
||||
$commande->initAsSpecimen();
|
||||
$specimenthirdparty = new Societe($db);
|
||||
$specimenthirdparty->initAsSpecimen();
|
||||
$commande->thirdparty = $specimenthirdparty;
|
||||
|
||||
// Search template files
|
||||
|
|
@ -242,6 +244,9 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
|||
|
||||
clearstatcache();
|
||||
|
||||
$specimenthirdparty = new Societe($db);
|
||||
$specimenthirdparty->initAsSpecimen();
|
||||
|
||||
foreach ($dirmodels as $reldir) {
|
||||
$dir = dol_buildpath($reldir."core/modules/action/doc");
|
||||
|
||||
|
|
@ -265,8 +270,9 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
|||
print "<td>\n";
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db, $specimenthirdparty);
|
||||
'@phan-var-force ModeleAction $module';
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ if ($action == 'set') {
|
|||
|
||||
$commande = new CommandeFournisseur($db);
|
||||
$commande->initAsSpecimen();
|
||||
$specimenthirdparty = new Societe($db);
|
||||
$specimenthirdparty->initAsSpecimen();
|
||||
$commande->thirdparty = $specimenthirdparty;
|
||||
|
||||
// Search template files
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ if ($action == 'updateMask') {
|
|||
$maskconstbom = GETPOST('maskconstBom', 'aZ09');
|
||||
$maskbom = GETPOST('maskBom', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconstbom && preg_match('/_MASK$/', $maskconstbom)) {
|
||||
$res = dolibarr_set_const($db, $maskconstbom, $maskbom, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
@ -351,6 +353,7 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
'@phan-var-force ModelePDFBom $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
@ -365,7 +368,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@ if (!getDolGlobalString('CHEQUERECEIPTS_ADDON')) {
|
|||
if ($action == 'updateMask') {
|
||||
$maskconstchequereceipts = GETPOST('maskconstchequereceipts', 'aZ09');
|
||||
$maskchequereceipts = GETPOST('maskchequereceipts', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconstchequereceipts && preg_match('/_MASK$/', $maskconstchequereceipts)) {
|
||||
$res = dolibarr_set_const($db, $maskconstchequereceipts, $maskchequereceipts, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
@ -216,7 +219,7 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
if (getDolGlobalString('CHEQUERECEIPTS_ADDON').'.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (!empty($module->error)) {
|
||||
dol_htmloutput_mesg($module->error, '', 'error', 1);
|
||||
dol_htmloutput_mesg($module->error, array(), 'error', 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
||||
* Copyright (C) 2023 Nick Fragoulis
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -845,10 +846,10 @@ if ($mysoc->useLocalTax(1)) {
|
|||
$formcompany->select_localtax(1, $conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1");
|
||||
}
|
||||
|
||||
$opcions = array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"), $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"), $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"));
|
||||
$options = array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"), $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"), $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"));
|
||||
|
||||
print '<br><label for="clt1">'.$langs->trans("CalcLocaltax").'</label>: ';
|
||||
print $form->selectarray("clt1", $opcions, getDolGlobalString('MAIN_INFO_LOCALTAX_CALC1'));
|
||||
print $form->selectarray("clt1", $options, getDolGlobalString('MAIN_INFO_LOCALTAX_CALC1'));
|
||||
print "</div>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
|
@ -888,8 +889,11 @@ if ($mysoc->useLocalTax(2)) {
|
|||
print '<br><label for="lt2">'.$langs->trans("LTRate").'</label>: ';
|
||||
$formcompany->select_localtax(2, getDolGlobalString('MAIN_INFO_VALUE_LOCALTAX2'), "lt2");
|
||||
}
|
||||
|
||||
$options = array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"), $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"), $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"));
|
||||
|
||||
print '<br><label for="clt2">'.$langs->trans("CalcLocaltax").'</label>: ';
|
||||
print $form->selectarray("clt2", $opcions, getDolGlobalString('MAIN_INFO_LOCALTAX_CALC2'));
|
||||
print $form->selectarray("clt2", $options, getDolGlobalString('MAIN_INFO_LOCALTAX_CALC2'));
|
||||
print "</div>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2022-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -136,7 +137,7 @@ $modules = array(
|
|||
),
|
||||
);
|
||||
|
||||
$labelmeteo = array(0=>$langs->trans("No"), 1=>$langs->trans("Yes"), 2=>$langs->trans("OnMobileOnly"));
|
||||
$labelmeteo = array(0 => $langs->trans("No"), 1 => $langs->trans("Yes"), 2 => $langs->trans("OnMobileOnly"));
|
||||
|
||||
if (!isset($conf->global->MAIN_DELAY_MEMBERS)) {
|
||||
$conf->global->MAIN_DELAY_MEMBERS = 0; // Must be same value than into conf.class.php
|
||||
|
|
@ -278,7 +279,7 @@ if ($action == 'edit') {
|
|||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td class="center">';
|
||||
print $labelmeteo[getDolGlobalString('MAIN_DISABLE_METEO')];
|
||||
print $labelmeteo[getDolGlobalInt('MAIN_DISABLE_METEO')];
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
|
@ -287,6 +288,9 @@ if ($action == 'edit') {
|
|||
print '<br>';
|
||||
|
||||
|
||||
$str_mode_std = null;
|
||||
$str_mode_percentage = null;
|
||||
|
||||
if (!getDolGlobalString('MAIN_DISABLE_METEO') || getDolGlobalInt('MAIN_DISABLE_METEO') != 1) {
|
||||
// Show logo for weather
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescWeather").'</span> ';
|
||||
|
|
|
|||
|
|
@ -94,6 +94,9 @@ if ($action == 'activate_delivery') {
|
|||
if ($action == 'updateMask') {
|
||||
$maskconstdelivery = GETPOST('maskconstdelivery', 'aZ09');
|
||||
$maskdelivery = GETPOST('maskdelivery', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconstdelivery && preg_match('/_MASK$/', $maskconstdelivery)) {
|
||||
$res = dolibarr_set_const($db, $maskconstdelivery, $maskdelivery, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020-2022 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -1127,11 +1128,17 @@ if (empty($reshook)) {
|
|||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET active = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} elseif ($code) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET active = 1 WHERE code = '".$db->escape(dol_escape_htmltag($code))."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} else {
|
||||
$sql = null;
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
if ($sql !== null) {
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} {
|
||||
dol_print_error(null, "No DB entry or no code");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1150,11 +1157,17 @@ if (empty($reshook)) {
|
|||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET active = 0 WHERE ".$rowidcol." = '".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} elseif ($code) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET active = 0 WHERE code = '".$db->escape(dol_escape_htmltag($code))."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} else {
|
||||
$sql = null;
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
if ($sql !== null) {
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} {
|
||||
dol_print_error(null, "No DB entry or no code");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1173,11 +1186,17 @@ if (empty($reshook)) {
|
|||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET favorite = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} elseif ($code) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET favorite = 1 WHERE code = '".$db->escape(dol_escape_htmltag($code))."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} else {
|
||||
$sql = null;
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
if ($sql !== null) {
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} {
|
||||
dol_print_error(null, "No DB entry or no code");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1196,11 +1215,17 @@ if (empty($reshook)) {
|
|||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET favorite = 0 WHERE ".$rowidcol." = '".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} elseif ($code) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET favorite = 0 WHERE code = '".$db->escape(dol_escape_htmltag($code))."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} else {
|
||||
$sql = null;
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
if ($sql !== null) {
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} {
|
||||
dol_print_error(null, "No DB entry or no code");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1219,11 +1244,17 @@ if (empty($reshook)) {
|
|||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET eec = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} elseif ($code) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET eec = 1 WHERE code = '".$db->escape(dol_escape_htmltag($code))."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} else {
|
||||
$sql = null;
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
if ($sql !== null) {
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} {
|
||||
dol_print_error(null, "No DB entry or no code");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1242,11 +1273,17 @@ if (empty($reshook)) {
|
|||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET eec = 0 WHERE ".$rowidcol." = '".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} elseif ($code) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET eec = 0 WHERE code = '".$db->escape(dol_escape_htmltag($code))."'".($entity != '' ? " AND entity = ".(int) $entity : '');
|
||||
} else {
|
||||
$sql = null;
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
if ($sql !== null) {
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} {
|
||||
dol_print_error(null, "No DB entry or no code");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2638,10 +2675,10 @@ $db->close();
|
|||
/**
|
||||
* Show fields in insert/edit mode
|
||||
*
|
||||
* @param array $fieldlist Array of fields
|
||||
* @param Object $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string[] $fieldlist Array of fields
|
||||
* @param ?Object $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string $tabname Name of SQL table
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we don't want it to be rendered
|
||||
* @param ''|'add'|'edit'|'hide' $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we don't want it to be rendered
|
||||
* @return string '' or value of entity into table
|
||||
*/
|
||||
function fieldList($fieldlist, $obj = null, $tabname = '', $context = '')
|
||||
|
|
@ -2777,7 +2814,7 @@ function fieldList($fieldlist, $obj = null, $tabname = '', $context = '')
|
|||
print '<input type="hidden" name="'. $value .'" value="'.$transkey.'">';
|
||||
}
|
||||
print '</td>';
|
||||
} elseif ($value == 'price' || preg_match('/^amount/i', $value)) {
|
||||
} elseif ($value == 'price' || preg_match('/^amount/i', (string) $value)) {
|
||||
print '<td><input type="text" class="flat minwidth75" value="'.price((!empty($obj->{$value}) ? $obj->{$value} : '')).'" name="'. $value .'"></td>';
|
||||
} elseif ($value == 'code' && isset($obj->{$value})) {
|
||||
print '<td>';
|
||||
|
|
@ -2814,7 +2851,7 @@ function fieldList($fieldlist, $obj = null, $tabname = '', $context = '')
|
|||
if (isModEnabled('accounting')) {
|
||||
$fieldname = $value;
|
||||
$accountancy_account = (!empty($obj->$fieldname) ? $obj->$fieldname : 0);
|
||||
print $formaccounting->select_account($accountancy_account, '.'. $value, 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
|
||||
print $formaccounting->select_account($accountancy_account, '.'. $value, 1, array(), 1, 1, 'maxwidth200 maxwidthonsmartphone');
|
||||
} else {
|
||||
$fieldname = $value;
|
||||
print '<input type="text" size="10" class="flat" value="'.(isset($obj->$fieldname) ? $obj->$fieldname : '').'" name="'. $value .'">';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*/
|
||||
/*
|
||||
* 2007-2022 PrestaShop SA and Contributors
|
||||
*
|
||||
|
|
@ -31,7 +33,6 @@
|
|||
*/
|
||||
class PrestaShopWebservice
|
||||
{
|
||||
|
||||
/** @var string Shop URL */
|
||||
protected $url;
|
||||
|
||||
|
|
@ -68,7 +69,7 @@ class PrestaShopWebservice
|
|||
*
|
||||
* @param string $url Root URL for the shop
|
||||
* @param string $key Authentication key
|
||||
* @param mixed $debug Debug mode Activated (true) or deactivated (false)
|
||||
* @param bool $debug Debug mode Activated (true) or deactivated (false)
|
||||
*
|
||||
* @throws PrestaShopWebserviceException if curl is not loaded
|
||||
*/
|
||||
|
|
@ -92,7 +93,7 @@ class PrestaShopWebservice
|
|||
* 'response' => CURL response
|
||||
* </p>
|
||||
*
|
||||
* @param array $request Response elements of CURL request
|
||||
* @param array{status_code:int,response:string} $request Response elements of CURL request
|
||||
*
|
||||
* @return void
|
||||
* @throws PrestaShopWebserviceException if HTTP status code is not 200 or 201
|
||||
|
|
@ -132,7 +133,7 @@ class PrestaShopWebservice
|
|||
$errors = $response->children()->children();
|
||||
if ($errors && count($errors) > 0) {
|
||||
foreach ($errors as $error) {
|
||||
$error_message.= ' - (Code ' . $error->code . '): ' . $error->message;
|
||||
$error_message .= ' - (Code ' . $error->code . '): ' . $error->message;
|
||||
}
|
||||
}
|
||||
$error_label = 'This call to PrestaShop Web Services failed and returned an HTTP status of %d. That means: %s.';
|
||||
|
|
@ -142,7 +143,7 @@ class PrestaShopWebservice
|
|||
|
||||
/**
|
||||
* Provides default parameters for the curl connection(s)
|
||||
* @return array Default parameters for curl connection(s)
|
||||
* @return array<int,bool|int|string|string[]|array<int,string>> Default parameters for curl connection(s)
|
||||
*/
|
||||
protected function getCurlDefaultParams()
|
||||
{
|
||||
|
|
@ -164,9 +165,9 @@ class PrestaShopWebservice
|
|||
* Handles a CURL request to PrestaShop Webservice. Can throw exception.
|
||||
*
|
||||
* @param string $url Resource name
|
||||
* @param mixed $curl_params CURL parameters (sent to curl_set_opt)
|
||||
* @param array<int,null|int|bool|string|float> $curl_params CURL parameters (sent to curl_set_opt)
|
||||
*
|
||||
* @return array status_code, response, header
|
||||
* @return array{status_code:int,response:?string,header:string}
|
||||
*
|
||||
* @throws PrestaShopWebserviceException
|
||||
*/
|
||||
|
|
@ -296,7 +297,7 @@ class PrestaShopWebservice
|
|||
libxml_disable_entity_loader(true);
|
||||
}
|
||||
|
||||
$xml = simplexml_load_string(trim($response), 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
|
||||
$xml = simplexml_load_string(trim($response), 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NONET);
|
||||
if (libxml_get_errors()) {
|
||||
$msg = var_export(libxml_get_errors(), true);
|
||||
libxml_clear_errors();
|
||||
|
|
@ -315,7 +316,7 @@ class PrestaShopWebservice
|
|||
* 'postXml' => Full XML string to add resource<br><br>
|
||||
* Examples are given in the tutorial</p>
|
||||
*
|
||||
* @param array $options Options
|
||||
* @param array{url?:string,resource?:string,id?:string,id_shop?:string,id_group_shop?:string,postXml:mixed} $options Array representing resource to add.
|
||||
*
|
||||
* @return SimpleXMLElement status_code, response
|
||||
* @throws PrestaShopWebserviceException
|
||||
|
|
@ -368,7 +369,7 @@ class PrestaShopWebservice
|
|||
* ?>
|
||||
* </code>
|
||||
*
|
||||
* @param array $options Array representing resource to get.
|
||||
* @param array<string,string> $options Array representing resource to get.
|
||||
*
|
||||
* @return SimpleXMLElement status_code, response
|
||||
* @throws PrestaShopWebserviceException
|
||||
|
|
@ -409,9 +410,9 @@ class PrestaShopWebservice
|
|||
/**
|
||||
* Head method (HEAD) a resource
|
||||
*
|
||||
* @param array $options Array representing resource for head request.
|
||||
* @param array<string,string> $options Array representing resource for head request.
|
||||
*
|
||||
* @return SimpleXMLElement status_code, response
|
||||
* @return string
|
||||
* @throws PrestaShopWebserviceException
|
||||
*/
|
||||
public function head($options)
|
||||
|
|
@ -452,7 +453,7 @@ class PrestaShopWebservice
|
|||
* 'putXml' => Modified XML string of a resource<br><br>
|
||||
* Examples are given in the tutorial</p>
|
||||
*
|
||||
* @param array $options Array representing resource to edit.
|
||||
* @param array{url?:string,resource?:string,id?:string,id_shop?:string,id_group_shop?:string,putXml:mixed} $options Array representing resource to edit.
|
||||
*
|
||||
* @return SimpleXMLElement
|
||||
* @throws PrestaShopWebserviceException
|
||||
|
|
@ -503,7 +504,7 @@ class PrestaShopWebservice
|
|||
* ?>
|
||||
* </code>
|
||||
*
|
||||
* @param array $options Array representing resource to delete.
|
||||
* @param array{url?:string,resource?:string,id?:string,id_shop?:string,id_group_shop?:string} $options Array representing resource to delete.
|
||||
*
|
||||
* @return bool
|
||||
* @throws PrestaShopWebserviceException
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -95,7 +96,7 @@ print '<tr class="oddeven">';
|
|||
print '<td>'.$langs->trans("ECMAutoTree").'</td>';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('ECM_AUTO_TREE_HIDEN', null, null, 1);
|
||||
print ajax_constantonoff('ECM_AUTO_TREE_HIDEN', array(), null, 1);
|
||||
} else {
|
||||
if (!getDolGlobalString('ECM_AUTO_TREE_HIDEN')) {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_ECM_AUTO_TREE_HIDEN&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -460,7 +461,7 @@ foreach ($object->fields as $key => $val) {
|
|||
} elseif ($key == 'lang') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
$formadmin = new FormAdmin($db);
|
||||
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
|
||||
print $formadmin->select_language($search[$key], 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2);
|
||||
} else {
|
||||
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">';
|
||||
}
|
||||
|
|
@ -471,7 +472,7 @@ foreach ($object->fields as $key => $val) {
|
|||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields);
|
||||
$parameters = array('arrayfields' => $arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
|
|
@ -512,7 +513,7 @@ foreach ($object->fields as $key => $val) {
|
|||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
// Hook fields
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
|
||||
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
|
|
@ -640,7 +641,7 @@ while ($i < $imaxinloop) {
|
|||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
|
|
@ -683,7 +684,7 @@ if ($num == 0) {
|
|||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
|||
if ($action == 'updateMask') {
|
||||
$maskconst = GETPOST('maskconst', 'aZ09');
|
||||
$maskvalue = GETPOST('maskvalue', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
|
||||
$res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ if (!$user->admin) {
|
|||
*/
|
||||
|
||||
$parameters = array();
|
||||
$rules = array();
|
||||
$tab_apply = array();
|
||||
$tab_rules_type = array();
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
@ -218,7 +221,7 @@ if ($action != 'edit') {
|
|||
echo '<td>';
|
||||
echo '<div class="float linecolapplyto">' . $form->selectarray('apply_to', $tab_apply, '', 0) . '</div>';
|
||||
echo '<div id="user" class="float linecoluser">' . $form->select_dolusers('', 'fk_user') . '</div>';
|
||||
echo '<div id="group" class="float linecolgroup">' . $form->select_dolgroups('', 'fk_usergroup') . '</div>';
|
||||
echo '<div id="group" class="float linecolgroup">' . $form->select_dolgroups(0, 'fk_usergroup') . '</div>';
|
||||
echo '</td>';
|
||||
|
||||
echo '<td class="linecoltype">' . $form->selectExpense('', 'fk_c_type_fees', 0, 1, 1) . '</td>';
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ if ($action == 'add' || GETPOST("modify")) {
|
|||
}
|
||||
|
||||
$result1 = dolibarr_set_const($db, "EXTERNAL_RSS_TITLE_".GETPOSTINT("norss"), GETPOST($external_rss_title), 'chaine', 0, '', $conf->entity);
|
||||
$result2 = 0;
|
||||
if ($result1) {
|
||||
$consttosave = "EXTERNAL_RSS_URLRSS_".GETPOSTINT("norss");
|
||||
$urltosave = GETPOST($external_rss_urlrss, 'alpha');
|
||||
|
|
@ -164,6 +165,7 @@ if (GETPOST("delete")) {
|
|||
|
||||
|
||||
$result1 = dolibarr_del_const($db, "EXTERNAL_RSS_TITLE_".GETPOSTINT("norss"), $conf->entity);
|
||||
$result2 = 0;
|
||||
if ($result1) {
|
||||
$result2 = dolibarr_del_const($db, "EXTERNAL_RSS_URLRSS_".GETPOSTINT("norss"), $conf->entity);
|
||||
}
|
||||
|
|
@ -212,7 +214,7 @@ print '</tr>';
|
|||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans('RSSUrl').'</td>';
|
||||
print '<td><input type="text" class="flat minwidth300" name="external_rss_urlrss_'.($lastexternalrss + 1).'" value=""></td>';
|
||||
print '<td>http://news.google.com/news?ned=us&topic=h&output=rss<br>http://www.dolibarr.org/rss</td>';
|
||||
print '<td>https://news.google.com/news?ned=us&topic=h&output=rss<br>https://www.dolibarr.org/rss</td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
|
|
@ -298,7 +300,7 @@ if ($resql) {
|
|||
print '</tr>'."\n";
|
||||
|
||||
// Logo
|
||||
if ($result > 0 && empty($rss->error)) {
|
||||
if ($result > 0 && empty($rssparser->error)) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("Logo")."</td>";
|
||||
print '<td>';
|
||||
|
|
@ -348,9 +350,9 @@ $db->close();
|
|||
/**
|
||||
* Check if the given RSS feed if inside the list of boxes/widgets
|
||||
*
|
||||
* @param int $idrss The id of the RSS feed
|
||||
* @param array $boxlist A list with boxes/widgets
|
||||
* @return bool true if the rss feed is inside the box/widget list, otherwise false
|
||||
* @param int $idrss The id of the RSS feed
|
||||
* @param ModeleBoxes[] $boxlist A list with boxes/widgets
|
||||
* @return bool true if the rss feed is inside the box/widget list, otherwise false
|
||||
*/
|
||||
function _isInBoxList($idrss, array $boxlist)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -230,7 +231,7 @@ if (empty($conf->use_javascript_ajax)) {
|
|||
print getDolGlobalString('FCKEDITOR_TEST');
|
||||
print '</div>';
|
||||
}
|
||||
print $form->buttonsSaveCancel("Save", '', null, 0, 'reposition');
|
||||
print $form->buttonsSaveCancel("Save", '', array(), 0, 'reposition');
|
||||
print '<div id="divforlog"></div>';
|
||||
print '</form>'."\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
|||
if ($action == 'updateMask') {
|
||||
$maskconst = GETPOST('maskconst', 'aZ09');
|
||||
$maskvalue = GETPOST('maskvalue', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
|
||||
$res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2009-2019 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -166,10 +167,11 @@ if ($geoip) {
|
|||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
$ip = '24.24.24.24';
|
||||
|
||||
print '<br><br>';
|
||||
print '<br><span class="opacitymedium">'.$langs->trans("TestGeoIPResult", $ip).':</span>';
|
||||
|
||||
$ip = '24.24.24.24';
|
||||
print '<br>'.$ip.' -> ';
|
||||
$result = dol_print_ip($ip, 1);
|
||||
if ($result) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2021-2023 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2023 Eric Seigne <eric.seigne@cap-rel.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -225,14 +226,14 @@ if ($action == 'update') {
|
|||
dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BTNACTION'), array()))));
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BTNACTION'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_BTNACTION', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_BTNACTION', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTBTNACTION'), array()))));
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTBTNACTION'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTBTNACTION', $conf->entity);
|
||||
} else {
|
||||
|
|
@ -385,7 +386,7 @@ if ($mode == 'other') {
|
|||
// Default language
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||
print img_picto('', 'language', 'class="pictofixedwidth"');
|
||||
print $formadmin->select_language(getDolGlobalString('MAIN_LANG_DEFAULT'), 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2);
|
||||
print $formadmin->select_language(getDolGlobalString('MAIN_LANG_DEFAULT'), 'MAIN_LANG_DEFAULT', 1, array(), '', 0, 0, 'minwidth300', 2);
|
||||
//print '<input class="button button-save smallpaddingimp" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ if ($action == 'updateMask') {
|
|||
$maskreplacement = GETPOST('maskreplacement', 'alpha');
|
||||
$maskcredit = GETPOST('maskcredit', 'alpha');
|
||||
$maskdeposit = GETPOST('maskdeposit', 'alpha');
|
||||
$res = 0;
|
||||
if ($maskconstinvoice && preg_match('/_MASK_/', $maskconstinvoice)) {
|
||||
$res = dolibarr_set_const($db, $maskconstinvoice, $maskinvoice, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
@ -444,7 +445,7 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
if (getDolGlobalString('FACTURE_ADDON') . '.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (!empty($module->error)) {
|
||||
dol_htmloutput_mesg($module->error, '', 'error', 1);
|
||||
dol_htmloutput_mesg($module->error, array(), 'error', 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -86,7 +87,7 @@ $arrayAvailableType = array(
|
|||
if ($action == 'edit') {
|
||||
$item->fieldInputOverride = $form->selectarray('INVOICE_USE_RETAINED_WARRANTY', $arrayAvailableType, $conf->global->INVOICE_USE_RETAINED_WARRANTY, 1);
|
||||
} else {
|
||||
$item->fieldOutputOverride= isset($arrayAvailableType[getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY')]) ? $arrayAvailableType[getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY')] : '';
|
||||
$item->fieldOutputOverride = isset($arrayAvailableType[getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY')]) ? $arrayAvailableType[getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY')] : '';
|
||||
}
|
||||
|
||||
//$item = $formSetup->newItem('INVOICE_RETAINED_WARRANTY_LIMITED_TO_SITUATION')->setAsYesNo();
|
||||
|
|
@ -131,7 +132,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
|||
|
||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
$help_yrl = 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura';
|
||||
$help_url = 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura';
|
||||
|
||||
llxHeader("", $langs->trans("BillsSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-invoice_situation');
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2005 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -306,8 +307,8 @@ if (function_exists("ldap_connect")) {
|
|||
$ldapgroups = $ldap->getRecords('*', getDolGlobalString('LDAP_GROUP_DN'), getDolGlobalString('LDAP_KEY_GROUPS'), $required_fields, 'group');
|
||||
//$ldapgroups = $ldap->getRecords('*', $conf->global->LDAP_GROUP_DN, $conf->global->LDAP_KEY_GROUPS, '', 'group');
|
||||
|
||||
$liste = array();
|
||||
if (is_array($ldapgroups)) {
|
||||
$liste = array();
|
||||
foreach ($ldapgroups as $key => $ldapgroup) {
|
||||
// Define the label string for this group
|
||||
$label = '';
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Abbes Bahfir <dolipar@dolipar.org>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -495,8 +496,8 @@ if (function_exists("ldap_connect")) {
|
|||
// $filter = '('.ldap_escape(getDolGlobalString('LDAP_KEY_USERS'), '', LDAP_ESCAPE_FILTER).'=*)';
|
||||
$ldapusers = $ldap->getRecords('*', getDolGlobalString('LDAP_USER_DN'), getDolGlobalString('LDAP_KEY_USERS'), $required_fields, 1);
|
||||
|
||||
$liste = array();
|
||||
if (is_array($ldapusers)) {
|
||||
$liste = array();
|
||||
foreach ($ldapusers as $key => $ldapuser) {
|
||||
// Define the label string for this user
|
||||
$label = '';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -79,6 +80,8 @@ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-loan');
|
|||
$form = new Form($db);
|
||||
if (isModEnabled('accounting')) {
|
||||
$formaccounting = new FormAccounting($db);
|
||||
} else {
|
||||
$formaccounting = null;
|
||||
}
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
|
@ -105,8 +108,8 @@ foreach ($list as $key) {
|
|||
|
||||
// Value
|
||||
print '<td>';
|
||||
if (isModEnabled('accounting')) {
|
||||
print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1);
|
||||
if ($formaccounting instanceof FormAccounting) {
|
||||
print $formaccounting->select_account(getDolGlobalString($key), $key, 1, array(), 1, 1);
|
||||
} else {
|
||||
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . getDolGlobalString($key) . '">';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2016 Jonathan TISSEAU <jonathan.tisseau@86dev.fr>
|
||||
* Copyright (C) 2023 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -1025,9 +1026,9 @@ if ($action == 'edit') {
|
|||
|
||||
if (!in_array($action, array('testconnect', 'test', 'testhtml')) && !getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) {
|
||||
$text = '';
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail') {
|
||||
//$text .= $langs->trans("WarningPHPMail", $listofmethods['mail'], $listofmethods['smtps']); // To encourage to use SMTPS
|
||||
}
|
||||
//if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail') {
|
||||
// $text .= $langs->trans("WarningPHPMail", $listofmethods['mail'], $listofmethods['smtps']); // To encourage to use SMTPS
|
||||
//}
|
||||
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail') {
|
||||
// mthode php mail
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -583,7 +584,7 @@ foreach ($object->fields as $key => $val) {
|
|||
} elseif ($key == 'lang') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
$formadmin = new FormAdmin($db);
|
||||
print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth100imp maxwidth125', 2);
|
||||
print $formadmin->select_language($search[$key], 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2);
|
||||
} else {
|
||||
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
* Copyright (C) 2015-2024 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -959,11 +960,11 @@ foreach ($fieldlist as $field => $value) {
|
|||
print '<td class="liste_titre"><input type="text" name="search_label" class="maxwidth75" value="'.dol_escape_htmltag($search_label).'"></td>';
|
||||
} elseif ($value == 'lang') {
|
||||
print '<td class="liste_titre">';
|
||||
print $formadmin->select_language($search_lang, 'search_lang', 0, null, 1, 0, 0, 'maxwidth100');
|
||||
print $formadmin->select_language($search_lang, 'search_lang', 0, array(), 1, 0, 0, 'maxwidth100');
|
||||
print '</td>';
|
||||
} elseif ($value == 'fk_user') {
|
||||
print '<td class="liste_titre">';
|
||||
print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 0, '', 0, '', 'maxwidth100', 1);
|
||||
print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), array(), 0, 0, 0, '', 0, '', 'maxwidth100', 1);
|
||||
print '</td>';
|
||||
} elseif ($value == 'topic') {
|
||||
print '<td class="liste_titre"><input type="text" name="search_topic" value="'.dol_escape_htmltag($search_topic).'"></td>';
|
||||
|
|
@ -1075,9 +1076,8 @@ if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
|||
}
|
||||
print '</tr>';
|
||||
|
||||
$nbqualified = 0;
|
||||
if ($num) {
|
||||
$nbqualified = 0;
|
||||
|
||||
// Lines with values
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
|
@ -1376,8 +1376,8 @@ $db->close();
|
|||
/**
|
||||
* Show fields in insert/edit mode
|
||||
*
|
||||
* @param array $fieldlist Array of fields
|
||||
* @param Object $obj If we show a particular record, obj is filled with record fields
|
||||
* @param array<int|string,null|int|float|string> $fieldlist Array of fields and their values
|
||||
* @param ?Object $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string $tabname Name of SQL table
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'preview'=show in readonly the template, 'hide'=Output field for the "add form" but we don't want it to be rendered
|
||||
* @return void
|
||||
|
|
@ -1397,7 +1397,7 @@ function fieldList($fieldlist, $obj = null, $tabname = '', $context = '')
|
|||
} elseif ($value == 'fk_user') {
|
||||
print '<td>';
|
||||
if ($user->admin && $context != 'preview') {
|
||||
print $form->select_dolusers(GETPOSTISSET('fk_user') ? GETPOSTINT('fk_user') : (empty($obj->$value) ? '' : $obj->$value), 'fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 0, '', 0, '', 'minwidth75 maxwidth100');
|
||||
print $form->select_dolusers(GETPOSTISSET('fk_user') ? GETPOSTINT('fk_user') : (empty($obj->$value) ? '' : $obj->$value), 'fk_user', 1, array(), 0, ($user->admin ? '' : 'hierarchyme'), array(), 0, 0, 0, '', 0, '', 'minwidth75 maxwidth100');
|
||||
} else {
|
||||
if ($context == 'add') { // I am not admin and we show the add form
|
||||
print $user->getNomUrl(-1); // Me
|
||||
|
|
@ -1423,7 +1423,7 @@ function fieldList($fieldlist, $obj = null, $tabname = '', $context = '')
|
|||
if ($context == 'edit') {
|
||||
$selectedlang = $obj->lang;
|
||||
}
|
||||
print $formadmin->select_language($selectedlang, 'langcode', 0, null, 1, 0, 0, 'maxwidth100');
|
||||
print $formadmin->select_language($selectedlang, 'langcode', 0, array(), 1, 0, 0, 'maxwidth100');
|
||||
} else {
|
||||
if (!empty($obj->lang)) {
|
||||
print $obj->lang.' - '.$langs->trans('Language_'.$obj->lang);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -94,7 +95,7 @@ if ($action == 'update' && !$cancel) {
|
|||
if (file_exists($fullpath)) {
|
||||
$db->begin();
|
||||
|
||||
$result = run_sql($fullpath, 1, '', 1, $key, 'none');
|
||||
$result = run_sql($fullpath, 1, 0, 1, $key, 'none');
|
||||
if ($result > 0) {
|
||||
$db->commit();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ foreach ($dirmenus as $dirmenu) {
|
|||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
$menu = null;
|
||||
$menu_handler_top = getDolGlobalString('MAIN_MENU_STANDARD');
|
||||
$menu_handler_smartphone = getDolGlobalString('MAIN_MENU_SMARTPHONE');
|
||||
$menu_handler_top = preg_replace('/_backoffice.php/i', '', $menu_handler_top);
|
||||
|
|
@ -388,8 +389,10 @@ if ($action == 'create') {
|
|||
|
||||
// Target
|
||||
print '<tr><td>'.$langs->trans('Target').'</td><td><select class="flat" name="target" id="target">';
|
||||
print '<option value=""'.(isset($menu->target) && $menu->target == "" ? ' selected' : '').'> </option>';
|
||||
print '<option value="_blank"'.(isset($menu->target) && $menu->target == "_blank" ? ' selected' : '').'>'.$langs->trans('_blank').'</option>';
|
||||
if ($menu instanceof Menubase) {
|
||||
print '<option value=""'.(isset($menu->target) && $menu->target == "" ? ' selected' : '').'> </option>';
|
||||
print '<option value="_blank"'.(isset($menu->target) && $menu->target == "_blank" ? ' selected' : '').'>'.$langs->trans('_blank').'</option>';
|
||||
}
|
||||
print '</select>';
|
||||
print ajax_combobox("target");
|
||||
print '</td></td><td>'.$langs->trans('DetailTarget').'</td></tr>';
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ $dirmod = array();
|
|||
$i = 0; // is a sequencer of modules found
|
||||
$j = 0; // j is module number. Automatically affected if module number not defined.
|
||||
$modNameLoaded = array();
|
||||
$familyinfo = array();
|
||||
|
||||
foreach ($modulesdir as $dir) {
|
||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||
|
|
@ -163,9 +164,6 @@ foreach ($modulesdir as $dir) {
|
|||
|
||||
// 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)) {
|
||||
if (!is_array($familyinfo)) {
|
||||
$familyinfo = array();
|
||||
}
|
||||
$familyinfo = array_merge($familyinfo, $objMod->familyinfo);
|
||||
$familykey = key($objMod->familyinfo);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/admin/dolistore/class/dolistore.class.php';
|
||||
|
||||
'
|
||||
@phan-var-force string $dolibarr_main_url_root_alt
|
||||
';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("errors", "admin", "modulebuilder"));
|
||||
|
||||
|
|
@ -534,6 +538,8 @@ foreach ($modulesdir as $dir) {
|
|||
}
|
||||
}
|
||||
|
||||
'@phan-var-force array<string,DolibarrModules> $modules';
|
||||
|
||||
if ($action == 'reset_confirm' && $user->admin) {
|
||||
if (!empty($modules[$value])) {
|
||||
$objMod = $modules[$value];
|
||||
|
|
@ -597,9 +603,9 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
|||
$deschelp .= '<br>';
|
||||
}
|
||||
}
|
||||
if ($mode == 'marketplace') {
|
||||
//$deschelp = '<div class="info hideonsmartphone">'.$langs->trans("ModulesMarketPlaceDesc")."<br></div><br>\n";
|
||||
}
|
||||
//if ($mode == 'marketplace') {
|
||||
// $deschelp = '<div class="info hideonsmartphone">'.$langs->trans("ModulesMarketPlaceDesc")."<br></div><br>\n";
|
||||
//}
|
||||
if ($mode == 'deploy') {
|
||||
$deschelp = '<div class="info hideonsmartphone">'.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."<br></div><br>\n";
|
||||
}
|
||||
|
|
@ -722,6 +728,10 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
|||
/** @var DolibarrModules $objMod */
|
||||
$objMod = $modules[$modName];
|
||||
|
||||
if (!is_object($objMod)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//print $objMod->name." - ".$key." - ".$objMod->version."<br>";
|
||||
if ($mode == 'expdev' && $objMod->version != 'development' && $objMod->version != 'experimental') {
|
||||
continue; // Discard if not for current tab
|
||||
|
|
@ -889,7 +899,8 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
|||
|
||||
if (!empty($objMod->disabled)) {
|
||||
$codeenabledisable .= $langs->trans("Disabled");
|
||||
} elseif (!empty($objMod->always_enabled) || ((isModEnabled('multicompany') && $objMod->core_enabled) && ($user->entity || $conf->entity != 1))) {
|
||||
} elseif (is_object($objMod)
|
||||
&& (!empty($objMod->always_enabled) || ((isModEnabled('multicompany') && $objMod->core_enabled) && ($user->entity || $conf->entity != 1)))) {
|
||||
// @phan-suppress-next-line PhanUndeclaredMethod
|
||||
if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) {
|
||||
$codeenabledisable .= $langs->trans("Used");
|
||||
|
|
@ -902,7 +913,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
|||
}
|
||||
} else {
|
||||
// @phan-suppress-next-line PhanUndeclaredMethod
|
||||
if (!empty($objMod->warnings_unactivation[$mysoc->country_code]) && method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) {
|
||||
if (is_object($objMod) && !empty($objMod->warnings_unactivation[$mysoc->country_code]) && method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) {
|
||||
$codeenabledisable .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&token='.newToken().'&module_position='.$module_position.'&action=reset_confirm&confirm_message_code='.urlencode($objMod->warnings_unactivation[$mysoc->country_code]).'&value='.$modName.'&mode='.$mode.$param.'">';
|
||||
$codeenabledisable .= img_picto($langs->trans("Activated").($warningstring ? ' '.$warningstring : ''), 'switch_on');
|
||||
$codeenabledisable .= '</a>';
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ if ($action == 'updateMask') {
|
|||
$maskconstmrp = GETPOST('maskconstMo', 'aZ09');
|
||||
$maskmrp = GETPOST('maskMo', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconstmrp && preg_match('/_MASK$/', $maskconstmrp)) {
|
||||
$res = dolibarr_set_const($db, $maskconstmrp, $maskmrp, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -44,6 +45,8 @@ $action = GETPOST('action', 'aZ09');
|
|||
$attrname = GETPOST('attrname', 'alpha');
|
||||
$elementtype = 'mrp_mo';
|
||||
|
||||
$help_url = '';
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* <one line to give the program's name and a brief idea of what it does.>
|
||||
* Copyright (C) 2015 ATM Consulting <support@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -148,7 +149,7 @@ $sql = "SELECT code_iso, label, unicode, active FROM ".MAIN_DB_PREFIX."c_currenc
|
|||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
while ($obj = $db->fetch_object($resql)) {
|
||||
$TAvailableCurrency[$obj->code_iso] = array('code'=>$obj->code_iso, 'active'=>$obj->active);
|
||||
$TAvailableCurrency[$obj->code_iso] = array('code' => $obj->code_iso, 'active' => $obj->active);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +208,7 @@ print '<tr class="oddeven">';
|
|||
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").'</td>';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MULTICURRENCY_USE_ORIGIN_TX', null, null, 0, 0, 0, 2, 0, 1);
|
||||
print ajax_constantonoff('MULTICURRENCY_USE_ORIGIN_TX', array(), null, 0, 0, 0, 2, 0, 1);
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MULTICURRENCY_USE_ORIGIN_TX", $arrval, $conf->global->MULTICURRENCY_USE_ORIGIN_TX);
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ if (!getDolGlobalString('PAYMENT_ADDON')) {
|
|||
if ($action == 'updateMask') {
|
||||
$maskconstpayment = GETPOST('maskconstpayment', 'aZ09');
|
||||
$maskpayment = GETPOST('maskpayment', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconstpayment && preg_match('/_MASK$/', $maskconstpayment)) {
|
||||
$res = dolibarr_set_const($db, $maskconstpayment, $maskpayment, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
@ -220,7 +223,7 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
if (getDolGlobalString('PAYMENT_ADDON') . '.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (!empty($module->error)) {
|
||||
dol_htmloutput_mesg($module->error, '', 'error', 1);
|
||||
dol_htmloutput_mesg($module->error, array(), 'error', 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ print '<tr class="oddeven"><td>';
|
|||
print $form->textwithpicto($langs->trans("PDFIn2Languages"), $langs->trans("PDF_USE_ALSO_LANGUAGE_CODE"));
|
||||
print '</td><td>';
|
||||
$selected = GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? GETPOST('PDF_USE_ALSO_LANGUAGE_CODE') : getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE');
|
||||
print $formadmin->select_language($selected, 'PDF_USE_ALSO_LANGUAGE_CODE', 0, null, 1);
|
||||
print $formadmin->select_language($selected, 'PDF_USE_ALSO_LANGUAGE_CODE', 0, array(), 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Height of logo
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@ $error = 0;
|
|||
if ($action == 'updateMask') {
|
||||
$maskconstpropal = GETPOST('maskconstpropal', 'aZ09');
|
||||
$maskpropal = GETPOST('maskpropal', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconstpropal && preg_match('/_MASK$/', $maskconstpropal)) {
|
||||
$res = dolibarr_set_const($db, $maskconstpropal, $maskpropal, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -307,6 +307,7 @@ $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_valu
|
|||
print load_fiche_titre($langs->trans("ReceiptPrinterSetup"), $linkback, 'title_setup');
|
||||
|
||||
$head = receiptprinteradmin_prepare_head($mode);
|
||||
$line = -1;
|
||||
|
||||
// mode = config
|
||||
if ($mode == 'config' && $user->admin) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -62,7 +63,7 @@ if ($action == 'update' || $action == 'add') {
|
|||
foreach ($constnamearray as $key => $val) {
|
||||
$constname = dol_escape_htmltag($constnamearray[$key]);
|
||||
$constvalue = dol_escape_htmltag($constvaluearray[$key]);
|
||||
$consttype = dol_escape_htmltag($consttypearray[$key]);
|
||||
$consttype = (int) $consttypearray[$key];
|
||||
$constnote = dol_escape_htmltag($constnotearray[$key]);
|
||||
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ if ($action == 'updateMask') {
|
|||
$maskinvoice = GETPOST('maskinvoice', 'alpha');
|
||||
$maskcredit = GETPOST('maskcredit', 'alpha');
|
||||
$maskdeposit = GETPOST('maskdeposit', 'alpha');
|
||||
$res = 0;
|
||||
|
||||
if ($maskconstinvoice && preg_match('/_MASK$/', $maskconstinvoice)) {
|
||||
$res = dolibarr_set_const($db, $maskconstinvoice, $maskinvoice, 'chaine', 0, '', $conf->entity);
|
||||
|
|
@ -379,6 +380,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print "<td>\n";
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db, $specimenthirdparty);
|
||||
'@phan-var-force ModelePDFSuppliersInvoices $module';
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ if ($action == 'updateMask') {
|
|||
$maskconstorder = GETPOST('maskconstorder', 'aZ09');
|
||||
$maskvalue = GETPOST('maskorder', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconstorder && preg_match('/_MASK$/', $maskconstorder)) {
|
||||
$res = dolibarr_set_const($db, $maskconstorder, $maskvalue, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
@ -381,8 +383,7 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db, new CommandeFournisseur($db));
|
||||
|
||||
'@phan-var-force ModeleNumRefSuppliersOrders $module';
|
||||
|
||||
'@phan-var-force ModelePDFSuppliersOrders $module';
|
||||
|
||||
print "<tr class=\"oddeven\">\n";
|
||||
print "<td>";
|
||||
|
|
@ -391,6 +392,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print "<td>\n";
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db, $specimenthirdparty);
|
||||
'@phan-var-force ModelePDFSuppliersOrders $module';
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
|||
if ($action == 'updateMask') {
|
||||
$maskconstsupplierpayment = GETPOST('maskconstsupplierpayment', 'aZ09');
|
||||
$masksupplierpayment = GETPOST('masksupplierpayment', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconstsupplierpayment && preg_match('/_MASK$/', $maskconstsupplierpayment)) {
|
||||
$res = dolibarr_set_const($db, $maskconstsupplierpayment, $masksupplierpayment, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
@ -299,7 +302,7 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
if (getDolGlobalString("PAYMENT_ADDON").'.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (!empty($module->error)) {
|
||||
dol_htmloutput_mesg($module->error, '', 'error', 1);
|
||||
dol_htmloutput_mesg($module->error, array(), 'error', 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
|||
if ($action == 'updateMask') {
|
||||
$maskconstsupplier_proposal = GETPOST('maskconstsupplier_proposal', 'aZ09');
|
||||
$masksupplier_proposal = GETPOST('masksupplier_proposal', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconstsupplier_proposal && preg_match('/_MASK$/', $maskconstsupplier_proposal)) {
|
||||
$res = dolibarr_set_const($db, $maskconstsupplier_proposal, $masksupplier_proposal, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ $activeModules = array();
|
|||
|
||||
if (getDolGlobalString('SYSLOG_HANDLERS')) {
|
||||
$activeModules = json_decode($conf->global->SYSLOG_HANDLERS);
|
||||
if (!is_array($activeModules)) {
|
||||
$activeModules = array();
|
||||
}
|
||||
}
|
||||
|
||||
$dirsyslogs = array_merge(array('/core/modules/syslog/'), $conf->modules_parts['syslog']);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -33,6 +34,8 @@ if (!$user->admin) {
|
|||
accessforbidden();
|
||||
}
|
||||
|
||||
$lastkeyshown = null;
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -94,6 +95,7 @@ if (preg_match('/mysql/i', $conf->db->type)) {
|
|||
if (!$base) {
|
||||
print $langs->trans("FeatureNotAvailableWithThisDatabaseDriver");
|
||||
} else {
|
||||
$i = 0;
|
||||
if ($base == 1) {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder">';
|
||||
|
|
@ -137,7 +139,7 @@ if (!$base) {
|
|||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td>'.($i+1).'</td>';
|
||||
print '<td>'.($i + 1).'</td>';
|
||||
print '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($obj->Name).'"><a href="dbtable.php?table='.urlencode($obj->Name).'">'.$obj->Name.'</a>';
|
||||
$tablename = preg_replace('/^'.MAIN_DB_PREFIX.'/', 'llx_', $obj->Name);
|
||||
|
||||
|
|
@ -217,7 +219,7 @@ if (!$base) {
|
|||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.($i+1).'</td>';
|
||||
print '<td>'.($i + 1).'</td>';
|
||||
print '<td>'.$row[0].'</td>';
|
||||
print '<td class="right">'.$row[1].'</td>';
|
||||
print '<td class="right">'.$row[2].'</td>';
|
||||
|
|
@ -256,7 +258,7 @@ if (!$base) {
|
|||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.($i+1).'</td>';
|
||||
print '<td>'.($i + 1).'</td>';
|
||||
print '<td>'.$row[0].'</td>';
|
||||
print '<td>'.$count.'</td>';
|
||||
print '</tr>';
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -97,6 +98,7 @@ print load_fiche_titre($langs->trans("Table")." ".$table, '', 'title_setup');
|
|||
|
||||
// Define request to get table description
|
||||
$base = 0;
|
||||
$sql = null;
|
||||
if (preg_match('/mysql/i', $conf->db->type)) {
|
||||
$sql = "SHOW TABLE STATUS LIKE '".$db->escape($db->escapeforlike($table))."'";
|
||||
$base = 1;
|
||||
|
|
@ -105,7 +107,7 @@ if (preg_match('/mysql/i', $conf->db->type)) {
|
|||
$base = 2;
|
||||
}
|
||||
|
||||
if (!$base) {
|
||||
if (!$base || $sql === null) {
|
||||
print $langs->trans("FeatureNotAvailableWithThisDatabaseDriver");
|
||||
} else {
|
||||
$resql = $db->query($sql);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2005-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -30,6 +31,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
'
|
||||
@phan-var-force string $dolibarr_main_document_root_alt
|
||||
';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("install", "other", "admin"));
|
||||
|
||||
|
|
@ -58,7 +62,7 @@ if ($action == 'getlastversion') {
|
|||
libxml_disable_entity_loader(true);
|
||||
}
|
||||
|
||||
$sfurl = simplexml_load_string($result['content'], 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
|
||||
$sfurl = simplexml_load_string($result['content'], 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NONET);
|
||||
} else {
|
||||
setEventMessages($langs->trans("ErrorPHPDoesNotSupport", "xml"), null, 'errors');
|
||||
}
|
||||
|
|
@ -324,7 +328,7 @@ $configfileparameters = array(
|
|||
'separator0' => '',
|
||||
'dolibarr_main_url_root' => $langs->trans("URLRoot"),
|
||||
'?dolibarr_main_url_root_alt' => $langs->trans("URLRoot").' (alt)',
|
||||
'dolibarr_main_document_root'=> $langs->trans("DocumentRootServer"),
|
||||
'dolibarr_main_document_root' => $langs->trans("DocumentRootServer"),
|
||||
'?dolibarr_main_document_root_alt' => $langs->trans("DocumentRootServer").' (alt)',
|
||||
'dolibarr_main_data_root' => $langs->trans("DataRootServer"),
|
||||
'separator1' => '',
|
||||
|
|
@ -340,8 +344,8 @@ $configfileparameters = array(
|
|||
'dolibarr_main_db_readonly' => $langs->trans("ReadOnlyMode"),
|
||||
'separator2' => '',
|
||||
'dolibarr_main_authentication' => $langs->trans("AuthenticationMode"),
|
||||
'?multicompany_transverse_mode'=> $langs->trans("MultiCompanyMode"),
|
||||
'separator'=> '',
|
||||
'?multicompany_transverse_mode' => $langs->trans("MultiCompanyMode"),
|
||||
'separator' => '',
|
||||
'?dolibarr_main_auth_ldap_login_attribute' => 'dolibarr_main_auth_ldap_login_attribute',
|
||||
'?dolibarr_main_auth_ldap_host' => 'dolibarr_main_auth_ldap_host',
|
||||
'?dolibarr_main_auth_ldap_port' => 'dolibarr_main_auth_ldap_port',
|
||||
|
|
@ -384,6 +388,9 @@ print '<td>'.$langs->trans("Name").'</td>';
|
|||
print '<td></td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
|
||||
$lastkeyshown = null;
|
||||
|
||||
foreach ($configfileparameters as $key => $value) {
|
||||
$ignore = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ foreach ($moduleList as $module) {
|
|||
|
||||
if (getDolGlobalString('MAIN_SHOW_PERMISSION')) {
|
||||
if (empty($langs->tab_translate[$translationKey])) {
|
||||
$tooltip = 'Missing translation (key '.$translationkey.' not found in admin.lang)';
|
||||
$tooltip = 'Missing translation (key '.$translationKey.' not found in admin.lang)';
|
||||
$idperms .= ' <img src="../../theme/eldy/img/warning.png" alt="Warning" title="'.$tooltip.'">';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -318,9 +318,9 @@ $db->close();
|
|||
* Return a result column with a translated result text
|
||||
*
|
||||
* @param string $name The name of the PHP extension
|
||||
* @param array $activated A list with all activated PHP extensions. Deprecated.
|
||||
* @param array $loaded A list with all loaded PHP extensions
|
||||
* @param array $functions A list with all PHP functions to check
|
||||
* @param string[] $activated A list with all activated PHP extensions. Deprecated.
|
||||
* @param string[] $loaded A list with all loaded PHP extensions
|
||||
* @param string[] $functions A list with all PHP functions to check
|
||||
* @return string
|
||||
*/
|
||||
function getResultColumn($name, array $activated, array $loaded, array $functions)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -372,6 +373,7 @@ if (!getDolGlobalString('SECURITY_DISABLE_TEST_ON_OBFUSCATED_CONF')) {
|
|||
|
||||
print '<strong>$dolibarr_main_stream_to_disable</strong>: ';
|
||||
// $arrayofstreamtodisable is defined into filefunc.inc.php
|
||||
'@phan-var-force string[] $arrayofstreamtodisable';
|
||||
if (empty($dolibarr_main_stream_to_disable)) {
|
||||
print '<span class="opacitymedium">'.$langs->trans("Undefined").' = '.implode(', ', $arrayofstreamtodisable).'</span>';
|
||||
} else {
|
||||
|
|
@ -729,7 +731,7 @@ $savMAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = getDolGlobalString('MAIN_RESTRICTHT
|
|||
$conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 0;
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1;
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 0;
|
||||
$result=dol_htmlwithnojs('<img onerror<=alert(document.domain)> src=>0xbeefed');
|
||||
$result = dol_htmlwithnojs('<img onerror<=alert(document.domain)> src=>0xbeefed');
|
||||
$conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = $savMAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES;
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = $savMAIN_RESTRICTHTML_ONLY_VALID_HTML;
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = $savMAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY;
|
||||
|
|
@ -753,7 +755,7 @@ if (extension_loaded('tidy') && class_exists("tidy")) {
|
|||
$conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 0;
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 0;
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1;
|
||||
$result=dol_htmlwithnojs('<img onerror<=alert(document.domain)> src=>0xbeefed');
|
||||
$result = dol_htmlwithnojs('<img onerror<=alert(document.domain)> src=>0xbeefed');
|
||||
$conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = $savMAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES;
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = $savMAIN_RESTRICTHTML_ONLY_VALID_HTML;
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = $savMAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2015-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2023 Joachim Kueter <git-jk@bloxera.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -100,6 +101,12 @@ if ($action == 'update') {
|
|||
$valuesellservice = 'payment';
|
||||
$valuebuyservice = 'payment';
|
||||
break;
|
||||
default:
|
||||
$valuesellproduct = null;
|
||||
$valuebuyproduct = null;
|
||||
$valuesellservice = null;
|
||||
$valuebuyservice = null;
|
||||
break;
|
||||
}
|
||||
|
||||
$res = dolibarr_set_const($db, 'TAX_MODE_SELL_PRODUCT', $valuesellproduct, 'chaine', 0, '', $conf->entity);
|
||||
|
|
@ -179,10 +186,10 @@ if (empty($mysoc->tva_assuj)) {
|
|||
} else {
|
||||
print '<td width="120">';
|
||||
$listval = array(
|
||||
'0'=>$langs->trans(""),
|
||||
'1'=>$langs->trans("Monthly"),
|
||||
'2'=>$langs->trans("Quarterly"),
|
||||
'3'=>$langs->trans("Annual"),
|
||||
'0' => $langs->trans(""),
|
||||
'1' => $langs->trans("Monthly"),
|
||||
'2' => $langs->trans("Quarterly"),
|
||||
'3' => $langs->trans("Annual"),
|
||||
);
|
||||
print $form->selectarray("MAIN_INFO_VAT_RETURN", $listval, getDolGlobalString('MAIN_INFO_VAT_RETURN'));
|
||||
print "</td>";
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ if ($action == 'updateMask') {
|
|||
$maskconstticket = GETPOST('maskconstticket', 'aZ09');
|
||||
$maskticket = GETPOST('maskticket', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconstticket && preg_match('/_MASK$/', $maskconstticket)) {
|
||||
$res = dolibarr_set_const($db, $maskconstticket, $maskticket, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -142,6 +143,7 @@ if ($savehandler == 'files') {
|
|||
print_liste_field_titre('');
|
||||
print "</tr>\n";
|
||||
|
||||
$i = 0;
|
||||
foreach ($listofsessions as $key => $sessionentry) {
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ if ($mode == 'overwrite') {
|
|||
print "\n";
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, null, 1, 0, $disablededit ? 1 : 0, 'maxwidth250', 1);
|
||||
print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, array(), 1, 0, $disablededit ? 1 : 0, 'maxwidth250', 1);
|
||||
print '</td>'."\n";
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat maxwidthonsmartphone"'.$disablededit.' name="transkey" id="transkey" value="'.(!empty($transkey) ? $transkey : "").'">';
|
||||
|
|
@ -513,7 +513,7 @@ if ($mode == 'searchkey') {
|
|||
|
||||
print '<tr class="liste_titre_filter"><td>';
|
||||
//print $formadmin->select_language($langcode,'langcode',0,null,$langs->trans("All"),0,0,'',1);
|
||||
print $formadmin->select_language($langcode, 'langcode', 0, null, 0, 0, 0, 'maxwidth250', 1);
|
||||
print $formadmin->select_language($langcode, 'langcode', 0, array(), 0, 0, 0, 'maxwidth250', 1);
|
||||
print '</td>'."\n";
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat maxwidthonsmartphone" name="transkey" value="'.dol_escape_htmltag($transkey).'">';
|
||||
|
|
@ -601,12 +601,12 @@ if ($mode == 'searchkey') {
|
|||
$obj = $db->fetch_object($result);
|
||||
}
|
||||
if (is_object($obj)) {
|
||||
print '<a class="editfielda reposition marginrightonly" href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$conf->entity.'&mode=overwrite&action=edit&token='.newToken().'">'.img_edit().'</a>';
|
||||
print ' ';
|
||||
print '<a class="marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$conf->entity.'&mode='.urlencode($mode).'&action=delete&token='.newToken().'&mode='.urlencode($mode).'">'.img_delete().'</a>';
|
||||
print ' ';
|
||||
$htmltext = $langs->trans("OriginalValueWas", '<i>'.$newlangfileonly->tab_translate[$key].'</i>');
|
||||
print $form->textwithpicto('', $htmltext, 1, 'info');
|
||||
print '<a class="editfielda reposition marginrightonly" href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$conf->entity.'&mode=overwrite&action=edit&token='.newToken().'">'.img_edit().'</a>';
|
||||
print ' ';
|
||||
print '<a class="marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$conf->entity.'&mode='.urlencode($mode).'&action=delete&token='.newToken().'&mode='.urlencode($mode).'">'.img_delete().'</a>';
|
||||
print ' ';
|
||||
$htmltext = $langs->trans("OriginalValueWas", '<i>'.$newlangfileonly->tab_translate[$key].'</i>');
|
||||
print $form->textwithpicto('', $htmltext, 1, 'info');
|
||||
}
|
||||
} elseif (getDolGlobalString('MAIN_ENABLE_OVERWRITE_TRANSLATION')) {
|
||||
//print $key.'-'.$val;
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ if ($action == 'edit') {
|
|||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// @phan-suppress-next-line PhanEmptyForeach
|
||||
foreach ($arrayofparameters as $constname => $val) {
|
||||
if ($val['enabled'] == 1) {
|
||||
$setupnotempty++;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -110,7 +111,7 @@ $tabcond[1] = (isModEnabled('website'));
|
|||
|
||||
// List of help for fields
|
||||
$tabhelp = array();
|
||||
$tabhelp[1] = array('ref'=>$langs->trans("EnterAnyCode"), 'virtualhost'=>$langs->trans("SetHereVirtualHost", DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/<i>websiteref</i>'));
|
||||
$tabhelp[1] = array('ref' => $langs->trans("EnterAnyCode"), 'virtualhost' => $langs->trans("SetHereVirtualHost", DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/<i>websiteref</i>'));
|
||||
|
||||
// List of check for fields (NOT USED YET)
|
||||
$tabfieldcheck = array();
|
||||
|
|
@ -158,11 +159,12 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
|||
$websitekey = strtolower(GETPOST('ref'));
|
||||
}
|
||||
|
||||
$newid = 0;
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
if ($ok && GETPOST('actionadd', 'alpha')) {
|
||||
if ($tabrowid[$id]) {
|
||||
// Get free id for insert
|
||||
$newid = 0;
|
||||
$sql = "SELECT MAX(".$tabrowid[$id].") newid from ".$tabname[$id];
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
|
|
@ -350,11 +352,17 @@ if ($action == $acts[0]) {
|
|||
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET status = 1 WHERE rowid = ".((int) $rowid);
|
||||
} else {
|
||||
$sql = null;
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
if ($sql !== null) {
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
dol_print_error(null, "No DB entry");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -368,11 +376,17 @@ if ($action == $acts[1]) {
|
|||
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET status = 0 WHERE rowid = ".((int) $rowid);
|
||||
} else {
|
||||
$sql = null;
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
if ($sql !== null) {
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
dol_print_error(null, "No DB entry");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -385,7 +399,7 @@ if ($action == $acts[1]) {
|
|||
$form = new Form($db);
|
||||
$formadmin = new FormAdmin($db);
|
||||
|
||||
llxHeader('', $langs->trans("WebsiteSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-website');
|
||||
llxHeader('', $langs->trans("WebsiteSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-website');
|
||||
|
||||
$titre = $langs->trans("WebsiteSetup");
|
||||
$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php').'">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
|
@ -581,7 +595,7 @@ if ($id) {
|
|||
print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
|
||||
if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) {
|
||||
$tmpaction = 'edit';
|
||||
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||
$parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
|
||||
$reshook = $hookmanager->executeHooks('editWebsiteFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
$error = $hookmanager->error;
|
||||
$errors = $hookmanager->errors;
|
||||
|
|
@ -597,7 +611,7 @@ if ($id) {
|
|||
print '</td>';
|
||||
} else {
|
||||
$tmpaction = 'view';
|
||||
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||
$parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
|
||||
$reshook = $hookmanager->executeHooks('viewWebsiteFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
$error = $hookmanager->error;
|
||||
|
|
@ -670,8 +684,8 @@ $db->close();
|
|||
/**
|
||||
* Show fields in insert/edit mode
|
||||
*
|
||||
* @param array $fieldlist Array of fields
|
||||
* @param Object $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string[] $fieldlist Array of fields
|
||||
* @param ?Object $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string $tabname Name of SQL table
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we don't want it to be rendered
|
||||
* @return void
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ if ($action == 'updateMask') {
|
|||
$maskconst = GETPOST('maskconstWorkstation', 'aZ09');
|
||||
$maskorder = GETPOST('maskWorkstation', 'alpha');
|
||||
|
||||
$res = 0;
|
||||
|
||||
if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
|
||||
$res = dolibarr_set_const($db, $maskconst, $maskorder, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
@ -90,6 +92,7 @@ if ($action == 'updateMask') {
|
|||
|
||||
$nameofclass = ucfirst($tmpobjectkey);
|
||||
$tmpobject = new $nameofclass($db);
|
||||
'@phan-var-force Workstation $tmpobject';
|
||||
$tmpobject->initAsSpecimen();
|
||||
|
||||
// Search template files
|
||||
|
|
@ -187,6 +190,7 @@ if ($action == 'edit') {
|
|||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// @phan-suppress-next-line PhanEmptyForeach
|
||||
foreach ($arrayofparameters as $key => $val) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
$tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -17,11 +18,11 @@
|
|||
* or see https://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/ai/class/ai.class.php
|
||||
* \ingroup ai
|
||||
* \brief Class files with common methods for Ai
|
||||
*/
|
||||
/**
|
||||
* \file htdocs/ai/class/ai.class.php
|
||||
* \ingroup ai
|
||||
* \brief Class files with common methods for Ai
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||
|
|
@ -75,7 +76,7 @@ class Ai
|
|||
* @param string $model Model name ('gpt-3.5-turbo', 'gpt-4-turbo', 'dall-e-3', ...)
|
||||
* @param string $function Code of the feature we want to use ('textgeneration', 'transcription', 'audiogeneration', 'imagegeneration', 'translation')
|
||||
* @param string $format Format for output ('', 'html', ...)
|
||||
* @return string|array $response Text or array if error
|
||||
* @return string|array{error:bool,message:string,code?:int,curl_error_no?:''|int,format?:string,service?:string,function?:string} $response Text or array if error
|
||||
*/
|
||||
public function generateContent($instructions, $model = 'auto', $function = 'textgeneration', $format = '')
|
||||
{
|
||||
|
|
@ -288,10 +289,10 @@ class Ai
|
|||
'error' => true,
|
||||
'message' => $errormessage,
|
||||
'code' => (empty($response['http_code']) ? 0 : $response['http_code']),
|
||||
'curl_error_no' => (empty($response['curl_error_no']) ? $response['curl_error_no'] : ''),
|
||||
'curl_error_no' => (!empty($response['curl_error_no']) ? $response['curl_error_no'] : ''),
|
||||
'format' => $format,
|
||||
'service' => $this->apiService,
|
||||
'function'=>$function
|
||||
'function' => $function
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2022 Alice Adminson <aadminson@example.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
/**
|
||||
* Prepare admin pages header
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{0:string,1:string,2:string}>
|
||||
*/
|
||||
function aiAdminPrepareHead()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,9 +75,9 @@ class DolibarrApi
|
|||
* Check and convert a string depending on its type/name.
|
||||
*
|
||||
* @param string $field Field name
|
||||
* @param string|array $value Value to check/clean
|
||||
* @param string|string[] $value Value to check/clean
|
||||
* @param Object $object Object
|
||||
* @return string|array Value cleaned
|
||||
* @return string|array<string,mixed> Value cleaned
|
||||
*/
|
||||
protected function _checkValForAPI($field, $value, $object)
|
||||
{
|
||||
|
|
@ -411,7 +411,7 @@ class DolibarrApi
|
|||
* Function to forge a SQL criteria from a Generic filter string.
|
||||
* Function no more used. Kept for backward compatibility with old APIs of modules
|
||||
*
|
||||
* @param array $matches Array of found string by regex search.
|
||||
* @param string[] $matches Array of found string by regex search.
|
||||
* Each entry is 1 and only 1 criteria.
|
||||
* Example: "t.ref:like:'SO-%'", "t.date_creation:<:'20160101'", "t.date_creation:<:'2016-01-01 12:30:00'", "t.nature:is:NULL", "t.field2:isnot:NULL"
|
||||
* @return string Forged criteria. Example: "t.field like 'abc%'"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -69,6 +70,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
|||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
$upload_dir = null;
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->asset->multidir_output[$object->entity ? $object->entity : $conf->entity]."/".get_exdir(0, 0, 0, 1, $object);
|
||||
}
|
||||
|
|
@ -103,7 +105,7 @@ $title = $langs->trans("Asset").' - '.$langs->trans("Files");
|
|||
$help_url = '';
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-asset page-card_documents');
|
||||
|
||||
if ($object->id) {
|
||||
if ($object->id && $upload_dir !== null) {
|
||||
/*
|
||||
* Show tabs
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -342,6 +342,7 @@ if (isModEnabled('societe')) {
|
|||
print $langs->trans("CurrentlyNWithoutBarCode", $nbthirdpartyno, $nbthirdpartytotal, $langs->transnoentitiesnoconv("ThirdParties"))."\n";
|
||||
|
||||
$disabledthirdparty = $disabledthirdparty1 = 0;
|
||||
$titleno = '';
|
||||
|
||||
if (is_object($modBarCodeThirdparty)) {
|
||||
print '<br>'.$langs->trans("BarCodeNumberManager").": ";
|
||||
|
|
@ -420,6 +421,7 @@ if (isModEnabled('product') || isModEnabled('service')) {
|
|||
|
||||
$disabledproduct = $disabledproduct1 = 0;
|
||||
|
||||
$titleno = '';
|
||||
if (is_object($modBarCodeProduct)) {
|
||||
print '<br>'.$langs->trans("BarCodeNumberManager").": ";
|
||||
$objproduct = new Product($db);
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ if (empty($reshook)) {
|
|||
$error++;
|
||||
}
|
||||
|
||||
$stdobject = null;
|
||||
if (!$error) {
|
||||
// Get encoder (barcode_type_coder) from barcode type id (barcode_type)
|
||||
$stdobject = new GenericObject($db);
|
||||
|
|
@ -151,7 +152,12 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$encoding = null;
|
||||
$diroutput = null;
|
||||
$template = null;
|
||||
$is2d = false;
|
||||
|
||||
if (!$error && $stdobject !== null) {
|
||||
$code = $forbarcode;
|
||||
$generator = $stdobject->barcode_type_coder; // coder (loaded by fetch_barcode). Engine.
|
||||
$encoding = strtoupper($stdobject->barcode_type_code); // code (loaded by fetch_barcode). Example 'ean', 'isbn', ...
|
||||
|
|
@ -186,7 +192,6 @@ if (empty($reshook)) {
|
|||
if ($generator != 'tcpdfbarcode') { // $generator can be 'phpbarcode' (with this generator, barcode is generated on disk first) or 'tcpdfbarcode' (no need to enter this section with this generator).
|
||||
'@phan-var-force modPhpbarcode $module';
|
||||
$template = 'standardlabel';
|
||||
$is2d = false;
|
||||
if ($module->encodingIsSupported($encoding)) {
|
||||
$barcodeimage = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png';
|
||||
dol_delete_file($barcodeimage);
|
||||
|
|
|
|||
|
|
@ -502,6 +502,10 @@ if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
|||
}
|
||||
print '</tr>';
|
||||
|
||||
$checkresult = array();
|
||||
$checkdetail = array();
|
||||
$loweridinerror = 0;
|
||||
|
||||
if (getDolGlobalString('BLOCKEDLOG_SCAN_ALL_FOR_LOWERIDINERROR')) {
|
||||
// This is version that is faster but require more memory and report errors that are outside the filter range
|
||||
|
||||
|
|
@ -509,9 +513,6 @@ if (getDolGlobalString('BLOCKEDLOG_SCAN_ALL_FOR_LOWERIDINERROR')) {
|
|||
// to find the $loweridinerror.
|
||||
} else {
|
||||
// This is version that optimize the memory (but will not report errors that are outside the filter range)
|
||||
$loweridinerror = 0;
|
||||
$checkresult = array();
|
||||
$checkdetail = array();
|
||||
if (is_array($blocks)) {
|
||||
foreach ($blocks as &$block) {
|
||||
$tmpcheckresult = $block->checkSignature('', 1); // Note: this make a sql request at each call, we can't avoid this as the sorting order is various
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -64,7 +65,7 @@ $blocks = $block_static->getLog('just_certified', 0, 0, 'rowid', 'ASC');
|
|||
|
||||
$auth->signature = $block_static->getSignature();
|
||||
|
||||
if (is_array($bocks)) {
|
||||
if (is_array($blocks)) {
|
||||
foreach ($blocks as &$b) {
|
||||
$auth->blockchain .= $b->signature;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -24,7 +25,7 @@
|
|||
/**
|
||||
* Define head array for tabs of blockedlog tools setup pages
|
||||
*
|
||||
* @return Array of head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of head
|
||||
*/
|
||||
function blockedlogadmin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -75,6 +76,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
|||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
$upload_dir = null;
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->bom->multidir_output[$object->entity ? $object->entity : 1]."/".get_exdir(0, 0, 0, 1, $object);
|
||||
}
|
||||
|
|
@ -108,7 +110,7 @@ $morehtmlref = "";
|
|||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-bom page-card_documents');
|
||||
|
||||
if ($object->id) {
|
||||
if ($object->id && $upload_dir !== null) {
|
||||
/*
|
||||
* Show tabs
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Vincent Maury <vmaury@timgroup.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -38,8 +39,11 @@ if (empty($object) || !is_object($object)) {
|
|||
exit;
|
||||
}
|
||||
|
||||
'@phan-var-force CommonObject $this
|
||||
@phan-var-force CommonObject $object';
|
||||
'
|
||||
@phan-var-force CommonObject $this
|
||||
@phan-var-force CommonObject $object
|
||||
@phan-var-force Societe $buyer
|
||||
';
|
||||
|
||||
global $forceall, $forcetoshowtitlelines, $filtertype;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 Vincent Maury <vmaury@timgroup.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -41,8 +42,15 @@ if (empty($object) || !is_object($object)) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
'@phan-var-force CommonObject $this
|
||||
@phan-var-force CommonObject $object';
|
||||
'
|
||||
@phan-var-force CommonObject $this
|
||||
@phan-var-force CommonObject $object
|
||||
@phan-var-force int $i
|
||||
@phan-var-force bool $var
|
||||
@phan-var-force BOMLine $line
|
||||
@phan-var-force Societe $buyer
|
||||
@phan-var-force Societe $seller
|
||||
';
|
||||
|
||||
global $forceall, $filtertype;
|
||||
|
||||
|
|
@ -94,13 +102,13 @@ if ($line->fk_product > 0) {
|
|||
|
||||
if (is_object($hookmanager)) {
|
||||
$fk_parent_line = (GETPOST('fk_parent_line') ? GETPOST('fk_parent_line') : $line->fk_parent_line);
|
||||
$parameters = array('line'=>$line, 'fk_parent_line'=>$fk_parent_line, 'var'=>$var, 'dateSelector'=>$dateSelector, 'seller'=>$seller, 'buyer'=>$buyer);
|
||||
$parameters = array('line' => $line, 'fk_parent_line' => $fk_parent_line, 'var' => $var, 'dateSelector' => $dateSelector, 'seller' => $seller, 'buyer' => $buyer);
|
||||
$reshook = $hookmanager->executeHooks('formEditProductOptions', $parameters, $this, $action);
|
||||
}
|
||||
|
||||
//Line extrafield
|
||||
if (is_object($objectline) && !empty($extrafields)) {
|
||||
$temps = $line->showOptionals($extrafields, 'edit', array('class'=>'tredited'), '', '', 1, 'line');
|
||||
$temps = $line->showOptionals($extrafields, 'edit', array('class' => 'tredited'), '', '', 1, 'line');
|
||||
if (!empty($temps)) {
|
||||
print '<div style="padding-top: 10px" id="extrafield_lines_area_edit" name="extrafield_lines_area_edit">';
|
||||
print $temps;
|
||||
|
|
|
|||
|
|
@ -38,10 +38,13 @@
|
|||
* @var CommonObjectLine $line
|
||||
* @var int $num
|
||||
*/
|
||||
'@phan-var-force CommonObjectLine $line
|
||||
@phan-var-force int $num
|
||||
@phan-var-force CommonObject $this
|
||||
@phan-var-force CommonObject $object';
|
||||
'
|
||||
@phan-var-force CommonObjectLine $line
|
||||
@phan-var-force int $num
|
||||
@phan-var-force int $i
|
||||
@phan-var-force CommonObject $this
|
||||
@phan-var-force CommonObject $object
|
||||
';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2022 Alice Adminson <aadminson@example.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -70,6 +71,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
|||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
$upload_dir = null;
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->bookcal->multidir_output[$object->entity ? $object->entity : $conf->entity]."/availabilities/".get_exdir(0, 0, 0, 1, $object);
|
||||
}
|
||||
|
|
@ -116,7 +118,7 @@ $help_url = '';
|
|||
//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-bookcal page-card_availabilities_document');
|
||||
|
||||
if ($object->id) {
|
||||
if ($object->id && $upload_dir !== null) {
|
||||
/*
|
||||
* Show tabs
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2023-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -95,6 +96,7 @@ if (!$permissiontoread) {
|
|||
*/
|
||||
|
||||
$parameters = '';
|
||||
$helpurl = '';
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023 Alice Adminson <aadminson@example.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -68,6 +69,7 @@ $diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user-
|
|||
$hookmanager->initHooks(array('calendardocument', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
// Fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$upload_dir = null;
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
|
|
|||
|
|
@ -58,6 +58,14 @@ $position = GETPOSTINT('position');
|
|||
$visible = GETPOSTINT('visible');
|
||||
$parent = GETPOSTINT('parent');
|
||||
|
||||
$idProdOrigin = 0;
|
||||
$idSupplierOrigin = 0;
|
||||
$idCompanyOrigin = 0;
|
||||
$idMemberOrigin = 0;
|
||||
$idContactOrigin = 0;
|
||||
$idProjectOrigin = 0;
|
||||
$idProdOrigin = 0;
|
||||
|
||||
if ($origin) {
|
||||
if ($type == Categorie::TYPE_PRODUCT) {
|
||||
$idProdOrigin = $origin;
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ $parameters = array('type' => $type, 'id' => $id, 'label' => $label);
|
|||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
// Remove element from category
|
||||
if ($id > 0 && $removeelem > 0 && $action == 'unlink') { // Test on permission not required here. Done later according to type of object.
|
||||
$tmpobject = null;
|
||||
if ($type == Categorie::TYPE_PRODUCT && ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer'))) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$tmpobject = new Product($db);
|
||||
|
|
@ -185,6 +186,7 @@ if ($elemid && $action == 'addintocategory') { // Test on permission not require
|
|||
($type == Categorie::TYPE_USER && $user->hasRight('user', 'user', 'creer')) ||
|
||||
($type == Categorie::TYPE_ACCOUNT && $user->hasRight('banque', 'configurer'))
|
||||
) {
|
||||
$newobject = null;
|
||||
if ($type == Categorie::TYPE_PRODUCT) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$newobject = new Product($db);
|
||||
|
|
@ -224,7 +226,9 @@ if ($elemid && $action == 'addintocategory') { // Test on permission not require
|
|||
} else {
|
||||
dol_print_error(null, "Not supported value of type = ".$type);
|
||||
}
|
||||
$result = $newobject->fetch($elemid);
|
||||
if ($newobject !== null) {
|
||||
$result = $newobject->fetch($elemid);
|
||||
}
|
||||
|
||||
// Add into category
|
||||
$result = $object->add_type($newobject, $elementtype);
|
||||
|
|
@ -741,7 +745,7 @@ if ($type == Categorie::TYPE_SUPPLIER) {
|
|||
// Link to delete from category
|
||||
print '<td class="right">';
|
||||
if ($permission) {
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$typeid."&action=unlink&token=".newToken()."&removeelem=".$soc->id.($limit?'&limit='.$limit:'').'">';
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$typeid."&action=unlink&token=".newToken()."&removeelem=".$soc->id.($limit ? '&limit='.$limit : '').'">';
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
print "</a>";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -37,6 +38,8 @@ if (!$user->admin) {
|
|||
accessforbidden();
|
||||
}
|
||||
|
||||
'@phan-var-force WebsitePage $objectpage';
|
||||
|
||||
$conf->dol_hide_leftmenu = 1; // Force hide of left menu.
|
||||
|
||||
$error = 0;
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ if ($complete == 'na' || $complete == -2) {
|
|||
$complete = -1;
|
||||
}
|
||||
|
||||
$tzforfullday = null;
|
||||
if ($fulldayevent) {
|
||||
$tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT');
|
||||
// For "full day" events, we must store date in GMT (It must be viewed as same moment everywhere)
|
||||
|
|
@ -123,6 +124,7 @@ $formactions = new FormActions($db);
|
|||
// Load object
|
||||
if ($id > 0 && $action != 'add') {
|
||||
$ret = $object->fetch($id);
|
||||
$ret1 = 0;
|
||||
if ($ret > 0) {
|
||||
$ret = $object->fetch_optionals();
|
||||
$ret1 = $object->fetch_userassigned();
|
||||
|
|
@ -517,6 +519,7 @@ if (empty($reshook) && $action == 'add' && $usercancreate) {
|
|||
|
||||
// Creation of action/event
|
||||
$idaction = $object->create($user);
|
||||
$moreparam = '';
|
||||
|
||||
if ($idaction > 0) {
|
||||
if (!$object->error) {
|
||||
|
|
@ -526,7 +529,6 @@ if (empty($reshook) && $action == 'add' && $usercancreate) {
|
|||
|
||||
unset($_SESSION['assignedtouser']);
|
||||
|
||||
$moreparam = '';
|
||||
if ($user->id != $object->userownerid) {
|
||||
$moreparam = "filtert=-1"; // We force to remove filter so created record is visible when going back to per user view.
|
||||
}
|
||||
|
|
@ -604,6 +606,8 @@ if (empty($reshook) && $action == 'add' && $usercancreate) {
|
|||
}
|
||||
|
||||
if ($eventisrecurring) {
|
||||
$dayoffset = 0;
|
||||
$monthoffset = 0;
|
||||
// We set first date of recurrence and offsets
|
||||
if ($selectedrecurrulefreq == 'WEEKLY' && !empty($selectedrecurrulebyday)) {
|
||||
$firstdatearray = dol_get_first_day_week(GETPOSTINT("apday"), GETPOSTINT("apmonth"), GETPOSTINT("apyear"));
|
||||
|
|
@ -718,9 +722,9 @@ if (empty($reshook) && $action == 'add' && $usercancreate) {
|
|||
|
||||
// increment date for recurrent events
|
||||
$datep = dol_time_plus_duree($datep, $dayoffset, 'd');
|
||||
$datep = dol_time_plus_duree($datep, $monthoffset, 'm');
|
||||
$datep = dol_time_plus_duree($datep, $monthoffset, 'm'); // @phan-suppress-current-line PhanPluginSuspiciousParamOrder
|
||||
$datef = dol_time_plus_duree($datef, $dayoffset, 'd');
|
||||
$datef = dol_time_plus_duree($datef, $monthoffset, 'm');
|
||||
$datef = dol_time_plus_duree($datef, $monthoffset, 'm'); // @phan-suppress-current-line PhanPluginSuspiciousParamOrder
|
||||
}
|
||||
}
|
||||
if (!empty($backtopage) && !$error) {
|
||||
|
|
@ -775,7 +779,7 @@ if (empty($reshook) && $action == 'update' && $usercancreate) {
|
|||
$datef = dol_mktime(GETPOST("p2hour", 'int'), GETPOST("p2min", 'int'), GETPOST("apsec", 'int'), GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuserrel');
|
||||
}
|
||||
//set end date to now if percentage is set to 100 and end date not set
|
||||
$datef = (!$datef && $percentage == 100)?dol_now():$datef;
|
||||
$datef = (!$datef && $percentage == 100) ? dol_now() : $datef;
|
||||
|
||||
if ($object->elementtype == 'ticket') { // code should be TICKET_MSG, TICKET_MSG_PRIVATE, TICKET_MSG_SENTBYMAIL, TICKET_MSG_PRIVATE_SENTBYMAIL
|
||||
if ($private) {
|
||||
|
|
|
|||
|
|
@ -313,7 +313,22 @@ if (empty($user->conf->AGENDA_DISABLE_EXT)) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
$firstdaytoshow = 0;
|
||||
$max_day_in_month = 0;
|
||||
$lastdaytoshow = 0;
|
||||
$tmpday = 0;
|
||||
$datestart = 0;
|
||||
$dateend = 0;
|
||||
$first_day = 0;
|
||||
$first_month = 0;
|
||||
$first_year = 0;
|
||||
$prev_day = 0;
|
||||
$prev_month = 0;
|
||||
$prev_year = 0;
|
||||
$max_day_in_prev_month = 0;
|
||||
$next_day = 0;
|
||||
$next_month = 0;
|
||||
$next_year = 0;
|
||||
if (empty($mode) || $mode == 'show_month') {
|
||||
$prev = dol_get_prev_month($month, $year);
|
||||
$prev_year = $prev['year'];
|
||||
|
|
|
|||
|
|
@ -832,6 +832,8 @@ $currentdaytoshow = $firstdaytoshow;
|
|||
echo '<div class="div-table-responsive">';
|
||||
//print dol_print_date($currentdaytoshow, 'dayhour', 'gmt');
|
||||
|
||||
$colorsbytype = array();
|
||||
|
||||
while ($currentdaytoshow < $lastdaytoshow) {
|
||||
echo '<table class="centpercent noborder nocellnopadd cal_month">';
|
||||
|
||||
|
|
@ -988,7 +990,6 @@ while ($currentdaytoshow < $lastdaytoshow) {
|
|||
}
|
||||
|
||||
// Load array of colors by type
|
||||
$colorsbytype = array();
|
||||
$labelbytype = array();
|
||||
$sql = "SELECT code, color, libelle as label FROM ".MAIN_DB_PREFIX."c_actioncomm ORDER BY position";
|
||||
$resql = $db->query($sql);
|
||||
|
|
|
|||
|
|
@ -502,6 +502,7 @@ if ($object->id > 0) {
|
|||
print '</tr>';
|
||||
}
|
||||
|
||||
$limit_field_type = '';
|
||||
// Max outstanding bill
|
||||
if ($object->client) {
|
||||
print '<tr class="nowrap">';
|
||||
|
|
@ -923,12 +924,12 @@ if ($object->id > 0) {
|
|||
}
|
||||
}
|
||||
|
||||
$orders2invoice = null;
|
||||
$param = "";
|
||||
/*
|
||||
* Latest orders
|
||||
*/
|
||||
if (isModEnabled('order') && $user->hasRight('commande', 'lire')) {
|
||||
$param = "";
|
||||
|
||||
$sql = "SELECT s.nom, s.rowid";
|
||||
$sql .= ", c.rowid as cid, c.entity, c.fk_projet, c.total_ht";
|
||||
$sql .= ", c.total_tva";
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -70,6 +71,8 @@ $result = restrictedArea($user, 'societe', $socid, '');
|
|||
|
||||
llxHeader('', $langs->trans("Contacts"));
|
||||
|
||||
$urlfiche = null;
|
||||
|
||||
if ($type == "c" || $type == "p") {
|
||||
$label = $langs->trans("Customers");
|
||||
$urlfiche = "card.php";
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -63,6 +64,7 @@ if (isset($user->socid) && $user->socid > 0) {
|
|||
$socid = $user->socid;
|
||||
}
|
||||
|
||||
$total = 0;
|
||||
|
||||
$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT', 5);
|
||||
$maxofloop = (!getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD);
|
||||
|
|
@ -90,6 +92,11 @@ if (!$user->hasRight('propal', 'read') && !$user->hasRight('supplier_proposal',
|
|||
$form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
$companystatic = new Societe($db);
|
||||
$propalstatic = null;
|
||||
$supplierproposalstatic = null;
|
||||
$orderstatic = null;
|
||||
$supplierorderstatic = null;
|
||||
$fichinterstatic = null;
|
||||
if (isModEnabled("propal")) {
|
||||
$propalstatic = new Propal($db);
|
||||
}
|
||||
|
|
@ -131,7 +138,7 @@ if ($tmp) {
|
|||
* Draft customer proposals
|
||||
*/
|
||||
|
||||
if (isModEnabled("propal") && $user->hasRight("propal", "lire")) {
|
||||
if (isModEnabled("propal") && $user->hasRight("propal", "lire") && is_object($propalstatic)) {
|
||||
$sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.total_tva, p.total_ttc, p.fk_statut as status";
|
||||
$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
|
||||
$sql .= ", s.code_client, s.code_compta as code_compta_client, s.client";
|
||||
|
|
@ -231,7 +238,7 @@ if (isModEnabled("propal") && $user->hasRight("propal", "lire")) {
|
|||
* Draft supplier proposals
|
||||
*/
|
||||
|
||||
if (isModEnabled('supplier_proposal') && $user->hasRight("supplier_proposal", "lire")) {
|
||||
if (isModEnabled('supplier_proposal') && $user->hasRight("supplier_proposal", "lire") && is_object($supplierproposalstatic)) {
|
||||
$sql = "SELECT p.rowid, p.ref, p.total_ht, p.total_tva, p.total_ttc, p.fk_statut as status";
|
||||
$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
|
||||
$sql .= ", s.code_client, s.code_compta as code_compta_client, s.client";
|
||||
|
|
@ -329,7 +336,7 @@ if (isModEnabled('supplier_proposal') && $user->hasRight("supplier_proposal", "l
|
|||
* Draft sales orders
|
||||
*/
|
||||
|
||||
if (isModEnabled('order') && $user->hasRight('commande', 'lire')) {
|
||||
if (isModEnabled('order') && $user->hasRight('commande', 'lire') && is_object($orderstatic)) {
|
||||
$sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.total_tva, c.total_ttc, c.fk_statut as status";
|
||||
$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
|
||||
$sql .= ", s.code_client, s.code_compta as code_compta_client, s.client";
|
||||
|
|
@ -528,7 +535,7 @@ if ((isModEnabled("fournisseur") && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMO
|
|||
/*
|
||||
* Draft interventions
|
||||
*/
|
||||
if (isModEnabled('intervention')) {
|
||||
if (isModEnabled('intervention') && is_object($fichinterstatic)) {
|
||||
$sql = "SELECT f.rowid, f.ref, s.nom as name, f.fk_statut, f.duree as duration";
|
||||
$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
|
||||
$sql .= ", s.code_client, s.code_compta as code_compta_client, s.client";
|
||||
|
|
@ -565,9 +572,9 @@ if (isModEnabled('intervention')) {
|
|||
while ($i < $nbofloop) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$fichinterstatic->id=$obj->rowid;
|
||||
$fichinterstatic->ref=$obj->ref;
|
||||
$fichinterstatic->statut=$obj->fk_statut;
|
||||
$fichinterstatic->id = $obj->rowid;
|
||||
$fichinterstatic->ref = $obj->ref;
|
||||
$fichinterstatic->statut = $obj->fk_statut;
|
||||
|
||||
$companystatic->id = $obj->socid;
|
||||
$companystatic->name = $obj->name;
|
||||
|
|
@ -721,7 +728,7 @@ if (isModEnabled("societe") && $user->hasRight('societe', 'lire')) {
|
|||
* Last modified proposals
|
||||
*/
|
||||
|
||||
if (isModEnabled('propal')) {
|
||||
if (isModEnabled('propal') && is_object($propalstatic)) {
|
||||
$sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut as status, c.tms as datem,";
|
||||
$sql .= " s.nom as socname, s.rowid as socid, s.canvas, s.client, s.email, s.code_compta as code_compta_client";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."propal as c,";
|
||||
|
|
@ -1216,7 +1223,7 @@ if (isModEnabled("propal") && $user->hasRight("propal", "lire")) {
|
|||
/*
|
||||
* Opened (validated) order
|
||||
*/
|
||||
if (isModEnabled('order') && $user->hasRight('commande', 'lire')) {
|
||||
if (isModEnabled('order') && $user->hasRight('commande', 'lire') && is_object($orderstatic)) {
|
||||
$sql = "SELECT c.rowid as commandeid, c.total_ttc, c.total_ht, c.total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv, c.facture as billed";
|
||||
$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
|
||||
$sql .= ", s.code_client, s.code_compta as code_compta_client, s.client";
|
||||
|
|
|
|||
|
|
@ -496,9 +496,9 @@ if (empty($reshook)) {
|
|||
// other are set at begin of page
|
||||
$substitutionarray['__EMAIL__'] = $object->sendto;
|
||||
$substitutionarray['__MAILTOEMAIL__'] = '<a href="mailto:'.$object->sendto.'">'.$object->sendto.'</a>';
|
||||
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefinedintestmode&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefinedintestmode-".$obj->sendto."-0", 'md5').'&email='.urlencode($obj->sendto).'&mtid=0" width="1" height="1" style="width:1px;height:1px" border="0"/>';
|
||||
$substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag=undefinedintestmode&unsuscrib=1&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefinedintestmode-".$obj->sendto."-0", 'md5').'&email='.urlencode($obj->sendto).'&mtid=0" target="_blank" rel="noopener noreferrer">'.$langs->trans("MailUnsubcribe").'</a>';
|
||||
$substitutionarray['__UNSUBSCRIBE_URL__'] = DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag=undefinedintestmode&unsuscrib=1&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefinedintestmode-".$obj->sendto."-0", 'md5').'&email='.urlencode($obj->sendto).'&mtid=0';
|
||||
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefinedintestmode&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefinedintestmode-".$object->sendto."-0", 'md5').'&email='.urlencode($object->sendto).'&mtid=0" width="1" height="1" style="width:1px;height:1px" border="0"/>';
|
||||
$substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag=undefinedintestmode&unsuscrib=1&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefinedintestmode-".$object->sendto."-0", 'md5').'&email='.urlencode($object->sendto).'&mtid=0" target="_blank" rel="noopener noreferrer">'.$langs->trans("MailUnsubcribe").'</a>';
|
||||
$substitutionarray['__UNSUBSCRIBE_URL__'] = DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag=undefinedintestmode&unsuscrib=1&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefinedintestmode-".$object->sendto."-0", 'md5').'&email='.urlencode($object->sendto).'&mtid=0';
|
||||
|
||||
// Subject and message substitutions
|
||||
complete_substitutions_array($substitutionarray, $langs, $targetobject);
|
||||
|
|
@ -544,10 +544,9 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
$mesgs = array();
|
||||
// Action add emailing
|
||||
if ($action == 'add' && $permissiontocreate) {
|
||||
$mesgs = array();
|
||||
|
||||
$object->messtype = (string) GETPOST("messtype");
|
||||
if ($object->messtype == 'sms') {
|
||||
$object->email_from = (string) GETPOST("from_phone", 'alphawithlgt'); // Must allow 'name <email>'
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
||||
|
||||
|
||||
'
|
||||
@phan-var-force array{0:string,1:string} $bctag From main.inc
|
||||
';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mails", "admin"));
|
||||
|
||||
|
|
@ -117,6 +121,7 @@ if (!GETPOST('confirmmassaction', 'alpha')) {
|
|||
if ($action == 'add' && $permissiontocreate) { // Add recipients
|
||||
$module = GETPOST("module", 'alpha');
|
||||
$result = -1;
|
||||
$obj = null;
|
||||
|
||||
foreach ($modulesdir as $dir) {
|
||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||
|
|
@ -133,8 +138,10 @@ if ($action == 'add' && $permissiontocreate) { // Add recipients
|
|||
// Add targets into database
|
||||
dol_syslog("Call add_to_target() on class ".$classname." evenunsubscribe=".$object->evenunsubscribe);
|
||||
|
||||
$obj = null;
|
||||
if (class_exists($classname)) {
|
||||
$obj = new $classname($db);
|
||||
'@phan-var-force MailingTargets $obj';
|
||||
$obj->evenunsubscribe = $object->evenunsubscribe;
|
||||
|
||||
$result = $obj->add_to_target($id);
|
||||
|
|
@ -158,7 +165,7 @@ if ($action == 'add' && $permissiontocreate) { // Add recipients
|
|||
if ($result == 0) {
|
||||
setEventMessages($langs->trans("WarningNoEMailsAdded"), null, 'warnings');
|
||||
}
|
||||
if ($result < 0) {
|
||||
if ($result < 0 && is_object($obj)) {
|
||||
setEventMessages($langs->trans("Error").($obj->error ? ' '.$obj->error : ''), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
|
@ -554,6 +561,7 @@ if ($object->fetch($id) >= 0) {
|
|||
require_once $file;
|
||||
|
||||
$obj = new $classname($db);
|
||||
'@phan-var-force MailingTargets $obj';
|
||||
|
||||
// Check if qualified
|
||||
$qualified = (is_null($obj->enabled) ? 1 : (int) dol_eval($obj->enabled, 1));
|
||||
|
|
@ -590,6 +598,8 @@ if ($object->fetch($id) >= 0) {
|
|||
print $obj->getDesc();
|
||||
print '</div>';
|
||||
|
||||
$nbofrecipient = -1;
|
||||
|
||||
try {
|
||||
$obj->evenunsubscribe = $object->evenunsubscribe; // Set flag to include/exclude email that has opt-out.
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ if (isModEnabled('margin')) {
|
|||
}
|
||||
|
||||
$error = 0;
|
||||
$outlangs = null;
|
||||
$array_options = array();
|
||||
|
||||
$id = GETPOSTINT('id');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
|
|
@ -136,6 +138,8 @@ $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc
|
|||
$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php
|
||||
|
||||
$price_base_type = null;
|
||||
|
||||
// Security check
|
||||
if (!empty($user->socid)) {
|
||||
$socid = $user->socid;
|
||||
|
|
@ -855,6 +859,8 @@ if (empty($reshook)) {
|
|||
} elseif ($fromElement == 'facture') {
|
||||
dol_include_once('/compta/'.$fromElement.'/class/'.$fromElement.'.class.php');
|
||||
$lineClassName = 'FactureLigne';
|
||||
} else {
|
||||
$lineClassName = null;
|
||||
}
|
||||
$nextRang = count($object->lines) + 1;
|
||||
$importCount = 0;
|
||||
|
|
@ -1766,6 +1772,7 @@ $form = new Form($db);
|
|||
$formfile = new FormFile($db);
|
||||
$formpropal = new FormPropal($db);
|
||||
$formmargin = new FormMargin($db);
|
||||
$formproject = null;
|
||||
if (isModEnabled('project')) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
|
|
@ -1800,6 +1807,7 @@ if ($action == 'create') {
|
|||
$datepropal = (empty($datepropal) ? (!getDolGlobalString('MAIN_AUTOFILL_DATE_PROPOSAL') ? -1 : '') : $datepropal);
|
||||
|
||||
// Load objectsrc
|
||||
$objectsrc = null;
|
||||
if (!empty($origin) && !empty($originid)) {
|
||||
// Parse element/subelement (ex: project_task)
|
||||
$element = $subelement = $origin;
|
||||
|
|
@ -1935,6 +1943,7 @@ if ($action == 'create') {
|
|||
print '<tr class="field_socid">';
|
||||
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans('Customer').'</td>';
|
||||
$shipping_method_id = 0;
|
||||
$warehouse_id = 0;
|
||||
if ($socid > 0) {
|
||||
print '<td class="valuefieldcreate">';
|
||||
print $soc->getNomUrl(1, 'customer');
|
||||
|
|
@ -2035,6 +2044,7 @@ if ($action == 'create') {
|
|||
print '</td></tr>';
|
||||
}
|
||||
|
||||
$formproduct = null;
|
||||
// Warehouse
|
||||
if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
|
|
@ -2070,7 +2080,7 @@ if ($action == 'create') {
|
|||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if (isModEnabled('project')) {
|
||||
if (isModEnabled('project') && is_object($formproject)) {
|
||||
$langs->load("projects");
|
||||
print '<tr class="field_projectid">';
|
||||
print '<td class="titlefieldcreate">'.$langs->trans("Project").'</td><td class="valuefieldcreate">';
|
||||
|
|
|
|||
|
|
@ -320,6 +320,9 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$objectclass = null;
|
||||
$search_code_client = '';
|
||||
|
||||
$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
|
|
@ -506,7 +509,7 @@ if ($action == "nosign" && $permissiontoclose) {
|
|||
}
|
||||
|
||||
// Closed records
|
||||
if (!$error && $massaction === 'setbilled' && $permissiontoclose) {
|
||||
if (!$error && $massaction === 'setbilled' && $permissiontoclose && $objectclass !== null) {
|
||||
$db->begin();
|
||||
|
||||
$objecttmp = new $objectclass($db);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
|
||||
|
|
@ -87,6 +88,11 @@ $formother = new FormOther($db);
|
|||
|
||||
$langs->loadLangs(array('propal', 'other', 'companies'));
|
||||
|
||||
$picto = null;
|
||||
$dir = null;
|
||||
$cat_type = null;
|
||||
$cat_label = null;
|
||||
|
||||
if ($mode == 'customer') {
|
||||
$picto = 'propal';
|
||||
$title = $langs->trans("ProposalsStatistics");
|
||||
|
|
|
|||
|
|
@ -104,6 +104,21 @@ if (!empty($user->socid)) {
|
|||
$socid = $user->socid;
|
||||
}
|
||||
|
||||
$array_options = 0;
|
||||
$object_id = 0;
|
||||
$price_base_type = null;
|
||||
$lineClassName = null;
|
||||
$remise_percent = null;
|
||||
$ref_client = null;
|
||||
$availability_id = null;
|
||||
$shipping_method_id = null;
|
||||
$warehouse_id = null;
|
||||
$demand_reason_id = null;
|
||||
$formproject = null;
|
||||
$objectsrc = null;
|
||||
$note_public = null;
|
||||
$note_private = null;
|
||||
|
||||
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
|
||||
$hookmanager->initHooks(array('ordercard', 'globalcard'));
|
||||
|
||||
|
|
@ -226,6 +241,7 @@ if (empty($reshook)) {
|
|||
// Reopen a closed order
|
||||
if ($object->statut == Commande::STATUS_CANCELED || $object->statut == Commande::STATUS_CLOSED) {
|
||||
if (getDolGlobalInt('ORDER_REOPEN_TO_DRAFT')) {
|
||||
$idwarehouse = GETPOSTINT('idwarehouse');
|
||||
$result = $object->setDraft($user, $idwarehouse);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -78,13 +78,18 @@ if (!isset($mode) || $mode != 'noajax') { // For ajax call
|
|||
$ecmdir = new EcmDirectory($db);
|
||||
if ($section > 0) {
|
||||
$result = $ecmdir->fetch($section);
|
||||
if (!($result > 0)) {
|
||||
//dol_print_error($db,$ecmdir->error);
|
||||
//exit;
|
||||
}
|
||||
//if (!($result > 0)) {
|
||||
//dol_print_error($db,$ecmdir->error);
|
||||
//exit;
|
||||
//}
|
||||
}
|
||||
} else {
|
||||
// For no ajax call
|
||||
// When no an ajax call (include from other file)
|
||||
'
|
||||
@phan-var-force int $section
|
||||
@phan-var-force string $module
|
||||
@phan-var-force string $showonrightsize
|
||||
';
|
||||
$rootdirfordoc = $conf->ecm->dir_output;
|
||||
|
||||
$ecmdir = new EcmDirectory($db);
|
||||
|
|
@ -291,7 +296,7 @@ if ($type == 'directory') {
|
|||
|
||||
$textifempty = ($section ? $langs->trans("NoFileFound") : ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("NoFileFound")));
|
||||
|
||||
$filter = preg_quote($search_doc_ref, '/');
|
||||
$filter = preg_quote((string) $search_doc_ref, '/');
|
||||
$filearray = dol_dir_list($upload_dir, "files", 1, $filter, $excludefiles, $sortfield, $sorting, 1);
|
||||
|
||||
$perm = $user->hasRight('ecm', 'upload');
|
||||
|
|
@ -355,6 +360,7 @@ if ($type == 'directory') {
|
|||
$textifempty = ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("ECMSelectASection"));
|
||||
}
|
||||
|
||||
$useinecm = null;
|
||||
if ($module == 'medias') {
|
||||
$useinecm = 6;
|
||||
$modulepart = 'medias';
|
||||
|
|
|
|||
|
|
@ -1318,8 +1318,8 @@ class Form
|
|||
* @param string $htmlname Name of field in form
|
||||
* @param string $filter Optional filters criteras. WARNING: To avoid SQL injection, only few chars [.a-z0-9 =<>()] are allowed here. Example: ((s.client:IN:1,3) AND (s.status:=:1)). Do not use a filter coming from input of users.
|
||||
* @param string|int<1,1> $showempty Add an empty field (Can be '1' or text key to use on empty line like 'SelectThirdParty')
|
||||
* @param int $showtype Show third party type in combolist (customer, prospect or supplier)
|
||||
* @param int $forcecombo Force to load all values and output a standard combobox (with no beautification)
|
||||
* @param int<0,1> $showtype Show third party type in combolist (customer, prospect or supplier)
|
||||
* @param int<0,1> $forcecombo Force to load all values and output a standard combobox (with no beautification)
|
||||
* @param array<array{method:string,url:string,htmlname:string,params:array<string,string>}> $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||
* @param int $limit Maximum number of elements
|
||||
* @param string $morecss Add more css styles to the SELECT component
|
||||
|
|
@ -2685,7 +2685,7 @@ class Form
|
|||
}
|
||||
// mode=1 means customers products
|
||||
$urloption = ($socid > 0 ? 'socid=' . $socid . '&' : '') . 'htmlname=' . $htmlname . '&outjson=1&price_level=' . $price_level . '&type=' . $filtertype . '&mode=1&status=' . $status . '&status_purchase=' . $status_purchase . '&finished=' . $finished . '&hidepriceinlabel=' . $hidepriceinlabel . '&warehousestatus=' . $warehouseStatus;
|
||||
if ((int) $warehouseId>0) {
|
||||
if ((int) $warehouseId > 0) {
|
||||
$urloption .= '&warehouseid=' . (int) $warehouseId;
|
||||
}
|
||||
$out .= ajax_autocompleter((string) $selected, $htmlname, DOL_URL_ROOT . '/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 1, $ajaxoptions);
|
||||
|
|
|
|||
|
|
@ -65,23 +65,23 @@ class FormFile
|
|||
*
|
||||
* @param string $url Url
|
||||
* @param string $title Title zone (Title or '' or 'none')
|
||||
* @param int $addcancel 1=Add 'Cancel' button
|
||||
* @param int<0,1> $addcancel 1=Add 'Cancel' button
|
||||
* @param int $sectionid If upload must be done inside a particular ECM section (is sectionid defined, sectiondir must not be)
|
||||
* @param int $perm Value of permission to allow upload
|
||||
* @param int $size Length of input file area. Deprecated.
|
||||
* @param Object $object Object to use (when attachment is done on an element)
|
||||
* @param ?CommonObject $object Object to use (when attachment is done on an element)
|
||||
* @param string $options Add an option column
|
||||
* @param integer $useajax Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option).
|
||||
* @param int<0,1> $useajax Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option).
|
||||
* Deprecated 2 should never be used and if 1 is used, option should not be enabled.
|
||||
* @param string $savingdocmask Mask to use to define output filename. For example 'XXXXX-__YYYYMMDD__-__file__'
|
||||
* @param integer $linkfiles 1=Also add form to link files, 0=Do not show form to link files
|
||||
* @param int<0,1> $linkfiles 1=Also add form to link files, 0=Do not show form to link files
|
||||
* @param string $htmlname Name and id of HTML form ('formuserfile' by default, 'formuserfileecm' when used to upload a file in ECM)
|
||||
* @param string $accept Specifies the types of files accepted (This is not a security check but an user interface facility. eg '.pdf,image/*' or '.png,.jpg' or 'video/*')
|
||||
* @param string $sectiondir If upload must be done inside a particular directory (if sectiondir defined, sectionid must not be)
|
||||
* @param int $usewithoutform 0=Default, 1=Disable <form> and <input hidden> to use in existing form area, 2=Disable the tag <form> only
|
||||
* @param int $capture 1=Add tag capture="capture" to force use of micro or video recording to generate file. When setting this to 1, you must also provide a value for $accept.
|
||||
* @param int $disablemulti 0=Default, 1=Disable multiple file upload
|
||||
* @param int $nooutput 0=Output result with print, 1=Return result
|
||||
* @param int<0,2> $usewithoutform 0=Default, 1=Disable <form> and <input hidden> to use in existing form area, 2=Disable the tag <form> only
|
||||
* @param int<0,1> $capture 1=Add tag capture="capture" to force use of micro or video recording to generate file. When setting this to 1, you must also provide a value for $accept.
|
||||
* @param int<0,1> $disablemulti 0=Default, 1=Disable multiple file upload
|
||||
* @param int<0,1> $nooutput 0=Output result with print, 1=Return result
|
||||
* @return int|string Return integer <0 if KO, >0 if OK, or string if $noouput=1
|
||||
*/
|
||||
public function form_attach_new_file($url, $title = '', $addcancel = 0, $sectionid = 0, $perm = 1, $size = 50, $object = null, $options = '', $useajax = 1, $savingdocmask = '', $linkfiles = 1, $htmlname = 'formuserfile', $accept = '', $sectiondir = '', $usewithoutform = 0, $capture = 0, $disablemulti = 0, $nooutput = 0)
|
||||
|
|
@ -1357,8 +1357,8 @@ class FormFile
|
|||
$nboflines = 0;
|
||||
$lastrowid = 0;
|
||||
$parametersByDefault = array(
|
||||
'modulepart'=> $modulepart,
|
||||
'relativepath'=> $relativepath,
|
||||
'modulepart' => $modulepart,
|
||||
'relativepath' => $relativepath,
|
||||
'permtoedit' => $permtoeditline,
|
||||
'permonobject' => $permonobject,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -847,9 +847,9 @@ class FormOther
|
|||
*
|
||||
* @param string $set_color Pre-selected color with format '#......'
|
||||
* @param string $prefix Name of HTML field
|
||||
* @param string $form_name Deprecated. Not used.
|
||||
* @param null|'' $form_name Deprecated. Not used.
|
||||
* @param int $showcolorbox 1=Show color code and color box, 0=Show only color code
|
||||
* @param array $arrayofcolors Array of possible colors to choose in the selector. All colors are possible if empty. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813')
|
||||
* @param string[] $arrayofcolors Array of possible colors to choose in the selector. All colors are possible if empty. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813')
|
||||
* @param string $morecss Add css style into input field
|
||||
* @param string $setpropertyonselect Set this CSS property after selecting a color
|
||||
* @param string $default Default color
|
||||
|
|
|
|||
|
|
@ -1168,13 +1168,13 @@ class Ldap
|
|||
* Returns an array containing a details or list of LDAP record(s).
|
||||
* ldapsearch -LLLx -hlocalhost -Dcn=admin,dc=parinux,dc=org -w password -b "ou=adherents,ou=people,dc=parinux,dc=org" userPassword
|
||||
*
|
||||
* @param string $search Value of field to search, '*' for all. Not used if $activefilter is set.
|
||||
* @param string $userDn DN (Ex: ou=adherents,ou=people,dc=parinux,dc=org)
|
||||
* @param string $useridentifier Name of key field (Ex: uid).
|
||||
* @param array $attributeArray Array of fields required. Note this array must also contain field $useridentifier (Ex: sn,userPassword)
|
||||
* @param int $activefilter '1' or 'user'=use field this->filter as filter instead of parameter $search, 'group'=use field this->filtergroup as filter, 'member'=use field this->filtermember as filter
|
||||
* @param array $attributeAsArray Array of fields wanted as an array not a string
|
||||
* @return array|int if KO: <0 || if OK: array of [id_record][ldap_field]=value
|
||||
* @param string $search Value of field to search, '*' for all. Not used if $activefilter is set.
|
||||
* @param string $userDn DN (Ex: ou=adherents,ou=people,dc=parinux,dc=org)
|
||||
* @param string $useridentifier Name of key field (Ex: uid).
|
||||
* @param string[] $attributeArray Array of fields required. Note this array must also contain field $useridentifier (Ex: sn,userPassword)
|
||||
* @param 0|1|'1'|'user'|'group'|'member' $activefilter '1' or 'user'=use field this->filter as filter instead of parameter $search, 'group'=use field this->filtergroup as filter, 'member'=use field this->filtermember as filter
|
||||
* @param string[] $attributeAsArray Array of fields wanted as an array not a string
|
||||
* @return array<string,array<string,string>>|int<min,-1> if KO: <0 || if OK: array of [id_record][ldap_field]=value
|
||||
*/
|
||||
public function getRecords($search, $userDn, $useridentifier, $attributeArray, $activefilter = 0, $attributeAsArray = array())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Account $object Object related to tabs
|
||||
* @return array Array of tabs to show
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function bank_prepare_head(Account $object)
|
||||
{
|
||||
|
|
@ -128,8 +128,8 @@ function bank_prepare_head(Account $object)
|
|||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Object $object Object related to tabs
|
||||
* @return array Array of tabs to shoc
|
||||
* @param ?CommonObject $object Object related to tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function bank_admin_prepare_head($object)
|
||||
{
|
||||
|
|
@ -189,9 +189,9 @@ function bank_admin_prepare_head($object)
|
|||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Object $object Object related to tabs
|
||||
* @param string $num val to account statement
|
||||
* @return array Array of tabs to shoc
|
||||
* @param CommonObject $object Object related to tabs
|
||||
* @param string $num val to account statement
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function account_statement_prepare_head($object, $num)
|
||||
{
|
||||
|
|
@ -231,7 +231,7 @@ function account_statement_prepare_head($object, $num)
|
|||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param CommonObject $object Object related to tabs
|
||||
* @return array Array of tabs to shoc
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function various_payment_prepare_head($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9671,8 +9671,8 @@ function make_substitutions($text, $substitutionarray, $outputlangs = null, $con
|
|||
*
|
||||
* @param array<string,string> $substitutionarray Array substitution old value => new value value
|
||||
* @param Translate $outputlangs Output language
|
||||
* @param CommonObject $object Source object
|
||||
* @param mixed $parameters Add more parameters (useful to pass product lines)
|
||||
* @param ?CommonObject $object Source object
|
||||
* @param ?mixed $parameters Add more parameters (useful to pass product lines)
|
||||
* @param string $callfunc What is the name of the custom function that will be called? (default: completesubstitutionarray)
|
||||
* @return void
|
||||
* @see make_substitutions()
|
||||
|
|
@ -10894,8 +10894,8 @@ function getLanguageCodeFromCountryCode($countrycode)
|
|||
*
|
||||
* @param Conf $conf Object conf
|
||||
* @param Translate $langs Object langs
|
||||
* @param object|null $object Object object
|
||||
* @param array<array<int,string>> $head List of head tabs (updated by this function)
|
||||
* @param ?Object $object Object object
|
||||
* @param array<array{0:string,1:string,2:string}> $head List of head tabs (updated by this function)
|
||||
* @param int $h New position to fill (updated by this function)
|
||||
* @param string $type Value for object where objectvalue can be
|
||||
* 'thirdparty' to add a tab in third party view
|
||||
|
|
@ -10913,7 +10913,7 @@ function getLanguageCodeFromCountryCode($countrycode)
|
|||
* 'categories_x' to add a tab in category view ('x': type of category (0=product, 1=supplier, 2=customer, 3=member)
|
||||
* 'ecm' to add a tab for another ecm view
|
||||
* 'stock' to add a tab for warehouse view
|
||||
* @param string $mode 'add' to complete head, 'remove' to remove entries
|
||||
* @param 'add'|'remove' $mode 'add' to complete head, 'remove' to remove entries
|
||||
* @param string $filterorigmodule Filter on module origin: 'external' will show only external modules. 'core' only core modules. No filter (default) will add both.
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user