Merge pull request #4480 from hregis/3.8_bug

Fix: for avoid conflict with "global $m" in memory.lib.php
This commit is contained in:
Laurent Destailleur 2016-01-30 12:22:47 +01:00
commit 3591f51918

View File

@ -484,24 +484,24 @@ if ($object->fetch($id) >= 0)
if ($obj->source_type == 'member') if ($obj->source_type == 'member')
{ {
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$m=new Adherent($db); $objectstatic=new Adherent($db);
$m->fetch($obj->source_id); $objectstatic->fetch($obj->source_id);
print $m->getNomUrl(2); print $objectstatic->getNomUrl(2);
} }
else if ($obj->source_type == 'user') else if ($obj->source_type == 'user')
{ {
include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
$m=new User($db); $objectstatic=new User($db);
$m->fetch($obj->source_id); $objectstatic->fetch($obj->source_id);
$m->id=$obj->source_id; $objectstatic->id=$obj->source_id;
print $m->getNomUrl(2); print $objectstatic->getNomUrl(2);
} }
else if ($obj->source_type == 'thirdparty') else if ($obj->source_type == 'thirdparty')
{ {
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$m=new Societe($db); $objectstatic=new Societe($db);
$m->fetch($obj->source_id); $objectstatic->fetch($obj->source_id);
print $m->getNomUrl(2); print $objectstatic->getNomUrl(2);
} }
else else
{ {