screenshot: Fix random screenshot function

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-10-23 13:55:18 +02:00
committed by Chris Morgan
parent 0c47bd87a3
commit 58ef8e62e5

View File

@@ -464,6 +464,7 @@ class screenshot
$bFormatting = true) $bFormatting = true)
{ {
// initialize variables to avoid notices when appending to them // initialize variables to avoid notices when appending to them
$hResult = null;
$sImgFile = ''; $sImgFile = '';
$sImg = ''; $sImg = '';
// we want a random screenshots for this app // we want a random screenshots for this app
@@ -508,7 +509,7 @@ class screenshot
$sZoomIcon = Screenshot::get_zoomicon_overlay(); $sZoomIcon = Screenshot::get_zoomicon_overlay();
/* we have screenshots */ /* we have screenshots */
if(query_num_rows($hResult)) if($hResult && query_num_rows($hResult))
{ {
if($iVersionId) if($iVersionId)
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&amp;iVersionId=$iVersionId'>".$sImgFile.$sZoomIcon."<center>View/Submit&nbsp;Screenshot</center></a>"; $sImg .= "<a href='screenshots.php?iAppId=$iAppId&amp;iVersionId=$iVersionId'>".$sImgFile.$sZoomIcon."<center>View/Submit&nbsp;Screenshot</center></a>";