From 08141e875f8705fe9b1a809da9c308dfebe57047 Mon Sep 17 00:00:00 2001 From: Jonathan Ernst Date: Sun, 20 Feb 2005 01:58:28 +0000 Subject: [PATCH] Every screenshot of an app were shown when asking for a version-specific screenshot --- include/screenshot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/screenshot.php b/include/screenshot.php index 59ce553..3a92105 100644 --- a/include/screenshot.php +++ b/include/screenshot.php @@ -280,7 +280,7 @@ class Screenshot { function get_screenshot_img($iAppId = null, $iVersionId = null) { // we want a random screenshots for this app - if($iAppId) + if($iAppId && !$iVersionId) { $hResult = query_appdb("SELECT appData.*, RAND() AS rand FROM appData, appVersion @@ -322,7 +322,7 @@ function get_screenshots($iAppId = null, $iVersionId = null, $bQueued = "false") /* * We want all screenshots for this app. */ - if($iAppId) + if($iAppId && !$iVersionId) { $sQuery = "SELECT appData.*, appVersion.appId as appId FROM appData, appVersion