From 7b3a7c9921c0d675a37d62eb71f7a85c43c88534 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Oct 2020 10:50:54 +0200 Subject: [PATCH] Add token on all url with action=delete --- htdocs/accountancy/admin/account.php | 4 ++-- htdocs/accountancy/admin/accountmodel.php | 4 ++-- htdocs/accountancy/admin/card.php | 4 ++-- htdocs/accountancy/admin/categories.php | 2 +- htdocs/accountancy/admin/fiscalyear_card.php | 4 ++-- htdocs/adherents/card.php | 2 +- htdocs/adherents/subscription/card.php | 4 ++-- htdocs/adherents/type.php | 2 +- htdocs/adherents/type_translation.php | 4 ++-- htdocs/admin/boxes.php | 2 +- htdocs/admin/const.php | 2 +- htdocs/admin/defaultvalues.php | 4 ++-- htdocs/admin/dict.php | 4 ++-- htdocs/admin/emailcollector_card.php | 4 ++-- htdocs/admin/expensereport_ik.php | 4 ++-- htdocs/admin/expensereport_rules.php | 4 ++-- htdocs/admin/mails_senderprofile_list.php | 2 +- htdocs/admin/mails_templates.php | 4 ++-- htdocs/admin/menus/index.php | 18 +++++++++--------- htdocs/admin/oauthlogintokens.php | 4 ++-- htdocs/admin/paymentbybanktransfer.php | 2 +- htdocs/admin/prelevement.php | 2 +- htdocs/admin/receiptprinter.php | 4 ++-- htdocs/admin/translation.php | 4 ++-- htdocs/admin/website.php | 4 ++-- htdocs/asset/card.php | 2 +- htdocs/asset/type.php | 2 +- htdocs/bom/bom_card.php | 2 +- htdocs/bom/tpl/objectline_view.tpl.php | 2 +- htdocs/bookmarks/card.php | 4 ++-- htdocs/bookmarks/list.php | 4 ++-- htdocs/categories/photos.php | 2 +- htdocs/categories/traduction.php | 2 +- htdocs/categories/viewcat.php | 2 +- htdocs/comm/action/card.php | 2 +- htdocs/comm/mailing/card.php | 2 +- htdocs/comm/mailing/cibles.php | 2 +- htdocs/comm/propal/card.php | 4 ++-- htdocs/commande/card.php | 2 +- htdocs/compta/bank/bankentries_list.php | 2 +- htdocs/compta/bank/card.php | 4 ++-- htdocs/compta/bank/categ.php | 4 ++-- htdocs/compta/bank/various_payment/card.php | 2 +- htdocs/compta/deplacement/card.php | 2 +- htdocs/compta/facture/card.php | 6 +++--- htdocs/compta/facture/prelevement.php | 2 +- htdocs/compta/localtax/card.php | 2 +- htdocs/compta/paiement/cheque/card.php | 4 ++-- htdocs/compta/payment_sc/card.php | 2 +- htdocs/compta/sociales/card.php | 10 +++++----- htdocs/compta/tva/card.php | 2 +- .../default/tpl/contactcard_view.tpl.php | 2 +- htdocs/contact/card.php | 2 +- htdocs/contrat/card.php | 4 ++-- htdocs/core/class/commonobject.class.php | 4 ++-- htdocs/core/class/html.formfile.class.php | 6 +++--- .../core/modules/printing/printgcp.modules.php | 4 ++-- htdocs/core/tpl/admin_extrafields_view.tpl.php | 4 ++-- htdocs/core/tpl/bloc_comment.tpl.php | 4 ++-- htdocs/core/tpl/contacts.tpl.php | 6 +++--- htdocs/core/tpl/resource_view.tpl.php | 4 ++-- htdocs/cron/card.php | 2 +- htdocs/cron/list.php | 4 ++-- htdocs/don/card.php | 2 +- htdocs/don/payment/card.php | 2 +- htdocs/ecm/dir_add_card.php | 2 +- htdocs/ecm/dir_card.php | 2 +- htdocs/ecm/file_card.php | 2 +- htdocs/expedition/card.php | 4 ++-- htdocs/expensereport/card.php | 4 ++-- htdocs/expensereport/payment/card.php | 2 +- htdocs/exports/class/export.class.php | 2 +- htdocs/fichinter/card-rec.php | 4 ++-- htdocs/fichinter/card.php | 2 +- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/facture/card.php | 6 +++--- htdocs/fourn/paiement/card.php | 2 +- htdocs/ftp/index.php | 8 ++++---- htdocs/holiday/card.php | 2 +- htdocs/hrm/establishment/card.php | 2 +- htdocs/imports/import.php | 2 +- htdocs/langs/en_US/ticket.lang | 4 +--- htdocs/livraison/card.php | 4 ++-- htdocs/loan/card.php | 4 ++-- htdocs/loan/payment/card.php | 2 +- htdocs/main.inc.php | 2 +- htdocs/modulebuilder/index.php | 2 +- .../modulebuilder/template/myobject_card.php | 2 +- htdocs/mrp/mo_card.php | 2 +- htdocs/opensurvey/card.php | 2 +- htdocs/product/admin/dynamic_prices.php | 8 ++++---- htdocs/product/card.php | 2 +- htdocs/product/dynamic_price/editor.php | 2 +- htdocs/product/inventory/card.php | 2 +- htdocs/product/inventory/inventory.php | 2 +- htdocs/product/price.php | 8 ++++---- htdocs/product/stock/card.php | 18 ++++++++++++------ htdocs/product/stock/product.php | 2 +- htdocs/product/stock/productlot_card.php | 2 +- htdocs/product/traduction.php | 4 ++-- htdocs/projet/card.php | 2 +- htdocs/projet/tasks/contact.php | 2 +- htdocs/projet/tasks/task.php | 2 +- htdocs/projet/tasks/time.php | 2 +- htdocs/reception/card.php | 6 +++--- .../recruitmentcandidature_card.php | 2 +- .../recruitmentjobposition_candidature.php | 2 +- .../recruitmentjobposition_card.php | 2 +- htdocs/resource/card.php | 2 +- htdocs/resource/list.php | 4 ++-- htdocs/salaries/card.php | 2 +- .../canvas/company/tpl/card_view.tpl.php | 2 +- .../canvas/individual/tpl/card_view.tpl.php | 2 +- htdocs/societe/card.php | 2 +- htdocs/societe/notify/card.php | 2 +- htdocs/societe/paymentmodes.php | 8 ++++---- htdocs/societe/price.php | 2 +- htdocs/supplier_proposal/card.php | 2 +- htdocs/takepos/index.php | 4 ++-- htdocs/takepos/phone.php | 6 +++--- htdocs/ticket/card.php | 2 +- htdocs/user/card.php | 2 +- htdocs/user/group/card.php | 4 ++-- htdocs/user/notify/card.php | 2 +- htdocs/variants/card.php | 6 +++--- htdocs/variants/combinations.php | 2 +- htdocs/variants/list.php | 2 +- htdocs/website/websiteaccount_card.php | 2 +- htdocs/zapier/hook_card.php | 2 +- 129 files changed, 216 insertions(+), 212 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index de8fd9a8cd6..0ac79bcc3aa 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -481,11 +481,11 @@ if ($resql) // Action print ''; if ($user->rights->accounting->chartofaccount) { - print ''; + print ''; print img_edit(); print ''; print ' '; - print ''; + print ''; print img_delete(); print ''; } diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index be3b49e41c1..d3bd17d95a5 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -669,11 +669,11 @@ if ($id) print ""; // Modify link - if ($canbemodified) print ''.img_edit().''; + if ($canbemodified) print ''.img_edit().''; else print ' '; // Delete link - if ($iserasable) print ''.img_delete().''; + if ($iserasable) print ''.img_delete().''; else print ' '; print "\n"; diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 4ad131f5170..29ed90bb7be 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -372,13 +372,13 @@ if ($action == 'create') { print '
'; if (!empty($user->rights->accounting->chartofaccount)) { - print ''.$langs->trans('Modify').''; + print ''.$langs->trans('Modify').''; } else { print ''.$langs->trans('Modify').''; } if (!empty($user->rights->accounting->chartofaccount)) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 909d633c487..d605105f8e9 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -170,7 +170,7 @@ if ($action == 'display' || $action == 'delete') { print ''.length_accountg($cpt->account_number).''; print ''.$cpt->label.''; print ''; - print "rowid."'>"; + print ''; print $langs->trans("DeleteFromCat"); print img_picto($langs->trans("DeleteFromCat"), 'unlink'); print ""; diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 27ef1ea7bd1..a122d3acab5 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -305,9 +305,9 @@ if ($action == 'create') */ print ''; } diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 0a32398f307..d0a67153209 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1694,7 +1694,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Delete if ($user->rights->adherent->supprimer) { - print '\n"; + print '\n"; } else { print '
'.$langs->trans("Delete")."
"; } diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 3fad8c9db14..a79355de768 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -345,7 +345,7 @@ if ($rowid && $action != 'edit') { if ($user->rights->adherent->cotisation->creer) { if (!$bankline->rappro) { - print '"; + print '"; } else { print '"; } @@ -353,7 +353,7 @@ if ($rowid && $action != 'edit') { // Delete if ($user->rights->adherent->cotisation->creer) { - print '\n"; + print '\n"; } print '
'; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 853e22bfbc9..ecd709bdd17 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -455,7 +455,7 @@ if ($rowid > 0) { // Delete if ($user->rights->adherent->configurer) { - print '
'.$langs->trans("DeleteType").'
'; + print '
'.$langs->trans("DeleteType").'
'; } print ""; diff --git a/htdocs/adherents/type_translation.php b/htdocs/adherents/type_translation.php index dcd4a7aa981..10c43dadbe3 100644 --- a/htdocs/adherents/type_translation.php +++ b/htdocs/adherents/type_translation.php @@ -201,7 +201,7 @@ if ($action == 'edit') { if (!empty($object->multilangs)) { foreach ($object->multilangs as $key => $value) { $s = picto_from_langcode($key); - print "
".($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"')."
"; + print '
'.($s ? $s.' ' : '').' '.$langs->trans('Language_'.$key).': '.img_delete('', 'class="valigntextbottom"')."
"; print '
'; print ''; @@ -228,7 +228,7 @@ if ($action == 'edit') { if (!empty($object->multilangs)) { foreach ($object->multilangs as $key => $value) { $s = picto_from_langcode($key); - print ($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"').''; + print ($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"').''; print '
'; print '
'; diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 2dbcfe00015..31723888e44 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -429,7 +429,7 @@ foreach ($boxactivated as $key => $box) print ($hasprevious ? ''.img_up().'' : ''); print ''; print '
'; print ''."\n"; diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 5a525cbe9ad..4aacdb3cfc2 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -299,7 +299,7 @@ if ($result) { print ''; } else { - print ''.img_delete().''; + print ''.img_delete().''; } print "\n"; diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 453f10bf837..17fa15af382 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -378,9 +378,9 @@ if ($result) print '"; // Modify link - if ($canbemodified) print ''; + if ($canbemodified) print ''; else print ''; // Delete link if ($iserasable) { print ''; } else print ''; diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 1420cc0263e..eb9ffb52831 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -540,7 +540,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; print ''; print ''; } @@ -632,7 +632,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Delete print ''; print ''; $i++; diff --git a/htdocs/admin/expensereport_ik.php b/htdocs/admin/expensereport_ik.php index 3ff8ad0c4ce..f55e78d4105 100644 --- a/htdocs/admin/expensereport_ik.php +++ b/htdocs/admin/expensereport_ik.php @@ -166,8 +166,8 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) echo ''; echo ''; } else { - echo ''.img_edit().''; - if (!empty($range->ik->id)) echo ''.img_delete().''; + echo ''.img_edit().''; + if (!empty($range->ik->id)) echo ''.img_delete().''; // TODO add delete link } } diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 6d08355b815..e0012139154 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -305,8 +305,8 @@ foreach ($rules as $rule) echo ''; diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 101e57970c0..b7b0060c778 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -320,20 +320,20 @@ if ($conf->use_javascript_ajax) $titre = $langs->trans($menu['titre']); $entry = '
'; - print ''.img_delete().''; + print ''.img_delete().''; print '
'; if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) { - print ''.img_edit().''; + print ''.img_edit().''; print '   '; - print ''.img_delete().''; + print ''.img_delete().''; } else { print ''; print ''; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index b6d5df3644a..1ac1e0f4ad4 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1671,14 +1671,14 @@ if ($id) print "'.img_edit().''.img_edit().' '; - if ($user->admin) print ''.img_delete().''; + if ($user->admin) print ''.img_delete().''; //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin print ' '.$rulefilter['rulevalue'].''; - print ' '.img_delete().''; + print ' '.img_delete().''; print '
'; print ''.img_edit().''; - print ' '.img_delete().''; + print ' '.img_delete().''; print '
'; if ($object->id != $rule->id) { - echo ''.img_edit().' '; - echo ''.img_delete().''; + echo ''.img_edit().' '; + echo ''.img_delete().''; } else { echo ' '; echo ''.$langs->trans('Cancel').''; diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 9a1a696e034..16ae12ffcc5 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -587,7 +587,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) if ($sortorder) $url .= '&page='.urlencode($sortorder); print ''.img_edit().''; //print '   '; - print ''.img_delete().'   '; + print ''.img_delete().'   '; if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { $selected = 0; diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 610dd9c1ef2..7c79505158a 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -889,10 +889,10 @@ if ($resql) // Modify link / Delete link print ''; - if ($canbemodified) print ''.img_edit().''; + if ($canbemodified) print ''.img_edit().''; if ($iserasable) { - print ''.img_delete().''; + print ''.img_delete().''; //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin } print '
'; - $entry .= '   '.$titre.''; + $entry .= '   '.$titre.''; $entry .= ''; - $entry .= ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; - $entry .= ''.img_edit_add('default').' '; - $entry .= ''.img_delete('default').' '; + $entry .= ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; + $entry .= ''.img_edit_add('default').' '; + $entry .= ''.img_delete('default').' '; $entry .= '     '; - $entry .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; + $entry .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; $entry .= '
'; - $buttons = ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; - $buttons .= ''.img_edit_add('default').' '; - $buttons .= ''.img_delete('default').' '; + $buttons = ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; + $buttons .= ''.img_edit_add('default').' '; + $buttons .= ''.img_delete('default').' '; $buttons .= '     '; - $buttons .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; + $buttons .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; $data[] = array( 'rowid'=>$menu['rowid'], diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index 0f12da3a02a..2d843a52577 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -148,7 +148,7 @@ if ($mode == 'setup' && $user->admin) // We pass this param list in to 'state' because we need it before and after the redirect. $shortscope = 'user,public_repo'; $urltorenew = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); - $urltodelete = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltodelete = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltocheckperms = 'https://github.com/settings/applications/'; } elseif ($key[0] == 'OAUTH_GOOGLE_NAME') { @@ -161,7 +161,7 @@ if ($mode == 'setup' && $user->admin) } //$scope.=',gmail_full'; $urltorenew = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); - $urltodelete = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltodelete = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltocheckperms = 'https://security.google.com/settings/security/permissions'; } elseif ($key[0] == 'OAUTH_STRIPE_TEST_NAME') { diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php index d85f79257d0..718e64e6446 100644 --- a/htdocs/admin/paymentbybanktransfer.php +++ b/htdocs/admin/paymentbybanktransfer.php @@ -465,7 +465,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print ''.dolGetFirstLastname($obj->firstname,$obj->lastname).''; $label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label); print ''.$label.''; - print 'rowid.'">'.img_delete().''; + print 'rowid.'">'.img_delete().''; print ''; $i++; } diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 1e1bee11ad4..50d01924364 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -472,7 +472,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print ''.dolGetFirstLastname($obj->firstname,$obj->lastname).''; $label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label); print ''.$label.''; - print 'rowid.'">'.img_delete().''; + print 'rowid.'">'.img_delete().''; print ''; $i++; } diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index 9b3563edd63..92b9ffbd8b4 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -340,11 +340,11 @@ if ($mode == 'config' && $user->admin) { print img_picto($langs->trans("Edit"), 'edit'); print ''; // delete icon - print ''; + print ''; print img_picto($langs->trans("Delete"), 'delete'); print ''; // test icon - print ''; + print ''; print img_picto($langs->trans("TestPrinter"), 'printer'); print ''; print ''; diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 17c4592f382..560530c9161 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -350,7 +350,7 @@ if ($mode == 'overwrite') } else { print ''.img_edit().''; print '   '; - print ''.img_delete().''; + print ''.img_delete().''; } print ''; @@ -514,7 +514,7 @@ if ($mode == 'searchkey') } print ''.img_edit().''; print ' '; - print ''.img_delete().''; + print ''.img_delete().''; print '  '; $htmltext = $langs->trans("OriginalValueWas", ''.$newlangfileonly->tab_translate[$key].''); print $form->textwithpicto('', $htmltext, 1, 'info'); diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index 83aeed6bd13..b8520ecc227 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -601,10 +601,10 @@ if ($id) print ""; // Modify link - print ''.img_edit().''; + print ''.img_edit().''; // Delete link - if ($iserasable) print ''.img_delete().''; + if ($iserasable) print ''.img_delete().''; else print ''.img_delete($langs->trans("DisableSiteFirst"), 'class="opacitymedium"').''; print "\n"; diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index 3434b03da99..7ef3d9c011e 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -323,7 +323,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($user->rights->asset->delete) { - print ''.$langs->trans('Delete').''."\n"; + print ''.$langs->trans('Delete').''."\n"; } else { print ''.$langs->trans('Delete').''."\n"; } diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 01418fde201..1045e9135ee 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -507,7 +507,7 @@ if ($rowid > 0) // Delete if ($user->rights->asset->write) { - print '
'.$langs->trans("DeleteType").'
'; + print '
'.$langs->trans("DeleteType").'
'; } print ""; diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index cf452d6b8da..7daf29416c2 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -683,7 +683,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($permissiontodelete) { - print ''.$langs->trans('Delete').''."\n"; + print ''.$langs->trans('Delete').''."\n"; } else { print ''.$langs->trans('Delete').''."\n"; } diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index e1e94dc2076..c5ee3870272 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -121,7 +121,7 @@ if ($this->status == 0 && ($object_rights->write) && $action != 'selectlines') { $coldisplay++; if (($line->fk_prev_id == null) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation - print 'id.'">'; + print 'id.'">'; print img_delete(); print ''; } diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index b6552dbd89c..93926e4ba92 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -311,13 +311,13 @@ if ($id > 0 && !preg_match('/^add/i', $action)) // Edit if ($user->rights->bookmark->creer && $action != 'edit') { - print " id."&action=edit\">".$langs->trans("Edit")."\n"; + print ''.$langs->trans("Edit").''."\n"; } // Remove if ($user->rights->bookmark->supprimer && $action != 'edit') { - print " id."&action=delete\">".$langs->trans("Delete")."\n"; + print ''.$langs->trans("Delete").''."\n"; } print ''; diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 3b01efdeea8..7f70d74f5d9 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -241,11 +241,11 @@ while ($i < min($num, $limit)) print ''; if ($user->rights->bookmark->creer) { - print 'rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().""; + print 'rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().""; } if ($user->rights->bookmark->supprimer) { - print 'rowid.'">'.img_delete().''; + print 'rowid.'">'.img_delete().''; } else { print " "; } diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index e8b3da0a525..dc0a980a6f8 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -254,7 +254,7 @@ if ($object->id) } if ($user->rights->categorie->creer) { - print ''; + print ''; print img_delete().''; } if ($nbbyrow) print ''; diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index cf3db3444c7..f5755a697ca 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -301,7 +301,7 @@ if ($action == 'edit') { $s = picto_from_langcode($key); print ''; - print ''; + print ''; print ''; print ''; if (!empty($conf->global->CATEGORY_USE_OTHER_FIELD_IN_TRANSLATION)) diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 616c97f3bb9..30b706a4b3a 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -266,7 +266,7 @@ if ($user->rights->categorie->creer) if ($user->rights->categorie->supprimer) { - print "".$langs->trans("Delete").""; + print "".$langs->trans("Delete").""; } print ""; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 3818f459893..cb63813139d 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -2139,7 +2139,7 @@ if ($id > 0) if ($user->rights->agenda->allactions->delete || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->delete)) { - print '
'.$langs->trans("Delete").'
'; + print '
'.$langs->trans("Delete").'
'; } else { print '
'.$langs->trans("Delete").'
'; } diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 13037b58769..78b9dea4bc6 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -1014,7 +1014,7 @@ if ($action == 'create') { print ''.$langs->trans("DeleteMailing").''; } else { - print ''.$langs->trans("DeleteMailing").''; + print ''.$langs->trans("DeleteMailing").''; } } diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 813a195007b..ef2f3cc772e 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -665,7 +665,7 @@ if ($object->fetch($id) >= 0) if ($obj->statut == 0) // Not sent yet { if ($user->rights->mailing->creer && $allowaddtarget) { - print ''.img_delete($langs->trans("RemoveRecipient")).''; + print ''.img_delete($langs->trans("RemoveRecipient")).''; } } /*if ($obj->statut == -1) // Sent with error diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 2c6b7a9dca6..8febd8868e9 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2491,12 +2491,12 @@ if ($action == 'create') // Clone if ($usercancreate) { - print ''.$langs->trans("ToClone").''; + print ''.$langs->trans("ToClone").''; } // Delete if ($usercandelete) { - print ''.$langs->trans('Delete').''; } } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index b3cb465d70d..5de377930d7 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2602,7 +2602,7 @@ if ($action == 'create' && $usercancreate) // Delete order if ($usercandelete) { if ($numshipping == 0) { - print '
'.$langs->trans('Delete').'
'; + print '
'.$langs->trans('Delete').'
'; } else { print '
'.$langs->trans("Delete").'
'; } diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 950d0c7d3c6..974ba750dd1 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -1490,7 +1490,7 @@ if ($resql) } if ($user->rights->banque->modifier) { - print 'rowid.'&id='.$objp->bankid.'&page='.$page.'">'; + print 'rowid.'&id='.$objp->bankid.'&page='.$page.'">'; print img_delete('', 'class="marginleftonly"'); print ''; } diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 7d9e825ce08..bac2f974def 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -761,13 +761,13 @@ if ($action == 'create') if ($user->rights->banque->configurer) { - print 'id.'">'.$langs->trans("Modify").''; + print 'id.'">'.$langs->trans("Modify").''; } $canbedeleted = $object->can_be_deleted(); // Renvoi vrai si compte sans mouvements if ($user->rights->banque->configurer && $canbedeleted) { - print 'id.'">'.$langs->trans("Delete").''; + print 'id.'">'.$langs->trans("Delete").''; } print ''; diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index 0f71134d08a..18b75bdea9b 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -135,8 +135,8 @@ if ($result) } else { print ""; print ''; } print ""; diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 20eab8b349e..371dbaa65e2 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -550,7 +550,7 @@ if ($id) if ($alreadyaccounted) { print '
'.$langs->trans("Delete").'
'; } else { - print '
'.$langs->trans("Delete").'
'; + print '
'.$langs->trans("Delete").'
'; } } else { print '
'.$langs->trans("Delete").'
'; diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 682981852d8..5b8b98135a1 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -521,7 +521,7 @@ if ($action == 'create') if ($user->rights->deplacement->supprimer) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 634a4a0e452..7b0d7fcf869 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3935,7 +3935,7 @@ if ($action == 'create') } } - if ($action == 'deletepaiement') + if ($action == 'deletepayment') { $payment_id = GETPOST('paiement_id'); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&paiement_id='.$payment_id, $langs->trans('DeletePayment'), $langs->trans('ConfirmDeletePayment'), 'confirm_delete_paiement', '', 'no', 1); @@ -4743,7 +4743,7 @@ if ($action == 'create') print ''; print ''; diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index cd7bbfd11c2..6353d394f20 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -280,7 +280,7 @@ if ($id) print "
\n"; if ($object->rappro == 0) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } else { print ''.$langs->trans("Delete").''; } diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 24650ea343f..71cd900f915 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -734,12 +734,12 @@ print '
'; if ($user->socid == 0 && !empty($object->id) && $object->statut == 0 && $user->rights->banque->cheque) { - print ''.$langs->trans('Validate').''; + print ''.$langs->trans('Validate').''; } if ($user->socid == 0 && !empty($object->id) && $user->rights->banque->cheque) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } print '
'; diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index 2819e492f7b..0e71c83f6cb 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -311,7 +311,7 @@ if ($action == '') { if (!$disable_delete) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index bcdfe1f5238..c744bcc90e8 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -706,13 +706,13 @@ if ($id > 0) // Reopen if ($object->paye && $user->rights->tax->charges->creer) { - print ""; + print ''; } // Edit if ($object->paye == 0 && $user->rights->tax->charges->creer) { - print ""; + print ''; } // Emit payment @@ -724,19 +724,19 @@ if ($id > 0) // Classify 'paid' if ($object->paye == 0 && round($resteapayer) <= 0 && $user->rights->tax->charges->creer) { - print ""; + print ''; } // Clone if ($user->rights->tax->charges->creer) { - print ""; + print '"; } // Delete if ($user->rights->tax->charges->supprimer) { - print ""; + print ''; } print "
"; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 717b584fe44..010fd112646 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -379,7 +379,7 @@ if ($id) { if (!empty($user->rights->tax->charges->supprimer)) { - print '
'.$langs->trans("Delete").'
'; + print '
'.$langs->trans("Delete").'
'; } else { print '
'.$langs->trans("Delete").'
'; } diff --git a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php index bd0808aa8b5..43fd48e3ef0 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php @@ -144,7 +144,7 @@ if (empty($user->socid)) { } if ($user->rights->societe->contact->supprimer) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } print '
'; diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 9f242b52666..e4e7ecaf5fb 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -1526,7 +1526,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Delete if ($user->rights->societe->contact->supprimer) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index adb117b7b8f..dd06d9fed4b 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1567,7 +1567,7 @@ if ($action == 'create') } if ($user->rights->contrat->creer && ($object->statut >= 0)) { - print ''; + print ''; print img_delete(); print ''; } @@ -2108,7 +2108,7 @@ if ($action == 'create') // - Droit de supprimer if (($user->rights->contrat->creer && $object->statut == $object::STATUS_DRAFT) || $user->rights->contrat->supprimer) { - print '
'.$langs->trans("Delete").'
'; + print '
'.$langs->trans("Delete").'
'; } else { print '
'.$langs->trans("Delete").'
'; } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 46567edf369..3ea4bba4a7f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7152,7 +7152,7 @@ abstract class CommonObject $return .= ''.img_picto($langs->trans("Resize"), 'resize', '').'   '; // Link to delete - $return .= ''; + $return .= ''; $return .= img_delete().''; } } @@ -7178,7 +7178,7 @@ abstract class CommonObject $return .= ''.img_picto($langs->trans("Resize"), 'resize', '').'   '; // Link to delete - $return .= ''; + $return .= ''; $return .= img_delete().''; } } diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 2e06837563e..7264c83b152 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1337,7 +1337,7 @@ class FormFile if (!empty($conf->dol_use_jmobile)) $useajax = 0; if (empty($conf->use_javascript_ajax)) $useajax = 0; if (!empty($conf->global->MAIN_ECM_DISABLE_JS)) $useajax = 0; - print ''.img_delete().''; + print ''.img_delete().''; } print ""; @@ -1645,7 +1645,7 @@ class FormFile //if ($forcedownload) print '&attachment=1'; //print '&file='.urlencode($relativefile).'">'; //print img_view().'   '; - //if ($permissiontodelete) print ''.img_delete().''; + //if ($permissiontodelete) print ''.img_delete().''; //else print ' '; print "\n"; } @@ -1819,7 +1819,7 @@ class FormFile print ''; } - print ''."\n"; + print ''."\n"; print ""; } } else { diff --git a/htdocs/core/tpl/bloc_comment.tpl.php b/htdocs/core/tpl/bloc_comment.tpl.php index 02a32110779..edb675e45d6 100644 --- a/htdocs/core/tpl/bloc_comment.tpl.php +++ b/htdocs/core/tpl/bloc_comment.tpl.php @@ -125,12 +125,12 @@ if (!empty($object->comments)) } else { if ($fk_user == $user->id || $user->admin == 1) { - print ''; + print ''; print img_picto('', 'edit.png'); print ''; } if (($first && $fk_user == $user->id) || $user->admin == 1) { - print ''; + print ''; print img_picto('', 'delete.png'); print ''; } diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 7665c4e2211..1cb8b813001 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -298,9 +298,9 @@ foreach ($list as $entry) if ($permission) { $href = $_SERVER["PHP_SELF"]; - $href .= "?id=".$object->id; - $href .= "&action=deletecontact"; - $href .= "&lineid=".$entry->id; + $href .= '?id='.$object->id; + $href .= '&action=deletecontact&token='.newToken(); + $href .= '&lineid='.$entry->id; print "'; print ''; // Display lines extrafields @@ -2499,7 +2499,7 @@ if ($action == 'create') // Delete if ($user->rights->expedition->supprimer) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } } diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index addb13da745..34c33f5aaab 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2199,10 +2199,10 @@ if ($action == 'create') { print '"; diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index d297313675e..b8ff3714596 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -714,14 +714,14 @@ if ($action == 'create') { if ($user->rights->ficheinter->creer) { print '
'; - print ''; print $langs->trans("CreateFichInter").'
'; } if ($user->rights->ficheinter->supprimer) { print '
'; - print ''; + print ''; print $langs->trans('Delete').'
'; } print ''; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 4034abad733..b6d7ab39336 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1697,7 +1697,7 @@ if ($action == 'create') // Delete if (($object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer) { - print '
'.$langs->trans('Delete').'
'; } } diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 4a26d3b4cb6..419d5c7a559 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2559,7 +2559,7 @@ if ($action == 'create') // Delete if (!empty($usercandelete) || ($object->statut == CommandeFournisseur::STATUS_DRAFT && !empty($usercancreate))) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 9470e408b70..b0f178c6fc4 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2345,7 +2345,7 @@ if ($action == 'create') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); } - if ($action == 'deletepaiement') + if ($action == 'deletepayment') { $payment_id = GETPOST('paiement_id'); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&paiement_id='.$payment_id, $langs->trans('DeletePayment'), $langs->trans('ConfirmDeletePayment'), 'confirm_delete_paiement', '', 0, 1); @@ -2789,7 +2789,7 @@ if ($action == 'create') print ''; // Del button - print ''; // Action button print ''; diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index d97bc8f7f35..49841fe24b9 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -521,7 +521,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Delete (need delete permission, or if draft, just need create/modify permission) if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { - print ''.$langs->trans('Delete').''."\n"; + print ''.$langs->trans('Delete').''."\n"; } else { print ''.$langs->trans('Delete').''."\n"; } diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 49b29b7048b..add7de31b56 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -656,7 +656,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Delete (need delete permission, or if draft, just need create/modify permission) if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { - print ''.$langs->trans('Delete').''."\n"; + print ''.$langs->trans('Delete').''."\n"; } else { print ''.$langs->trans('Delete').''."\n"; } diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 2d714deeb2c..f5fa5a5ab78 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -371,7 +371,7 @@ if ($action != 'edit' && $user->rights->opensurvey->write) { } //Delete button - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } print ''; diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index bc9f1048b4b..aafc36ca256 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -178,8 +178,8 @@ if ($action != 'create_updater' && $action != 'edit_updater') print ''; print ''; print ''; - print ''; + print ''; print ''; } } else { @@ -270,7 +270,7 @@ if ($action != 'create_variable' && $action != 'edit_variable') print ''; print ''; print ''; + print 'id.'">'.img_delete().''; print ''; } } else { @@ -284,7 +284,7 @@ if ($action != 'create_variable' && $action != 'edit_variable') { //Action Buttons print '
'; - print ''.$langs->trans("AddUpdater").''; + print ''.$langs->trans("AddUpdater").''; print '
'; } } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index f86b94f314e..ce852876a3d 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -2238,7 +2238,7 @@ if ($action != 'create' && $action != 'edit') { print ''.$langs->trans('Delete').''."\n"; } else { - print 'id.'">'.$langs->trans("Delete").''; + print 'id.'">'.$langs->trans("Delete").''; } } else { print ''.$langs->trans("Delete").''; diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php index c0bbf8388a2..b59319ad985 100644 --- a/htdocs/product/dynamic_price/editor.php +++ b/htdocs/product/dynamic_price/editor.php @@ -206,7 +206,7 @@ if ($eid == 0) { print '
'.$langs->trans('Delete').'
'."\n"; } else { - print '
'.$langs->trans("Delete").'
'; + print '
'.$langs->trans("Delete").'
'; } print ''; diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index 3053cc45d71..f7dbc1f6410 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -425,7 +425,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Delete (need delete permission, or if draft, just need create/modify permission) if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { - print ''.$langs->trans('Delete').''."\n"; + print ''.$langs->trans('Delete').''."\n"; } else { print ''.$langs->trans('Delete').''."\n"; } diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 504f8419685..37f1cb9721a 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -512,7 +512,7 @@ if ($object->id > 0) print 'rowid).'">'; print ''; print ''; print ''; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index c73e43dc6f0..847292fa367 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -913,7 +913,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ if (($user->rights->produit->creer || $user->rights->service->creer)) { print ''; print img_edit().''; - print ''; + print ''; print img_delete().''; } else { print ' '; @@ -1064,7 +1064,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ { print ''; print img_edit().''; - print ''; + print ''; print img_delete().''; } else { print ' '; @@ -1591,7 +1591,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul print ''; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 11aa5e860ae..81ae26390c9 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -485,13 +485,19 @@ if ($action == 'create') { if (empty($action)) { - if ($user->rights->stock->creer) - print "id."\">".$langs->trans("Modify").""; - else print "".$langs->trans("Modify").""; + if ($user->rights->stock->creer) { + print ''.$langs->trans("Modify").''; + } + else { + print ''.$langs->trans("Modify").''; + } - if ($user->rights->stock->supprimer) - print "id."\">".$langs->trans("Delete").""; - else print "".$langs->trans("Delete").""; + if ($user->rights->stock->supprimer) { + print ''.$langs->trans("Delete").''; + } + else { + print ''.$langs->trans("Delete").''; + } } } diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 54d57bf5d75..64c23814ec2 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -1006,7 +1006,7 @@ if (!$variants) { print ''; print ''; if (!empty($user->rights->produit->creer)) { - print ''; + print ''; } print ''; } diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index bdc68f5c3e5..dbedba85d99 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -371,7 +371,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($user->rights->stock->supprimer) { - print '
'.$langs->trans('Delete').'
'."\n"; + print '
'.$langs->trans('Delete').'
'."\n"; } */ } diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 502a15cd04e..c6a5d15a0b0 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -236,7 +236,7 @@ if ($action == 'edit') foreach ($object->multilangs as $key => $value) { $s = picto_from_langcode($key); - print "
".($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"')."
"; + print "
".($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"')."
"; print '
'; print '
'.($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', '').'
'.($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', '').'
'.$langs->trans('Label').''.$object->multilangs[$key]["label"].'
'.$langs->trans('Description').''.$object->multilangs[$key]["description"].'
".$objp->label."'; - print ''.img_edit().''; - print ''.img_delete().''; + print ''.img_edit().''; + print ''.img_delete().''; print '
'; if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) { - print 'rowid.'">'; + print 'rowid.'">'; print img_delete(); print ''; } @@ -5286,7 +5286,7 @@ if ($action == 'create') { print ''.$langs->trans('Delete').''; } else { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } } else { print ''.$langs->trans('Delete').''; diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 721c0b857ab..f69517c1037 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -752,7 +752,7 @@ if ($object->id > 0) print ''.$langs->trans("OrderWaiting").''; - print ''; + print ''; print img_delete(); print '
'; print ''.img_edit().''; // id= is included into $param if ($permissiontodelete) { - print '   '.img_delete().''; // id= is included into $param + print '   '.img_delete().''; // id= is included into $param } else { print ' '; } diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index 4b707f0772f..0312aa061f8 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -140,7 +140,7 @@ class printing_printgcp extends PrintingDriver 'info'=>$access, 'type'=>'info', 'renew'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?state=userinfo_email,userinfo_profile,cloud_print&backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), - 'delete'=>($storage->hasAccessToken($this->OAUTH_SERVICENAME_GOOGLE) ? $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp') : '') + 'delete'=>($storage->hasAccessToken($this->OAUTH_SERVICENAME_GOOGLE) ? $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp') : '') ); if ($token_ok) { $expiredat = ''; @@ -166,7 +166,7 @@ class printing_printgcp extends PrintingDriver /* if ($storage->hasAccessToken($this->OAUTH_SERVICENAME_GOOGLE)) { $this->conf[] = array('varname'=>'PRINTGCP_AUTHLINK', 'link'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), 'type'=>'authlink'); - $this->conf[] = array('varname'=>'DELETE_TOKEN', 'link'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), 'type'=>'delete'); + $this->conf[] = array('varname'=>'DELETE_TOKEN', 'link'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), 'type'=>'delete'); } else { $this->conf[] = array('varname'=>'PRINTGCP_AUTHLINK', 'link'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), 'type'=>'authlink'); }*/ diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index 8b92f4e183c..fb542f9037e 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -112,8 +112,8 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel } print ''.img_edit().''; - print '  '.img_delete().''.img_edit().''; + print '  '.img_delete().'
"; print ""; diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php index ed54b4a2d00..9bc8447a796 100644 --- a/htdocs/core/tpl/resource_view.tpl.php +++ b/htdocs/core/tpl/resource_view.tpl.php @@ -73,11 +73,11 @@ if ((array) $linked_resources && count($linked_resources) > 0) print ''; print ''; diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 80c3602f5d9..df529b598ec 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -726,7 +726,7 @@ if (($action == "create") || ($action == "edit")) if (!$user->rights->cron->delete) { print ''.$langs->trans("Delete").''; } else { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } print ''; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index a41608e7e25..927c1d1014f 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -536,12 +536,12 @@ if ($num > 0) $backtourl = urlencode($_SERVER["PHP_SELF"].'?'.$param.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '')); if ($user->rights->cron->create) { - print 'trans('Edit'))."\">".img_picto($langs->trans('Edit'), 'edit')."  "; } if ($user->rights->cron->delete) { - print 'trans('CronDelete'))."\">".img_picto($langs->trans('CronDelete'), 'delete', '', false, 0, 0, '', 'marginleftonly')."   "; } else { print "trans('NotEnoughPermissions'))."\">".img_picto($langs->trans('NotEnoughPermissions'), 'delete', '', false, 0, 0, '', 'marginleftonly')."   "; diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 42e45c2cba0..95bebb3ef8d 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -817,7 +817,7 @@ if (!empty($id) && $action != 'edit') { if ($object->statut == -1 || $object->statut == 0) { - print '"; + print '"; } else { print '"; } diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index 4e4ce818556..26f540969ee 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -268,7 +268,7 @@ if (empty($action)) { if (!$disable_delete) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index b4e3c76aef1..a84beb605cb 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -292,7 +292,7 @@ if (empty($action) || $action == 'delete_section') print '
'; if ($user->rights->ecm->setup) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/ecm/dir_card.php b/htdocs/ecm/dir_card.php index 27d08e9119f..be481aa09bd 100644 --- a/htdocs/ecm/dir_card.php +++ b/htdocs/ecm/dir_card.php @@ -457,7 +457,7 @@ if ($action != 'edit' && $action != 'delete') //{ if ($permtoadd) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/ecm/file_card.php b/htdocs/ecm/file_card.php index 48c15f92aa2..40068e2e0a3 100644 --- a/htdocs/ecm/file_card.php +++ b/htdocs/ecm/file_card.php @@ -405,7 +405,7 @@ if ($action != 'edit') /* if ($user->rights->ecm->setup) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 7d4a455d58b..86ec2ee5c38 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -2360,7 +2360,7 @@ if ($action == 'create') print 'id.'">'.img_edit().''; print '
'; - print 'id.'">'.img_delete().''; + print 'id.'">'.img_delete().''; print ''; - print 'rowid.'">'; + print 'rowid.'">'; print img_edit(); print '   '; - print 'rowid.'">'; + print 'rowid.'">'; print img_delete(); print ''; diff --git a/htdocs/expensereport/payment/card.php b/htdocs/expensereport/payment/card.php index fd1453b8ae5..9bc50341973 100644 --- a/htdocs/expensereport/payment/card.php +++ b/htdocs/expensereport/payment/card.php @@ -293,7 +293,7 @@ if ($action == '') { if (!$disable_delete) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index a33437166ea..89ae2103476 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -845,7 +845,7 @@ class Export } // suppression de l'export print ''; - print 'rowid.'">'; + print 'rowid.'">'; print img_delete(); print ''; print "
'; if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) { - print 'rowid.'">'; + print 'rowid.'">'; print img_delete(); print ''; } @@ -3178,7 +3178,7 @@ if ($action == 'create') { print ''; } else { - print ''; + print ''; } } print ''; diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 9a7af329f50..ffe4c95bf51 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -345,7 +345,7 @@ if ($result > 0) { if ($allow_delete) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index cd76f74b278..7c0eab0f352 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -598,19 +598,19 @@ if (!function_exists('ftp_connect')) print ''; if ($is_directory) { - if ($file != '..') print ''.img_delete().''; + if ($file != '..') print ''.img_delete().''; else print ' '; } elseif ($is_link) { $newfile = $file; $newfile = preg_replace('/ ->.*/', '', $newfile); - print ''.img_delete().''; + print ''.img_delete().''; } else { - print ''.img_picto('', 'file').''; + print ''.img_picto('', 'file').''; print '   '; print ''; print '   '; - print ''.img_delete().''; + print ''.img_delete().''; print ''; print ''; } diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 3bacf8d6d6a..d9bbe6607bf 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -1470,7 +1470,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') } if ($candelete && ($object->statut == Holiday::STATUS_DRAFT || $object->statut == Holiday::STATUS_CANCELED || $object->statut == Holiday::STATUS_REFUSED)) // If draft or canceled or refused { - print ''.$langs->trans("DeleteCP").''; + print ''.$langs->trans("DeleteCP").''; } print ''; diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 0b000f879c2..1f43878babf 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -426,7 +426,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; } diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 8dee2ed0538..71fad9dee9b 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -639,7 +639,7 @@ if ($step == 3 && $datatoimport) // Affiche date fichier print ''.dol_print_date(dol_filemtime($dir.'/'.$file), 'dayhour').''.img_delete().''; diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index e6f9e612a59..cf370fbdca0 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index 80594338ba1..2a1646a5d80 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -658,9 +658,9 @@ if ($action == 'create') // Create. Seems to no be used { if ($conf->expedition_bon->enabled) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } else { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } } diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 157bdbd53b8..1c4116b34c2 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -752,13 +752,13 @@ if ($id > 0) // Classify 'paid' if (($object->paid == 0 || $object->paid == 2) && round($staytopay) <= 0 && $user->rights->loan->write) { - print ''; + print ''; } // Delete if (($object->paid == 0 || $object->paid == 2) && $user->rights->loan->delete) { - print ''; + print ''; } print ""; diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 9b4da35e5d1..51aa3f85a92 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -281,7 +281,7 @@ if (empty($action) && !empty($user->rights->loan->delete)) { if (!$disable_delete) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 6cdf59a078a..69f985db0b9 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -373,7 +373,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl || defined('CSRFCHECK_WITH_TOKEN')) // Check validity of token, only if option MAIN_SECURITY_CSRF_WITH_TOKEN enabled or if constant CSRFCHECK_WITH_TOKEN is set { // Check all cases that need a token (all POST actions, all actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set, all sensitive GET actions) - if ($_SERVER['REQUEST_METHOD'] == 'POST' || ((GETPOSTISSET('action') || GETPOSTISSET('massaction')) && defined('CSRFCHECK_WITH_TOKEN')) || in_array(GETPOST('action', 'aZ09'), array('add', 'addtimespent', 'update', 'install', 'delete', 'deleteprof'))) + if ($_SERVER['REQUEST_METHOD'] == 'POST' || ((GETPOSTISSET('action') || GETPOSTISSET('massaction')) && defined('CSRFCHECK_WITH_TOKEN')) || in_array(GETPOST('action', 'aZ09'), array('add', 'addtimespent', 'update', 'install', 'delete', 'deleteprof', 'deletepayment'))) { if (!GETPOSTISSET('token')) { dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused by CSRFCHECK_WITH_TOKEN protection. Token not provided."); diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index fd9fe7fa798..49d097ffc8a 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -2713,7 +2713,7 @@ if ($module == 'initmodule') print ''; if ($propname != 'rowid') { - print ''.img_delete().''; + print ''.img_delete().''; } print ''.$entry->code.''.$entry->description.''.price($entry->value).'id.'">'.img_edit().'  '; - print 'id.'">'.img_delete().'id.'">'.img_edit().'  '; + print 'id.'">'.img_delete().'
'.$entry->update_interval.''.$entry->getLastUpdated().'id.'">'.img_edit().'  '; - print 'id.'">'.img_delete().'
'; - print ''.img_delete().''; + print ''.img_delete().''; print '
'; if ($candelete) { - print 'id.'&lineid='.$objp->rowid.'">'; + print 'id.'&lineid='.$objp->rowid.'">'; print img_delete(); print ''; } else print ' '; // Can not delete last price (it's current price) @@ -2148,7 +2148,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print img_edit('default', 0, 'style="vertical-align: middle;"'); print ''; print ' '; - print 'id.'&lineid='.$line->id.'">'; + print 'id.'&lineid='.$line->id.'">'; print img_delete('default', 'style="vertical-align: middle;"'); print ''; print ''.$line['seuil_stock_alerte'].''.$line['desiredstock'].''.img_delete().''.img_delete().'
'; @@ -272,7 +272,7 @@ if ($action == 'edit') foreach ($object->multilangs as $key => $value) { $s = picto_from_langcode($key); - print ($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"').''; + print ($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"').''; print '
'; print '
'; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index c1c59bcd3b7..db38e3c02d7 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1324,7 +1324,7 @@ if ($action == 'create' && $user->rights->projet->creer) { if ($userDelete > 0 || ($object->statut == 0 && $user->rights->projet->creer)) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 72e3a1bae32..313fec73721 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -518,7 +518,7 @@ if ($id > 0 || !empty($ref)) if ($user->rights->projet->creer) { print ' '; - print ''; + print ''; print img_picto($langs->trans('Unlink'), 'unlink'); print ''; } diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 49e1a3e6866..096eb62d0d0 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -604,7 +604,7 @@ if ($id > 0 || !empty($ref)) { if (!$object->hasChildren() && !$object->hasTimeSpent()) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 4ded7e9d197..dfeb73bb3cc 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1462,7 +1462,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) print ''; print ' '; - print 'rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; + print 'rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; print img_delete('default', 'class="pictodelete paddingleft"'); print ''; diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 0758e1456ce..d41ce8e6bf4 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -1909,10 +1909,10 @@ if ($action == 'create') { // edit-delete buttons print '
'; print ''; // Display lines extrafields @@ -2035,7 +2035,7 @@ if ($action == 'create') if ($user->rights->reception->supprimer) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } } diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index 5e790c0b993..e25de998a36 100644 --- a/htdocs/recruitment/recruitmentcandidature_card.php +++ b/htdocs/recruitment/recruitmentcandidature_card.php @@ -543,7 +543,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Delete (need delete permission, or if draft, just need create/modify permission) if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { - print ''.$langs->trans('Delete').''."\n"; + print ''.$langs->trans('Delete').''."\n"; } else { print ''.$langs->trans('Delete').''."\n"; } diff --git a/htdocs/recruitment/recruitmentjobposition_candidature.php b/htdocs/recruitment/recruitmentjobposition_candidature.php index 219bb3469f6..a945df25bfc 100644 --- a/htdocs/recruitment/recruitmentjobposition_candidature.php +++ b/htdocs/recruitment/recruitmentjobposition_candidature.php @@ -520,7 +520,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Delete (need delete permission, or if draft, just need create/modify permission) if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { - print ''.$langs->trans('Delete').''."\n"; + print ''.$langs->trans('Delete').''."\n"; } else { print ''.$langs->trans('Delete').''."\n"; } diff --git a/htdocs/recruitment/recruitmentjobposition_card.php b/htdocs/recruitment/recruitmentjobposition_card.php index ee09413905d..d4a115962f2 100644 --- a/htdocs/recruitment/recruitmentjobposition_card.php +++ b/htdocs/recruitment/recruitmentjobposition_card.php @@ -544,7 +544,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Delete (need delete permission, or if draft, just need create/modify permission) if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { - print ''.$langs->trans('Delete').''."\n"; + print ''.$langs->trans('Delete').''."\n"; } else { print ''.$langs->trans('Delete').''."\n"; } diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index b1fec3058c0..e170b038e7a 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -369,7 +369,7 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) if ($user->rights->resource->delete) { print '
'; - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; print '
'; } } diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index e2d10ffceef..a8a946e7578 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -269,11 +269,11 @@ if ($ret) include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; print ''; diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 6a696aa4132..ec1184a77e6 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -484,7 +484,7 @@ if ($id) { if (!empty($user->rights->salaries->delete)) { - print '
'.$langs->trans("Delete").'
'; + print '
'.$langs->trans("Delete").'
'; } else { print '
'.$langs->trans("Delete").'
'; } diff --git a/htdocs/societe/canvas/company/tpl/card_view.tpl.php b/htdocs/societe/canvas/company/tpl/card_view.tpl.php index d7f06763034..6591e38e1cb 100644 --- a/htdocs/societe/canvas/company/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/company/tpl/card_view.tpl.php @@ -246,7 +246,7 @@ for ($i = 1; $i <= 4; $i++) { use_javascript_ajax) { ?> trans('Delete'); ?> - ">trans('Delete'); ?> + ">trans('Delete'); ?> diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php index 14c8822dc9e..a49dbcde698 100644 --- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php @@ -189,7 +189,7 @@ if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delet use_javascript_ajax) { ?> trans('Delete'); ?> - ">trans('Delete'); ?> + ">trans('Delete'); ?> diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 8104d40d201..9e6ad514da6 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2657,7 +2657,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''.$langs->trans('Delete').''."\n"; } else { - print ''.$langs->trans('Delete').''."\n"; + print ''.$langs->trans('Delete').''."\n"; } } } diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index 18cc536d6b8..ba1ea5d54a5 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -339,7 +339,7 @@ if ($result > 0) if ($obj->type == 'email') print $langs->trans("Email"); if ($obj->type == 'sms') print $langs->trans("SMS"); print ''; - print ''; + print ''; print ''; $i++; } diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index ed835dfd9a4..6adf32dd392 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1094,11 +1094,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''.$langs->trans("CreateCardOnStripe").''; } - print ''; + print ''; print img_picto($langs->trans("Modify"), 'edit'); print ''; print ' '; - print ''; // source='.$companypaymentmodetemp->stripe_card_ref.'& + print ''; // source='.$companypaymentmodetemp->stripe_card_ref.'& print img_picto($langs->trans("Delete"), 'delete'); print ''; } @@ -1248,7 +1248,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 1e884629791..1190b29aa3c 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1902,7 +1902,7 @@ if ($action == 'create') // Delete if (($object->statut == SupplierProposal::STATUS_DRAFT && $usercancreate) || $usercandelete) { - print '
'.$langs->trans('Delete').'
'; } } diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index bcc56ff0166..66212ab3203 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -432,7 +432,7 @@ function ChangeThirdparty(idcustomer) { function deleteline() { console.log("Delete line"); - $("#poslines").load("invoice.php?action=deleteline&place="+place+"&idline="+selectedline, function() { + $("#poslines").load("invoice.php?action=deleteline&token=&place="+place+"&idline="+selectedline, function() { //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); }); ClearSearch(); @@ -499,7 +499,7 @@ function New() { if (r == true) { // Reload section with invoice lines - $("#poslines").load("invoice.php?action=delete&place=" + place, function () { + $("#poslines").load("invoice.php?action=delete&token=&place=" + place, function () { //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); }); ClearSearch(); diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 119752014a1..14ca718740b 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -250,7 +250,7 @@ function SetQty(place, selectedline, qty){ if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { ?> if (qty==0){ - $("#phonediv2").load("auto_order.php?mobilepage=invoice&action=deleteline&place="+place+"&idline="+selectedline, function() { + $("#phonediv2").load("auto_order.php?mobilepage=invoice&action=deleteline&token=&place="+place+"&idline="+selectedline, function() { }); } else{ @@ -262,7 +262,7 @@ function SetQty(place, selectedline, qty){ else { ?> if (qty==0){ - $("#phonediv2").load("invoice.php?mobilepage=invoice&action=deleteline&place="+place+"&idline="+selectedline, function() { + $("#phonediv2").load("invoice.php?mobilepage=invoice&action=deleteline&token=&place="+place+"&idline="+selectedline, function() { }); } else{ @@ -271,7 +271,7 @@ function SetQty(place, selectedline, qty){ } + ?> LoadCats(); } diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 03e9fe52781..1719013bdf5 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -1265,7 +1265,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = // Delete ticket if ($user->rights->ticket->delete && !$user->socid) { - print '
'.$langs->trans('Delete').'
'; + print '
'.$langs->trans('Delete').'
'; } } print ''."\n"; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 96b9d55af6a..f989e231f60 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1898,7 +1898,7 @@ if ($action == 'create' || $action == 'adduserldap') { if ($user->admin || !$object->admin) // If user edited is admin, delete is possible on for an admin { - print '
'.$langs->trans("DeleteUser").'
'; + print '
'.$langs->trans("DeleteUser").'
'; } else { print '
'.$langs->trans("DeleteUser").'
'; } diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index febdf3373fe..e8ffbd7c1f7 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -385,12 +385,12 @@ else { if ($caneditperms) { - print ''.$langs->trans("Modify").''; + print ''.$langs->trans("Modify").''; } if ($candisableperms) { - print ''.$langs->trans("DeleteGroup").''; + print ''.$langs->trans("DeleteGroup").''; } print "\n"; diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php index bc07dc0270d..ca90e7f60e9 100644 --- a/htdocs/user/notify/card.php +++ b/htdocs/user/notify/card.php @@ -313,7 +313,7 @@ if ($result > 0) if ($obj->type == 'email') print $langs->trans("Email"); if ($obj->type == 'sms') print $langs->trans("SMS"); print ''; - print ''; + print ''; print ''; $i++; } diff --git a/htdocs/variants/card.php b/htdocs/variants/card.php index 13b7408fc93..c1bbc6fe6e2 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -219,8 +219,8 @@ if ($action == 'edit') {
@@ -263,7 +263,7 @@ if ($action == 'edit') { '.$prodstatic->getLibStatut(2, 1).''; print ''; print ''; print ''; print '
'; - print 'id.'">'.img_edit().''; + print 'id.'">'.img_edit().''; print ''; - print 'id.'">'.img_delete().''; + print 'id.'">'.img_delete().''; print ''; - print ''; + print ''; print img_edit(); print ''; print ' '; - print ''; + print ''; print img_delete('', 'class="marginleftonly"'); print ''; print ' '.img_delete().''.img_delete().'
'; if ($user->rights->societe->creer) { - print ''; + print ''; print img_picto($langs->trans("Delete"), 'delete'); print ''; } @@ -1492,7 +1492,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print img_picto($langs->trans("Modify"), 'edit'); print ''; - print ''; + print ''; print img_picto($langs->trans("Delete"), 'delete'); print ''; } diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 8fb17a59e3f..4a709fb9009 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -593,7 +593,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print img_edit('default', 0, 'style="vertical-align: middle;"'); print ''; print ' '; - print 'id.'&lineid='.$line->id.'">'; + print 'id.'&lineid='.$line->id.'">'; print img_delete('default', 'style="vertical-align: middle;"'); print ''; print ''.img_delete().''.img_delete().'
value) ?> - + '; print 'id.'">'.img_edit().''; - print 'id.'">'.img_delete().''; + print 'id.'">'.img_delete().''; print ''; if ($productCombinations || $massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index 971533bdd25..7973553f6d0 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -126,7 +126,7 @@ foreach ($variants as $key => $attribute) { print ''.$attribute->countChildProducts().''; print ''.img_edit().''; - print ''.img_delete().''; + print ''.img_delete().''; print ''; if ($key > 0) { diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php index c1057935e31..403128a0f8b 100644 --- a/htdocs/website/websiteaccount_card.php +++ b/htdocs/website/websiteaccount_card.php @@ -331,7 +331,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($user->rights->website->delete) { - print ''."\n"; + print ''."\n"; } } print ''."\n"; diff --git a/htdocs/zapier/hook_card.php b/htdocs/zapier/hook_card.php index efb02395e7b..721b40ebfd9 100644 --- a/htdocs/zapier/hook_card.php +++ b/htdocs/zapier/hook_card.php @@ -353,7 +353,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea */ if ($user->rights->mymodule->delete) { - print ''.$langs->trans('Delete').''."\n"; + print ''.$langs->trans('Delete').''."\n"; } else { print ''.$langs->trans('Delete').''."\n"; }