Commit 2fbf617d authored by Nigel McNie's avatar Nigel McNie
Browse files

Robustness fix: don't export any artefacts if no views have been selected for export.

parent 8e4e4aeb
......@@ -199,12 +199,17 @@ abstract class PluginExport extends Plugin {
$this->artefactexportmode = $artefacts;
}
else if ($artefacts == self::EXPORT_ARTEFACTS_FOR_VIEWS) {
$sql = "SELECT va.artefact
FROM {view_artefact} va
LEFT JOIN {view} v ON v.id = va.view
WHERE v.owner = ?
$vaextra";
$tmpartefacts = (array)get_column_sql($sql, array($userid));
if ($tmpviews) {
$sql = "SELECT va.artefact
FROM {view_artefact} va
LEFT JOIN {view} v ON v.id = va.view
WHERE v.owner = ?
$vaextra";
$tmpartefacts = (array)get_column_sql($sql, array($userid));
}
else {
$tmpartefacts = array();
}
$this->artefactexportmode = $artefacts;
}
else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment