diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php
index 479479d4b9d..4cb0eb670f8 100644
--- a/htdocs/hrm/class/position.class.php
+++ b/htdocs/hrm/class/position.class.php
@@ -1123,9 +1123,10 @@ class Position extends CommonObject
* Return clicable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+ * @param array $arraydata Array of data
* @return string HTML Code for Kanban thumb.
*/
- public function getKanbanView($option = '')
+ public function getKanbanView($option = '', $arraydata = null)
{
global $selected, $langs;
$return = '
';
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index 7465f2ce161..338ad79affb 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -671,7 +671,7 @@ print ''."\n";
$needToFetchEachLine = 0;
if (isset($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) {
foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) {
- if (preg_match('/\$object/', $val)) {
+ if ($val && preg_match('/\$object/', $val)) {
$needToFetchEachLine++; // There is at least one compute field that use $object
}
}
diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php
index a6df07655ed..1833fc97d52 100644
--- a/htdocs/partnership/class/partnership.class.php
+++ b/htdocs/partnership/class/partnership.class.php
@@ -1320,6 +1320,36 @@ class Partnership extends CommonObject
return $error;
}
+
+ /**
+ * Return a thumb for kanban views
+ *
+ * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+ * @param array $arraydata Array of data
+ * @return string HTML Code for Kanban thumb.
+ */
+ public function getKanbanView($option = '', $arraydata = null)
+ {
+ global $conf, $langs;
+ $return = '
';
// Action column
- if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
+ if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '
';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
@@ -867,6 +889,9 @@ while ($i < $imaxinloop) {
print '';
}
print '
executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
- if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
+ if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '
';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
@@ -960,9 +985,9 @@ while ($i < $imaxinloop) {
print '';
}
print '
';
- }
- if (!$i) {
- $totalarray['nbfield']++;
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
print '
'."\n";
@@ -970,7 +995,9 @@ while ($i < $imaxinloop) {
$i++;
}
-if ($managedfor != 'member') $totalarray['nbfield']++; // End of subscription date
+if ($managedfor != 'member') {
+ $totalarray['nbfield']++; // End of subscription date
+}
// Show total line
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
@@ -983,7 +1010,9 @@ if ($num == 0) {
$colspan++;
}
}
- if ($managedfor != 'member') $colspan++; // End of subscription date
+ if ($managedfor != 'member') {
+ $colspan++; // End of subscription date
+ }
print '
'.$langs->trans("NoRecordFound").'
';
}
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index a18a7796541..321c6722018 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -6363,9 +6363,10 @@ class Product extends CommonObject
* Return clicable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+ * @param array $arraydata Array of data
* @return string HTML Code for Kanban thumb.
*/
- public function getKanbanView($option = '')
+ public function getKanbanView($option = '', $arraydata = null)
{
global $langs,$conf;
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 8aa886e7bd6..02200651a13 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -5201,9 +5201,10 @@ class Societe extends CommonObject
* Return clicable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+ * @param array $arraydata Array of data
* @return string HTML Code for Kanban thumb.
*/
- public function getKanbanView($option = '')
+ public function getKanbanView($option = '', $arraydata = null)
{
$return = '