Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
2fbf617d
Commit
2fbf617d
authored
Apr 28, 2009
by
Nigel McNie
Browse files
Robustness fix: don't export any artefacts if no views have been selected for export.
parent
8e4e4aeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/export/lib.php
View file @
2fbf617d
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment