Alexander Nicolaysen Sørnes : Fix screenshot submission when an app but no version is selected

Chris Morgan cmorgan at winehq.org
Thu Sep 27 08:23:13 CDT 2007


Module: appdb
Branch: master
Commit: 715f3af1b327eca1caf62a53883667375e44e904
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=715f3af1b327eca1caf62a53883667375e44e904

Author: Alexander Nicolaysen Sørnes <alexander at alex.alexstyrt>
Date:   Thu Sep 27 12:07:23 2007 +0200

Fix screenshot submission when an app but no version is selected

---

 screenshots.php |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/screenshots.php b/screenshots.php
index defd506..306ae7d 100644
--- a/screenshots.php
+++ b/screenshots.php
@@ -147,11 +147,22 @@ if($aClean['iVersionId'] && $_SESSION['current']->isLoggedIn())
     echo '<input type="hidden" name="MAX_FILE_SIZE" value="4000000" />',"\n";
     echo '<input type="hidden" name="sCmd" value="screenshot_upload" />',"\n";
     echo '<input type="hidden" name="iVersionId" value="'.$aClean['iVersionId'].'"></form />',"\n";
-} else // else let the person know that if they log in they can submit screenshots
+} else if(!$_SESSION['current']->isLoggedIn()) // else let the person know that if they log in they can submit screenshots
 {
   echo '<div align="center"><a href="'.login_url().'">';
   echo "Log in</a> to submit screenshots</div>\n";
+} else
+{
+    echo html_frame_start("Upload Screenshot", "30%");
+    echo 'If you would like to submit screenshots, please select an application version below.<br />';
+    echo '<ul>';
+    foreach($oApp->getVersions() as $oVersion)
+        echo '<li><a href="'.BASE.'screenshots.php?iVersionId='.$oVersion->objectGetId().'">'.$oVersion->sName.'</a></li>';
+
+    echo '</ul>';
+    echo html_frame_end();
 }
+
 echo html_back_link(1);
 
 apidb_footer();




More information about the wine-cvs mailing list