From 8aecb8726d424bf443fedab36bfe42dcbed66146 Mon Sep 17 00:00:00 2001
From: Stein Magne Bjorklund <steinmb@smbjorklund.com>
Date: Fri, 17 Sep 2021 17:21:11 +0200
Subject: [PATCH] Make sure exporter do not inject warnings/notify messages
 into document

- Also remove extra include of settings. No longer needed.
---
 classes/Exporter.php | 2 +-
 index.php            | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/classes/Exporter.php b/classes/Exporter.php
index 89084dcd..97b9eaf2 100644
--- a/classes/Exporter.php
+++ b/classes/Exporter.php
@@ -39,7 +39,7 @@ class Exporter
         array_push($triples, $t);
         $t['o'] = LS . 'Application';
         array_push($triples, $t);
-        if ($conf['parentApp'] != null) {
+        if (isset($conf['parentApp']) && $conf['parentApp'] !== null) {
             $t['p'] = OPMV . 'wasDerivedFrom';
             $t['o'] = $conf['parentApp'];
             array_push($triples, $t);
diff --git a/index.php b/index.php
index 7fafc57a..bf2a12d1 100644
--- a/index.php
+++ b/index.php
@@ -47,7 +47,6 @@ if ($acceptContentType === null) {
 }
 
 if ($conf['export'] && $_GET['q'] === 'export') {
-    include_once('settings.inc.php');
     $exp = new Exporter();
     header('Content-Type: text/plain');
     $exp->run();
-- 
GitLab