From 98491ff277755f9b944fced9a929dc75c0efeb03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Ferry?= Date: Sat, 15 Mar 2014 03:22:21 +0100 Subject: [PATCH] Fix conflict --- element_resource.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/element_resource.php b/element_resource.php index 972e3dc3ea4..ab4ce383953 100644 --- a/element_resource.php +++ b/element_resource.php @@ -180,16 +180,18 @@ else //print '/'.$modresources.'/class/'.$resource_obj.'.class.php
'; + $path = ''; + if(strpos($resource_obj,'@')) + $path .= '/'.$element_prop['module']; + $linked_resources = $object->getElementResources($element,$element_id,$resource_obj); if ( $mode == 'add' && $resource_obj == $resource_type) { //print '/'.$element_prop['module'].'/core/tpl/resource_'.$element_prop['element'].'_'.$mode.'.tpl.php'.'
'; - $path = $element_prop['module']; - if(strpos($element_prop['module'],'@')) - $path .= '/'.$element_prop['module']; - + + // If we have a specific template we use it if(file_exists(dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_'.$mode.'.tpl.php'))) { @@ -207,9 +209,9 @@ else //print '/'.$element_prop['module'].'/core/tpl/resource_'.$element_prop['element'].'_view.tpl.php'; // If we have a specific template we use it - if(file_exists(dol_buildpath('/'.$element_prop['module'].'/core/tpl/resource_'.$element_prop['element'].'_view.tpl.php'))) + if(file_exists(dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_view.tpl.php'))) { - $res=@include dol_buildpath('/'.$element_prop['module'].'/core/tpl/resource_'.$element_prop['element'].'_view.tpl.php'); + $res=@include dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_view.tpl.php'); } else