diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php
index 4f3d45294a9..ea4bbf97af0 100644
--- a/htdocs/admin/dav.php
+++ b/htdocs/admin/dav.php
@@ -35,7 +35,10 @@ if (!$user->admin)
$action = GETPOST('action', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
-$arrayofparameters=array('DAV_ALLOW_PUBLIC_DIR'=>array('css'=>'minwidth200'));
+$arrayofparameters=array(
+ 'DAV_ALLOW_PUBLIC_DIR'=>array('css'=>'minwidth200', 'enabled'=>1),
+ 'DAV_ALLOW_ECM_DIR'=>array('css'=>'minwidth200', 'enabled'=>$conf->ecm->enabled)
+);
/*
@@ -76,6 +79,8 @@ if ($action == 'edit')
foreach($arrayofparameters as $key => $val)
{
+ if (isset($val['enabled']) && empty($val['enabled'])) continue;
+
print '
| ';
print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip'));
print ' | |
';
diff --git a/htdocs/dav/fileserver.php b/htdocs/dav/fileserver.php
index 0f5f365336b..a1d145306f5 100644
--- a/htdocs/dav/fileserver.php
+++ b/htdocs/dav/fileserver.php
@@ -98,9 +98,20 @@ $authBackend->setRealm(constant('DOL_APPLICATION_TITLE'));
$nodes = array();
// Enable directories and features according to DAV setup
-// / Public docs
-if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) $nodes[] = new \Sabre\DAV\FS\Directory($dolibarr_main_data_root. '/dav/public');
+// Public dir
+if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR))
+{
+ $nodes[] = new \Sabre\DAV\FS\Directory($dolibarr_main_data_root. '/dav/public');
+}
+// Private dir
$nodes[] = new \Sabre\DAV\FS\Directory($dolibarr_main_data_root. '/dav/private');
+// ECM dir
+if (! empty($conf->ecm->enabled) && ! empty($conf->global->DAV_ALLOW_ECM_DIR))
+{
+ $nodes[] = new \Sabre\DAV\FS\Directory($dolibarr_main_data_root. '/ecm');
+}
+
+
// Principals Backend
//$principalBackend = new \Sabre\DAVACL\PrincipalBackend\Dolibarr($user,$db);
diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php
index 80445e76e25..fd2c509233b 100644
--- a/htdocs/modulebuilder/template/admin/setup.php
+++ b/htdocs/modulebuilder/template/admin/setup.php
@@ -53,7 +53,10 @@ if (! $user->admin) accessforbidden();
$action = GETPOST('action', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
-$arrayofparameters=array('MYMODULE_MYPARAM1'=>array('css'=>'minwidth200'), 'MYMODULE_MYPARAM2'=>array('css'=>'minwidth500'));
+$arrayofparameters=array(
+ 'MYMODULE_MYPARAM1'=>array('css'=>'minwidth200','enabled'=>1),
+ 'MYMODULE_MYPARAM2'=>array('css'=>'minwidth500','enabled'=>1)
+);
/*
@@ -96,6 +99,8 @@ if ($action == 'edit')
foreach($arrayofparameters as $key => $val)
{
+ if (isset($val['enabled']) && empty($val['enabled'])) continue;
+
print '| ';
print $form->textwithpicto($langs->trans($key),$langs->trans($key.'Tooltip'));
print ' | |
';