From 7a0a47bd1e7f38ec69ec66eb6ee9952cca87699a Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Thu, 23 Aug 2007 02:33:57 +0000 Subject: [PATCH] Remove logic that was preventing the opening of the version frame. The code to open the version frame also determins if the user maintains the version or not, which decides whether we include the "Delete Image" link. Change fixes missing "Delete Image" link for maintainers. --- screenshots.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/screenshots.php b/screenshots.php index e5a46c6..defd506 100644 --- a/screenshots.php +++ b/screenshots.php @@ -62,7 +62,7 @@ $oVersion = new Version($aClean['iVersionId']); if($hResult && query_num_rows($hResult)) { - echo html_frame_start("Screenshot Gallery for ".$oApp->sName." ".$oVersion->sName,500); + echo html_frame_start("Screenshot Gallery for ".$oApp->sName, 500); // display thumbnails $c = 1; @@ -77,7 +77,7 @@ if($hResult && query_num_rows($hResult)) // if the current version changed then update the current version // and close the previous html frame if this isn't the // first frame - if(!$aClean['iVersionId'] && $oRow->versionId != $iCurrentVersionId) + if($oRow->versionId != $iCurrentVersionId) { if($iCurrentVersionId) { @@ -86,13 +86,14 @@ if($hResult && query_num_rows($hResult)) $c=1; } $iCurrentVersionId = $oRow->versionId; - $bUserIsMaintainerOfVersion = $_SESSION['current']->isMaintainer($iCurrentVersionId); + $bUserIsMaintainerOfVersion = $_SESSION['current']->isMaintainer($iCurrentVersionId); echo html_frame_start("Version ".Version::lookup_name($iCurrentVersionId)); echo "
\n"; } $oScreenshot = new Screenshot($oRow->id); $img = $oScreenshot->get_thumbnail_img(); + // display image echo "
\n"; echo $img; @@ -120,7 +121,8 @@ if($hResult && query_num_rows($hResult)) echo html_frame_end(); // close the current version we are displaying echo html_frame_end(); // close the "Screenshot Gallary..." html frame -} else { +} else +{ echo "

There are currently no screenshots for the selected version of this application."; echo "
Please consider submitting a screenshot for the selected version yourself.

"; }