diff --git a/htdocs/export/leap/lib.php b/htdocs/export/leap/lib.php index 015d952b471c92c4c3002837d0c2175e1443a01a..0ad13e8e7c6006efb911dabdf938ab9ade78e5cb 100644 --- a/htdocs/export/leap/lib.php +++ b/htdocs/export/leap/lib.php @@ -321,12 +321,13 @@ class PluginExportLeap extends PluginExport { // Some links can be determined in advance private function setup_links() { - if (empty($this->views) || empty($this->artefacts)) { + + // If there are no pages, no links to set up. + if (empty($this->views)) { return; } $viewlist = join(',', array_keys($this->views)); - $artefactlist = join(',', array_keys($this->artefacts)); // Views in collections if ($this->collections) { @@ -343,6 +344,13 @@ class PluginExportLeap extends PluginExport { } } + // If there are no artefacts, no need to try to set those up. + if (empty($this->artefacts)) { + return; + } + + $artefactlist = join(',', array_keys($this->artefacts)); + // Artefacts directly in views $records = get_records_select_array( 'view_artefact', @@ -1154,4 +1162,4 @@ class LeapExportOutputFilter { return $matches[0]; } -} \ No newline at end of file +}