diff --git a/htdocs/core/modules/action/rapport.class.php b/htdocs/core/modules/action/rapport.class.php index 4835c39c194..94bfa344360 100644 --- a/htdocs/core/modules/action/rapport.class.php +++ b/htdocs/core/modules/action/rapport.class.php @@ -234,7 +234,7 @@ class CommActionRapport $sql = "SELECT s.nom as thirdparty, s.rowid as socid, s.client,"; $sql .= " a.id, a.datep as dp, a.datep2 as dp2,"; - $sql .= " a.fk_contact, a.note, a.percent as percent, a.label, a.fk_project,"; + $sql .= " a.fk_contact, a.note, a.percent as percent, a.fulldayevent, a.label, a.fk_project,"; $sql .= " c.code, c.libelle,"; $sql .= " u.login"; $sql .= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a"; diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 1816528b854..5c588b59c6b 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -50,7 +50,6 @@ if ($user->socid > 0) { } $object = new Dolresource($db); - $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -246,7 +245,7 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) { print ''; // Other attributes - $parameters = array('objectsrc' => $objectsrc); + $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 3e1a2615cd9..515a766263b 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -44,21 +44,39 @@ class Dolresource extends CommonObject */ public $picto = 'resource'; + + /** + * @var int ID + */ + public $fk_code_type_resource; + + public $type_label; + + public $description; + + public $fk_country; + + + // Variable for a link of resource + + /** + * @var int ID + */ public $resource_id; public $resource_type; public $element_id; public $element_type; public $busy; public $mandatory; - /** * @var int ID */ public $fk_user_create; - - public $type_label; public $tms = ''; + /** + * @var array Cache of type of resources. TODO Use $conf->cache['type_of_resources'] instead + */ public $cache_code_type_resource = array(); /** @@ -66,6 +84,7 @@ class Dolresource extends CommonObject */ public $oldcopy; + /** * Constructor * @@ -339,10 +358,10 @@ class Dolresource extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Load object in memory from database + * Load data of link in memory from database * - * @param int $id id object - * @return int <0 if KO, >0 if OK + * @param int $id Id of link element_resources + * @return int <0 if KO, >0 if OK */ public function fetch_element_resource($id) { diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 6b649b396db..55a9540bfe1 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -33,6 +33,7 @@ $langs->loadLangs(array("resource", "companies", "other")); // Get parameters $id = GETPOST('id', 'int'); $action = GETPOST('action', 'alpha'); +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) $lineid = GETPOST('lineid', 'int'); $element = GETPOST('element', 'alpha');