Fix bad signature of fetch. The ref_ext is missing.

This commit is contained in:
Laurent Destailleur 2015-07-20 17:19:44 +02:00
parent f0ed7dac09
commit 2bebb869fb

View File

@ -378,9 +378,10 @@ class ActionComm extends CommonObject
* *
* @param int $id Id of action to get * @param int $id Id of action to get
* @param string $ref Ref of action to get * @param string $ref Ref of action to get
* @param string $ref_ext Ref ext to get
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetch($id, $ref='') function fetch($id, $ref='',$ref_ext='')
{ {
global $langs; global $langs;
@ -409,6 +410,7 @@ class ActionComm extends CommonObject
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
$sql.= " WHERE "; $sql.= " WHERE ";
if ($ref) $sql.= " a.id=".$ref; // No field ref, we use id if ($ref) $sql.= " a.id=".$ref; // No field ref, we use id
elseif ($ref_ext) $sql.= " a.ref_ext='".$this->db->escape($ref_ext)."'";
else $sql.= " a.id=".$id; else $sql.= " a.id=".$id;
dol_syslog(get_class($this)."::fetch", LOG_DEBUG); dol_syslog(get_class($this)."::fetch", LOG_DEBUG);