Commit 106091ce authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon

Bug 1364705: Query only the artefacts of the user being exported

behatnotneeded: Can't test in Behat

Change-Id: I3dac42a4e5a08155e131bc45494b78a13c1417cd
parent 9ca160df
......@@ -34,7 +34,14 @@ class LeapExportElementInternal extends LeapExportElement {
public function assign_smarty_vars() {
$user = $this->get('exporter')->get('user');
$userid = $user->get('id');
$updated = get_record_sql('select '.db_format_tsfield('max(mtime)', 'mtime').' from {artefact} a join {artefact_installed_type} t on a.artefacttype = where t.plugin = \'internal\'');
$updated = get_record_sql("
SELECT " . db_format_tsfield('max(mtime)', 'mtime') . "
FROM {artefact} a
JOIN {artefact_installed_type} t ON a.artefacttype =
WHERE t.plugin = 'internal'
AND a.owner = ?",
$this->smarty->assign('artefacttype', 'internal');
$this->smarty->assign('artefactplugin', 'internal');
$this->smarty->assign('title', display_name($user, $user));
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