Explorar o código

DBObject::ExecActions : add_to_list action now accepts the source object id as first parameter

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4647 a333f486-631f-4898-b8df-5754b55c2be0
glajarige %!s(int64=8) %!d(string=hai) anos
pai
achega
d338d8269b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      core/dbobject.class.php

+ 1 - 1
core/dbobject.class.php

@@ -3406,7 +3406,7 @@ abstract class DBObject implements iDisplay
 					throw new Exception('Missing argument #1: source attribute');
 				}
 				$sSourceKeyAttCode = $aParams[0];
-				if (!MetaModel::IsValidAttCode(get_class($oObjectToRead), $sSourceKeyAttCode))
+				if (($sSourceKeyAttCode != 'id') && !MetaModel::IsValidAttCode(get_class($oObjectToRead), $sSourceKeyAttCode))
 				{
 					throw new Exception("Unknown attribute ".get_class($oObjectToRead)."::".$sSourceKeyAttCode);
 				}