From 6f7e4fd15c9f8919d43c701638a4a0ba1895324d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 9 Oct 2019 22:02:58 +0200 Subject: [PATCH 1/4] Update list.php --- htdocs/holiday/list.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 1854cce2800..882f59dbee6 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -3,6 +3,7 @@ * Copyright (C) 2013-2018 Laurent Destailleur * Copyright (C) 2012-2016 Regis Houssin * Copyright (C) 2018 Charlene Benke + * Copyright (C) 2019 Frédéric France * * 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 @@ -273,7 +274,9 @@ $sql.= " ua.login as validator_login,"; $sql.= " ua.statut as validator_statut,"; $sql.= " ua.photo as validator_photo"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook From 6bb14bdb0c4d36e7f849ffc5f1ad3a91e2fe8e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 9 Oct 2019 22:07:52 +0200 Subject: [PATCH 2/4] Update list.php --- htdocs/expensereport/list.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index daadfa913ec..2b4a2a9a983 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -7,6 +7,7 @@ * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Charlene Benke * Copyright (C) 2019 Juanjo Menent + * Copyright (C) 2019 Frédéric France * * 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 @@ -279,7 +280,9 @@ $sql = "SELECT d.rowid, d.ref, d.fk_user_author, d.total_ht, d.total_tva, d.tota $sql.= " d.date_debut, d.date_fin, d.date_create, d.tms as date_modif, d.date_valid, d.date_approve, d.note_private, d.note_public,"; $sql.= " u.rowid as id_user, u.firstname, u.lastname, u.login, u.email, u.statut, u.photo"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook From 7b81ffe3fe618eabe3219f0111d620b6cbac20f5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Oct 2019 16:29:16 +0200 Subject: [PATCH 3/4] Update list.php --- htdocs/expensereport/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 2b4a2a9a983..ecf32df6740 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -281,7 +281,7 @@ $sql.= " d.date_debut, d.date_fin, d.date_create, d.tms as date_modif, d.date_va $sql.= " u.rowid as id_user, u.firstname, u.lastname, u.login, u.email, u.statut, u.photo"; // Add fields from extrafields if (! empty($extrafields->attributes[$object->table_element]['label'])) { - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); } // Add fields from hooks $parameters=array(); From d9e434965a87a0e163f9b5494a49255173d5803d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Oct 2019 16:29:44 +0200 Subject: [PATCH 4/4] Update list.php --- htdocs/holiday/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 882f59dbee6..b86dd2864b5 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -275,7 +275,7 @@ $sql.= " ua.statut as validator_statut,"; $sql.= " ua.photo as validator_photo"; // Add fields from extrafields if (! empty($extrafields->attributes[$object->table_element]['label'])) { - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); } // Add fields from hooks $parameters=array();