diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 86efee3a04a..cd48526e62b 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -61,7 +61,7 @@ $object = new AccountingAccount($db); */ if (GETPOST('cancel', 'alpha')) { - $urltogo = $backtopage ? $backtopage : dol_buildpath('/accountancy/admin/account.php', 1); + $urltogo = $backtopage ? $backtopage : DOL_URL_ROOT.'/accountancy/admin/account.php'; header("Location: ".$urltogo); exit; } @@ -121,7 +121,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) { } if (!$error) { setEventMessages("RecordCreatedSuccessfully", null, 'mesgs'); - $urltogo = $backtopage ? $backtopage : dol_buildpath('/accountancy/admin/account.php', 1); + $urltogo = $backtopage ? $backtopage : DOL_URL_ROOT.'/accountancy/admin/account.php'; header("Location: " . $urltogo); exit; } diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index fe1a61c686c..f719bd7c705 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -356,7 +356,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* diff --git a/htdocs/admin/ticket_public.php b/htdocs/admin/ticket_public.php index 22e4a4a1b42..68dbfb429b8 100644 --- a/htdocs/admin/ticket_public.php +++ b/htdocs/admin/ticket_public.php @@ -180,10 +180,11 @@ $head = ticketAdminPrepareHead(); print dol_get_fiche_head($head, 'public', $langs->trans("Module56000Name"), -1, "ticket"); -print ''.$langs->trans("TicketPublicAccess").' : '.dol_buildpath('/public/ticket/index.php', 2).''; +print ''.$langs->trans("TicketPublicAccess").' : '.dol_buildpath('/public/ticket/index.php', 2).''; print dol_get_fiche_end(); +$param = ''; $enabledisablehtml = $langs->trans("TicketsActivatePublicInterface").' '; if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index ceaf6aa2ecc..efa1703bca5 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -247,7 +247,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index 16af18d8277..53ad1ee4c43 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -97,7 +97,7 @@ if ($id > 0 || !empty($ref)) { // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php index bf65f40fe13..bfb0f5b8c81 100644 --- a/htdocs/bom/bom_agenda.php +++ b/htdocs/bom/bom_agenda.php @@ -139,7 +139,7 @@ if ($object->id > 0) { // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 235336d4f73..4926f2fd73a 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -105,7 +105,7 @@ if (empty($reshook)) { if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { $backtopage = $backurlforlist; } else { - $backtopage = dol_buildpath('/bom/bom_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + $backtopage = DOL_URL_ROOT.'/bom/bom_card.php?id='.($id > 0 ? $id : '__ID__'); } } } @@ -450,7 +450,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* @@ -616,24 +616,24 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Re-open if ($permissiontoadd && $object->status == $object::STATUS_CANCELED) { - print ''.$langs->trans("ReOpen").''."\n"; + print ''.$langs->trans("ReOpen").''."\n"; } // Create MO if ($conf->mrp->enabled) { if ($object->status == $object::STATUS_VALIDATED && !empty($user->rights->mrp->write)) { - print ''.$langs->trans("CreateMO").''."\n"; + print ''.$langs->trans("CreateMO").''."\n"; } } // Clone if ($permissiontoadd) { - print ''.$langs->trans("ToClone").''."\n"; + print ''.$langs->trans("ToClone").''."\n"; } // Close / Cancel if ($permissiontoadd && $object->status == $object::STATUS_VALIDATED) { - print ''.$langs->trans("Disable").''."\n"; + print ''.$langs->trans("Disable").''."\n"; } /* @@ -687,7 +687,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $MAXEVENT = 10; - $morehtmlright = ''; + $morehtmlright = ''; $morehtmlright .= $langs->trans("SeeAll"); $morehtmlright .= ''; diff --git a/htdocs/bom/bom_document.php b/htdocs/bom/bom_document.php index dd0227e4305..c36ac32bb59 100644 --- a/htdocs/bom/bom_document.php +++ b/htdocs/bom/bom_document.php @@ -125,7 +125,7 @@ if ($object->id) { // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/bom/bom_note.php b/htdocs/bom/bom_note.php index f456e7ddf98..8ace40cc900 100644 --- a/htdocs/bom/bom_note.php +++ b/htdocs/bom/bom_note.php @@ -100,7 +100,7 @@ if ($id > 0 || !empty($ref)) { // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index de8c87bcd43..9560a95bd96 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1383,7 +1383,7 @@ class BOMLine extends CommonObjectLine $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; - $url = dol_buildpath('/bom/bomline_card.php', 1).'?id='.$this->id; + $url = DOL_URL_ROOT.'/bom/bomline_card.php?id='.$this->id; if ($option != 'nolink') { // Add param to save lastsearch_values or not diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 656d370d6d5..91e09a5623a 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2544,7 +2544,7 @@ if ($action == 'create') { // ReOpen if ( (( ! empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) { - print 'global->MAIN_JUMP_TAG) ? '' : '#reopen').'"'; + print 'global->MAIN_JUMP_TAG) ? '' : '#reopen').'"'; print '>'.$langs->trans('ReOpen').''; } @@ -2552,7 +2552,7 @@ if ($action == 'create') { if (empty($user->socid)) { if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { - print ''.$langs->trans('SendMail').''; + print ''.$langs->trans('SendMail').''; } else { print ''.$langs->trans('SendMail').''; } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 3aaa79cab55..13e9b82e799 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2485,14 +2485,14 @@ if ($action == 'create' && $usercancreate) { if (empty($reshook)) { // Reopen a closed order if (($object->statut == Commande::STATUS_CLOSED || $object->statut == Commande::STATUS_CANCELED) && $usercancreate) { - print ''.$langs->trans('ReOpen').''; + print ''.$langs->trans('ReOpen').''; } // Send if (empty($user->socid)) { if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { - print ''.$langs->trans('SendMail').''; + print ''.$langs->trans('SendMail').''; } else { print ''.$langs->trans('SendMail').''; } diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 26949590334..eebe3e4832f 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -107,9 +107,9 @@ if (!$user->rights->cashdesk->run && !$user->rights->takepos->run) { $permissiontoadd = ($user->rights->cashdesk->run || $user->rights->takepos->run); $permissiontodelete = ($user->rights->cashdesk->run || $user->rights->takepos->run) || ($permissiontoadd && $object->status == 0); if (empty($backtopage)) { - $backtopage = dol_buildpath('/compta/cashcontrol/cashcontrol_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + $backtopage = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?id='.($id > 0 ? $id : '__ID__'); } -$backurlforlist = dol_buildpath('/compta/cashcontrol/cashcontrol_list.php', 1); +$backurlforlist = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_list.php'; $triggermodname = 'CACHCONTROL_MODIFY'; // Name of trigger action code to execute when we modify record if (empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH) && empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH1)) { @@ -679,11 +679,11 @@ if (empty($action) || $action == "view" || $action == "close") { print ''; if ($object->status == CashControl::STATUS_DRAFT) { - print ''; + print ''; - print ''; + print ''; } else { - print ''; + print ''; } print '
'; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index cbf2d8952b6..798e28f1c59 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -5319,7 +5319,7 @@ if ($action == 'create') { && ($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED || ($object->statut == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || $usercanreopen)) { // A paid invoice (partially or completely) if ($object->close_code != 'replaced' || (!$objectidnext)) { // Not replaced by another invoice or replaced but the replacement invoice has been deleted - print ''.$langs->trans('ReOpen').''; + print ''.$langs->trans('ReOpen').''; } else { print ''.$langs->trans('ReOpen').''; } @@ -5328,7 +5328,7 @@ if ($action == 'create') { // Validate if ($object->statut == Facture::STATUS_DRAFT && count($object->lines) > 0 && ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA || $object->type == Facture::TYPE_SITUATION) && (!empty($conf->global->FACTURE_ENABLE_NEGATIVE) || $object->total_ttc >= 0)) || ($object->type == Facture::TYPE_CREDIT_NOTE && $object->total_ttc <= 0))) { if ($usercanvalidate) { - print ''.$langs->trans('Validate').''; + print ''.$langs->trans('Validate').''; } } diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 79a998a3278..bbd4e0ed071 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -752,27 +752,27 @@ 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 if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->tax->charges->creer) { - print ""; + print '"; } // 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 diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 13ba7d08b34..9764f679959 100755 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -738,17 +738,17 @@ if ($id) { if ($action != 'edit') { // 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 if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->tax->charges->creer) { - print ""; + print ''; } // Classify 'paid' @@ -758,16 +758,16 @@ if ($id) { || (round($resteapayer) >= 0 && $object->amount < 0) ) && $user->rights->tax->charges->creer) { - print ""; + print '"; } // Clone if ($user->rights->tax->charges->creer) { - print ""; + print '"; } if (!empty($user->rights->tax->charges->supprimer) && empty($totalpaye)) { - print ''; + print ''; } else { print ''; } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index f77b59a1f49..029bcc454dc 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -2039,7 +2039,7 @@ if ($action == 'create') { } if ($object->statut == 1) { if ($user->rights->contrat->creer) { - print ''; + print ''; } else { print ''; } @@ -2048,7 +2048,7 @@ if ($action == 'create') { if (!empty($conf->commande->enabled) && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices) { $langs->load("orders"); if ($user->rights->commande->creer) { - print ''; + print ''; } else { print ''; } diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 9506984f4f3..ba18e415539 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -101,7 +101,7 @@ function ticket_prepare_head($object) include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $upload_dir = $conf->ticket->dir_output."/".$object->ref; $nbFiles = count(dol_dir_list($upload_dir, 'files')); - $head[$h][0] = dol_buildpath('/ticket/document.php', 1).'?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/ticket/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); if ($nbFiles > 0) { $head[$h][1] .= ''.$nbFiles.''; diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 1257d473ced..078b68d864e 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -303,12 +303,12 @@ foreach ($list as $entry) { if ($permission) { $href = $_SERVER["PHP_SELF"]; - $href .= '?id='.$object->id; + $href .= '?id='.((int) $object->id); $href .= '&action=deletecontact&token='.newToken(); - $href .= '&lineid='.$entry->id; + $href .= '&lineid='.((int) $entry->id); - print ""; - print ""; + print ''; + print ''; print img_picto($langs->trans("Unlink"), "unlink"); print ""; print ""; diff --git a/htdocs/datapolicy/admin/setupmail.php b/htdocs/datapolicy/admin/setupmail.php index 2ec083b0fa8..535c4383d0d 100644 --- a/htdocs/datapolicy/admin/setupmail.php +++ b/htdocs/datapolicy/admin/setupmail.php @@ -160,7 +160,7 @@ print dol_get_fiche_end(); print '

