diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 8908b4e2a46..065f01d2091 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2014 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,6 +37,7 @@ class CActionComm var $type; var $libelle; var $active; + var $color; var $type_actions=array(); @@ -59,7 +60,7 @@ class CActionComm */ function fetch($id) { - $sql = "SELECT id, code, type, libelle, active"; + $sql = "SELECT id, code, type, libelle, color, active"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm"; if (is_numeric($id)) $sql.= " WHERE id=".$id; else $sql.= " WHERE code='".$id."'"; @@ -77,12 +78,13 @@ class CActionComm $this->type = $obj->type; $this->libelle = $obj->libelle; $this->active = $obj->active; + $this->color = $obj->color; $this->db->free($resql); return 1; } else - { + { $this->db->free($resql); return 0; } @@ -95,7 +97,7 @@ class CActionComm } /** - * Return list of event types + * Return list of event types: array(id=>label) or array(code=>label) * * @param int $active 1 or 0 to filter on event state active or not ('' by default = no filter) * @param string $idorcode 'id' or 'code' @@ -111,7 +113,7 @@ class CActionComm $repid = array(); $repcode = array(); - $sql = "SELECT id, code, libelle, module, type"; + $sql = "SELECT id, code, libelle, module, type, color"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm"; if ($active != '') $sql.=" WHERE active=".$active; if (! empty($excludetype)) $sql.=($active != ''?" AND":" WHERE")." type <> '".$excludetype."'";