Browse Source

Merge pull request #9848 from bafbes/abb80038

New : parameter for getnomurl in field specification
Laurent Destailleur 6 years ago
parent
commit
03b93781a0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      htdocs/core/class/commonobject.class.php

+ 2 - 1
htdocs/core/class/commonobject.class.php

@@ -6203,6 +6203,7 @@ abstract class CommonObject
 				$InfoFieldList = explode(":", $param_list[0]);
 				$classname=$InfoFieldList[0];
 				$classpath=$InfoFieldList[1];
+				$getnomurlparam=(empty($InfoFieldList[2]) ? 3 : $InfoFieldList[2]);
 				if (! empty($classpath))
 				{
 					dol_include_once($InfoFieldList[1]);
@@ -6210,7 +6211,7 @@ abstract class CommonObject
 					{
 						$object = new $classname($this->db);
 						$object->fetch($value);
-						$value=$object->getNomUrl(3);
+						$value=$object->getNomUrl($getnomurlparam);
 					}
 				}
 				else