Commit a0d57f31 authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review

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

parents e06949fd 106091ce
......@@ -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