diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index bdf92b31905..255bb036c93 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -266,7 +266,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas=$obj->canvas;
- print $companystatic->getNomUrl(1,'customer',16);
+ print $companystatic->getNomUrl(1,'supplier',16);
print '';
print '
'.price($obj->total_ht).' | ';
$i++;
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 0b5fcd547e7..c33cc9b31ed 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -1824,7 +1824,7 @@ if ($action == 'create')
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->propal->creer, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->propal->creer, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer');
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref.=' ('.$langs->trans("OtherProposals").')';
// Project
if (! empty($conf->projet->enabled))
diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php
index 01e851769a7..eff22ba4358 100644
--- a/htdocs/comm/propal/contact.php
+++ b/htdocs/comm/propal/contact.php
@@ -164,7 +164,7 @@ if ($object->id > 0)
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer');
// Project
if (! empty($conf->projet->enabled))
{
diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php
index 4ceae6b1221..8ef875f0a23 100644
--- a/htdocs/comm/propal/document.php
+++ b/htdocs/comm/propal/document.php
@@ -114,7 +114,7 @@ if ($object->id > 0)
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer');
// Project
if (! empty($conf->projet->enabled))
{
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 681193c6d71..c39c918cd71 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -3265,7 +3265,7 @@ else if ($id > 0 || ! empty($ref))
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer');
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref.=' ('.$langs->trans("OtherBills").')';
// Project
if (! empty($conf->projet->enabled))
diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php
index 2c95366f9a9..61f37d221f8 100644
--- a/htdocs/compta/facture/contact.php
+++ b/htdocs/compta/facture/contact.php
@@ -155,7 +155,7 @@ if ($id > 0 || ! empty($ref))
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer');
// Project
if (! empty($conf->projet->enabled))
{
diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php
index 8b76f9b167f..a9396e445c9 100644
--- a/htdocs/compta/facture/document.php
+++ b/htdocs/compta/facture/document.php
@@ -125,7 +125,7 @@ if ($id > 0 || ! empty($ref))
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer');
// Project
if (! empty($conf->projet->enabled))
{
diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php
index 00272fee9b3..2347178b05d 100644
--- a/htdocs/compta/facture/info.php
+++ b/htdocs/compta/facture/info.php
@@ -69,7 +69,7 @@ $morehtmlref='';
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
// Thirdparty
-$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer');
// Project
if (! empty($conf->projet->enabled))
{
diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php
index 755ac413743..356ba3916a0 100644
--- a/htdocs/compta/facture/note.php
+++ b/htdocs/compta/facture/note.php
@@ -92,7 +92,7 @@ if ($id > 0 || ! empty($ref))
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer');
// Project
if (! empty($conf->projet->enabled))
{
diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php
index c36037940b9..12a4ecee052 100644
--- a/htdocs/compta/index.php
+++ b/htdocs/compta/index.php
@@ -199,7 +199,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
print $facturestatic->getNomUrl(1,'');
print '';
print '
';
- print $companystatic->getNomUrl(1,'',16);
+ print $companystatic->getNomUrl(1,'customer',16);
print ' | ';
print ''.price($obj->total_ttc).' | ';
print '';
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index 3b2e36e21d8..dbc69c943dd 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -490,8 +490,7 @@ if ($dirins && $action == 'addproperty' && !empty($module) && ! empty($tabobj))
setEventMessages($langs->trans('FilesForObjectUpdated', $objectname), null);
clearstatcache(true);
- sleep(4); // With sleep 2, after the header("Location...", the new page output does not see the change. TODO Why do we need this sleep ?
-
+
// Make a redirect to reload all data
header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=objects&module='.$module.'&tabobj='.$objectname.'&nocache='.time());
@@ -526,8 +525,7 @@ if ($dirins && $action == 'confirm_deleteproperty' && $propertykey)
setEventMessages($langs->trans('FilesForObjectUpdated', $objectname), null);
clearstatcache(true);
- sleep(4); // With sleep 2, after the header("Location...", the new page output does not see the change. TODO Why do we need this sleep ?
-
+
// Make a redirect to reload all data
header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=objects&module='.$module.'&tabobj='.$objectname);
@@ -1550,6 +1548,8 @@ elseif (! empty($module))
print '
';
+ if(function_exists('opcache_invalidate')) opcache_invalidate($dirread.'/'.$pathtoclass,true); // remove the include cache hell !
+
if (empty($forceddirread))
{
$result = dol_include_once($pathtoclass);