'; print $langs->trans('SendAgreementText'); -print ''.$langs->trans('SendAgreement').''; +print ''.$langs->trans('SendAgreement').''; llxFooter(); $db->close(); diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 74d7cc309b9..737d2134ccc 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -515,7 +515,7 @@ class EmailCollector extends CommonObject $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; - $url = dol_buildpath('/admin/emailcollector_card.php', 1).'?id='.$this->id; + $url = DOL_URL_ROOT.'/admin/emailcollector_card.php?id='.$this->id; if ($option != 'nolink') { // Add param to save lastsearch_values or not diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index f4a4933a899..784dc4853be 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -736,7 +736,7 @@ class ConferenceOrBoothAttendee extends CommonObject $label .= '
'.$langs->trans('DateOfRegistration').': '.dol_print_date($this->date_subscription, 'dayhour'); $label .= '
'.$langs->trans('AmountPaid').': '.$this->amount; - $url = dol_buildpath('/eventorganization/conferenceorboothattendee_card.php', 1).'?id='.$this->id; + $url = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?id='.$this->id; if ($option != 'nolink') { // Add param to save lastsearch_values or not diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 46e31740982..62963c3b6d0 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -2442,9 +2442,9 @@ if ($action == 'create') { // 0=draft, 1=validated, 2=billed, we miss a status "delivered" (only available on order) if ($object->statut == Expedition::STATUS_CLOSED && $user->rights->expedition->creer) { if (!empty($conf->facture->enabled) && !empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? - print ''.$langs->trans("ClassifyUnbilled").''; + print ''.$langs->trans("ClassifyUnbilled").''; } else { - print ''.$langs->trans("ReOpen").''; + print ''.$langs->trans("ReOpen").''; } } diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index c1037b15556..96801fcc727 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1573,7 +1573,7 @@ if ($action == 'create') { // Reopen if ($object->statut >= Fichinter::STATUS_CLOSED) { if ($user->rights->ficheinter->creer) { - print ''; + print ''; } else { print ''; } @@ -1583,7 +1583,7 @@ if ($action == 'create') { if (empty($user->socid)) { if ($object->statut > Fichinter::STATUS_DRAFT) { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->ficheinter->ficheinter_advance->send) { - print ''; + print ''; } else { print ''; } diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index d5110f4dc69..16020d5b9f9 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2410,7 +2410,7 @@ if ($action == 'create') { // Modify if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) { if ($usercanorder) { - print ''.$langs->trans("Modify").''; + print ''.$langs->trans("Modify").''; } } @@ -2466,20 +2466,20 @@ if ($action == 'create') { if (!$buttonshown && $usercanapprove) { if (empty($conf->global->SUPPLIER_ORDER_REOPEN_BY_APPROVER_ONLY) || (!empty($conf->global->SUPPLIER_ORDER_REOPEN_BY_APPROVER_ONLY) && $user->id == $object->user_approve_id)) { - print ''.$langs->trans("Disapprove").''; + print ''.$langs->trans("Disapprove").''; $buttonshown++; } } if (!$buttonshown && $usercanapprovesecond && !empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)) { if (empty($conf->global->SUPPLIER_ORDER_REOPEN_BY_APPROVER2_ONLY) || (!empty($conf->global->SUPPLIER_ORDER_REOPEN_BY_APPROVER2_ONLY) && $user->id == $object->user_approve_id2)) { - print ''.$langs->trans("Disapprove").''; + print ''.$langs->trans("Disapprove").''; } } } if (in_array($object->statut, array(3, 4, 5, 6, 7, 9))) { if ($usercanorder) { - print ''.$langs->trans("ReOpen").''; + print ''.$langs->trans("ReOpen").''; } } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index d2c7ce613d4..31294905b40 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3413,7 +3413,7 @@ if ($action == 'create') { || ($object->type == FactureFournisseur::TYPE_DEPOSIT && empty($discount->id))) && ($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED)) { // A paid invoice (partially or completely) if (!$facidnext && $object->close_code != 'replaced' && $usercancreate) { // Not replaced by another invoice - print ''.$langs->trans('ReOpen').''; + print ''.$langs->trans('ReOpen').''; } else { if ($usercancreate) { print ''.$langs->trans('ReOpen').''; diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index ae920da31a1..65c3521bf20 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -1549,10 +1549,6 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { $MAXEVENT = 10; - /*$morehtmlright = ''; - $morehtmlright .= $langs->trans("SeeAll"); - $morehtmlright .= '';*/ - // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); diff --git a/htdocs/hrm/establishment/info.php b/htdocs/hrm/establishment/info.php index 517b76de93a..19030283a4e 100644 --- a/htdocs/hrm/establishment/info.php +++ b/htdocs/hrm/establishment/info.php @@ -137,7 +137,7 @@ if ($object->id > 0) { // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* diff --git a/htdocs/knowledgemanagement/knowledgerecord_card.php b/htdocs/knowledgemanagement/knowledgerecord_card.php index 4b35e3be1c3..dcb12a8db89 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_card.php +++ b/htdocs/knowledgemanagement/knowledgerecord_card.php @@ -105,14 +105,14 @@ if ($reshook < 0) { if (empty($reshook)) { $error = 0; - $backurlforlist = dol_buildpath('/knowledgemanagement/knowledgerecord_list.php', 1); + $backurlforlist = DOL_URL_ROOT.'/knowledgemanagement/knowledgerecord_list.php'; if (empty($backtopage) || ($cancel && empty($id))) { if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { $backtopage = $backurlforlist; } else { - $backtopage = dol_buildpath('/knowledgemanagement/knowledgerecord_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + $backtopage = DOL_URL_ROOT.'/knowledgemanagement/knowledgerecord_card.php?id='.($id > 0 ? $id : '__ID__'); } } } @@ -310,7 +310,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* @@ -475,7 +475,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $MAXEVENT = 10; - $morehtmlright = ''; + $morehtmlright = ''; $morehtmlright .= $langs->trans("SeeAll"); $morehtmlright .= ''; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 2c8437eca0d..9eee895c71d 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -465,8 +465,8 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl $arrayofactiontoforcetokencheck = array( 'activate', 'add', 'addrights', 'addtimespent', 'confirm_create_user', 'confirm_create_thirdparty', 'confirm_delete', 'confirm_deletedir', 'confirm_deletefile', 'confirm_purge', 'confirm_reject_check', - 'confirm_validate', 'confirm_close', - 'delete', 'deletefilter', 'deleteoperation', 'deleteprof', 'deletepayment', 'delrights', + 'confirm_activate', 'confirm_validate', 'confirm_close', + 'delete', 'deletecontact', 'deletefilter', 'deleteoperation', 'deleteprof', 'deletepayment', 'delrights', 'disable', 'doprev', 'donext', 'dvprev', 'dvnext', 'enable', diff --git a/htdocs/margin/index.php b/htdocs/margin/index.php index cab6dd9f0da..0dcab7435f7 100644 --- a/htdocs/margin/index.php +++ b/htdocs/margin/index.php @@ -32,4 +32,4 @@ if ($user->rights->produit->lire) { $page = 'agentMargins'; } -header('Location: '.dol_buildpath('/margin/'.$page.'.php', 1)); +header('Location: '.DOL_URL_ROOT.'/margin/'.$page.'.php'); diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 8c48228f2be..a7ed52687df 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1027,9 +1027,9 @@ class Mo extends CommonObject $label .= '
'.$langs->trans('Label').': '.$this->label; } - $url = dol_buildpath('/mrp/mo_card.php', 1).'?id='.$this->id; + $url = DOL_URL_ROOT.'/mrp/mo_card.php?id='.$this->id; if ($option == 'production') { - $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id; + $url = DOL_URL_ROOT.'/mrp/mo_production.php?id='.$this->id; } if ($option != 'nolink') { diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index db3f54901b9..2885575be23 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -356,19 +356,19 @@ print '
'; if ($action != 'edit' && $user->rights->opensurvey->write) { //Modify button - print ''.$langs->trans("Modify").''; + print ''.$langs->trans("Modify").''; if ($object->status == Opensurveysondage::STATUS_VALIDATED) { //Close button - print ''.$langs->trans("Close").''; + print ''.$langs->trans("Close").''; } if ($object->status == Opensurveysondage::STATUS_CLOSED) { //Opened button - print ''.$langs->trans("ReOpen").''; + print ''.$langs->trans("ReOpen").''; } //Delete button - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } print '
'; diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php index 6458c9ab71c..83f96ea8249 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -951,7 +951,7 @@ class Partnership extends CommonObject $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; - $url = dol_buildpath('/partnership/partnership_card.php', 1).'?id='.$this->id; + $url = DOL_URL_ROOT.'/partnership/partnership_card.php?id='.$this->id; if ($option != 'nolink') { // Add param to save lastsearch_values or not diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 12b6d8f32df..05419cdb4ef 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1281,7 +1281,7 @@ if ($action == 'create' && $user->rights->projet->creer) { // Reopen if ($object->statut == Project::STATUS_CLOSED && $user->rights->projet->creer) { if ($userWrite > 0) { - print ''.$langs->trans("ReOpen").''; + print ''.$langs->trans("ReOpen").''; } else { print ''.$langs->trans('ReOpen').''; } diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 3317288a4e1..d9c3c746eca 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -1990,9 +1990,9 @@ if ($action == 'create') { // 0=draft, 1=validated, 2=billed, we miss a status "delivered" (only available on order) if ($object->statut == Reception::STATUS_CLOSED && $user->rights->reception->creer) { if (!empty($conf->facture->enabled) && !empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? - print ''.$langs->trans("ClassifyUnbilled").''; + print ''.$langs->trans("ClassifyUnbilled").''; } else { - print ''.$langs->trans("ReOpen").''; + print ''.$langs->trans("ReOpen").''; } } diff --git a/htdocs/recruitment/recruitmentcandidature_list.php b/htdocs/recruitment/recruitmentcandidature_list.php index 70b5366aec7..d2315b1f756 100644 --- a/htdocs/recruitment/recruitmentcandidature_list.php +++ b/htdocs/recruitment/recruitmentcandidature_list.php @@ -338,7 +338,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) { $obj = $db->fetch_object($resql); $id = $obj->rowid; - header("Location: ".dol_buildpath('/recruitment/recruitmentcandidature_card.php', 1).'?id='.$id); + header("Location: ".DOL_URL_ROOT.'/recruitment/recruitmentcandidature_card.php?id='.$id); exit; } diff --git a/htdocs/recruitment/recruitmentjobposition_applications.php b/htdocs/recruitment/recruitmentjobposition_applications.php index e5740fb203c..ce428ee16a1 100644 --- a/htdocs/recruitment/recruitmentjobposition_applications.php +++ b/htdocs/recruitment/recruitmentjobposition_applications.php @@ -148,14 +148,14 @@ if ($reshook < 0) { if (empty($reshook)) { $error = 0; - $backurlforlist = dol_buildpath('/recruitment/recruitmentjobposition_list.php', 1); + $backurlforlist = DOL_URL_ROOT.'/recruitment/recruitmentjobposition_list.php'; if (empty($backtopage) || ($cancel && empty($id))) { if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { $backtopage = $backurlforlist; } else { - $backtopage = dol_buildpath('/recruitment/recruitmentjobposition_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + $backtopage = DOL_URL_ROOT.'/recruitment/recruitmentjobposition_card.php?id='.($id > 0 ? $id : '__ID__'); } } } diff --git a/htdocs/recruitment/recruitmentjobposition_list.php b/htdocs/recruitment/recruitmentjobposition_list.php index 8f45caed040..0544cdb160f 100644 --- a/htdocs/recruitment/recruitmentjobposition_list.php +++ b/htdocs/recruitment/recruitmentjobposition_list.php @@ -359,7 +359,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) { $obj = $db->fetch_object($resql); $id = $obj->rowid; - header("Location: ".dol_buildpath('/recruitment/recruitmentjobposition_card.php', 1).'?id='.$id); + header("Location: ".DOL_URL_ROOT.'/recruitment/recruitmentjobposition_card.php?id='.$id); exit; } diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 7020beced48..a0f80d7b27c 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -974,7 +974,7 @@ class Dolresource extends CommonObject $linkstart = ''; $linkend = ''; - /*$linkstart = ''; + /*$linkstart = ''; $linkend = '';*/ $result .= $linkstart; diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 699b0ec35ba..27af3579474 100755 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -628,12 +628,12 @@ if ($action == 'create') { } } ); - + } else { alert("'.$langs->trans("FillFieldFirst").'"); } }); - + })'; print ''; } @@ -977,17 +977,17 @@ if ($id) { if ($action != 'edit') { // Reopen if ($object->paye && $user->rights->salaries->write) { - print ""; + print '"; } // Edit if ($object->paye == 0 && $user->rights->salaries->write) { - print ""; + print '"; } // Emit payment if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->salaries->write) { - print ""; + print '"; } // Classify 'paid' diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index 1f11e6a29c3..9574544a11a 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -394,7 +394,7 @@ class CompanyPaymentMode extends CommonObject $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; - $url = dol_buildpath('/monmodule/companypaymentmode_card.php', 1).'?id='.$this->id; + $url = ''; if ($option != 'nolink') { // Add param to save lastsearch_values or not diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 8fbbbbcee6e..f73c460b4a4 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -392,7 +392,7 @@ class SocieteAccount extends CommonObject $label .= ''.$langs->trans('Login').': '.$this->ref; //$label.= '' . $langs->trans('WebSite') . ': ' . $this->ref; - $url = dol_buildpath('/website/websiteaccount_card.php', 1).'?id='.$this->id; + $url = DOL_URL_ROOT.'/website/websiteaccount_card.php?id='.$this->id; if ($option != 'nolink') { // Add param to save lastsearch_values or not diff --git a/htdocs/societe/partnership.php b/htdocs/societe/partnership.php index 295fe8b2075..85223e856f3 100644 --- a/htdocs/societe/partnership.php +++ b/htdocs/societe/partnership.php @@ -132,7 +132,7 @@ $date_end = dol_mktime(0, 0, 0, GETPOST('date_partnership_endmonth', 'int'), GET if (empty($reshook)) { $error = 0; - $backtopage = dol_buildpath('/partnership/partnership.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + $backtopage = DOL_URL_ROOT.'/partnership/partnership.php?id='.($id > 0 ? $id : '__ID__'); // Actions when linking object each other include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index b00e5954e6d..0a0d3c56bf4 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1848,12 +1848,12 @@ if ($action == 'create') { // Edit if ($object->statut == SupplierProposal::STATUS_VALIDATED && $usercancreate) { - print ''; + print ''; } // ReOpen if (($object->statut == SupplierProposal::STATUS_SIGNED || $object->statut == SupplierProposal::STATUS_NOTSIGNED || $object->statut == SupplierProposal::STATUS_CLOSE) && $usercanclose) { - print '
global->MAIN_JUMP_TAG) ? '' : '#reopen').'"'; + print ''; } @@ -1861,7 +1861,7 @@ if ($action == 'create') { if (empty($user->socid)) { if ($object->statut == SupplierProposal::STATUS_VALIDATED || $object->statut == SupplierProposal::STATUS_SIGNED) { if ($usercansend) { - print ''; + print ''; } else { print ''; } diff --git a/htdocs/ticket/agenda.php b/htdocs/ticket/agenda.php index fee91e959aa..8f7f020cff3 100644 --- a/htdocs/ticket/agenda.php +++ b/htdocs/ticket/agenda.php @@ -217,7 +217,7 @@ if (!empty($conf->projet->enabled)) { $morehtmlref .= '
'; -$linkback = ''.$langs->trans("BackToList").' '; +$linkback = ''.$langs->trans("BackToList").' '; dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index e7a00699733..839662968f8 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -1340,28 +1340,28 @@ if ($action == 'create' || $action == 'presend') { print ''; } if ($object->fk_soc > 0 && $object->fk_statut < Ticket::STATUS_CLOSED && $user->rights->ficheinter->creer) { - print ''; + print ''; } /* This is useless. We can already modify each field individually if ($user->rights->ticket->write && $object->fk_statut < Ticket::STATUS_CLOSED) { - print ''; + print ''; } */ // Close ticket if statut is read if ($object->fk_statut > 0 && $object->fk_statut < Ticket::STATUS_CLOSED && $user->rights->ticket->write) { - print ''; + print ''; } // Abadon ticket if statut is read if ($object->fk_statut > 0 && $object->fk_statut < Ticket::STATUS_CLOSED && $user->rights->ticket->write) { - print ''; + print ''; } // Re-open ticket if (!$user->socid && ($object->fk_statut == Ticket::STATUS_CLOSED || $object->fk_statut == Ticket::STATUS_CANCELED) && !$user->socid) { - print ''; + print ''; } // Delete ticket diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index ea273064840..874036a5c38 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1344,7 +1344,7 @@ class Ticket extends CommonObject $label .= ''.$langs->trans('TicketTrackId').': '.$this->track_id.'
'; $label .= ''.$langs->trans('Subject').': '.$this->subject; - $url = dol_buildpath('/ticket/card.php', 1).'?id='.$this->id; + $url = DOL_URL_ROOT.'/ticket/card.php?id='.$this->id; if ($option != 'nolink') { // Add param to save lastsearch_values or not diff --git a/htdocs/ticket/contact.php b/htdocs/ticket/contact.php index 8d450ffb44b..36401e71ece 100644 --- a/htdocs/ticket/contact.php +++ b/htdocs/ticket/contact.php @@ -52,7 +52,7 @@ $lineid = GETPOST('lineid', 'int'); // Store current page url -$url_page_current = dol_buildpath('/ticket/contact.php', 1); +$url_page_current = DOL_URL_ROOT.'/ticket/contact.php'; $object = new Ticket($db); diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index 4b048d54671..aeab9ac6e27 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -159,7 +159,7 @@ if (!$user->rights->ticket->read) { } // Store current page url -$url_page_current = dol_buildpath('/ticket/list.php', 1); +$url_page_current = DOL_URL_ROOT.'/ticket/list.php'; if ($project_ref) { $tmpproject = new Project($db); diff --git a/htdocs/ticket/messaging.php b/htdocs/ticket/messaging.php index 68615424abf..e515fa3fea8 100644 --- a/htdocs/ticket/messaging.php +++ b/htdocs/ticket/messaging.php @@ -215,7 +215,7 @@ if (!empty($conf->projet->enabled)) { $morehtmlref .= '
'; -$linkback = ''.$langs->trans("BackToList").' '; +$linkback = ''.$langs->trans("BackToList").' '; dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); @@ -248,7 +248,7 @@ if (!empty($object->id)) { // Show link to add event (if read and not closed) $btnstatus = $object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage"; - $url = dol_buildpath('/comm/action/card.php', 1).'?action=create&datep='.date('YmdHi').'&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id); + $url = DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.date('YmdHi').'&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id); $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, 'add-new-ticket-even-button', $btnstatus); diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 186d8463549..0034878d5a1 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -96,7 +96,7 @@ if (empty($reshook)) { if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { $backtopage = $backurlforlist; } else { - $backtopage = dol_buildpath('/user/group/card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + $backtopage = DOL_URL_ROOT.'/user/group/card.php?id='.($id > 0 ? $id : '__ID__'); } } } diff --git a/htdocs/workstation/workstation_document.php b/htdocs/workstation/workstation_document.php index b33be2818dc..79ad4b305a6 100755 --- a/htdocs/workstation/workstation_document.php +++ b/htdocs/workstation/workstation_document.php @@ -118,7 +118,7 @@ if ($object->id) { // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* diff --git a/htdocs/workstation/workstation_list.php b/htdocs/workstation/workstation_list.php index b395c5e5a1b..b5a27aeb1e2 100755 --- a/htdocs/workstation/workstation_list.php +++ b/htdocs/workstation/workstation_list.php @@ -345,7 +345,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) { $obj = $db->fetch_object($resql); $id = $obj->rowid; - header("Location: ".dol_buildpath('/workstation/workstation_card.php', 1).'?id='.$id); + header("Location: ".DOL_URL_ROOT.'/workstation/workstation_card.php?id='.$id); exit; } diff --git a/htdocs/workstation/workstation_note.php b/htdocs/workstation/workstation_note.php index 7e1b765bf82..1f7e05bce79 100755 --- a/htdocs/workstation/workstation_note.php +++ b/htdocs/workstation/workstation_note.php @@ -96,7 +96,7 @@ if ($id > 0 || !empty($ref)) { // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php index b27959a24c6..5d0155885c2 100644 --- a/htdocs/zapier/class/hook.class.php +++ b/htdocs/zapier/class/hook.class.php @@ -516,7 +516,7 @@ class Hook extends CommonObject $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; - $url = dol_buildpath('/zapier/hook_card.php', 1).'?id='.$this->id; + $url = DOL_URL_ROOT.'/zapier/hook_card.php?id='.$this->id; if ($option != 'nolink') { // Add param to save lastsearch_values or not