A bit of defense in the bookmark-fetching, and make sure we get the real

preview image out!


git-svn-id: svn://10.0.0.236/trunk@214065 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
shaver%mozilla.org
2006-10-24 10:58:21 +00:00
parent 8d632b0cdc
commit 692332820d
2 changed files with 5 additions and 2 deletions

View File

@@ -15,7 +15,9 @@ setApp();
$amo = new AMO_Object();
$primary = $amo->getAddons(array(3615));
$primary = $primary[0];
if (is_array($primary) && !is_empty($primary)) {
$primary = $primary[0];
}
$other = $amo->getAddons(array(2410, 1833));

View File

@@ -576,7 +576,8 @@ class AMO_Object
INNER JOIN reviews r ON m.ID = r.ID
INNER JOIN previews p ON p.ID = m.ID
WHERE
m.ID in ({$ids_sql})
m.ID in ({$ids_sql}) AND
p.preview = 'YES'
GROUP BY
m.ID
";