From cef9e8c8af2545e6135419b0785174a9d8c412bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Mon, 22 Mar 2010 09:30:34 +0100 Subject: [PATCH] Fix medals fetching for Profiles MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- include/profilefields.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/profilefields.inc.php b/include/profilefields.inc.php index 815b438..1bbb91a 100644 --- a/include/profilefields.inc.php +++ b/include/profilefields.inc.php @@ -380,15 +380,16 @@ class ProfileMedals extends ProfileField { $this->pid = $it->value(); while ($medal = $it->next()) { - $this->medals[$medal['mid']] = $medal['gid']; + $this->medals[$medal['mid']] = $medal; } } public static function fetchData(array $pids, $visibility) { - $data = XDB::iterator('SELECT pm.pid, pm.mid, pm.gid + $data = XDB::iterator('SELECT pm.pid, pm.mid, pm.gid, pme.text, pme.img FROM profile_medals AS pm LEFT JOIN profiles AS p ON (pm.pid = p.pid) + LEFT JOIN profile_medal_enum AS pme ON (pme.id = pm.mid) WHERE pm.pid IN {?} AND p.medals_pub IN {?} ORDER BY ' . XDB::formatCustomOrder('pm.pid', $pids), $pids, $visibility); -- 2.1.4