From 638643226324ba63fe0d6a4960e99703a60dd3ff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Jul 2022 00:01:33 +0200 Subject: [PATCH 1/2] Fix missing migration --- htdocs/install/mysql/migration/15.0.0-16.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql index c090c55dee7..8e2b004efda 100644 --- a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql +++ b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql @@ -662,3 +662,4 @@ DELETE FROM llx_cronjob WHERE label = 'PurgeDeleteTemporaryFilesShort' AND param ALTER TABLE llx_cronjob DROP INDEX uk_cronjob; ALTER TABLE llx_cronjob ADD UNIQUE INDEX uk_cronjob (label, entity); +ALTER TABLE llx_expedition ADD COLUMN billed smallint DEFAULT 0; From e0b664066be76dc5bd8f236faf083bec276fd8b1 Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Thu, 7 Jul 2022 16:24:59 +0200 Subject: [PATCH 2/2] default to create on card.php if $action is empty --- htdocs/accountancy/admin/card.php | 2 +- htdocs/accountancy/admin/fiscalyear_card.php | 2 +- htdocs/accountancy/bookkeeping/card.php | 2 +- htdocs/adherents/card.php | 2 +- htdocs/admin/emailcollector_card.php | 2 +- htdocs/asset/card.php | 2 +- htdocs/asset/model/card.php | 2 +- htdocs/bom/bom_card.php | 2 +- htdocs/bookmarks/card.php | 2 +- htdocs/comm/action/card.php | 2 +- htdocs/comm/mailing/card.php | 2 +- htdocs/comm/propal/card.php | 2 +- htdocs/compta/bank/card.php | 2 +- htdocs/compta/bank/various_payment/card.php | 2 +- htdocs/compta/deplacement/card.php | 2 +- htdocs/compta/facture/card.php | 2 +- htdocs/compta/localtax/card.php | 2 +- htdocs/compta/sociales/card.php | 2 +- htdocs/compta/tva/card.php | 2 +- htdocs/contact/card.php | 2 +- htdocs/contrat/card.php | 2 +- htdocs/cron/card.php | 2 +- htdocs/delivery/card.php | 2 +- htdocs/don/card.php | 2 +- htdocs/ecm/dir_add_card.php | 2 +- htdocs/eventorganization/conferenceorbooth_card.php | 4 ++-- htdocs/eventorganization/conferenceorboothattendee_card.php | 2 +- htdocs/expedition/card.php | 2 +- htdocs/expensereport/card.php | 2 +- htdocs/fichinter/card.php | 2 +- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/hrm/establishment/card.php | 2 +- htdocs/hrm/evaluation_card.php | 2 +- htdocs/hrm/job_card.php | 2 +- htdocs/hrm/skill_card.php | 2 +- htdocs/intracommreport/card.php | 2 +- htdocs/knowledgemanagement/knowledgerecord_card.php | 2 +- htdocs/loan/card.php | 2 +- htdocs/modulebuilder/template/myobject_card.php | 2 +- htdocs/mrp/mo_card.php | 2 +- htdocs/partnership/partnership_card.php | 2 +- htdocs/product/inventory/card.php | 2 +- htdocs/product/stock/card.php | 2 +- htdocs/product/stock/productlot_card.php | 2 +- htdocs/product/stock/stocktransfer/stocktransfer_card.php | 2 +- htdocs/reception/card.php | 2 +- htdocs/recruitment/recruitmentcandidature_card.php | 2 +- htdocs/recruitment/recruitmentjobposition_card.php | 2 +- htdocs/resource/card.php | 2 +- htdocs/salaries/card.php | 2 +- htdocs/societe/card.php | 2 +- htdocs/supplier_proposal/card.php | 2 +- htdocs/user/group/card.php | 2 +- htdocs/user/notify/card.php | 2 +- htdocs/variants/card.php | 2 +- htdocs/webhook/target_card.php | 2 +- htdocs/website/websiteaccount_card.php | 2 +- htdocs/workstation/workstation_card.php | 2 +- 59 files changed, 60 insertions(+), 60 deletions(-) diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 02b95cfd043..15428e356c8 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -220,7 +220,7 @@ llxheader('', $title, $help_url); // Create mode -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans('NewAccountingAccount')); print '
'."\n"; diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 2aa33f21645..96f9d988ebb 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -154,7 +154,7 @@ $help_url = "EN:Module_Double_Entry_Accounting"; llxHeader('', $title, $help_url); -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewFiscalYear")); print ''; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 7c8c0dca547..5f4ebcc22fc 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -340,7 +340,7 @@ if ($action == 'delete') { print $formconfirm; } -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("CreateMvts")); $object = new BookKeeping($db); diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 0096ba9a285..4731414f285 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -920,7 +920,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // ----------------------------------------- // Create mode - if ($action == 'create') { + if ($action == 'create' || (empty($action) && empty($id))) { $object->canvas = $canvas; $object->state_id = GETPOST('state_id', 'int'); diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index ab4f0c7def0..9f0986ad8f2 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -253,7 +253,7 @@ $help_url = "EN:Module_EMail_Collector|FR:Module_Collecteur_de_courrier_électro llxHeader('', 'EmailCollector', $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewEmailCollector", $langs->transnoentitiesnoconv("EmailCollector"))); print ''; diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index d94ba613d91..be635bb17f6 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -166,7 +166,7 @@ $help_url = ''; llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Asset")), '', 'object_'.$object->picto); print ''; diff --git a/htdocs/asset/model/card.php b/htdocs/asset/model/card.php index 3d3ec2f67d2..c1b5187cd3c 100644 --- a/htdocs/asset/model/card.php +++ b/htdocs/asset/model/card.php @@ -138,7 +138,7 @@ $help_url = ''; llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("AssetModel")), '', 'object_' . $object->picto); print ''; diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index ee619a589e3..bc1bb0c5b11 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -268,7 +268,7 @@ $help_url ='EN:Module_BOM'; llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewBOM"), '', 'bom'); print ''; diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index bbc92a83ef1..5f2e9ab5b81 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -144,7 +144,7 @@ $h++; $hselected = 'card'; -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { /* * Fact bookmark creation mode */ diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 351ab9212bc..5cc9d1b2217 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -923,7 +923,7 @@ $arrayrecurrulefreq = array( $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda'; llxHeader('', $langs->trans("Agenda"), $help_url); -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { $contact = new Contact($db); $socpeopleassigned = GETPOST("socpeopleassigned", 'array'); diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index d46a02132a1..5e495d4c530 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -704,7 +704,7 @@ llxHeader( array() ); -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { // EMailing in creation mode print ''."\n"; print ''; diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index b8b46a0c8d9..defe7fc88fd 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1533,7 +1533,7 @@ llxHeader('', $title, $help_url); $now = dol_now(); // Add new proposal -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { $currency_code = $conf->currency; print load_fiche_titre($langs->trans("NewProp"), '', 'propal'); diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 29341b0fb99..1f01336be06 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -341,7 +341,7 @@ llxHeader("", $title, $help_url); // Creation -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { $object = new Account($db); print load_fiche_titre($langs->trans("NewFinancialAccount"), '', 'bank_account'); diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 95d5ffa0e9e..e4e47253efe 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -335,7 +335,7 @@ foreach ($bankcateg->fetchAll() as $bankcategory) { } // Create mode -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { // Update fields properties in realtime if (!empty($conf->use_javascript_ajax)) { print "\n".''; // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewEval"), '', 'object_' . $object->picto); print ''; diff --git a/htdocs/hrm/job_card.php b/htdocs/hrm/job_card.php index a9ec4f77121..c90ff0ce9dd 100644 --- a/htdocs/hrm/job_card.php +++ b/htdocs/hrm/job_card.php @@ -180,7 +180,7 @@ llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentities('Job')), '', 'object_' . $object->picto); print ''; diff --git a/htdocs/hrm/skill_card.php b/htdocs/hrm/skill_card.php index 3a27d5898c0..795d7fab65f 100644 --- a/htdocs/hrm/skill_card.php +++ b/htdocs/hrm/skill_card.php @@ -187,7 +187,7 @@ llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewSkill"), '', 'object_' . $object->picto); print ''; diff --git a/htdocs/intracommreport/card.php b/htdocs/intracommreport/card.php index 681320e0d75..938b99adf4c 100644 --- a/htdocs/intracommreport/card.php +++ b/htdocs/intracommreport/card.php @@ -156,7 +156,7 @@ if ($action == 'add' && $permissiontoadd) { */ // Creation mode -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { $title = $langs->trans("IntracommReportTitle"); llxHeader("", $title); print load_fiche_titre($langs->trans("IntracommReportTitle")); diff --git a/htdocs/knowledgemanagement/knowledgerecord_card.php b/htdocs/knowledgemanagement/knowledgerecord_card.php index baddd9e29a5..74bd23608d0 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_card.php +++ b/htdocs/knowledgemanagement/knowledgerecord_card.php @@ -169,7 +169,7 @@ $help_url = ''; llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewKnowledgeRecord"), '', 'object_'.$object->picto); print ''; diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 3ad898cda98..047a64780b2 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -254,7 +254,7 @@ llxHeader("", $title, $help_url); // Create mode -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index b7a051c1bd9..0d398fdcf53 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -242,7 +242,7 @@ llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { if (empty($permissiontoadd)) { accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1); exit; diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 2c333ff616e..178b51ec2bd 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -241,7 +241,7 @@ llxHeader('', $title, ''); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { if (GETPOST('fk_bom', 'int') > 0) { $titlelist = $langs->trans("ToConsume"); if ($objectbom->bomtype == 1) { diff --git a/htdocs/partnership/partnership_card.php b/htdocs/partnership/partnership_card.php index 08164421f60..82d9aa4d56e 100644 --- a/htdocs/partnership/partnership_card.php +++ b/htdocs/partnership/partnership_card.php @@ -259,7 +259,7 @@ $help_url = ''; llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewPartnership"), '', 'object_'.$object->picto); print ''; diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index 0a21f9939ee..daf9d386db7 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -181,7 +181,7 @@ llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewInventory"), '', 'product'); print ''; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 3ef85adeb84..c5910b5e563 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -285,7 +285,7 @@ $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; llxHeader("", $langs->trans("WarehouseCard"), $help_url); -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewWarehouse"), '', 'stock'); dol_set_focus('input[name="libelle"]'); diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index 6e6f8991e83..8b2c0720c47 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -378,7 +378,7 @@ llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("Batch"), '', 'object_'.$object->picto); print ''; diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index b009ace7275..cf8f9fdf572 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -413,7 +413,7 @@ print '}); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("StockTransfer")), '', 'object_'.$object->picto); print ''; diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index ed4586a7376..c8feafb146d 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -728,7 +728,7 @@ if ($action == 'create2') { } // Mode creation. -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { $recept = new Reception($db); print load_fiche_titre($langs->trans("CreateReception")); diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index 0da5badd7bc..076778fd56f 100644 --- a/htdocs/recruitment/recruitmentcandidature_card.php +++ b/htdocs/recruitment/recruitmentcandidature_card.php @@ -283,7 +283,7 @@ llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("RecruitmentCandidature")), '', 'object_'.$object->picto); print ''; diff --git a/htdocs/recruitment/recruitmentjobposition_card.php b/htdocs/recruitment/recruitmentjobposition_card.php index b2172aca80d..f1567ae0ae4 100644 --- a/htdocs/recruitment/recruitmentjobposition_card.php +++ b/htdocs/recruitment/recruitmentjobposition_card.php @@ -202,7 +202,7 @@ $help_url = ''; llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewPositionToBeFilled"), '', 'object_'.$object->picto); print ''; diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 4ffbe1eb0a7..40ba3e8b4dc 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -197,7 +197,7 @@ $form = new Form($db); $formresource = new FormResource($db); if ($action == 'create' || $object->fetch($id, $ref) > 0) { - if ($action == 'create') { + if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($title, '', 'object_resource'); print dol_get_fiche_head(''); } else { diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 7d57575dacd..86711022c1e 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -457,7 +457,7 @@ if ($id > 0) { } // Create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { $year_current = strftime("%Y", dol_now()); $pastmonth = strftime("%m", dol_now()) - 1; $pastmonthyear = $year_current; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 8e347a6d487..42b6e514e63 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -979,7 +979,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // ----------------------------------------- // When used in standard mode // ----------------------------------------- - if ($action == 'create') { + if ($action == 'create' || (empty($action) && empty($id))) { /* * Creation */ diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 9e92a5fb4b6..b1e4c2e8c5d 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1138,7 +1138,7 @@ if (!empty($conf->project->enabled)) { $now = dol_now(); // Add new askprice -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { $currency_code = $conf->currency; print load_fiche_titre($langs->trans("NewAskPrice"), '', 'supplier_proposal'); diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 1acfa858663..1e6776f7118 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -254,7 +254,7 @@ $fuserstatic = new User($db); $form = new Form($db); $formfile = new FormFile($db); -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewGroup"), '', 'object_group'); dol_set_focus('#nom'); diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php index 3337d846f0b..56c6d2d01f7 100644 --- a/htdocs/user/notify/card.php +++ b/htdocs/user/notify/card.php @@ -272,7 +272,7 @@ if ($result > 0) { print ''; - if ($action == 'create') { + if ($action == 'create' || (empty($action) && empty($id))) { // $listofemails=$object->thirdparty_and_contact_email_array(); if ($object->email) { $actions = array(); diff --git a/htdocs/variants/card.php b/htdocs/variants/card.php index 68bb8d60998..470e3fd96f8 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -158,7 +158,7 @@ $help_url = 'EN:Module_Products#Variants'; llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ProductAttribute")), '', 'object_' . $object->picto); print ''; diff --git a/htdocs/webhook/target_card.php b/htdocs/webhook/target_card.php index dd0d5e171e8..3ffd381f3aa 100644 --- a/htdocs/webhook/target_card.php +++ b/htdocs/webhook/target_card.php @@ -240,7 +240,7 @@ llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { if (empty($permissiontoadd)) { accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1); exit; diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php index 249398c322e..7a075eb8734 100644 --- a/htdocs/website/websiteaccount_card.php +++ b/htdocs/website/websiteaccount_card.php @@ -118,7 +118,7 @@ $formfile = new FormFile($db); llxHeader('', 'WebsiteAccount', ''); // Part to create -if ($action == 'create') { +if ($action == 'create' || (empty($action) && empty($id))) { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("WebsiteAccount"))); print ''; diff --git a/htdocs/workstation/workstation_card.php b/htdocs/workstation/workstation_card.php index 9e859dcc2d0..a2409802024 100644 --- a/htdocs/workstation/workstation_card.php +++ b/htdocs/workstation/workstation_card.php @@ -186,7 +186,7 @@ llxHeader('', $title, $help_url); trans("NewObject", $langs->transnoentitiesnoconv("Workstation")), '', 'object_'.$object->picto); print '';