fix: [opendata export] Using external_baseurl if set, before baseurl

- If external_baseurl is not set, baseurl is used
pull/5891/head
chrisr3d 2020-05-15 14:22:14 +02:00
parent f44b22f8d5
commit efadd73a58
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ class OpendataExport
$this->__url = $this->__default_filters['url'];
unset($this->__default_filters['url']);
} else {
$baseurl = Configure::read('MISP.baseurl');
$external_baseurl = Configure::read('MISP.external_baseurl');
$baseurl = !empty($external_baseurl) ? $external_baseurl : Configure::read('MISP.baseurl');
if (empty($baseurl)) {
throw new Exception(__('Missing url of the MISP instance, and baseurl is not set.'));
}