diff --git a/lizmap/modules/admin/controllers/server_information.classic.php b/lizmap/modules/admin/controllers/server_information.classic.php
index 96622965bc..7d7739d7a7 100644
--- a/lizmap/modules/admin/controllers/server_information.classic.php
+++ b/lizmap/modules/admin/controllers/server_information.classic.php
@@ -102,11 +102,6 @@ public function index()
'minimumQgisVersion' => $qgisMinimumVersionRequired,
'minimumLizmapServer' => $lizmapPluginMinimumVersionRequired,
);
- if (\jApp::isModuleEnabled('webdav') && class_exists('\\LizmapDAV\\Server')) {
- if (\jAcl2::check('lizmap.webdav.access')) {
- $assign['webdav'] = \jServer::getServerURI().\LizmapDAV\Server::serverBaseUri();
- }
- }
$tpl->assign($assign);
$rep->body->assign('MAIN', $tpl->fetch('server_information'));
$rep->body->assign('selectedMenuItem', 'lizmap_server_information');
diff --git a/lizmap/modules/admin/templates/server_information.tpl b/lizmap/modules/admin/templates/server_information.tpl
index 97e6333ade..3568d35f08 100644
--- a/lizmap/modules/admin/templates/server_information.tpl
+++ b/lizmap/modules/admin/templates/server_information.tpl
@@ -26,17 +26,6 @@
- {if isset($webdav)}
-
- {@admin.server.information.webdav.url@} |
-
- {$webdav}
-
- |
-
- {/if}
{hook 'LizmapServerVersion', $data['info']}
diff --git a/lizmap/modules/lizmap/lib/Events/LizmapMetadataEvent.php b/lizmap/modules/lizmap/lib/Events/LizmapMetadataEvent.php
new file mode 100644
index 0000000000..3b5a1ef06a
--- /dev/null
+++ b/lizmap/modules/lizmap/lib/Events/LizmapMetadataEvent.php
@@ -0,0 +1,42 @@
+_responses = array(
+ array(),
+ );
+ }
+
+ /**
+ * @param mixed $key
+ * @param mixed $value
+ */
+ public function addMetadata($key, $value)
+ {
+ $this->_responses[0][$key] = $value;
+ }
+
+ /**
+ * @return array
+ */
+ public function getMetadata()
+ {
+ return $this->_responses[0];
+ }
+}
diff --git a/lizmap/modules/lizmap/lib/Server/Server.php b/lizmap/modules/lizmap/lib/Server/Server.php
index 65e94df54b..c0f8430316 100644
--- a/lizmap/modules/lizmap/lib/Server/Server.php
+++ b/lizmap/modules/lizmap/lib/Server/Server.php
@@ -272,12 +272,6 @@ private function getLizmapMetadata()
);
}
- if (\jApp::isModuleEnabled('webdav') && class_exists('\\LizmapDAV\\Server')) {
- if (\jAcl2::check('lizmap.webdav.access')) {
- $data['webdav'] = \jServer::getServerURI().\LizmapDAV\Server::serverBaseUri();
- }
- }
-
return $data;
}
diff --git a/lizmap/modules/view/controllers/app.classic.php b/lizmap/modules/view/controllers/app.classic.php
index 3c5dc4746b..96123aa159 100644
--- a/lizmap/modules/view/controllers/app.classic.php
+++ b/lizmap/modules/view/controllers/app.classic.php
@@ -44,6 +44,13 @@ public function metadata()
$data['qgis_server_info'] = array('error' => 'WRONG_CREDENTIALS');
}
+ // retrieves foreign metadata
+ $event = new \Lizmap\Events\LizmapMetadataEvent();
+ \jEvent::notify($event);
+ // merge other foreign metadata with current metadata.
+ // We don't want that foreign metadata overwrite our own metadata.
+ $data = array_merge($event->getMetadata(), $data);
+
$rep->data = $data;
return $rep;