From ad93e6cfd2ae82f933175883e7da50bb018c4ffb Mon Sep 17 00:00:00 2001
From: Laurent Giovannoni <laurent.giovannoni@maarch.org>
Date: Thu, 2 Feb 2012 16:00:57 +0000
Subject: [PATCH] fix: custom path for export.xml

---
 core/trunk/core/class/ExportControler.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/core/trunk/core/class/ExportControler.php b/core/trunk/core/class/ExportControler.php
index fa7f30c3125..a48142cbcc6 100755
--- a/core/trunk/core/class/ExportControler.php
+++ b/core/trunk/core/class/ExportControler.php
@@ -152,7 +152,11 @@ class ExportControler
 	
 	private function loadXMLConf()
 	{
-		$exportConf = simplexml_load_file('apps/maarch_entreprise/xml/export.xml');
+		$path = 'apps/maarch_entreprise/xml/export.xml';
+		if (file_exists('custom/'.$_SESSION['custom_override_id'].'/apps/maarch_entreprise/xml/export.xml')) {
+			$path = 'custom/'.$_SESSION['custom_override_id'].'/apps/maarch_entreprise/xml/export.xml';
+		}
+		$exportConf = simplexml_load_file($path);
 		return $exportConf;
 	}
 	
-- 
GitLab