From ec5a094d27a767f5c742a75c9d85cbc72a28440d Mon Sep 17 00:00:00 2001
From: florian HENRY <florian.henry@atm-consulting.fr>
Date: Fri, 9 Dec 2016 17:17:58 +0100
Subject: [PATCH] FIX : Do not include separate extrafields into export cause
 "separate" extrafields aren't sql column

---
 htdocs/core/extrafieldsinexport.inc.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/htdocs/core/extrafieldsinexport.inc.php b/htdocs/core/extrafieldsinexport.inc.php
index 7466c66df08..ac22841ad20 100644
--- a/htdocs/core/extrafieldsinexport.inc.php
+++ b/htdocs/core/extrafieldsinexport.inc.php
@@ -42,9 +42,11 @@ if ($resql)    // This can fail when class is used on old database (during migra
 				if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
 				break;
 		}
-		$this->export_fields_array[$r][$fieldname]=$fieldlabel;
-		$this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
-		$this->export_entities_array[$r][$fieldname]=$keyforelement;
+		if ($obj->type!='separate') {
+			$this->export_fields_array[$r][$fieldname]=$fieldlabel;
+			$this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
+			$this->export_entities_array[$r][$fieldname]=$keyforelement;
+		}
 	}
 }
 // End add axtra fields
-- 
GitLab