Commit 63395f24 authored by Gregor Anzelj's avatar Gregor Anzelj Committed by Melissa Draper

Escape table names in profile image query (Bug #1077013)

When not escaped, the adodb abstraction layer did not use the prefix

Change-Id: Id44f520e2331be7f3e322f2084412d0b3545701c
Signed-off-by: default avatarGregor Anzelj <gregor.anzelj@gmail.com>
parent 7f0562e8
......@@ -32,8 +32,8 @@ require(dirname(dirname(dirname(__FILE__))) . '/init.php');
$result = get_records_sql_array('SELECT a.id, a.title, a.note, (u.profileicon = a.id) AS isdefault,
COUNT (DISTINCT aa.artefact) AS attachcount, COUNT(DISTINCT va.view) AS viewcount
FROM {artefact} a
LEFT OUTER JOIN view_artefact va ON va.artefact = a.id
LEFT OUTER JOIN artefact_attachment aa ON aa.attachment = a.id
LEFT OUTER JOIN {view_artefact} va ON va.artefact = a.id
LEFT OUTER JOIN {artefact_attachment} aa ON aa.attachment = a.id
LEFT OUTER JOIN {usr} u ON (u.id = a.owner)
WHERE artefacttype = \'profileicon\'
AND a.owner = ?
......
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