diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 86efee3a04ad1..cd48526e62b6d 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -61,7 +61,7 @@ */ 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 (!$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 fe1a61c686ca1..f719bd7c705b2 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -356,7 +356,7 @@ // 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 22e4a4a1b4210..68dbfb429b8bc 100644 --- a/htdocs/admin/ticket_public.php +++ b/htdocs/admin/ticket_public.php @@ -180,10 +180,11 @@ 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 ceaf6aa2eccb3..efa1703bca5be 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -247,7 +247,7 @@ // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index 16af18d827769..53ad1ee4c43f5 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -97,7 +97,7 @@ // 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 bf65f40fe1300..bfb0f5b8c81da 100644 --- a/htdocs/bom/bom_agenda.php +++ b/htdocs/bom/bom_agenda.php @@ -139,7 +139,7 @@ // 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 235336d4f73aa..4926f2fd73af2 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -105,7 +105,7 @@ 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 @@ // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* @@ -616,24 +616,24 @@ // 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 @@ $MAXEVENT = 10; - $morehtmlright = ''; + $morehtmlright = ''; $morehtmlright .= $langs->trans("SeeAll"); $morehtmlright .= ''; diff --git a/htdocs/bom/bom_document.php b/htdocs/bom/bom_document.php index dd0227e430522..c36ac32bb5923 100644 --- a/htdocs/bom/bom_document.php +++ b/htdocs/bom/bom_document.php @@ -125,7 +125,7 @@ // 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 f456e7ddf98b5..8ace40cc900dd 100644 --- a/htdocs/bom/bom_note.php +++ b/htdocs/bom/bom_note.php @@ -100,7 +100,7 @@ // 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 de8c87bcd4395..9560a95bd9629 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1383,7 +1383,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss $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 656d370d6d52f..91e09a5623a67 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2544,7 +2544,7 @@ // 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 (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 3aaa79cab55f2..13e9b82e799e0 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2485,14 +2485,14 @@ 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 269495903344c..eebe3e4832fd7 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -107,9 +107,9 @@ $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 @@ 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 cbf2d8952b6ef..798e28f1c596c 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -5319,7 +5319,7 @@ function js_recalculate_revenuestamp(){ && ($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 @@ function js_recalculate_revenuestamp(){ // 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 79a998a3278df..bbd4e0ed0714f 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -752,27 +752,27 @@ // 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 13ba7d08b343a..9764f679959c5 100755 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -738,17 +738,17 @@ 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 @@ || (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 f77b59a1f49ee..029bcc454dcad 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -2039,7 +2039,7 @@ } if ($object->statut == 1) { if ($user->rights->contrat->creer) { - print ''; + print ''; } else { print ''; } @@ -2048,7 +2048,7 @@ 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 9506984f4f363..ba18e41553937 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 1257d473ced02..078b68d864e7f 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -303,12 +303,12 @@ 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 2ec083b0fa8eb..535c4383d0d28 100644 --- a/htdocs/datapolicy/admin/setupmail.php +++ b/htdocs/datapolicy/admin/setupmail.php @@ -160,7 +160,7 @@ 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 74d7cc309b9d3..737d2134ccc37 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -515,7 +515,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss $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 f4a4933a89939..784dc4853be29 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -736,7 +736,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss $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 46e3174098230..62963c3b6d0a9 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -2442,9 +2442,9 @@ // 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 c1037b155568f..96801fcc727f3 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1573,7 +1573,7 @@ // Reopen if ($object->statut >= Fichinter::STATUS_CLOSED) { if ($user->rights->ficheinter->creer) { - print ''; + print ''; } else { print ''; } @@ -1583,7 +1583,7 @@ 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 d5110f4dc69d0..16020d5b9f927 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2410,7 +2410,7 @@ // Modify if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) { if ($usercanorder) { - print ''.$langs->trans("Modify").''; + print ''.$langs->trans("Modify").''; } } @@ -2466,20 +2466,20 @@ 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 d2c7ce613d491..31294905b40fe 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3413,7 +3413,7 @@ function setRadioForTypeOfInvoice() { || ($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 ae920da31a103..65c3521bf20e0 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -1549,10 +1549,6 @@ $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 517b76de93ac9..19030283a4e38 100644 --- a/htdocs/hrm/establishment/info.php +++ b/htdocs/hrm/establishment/info.php @@ -137,7 +137,7 @@ // 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 4b35e3be1c3d7..dcb12a8db8945 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_card.php +++ b/htdocs/knowledgemanagement/knowledgerecord_card.php @@ -105,14 +105,14 @@ 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 @@ // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* @@ -475,7 +475,7 @@ $MAXEVENT = 10; - $morehtmlright = ''; + $morehtmlright = ''; $morehtmlright .= $langs->trans("SeeAll"); $morehtmlright .= ''; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 2c8437eca0d96..9eee895c71d86 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -465,8 +465,8 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type) $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 cab6dd9f0da7e..0dcab7435f756 100644 --- a/htdocs/margin/index.php +++ b/htdocs/margin/index.php @@ -32,4 +32,4 @@ $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 8c48228f2be5f..a7ed52687df89 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1027,9 +1027,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss $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 db3f54901b9e4..2885575be23ba 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -356,19 +356,19 @@ 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 6458c9ab71c86..83f96ea82495d 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -951,7 +951,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss $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 12b6d8f32dfe3..05419cdb4eff8 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1281,7 +1281,7 @@ function change_percent() // 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 3317288a4e1b8..d9c3c746ecaf5 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -1990,9 +1990,9 @@ // 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 70b5366aec7d8..d2315b1f75658 100644 --- a/htdocs/recruitment/recruitmentcandidature_list.php +++ b/htdocs/recruitment/recruitmentcandidature_list.php @@ -338,7 +338,7 @@ 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 e5740fb203c7a..ce428ee16a146 100644 --- a/htdocs/recruitment/recruitmentjobposition_applications.php +++ b/htdocs/recruitment/recruitmentjobposition_applications.php @@ -148,14 +148,14 @@ 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 8f45caed0408a..0544cdb160fed 100644 --- a/htdocs/recruitment/recruitmentjobposition_list.php +++ b/htdocs/recruitment/recruitmentjobposition_list.php @@ -359,7 +359,7 @@ 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 7020beced4851..a0f80d7b27c01 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -974,7 +974,7 @@ public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notoo $linkstart = ''; $linkend = ''; - /*$linkstart = ''; + /*$linkstart = ''; $linkend = '';*/ $result .= $linkstart; diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 699b0ec35ba5a..27af357947491 100755 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -628,12 +628,12 @@ function( data ) { } } ); - + } else { alert("'.$langs->trans("FillFieldFirst").'"); } }); - + })'; print ''; } @@ -977,17 +977,17 @@ function( data ) { 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 1f11e6a29c387..9574544a11a84 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -394,7 +394,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss $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 8fbbbbcee6e2b..f73c460b4a4be 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -392,7 +392,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss $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 295fe8b207596..85223e856f3c6 100644 --- a/htdocs/societe/partnership.php +++ b/htdocs/societe/partnership.php @@ -132,7 +132,7 @@ 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 b00e5954e6da0..0a0d3c56bf497 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1848,12 +1848,12 @@ // 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 (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 fee91e959aabe..8f7f020cff368 100644 --- a/htdocs/ticket/agenda.php +++ b/htdocs/ticket/agenda.php @@ -217,7 +217,7 @@ $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 e7a00699733d9..839662968f887 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -1340,28 +1340,28 @@ 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 ea27306484012..874036a5c38e5 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1344,7 +1344,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss $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 8d450ffb44bd7..36401e71ecefd 100644 --- a/htdocs/ticket/contact.php +++ b/htdocs/ticket/contact.php @@ -52,7 +52,7 @@ // 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 4b048d5467141..aeab9ac6e2719 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -159,7 +159,7 @@ } // 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 68615424abf87..e515fa3fea849 100644 --- a/htdocs/ticket/messaging.php +++ b/htdocs/ticket/messaging.php @@ -215,7 +215,7 @@ $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 @@ // 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 186d846354989..0034878d5a163 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -96,7 +96,7 @@ 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 b33be2818dc5e..79ad4b305a66a 100755 --- a/htdocs/workstation/workstation_document.php +++ b/htdocs/workstation/workstation_document.php @@ -118,7 +118,7 @@ // 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 b395c5e5a1b1d..b5a27aeb1e2f9 100755 --- a/htdocs/workstation/workstation_list.php +++ b/htdocs/workstation/workstation_list.php @@ -345,7 +345,7 @@ 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 7e1b765bf82a1..1f7e05bce796a 100755 --- a/htdocs/workstation/workstation_note.php +++ b/htdocs/workstation/workstation_note.php @@ -96,7 +96,7 @@ // 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 b27959a24c604..5d0155885c2e4 100644 --- a/htdocs/zapier/class/hook.class.php +++ b/htdocs/zapier/class/hook.class.php @@ -516,7 +516,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss $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