appdb/. screenshots.php

WineHQ wineowner at
Wed Aug 22 20:48:45 CDT 2007

ChangeSet ID:	31335
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at	2007/08/22 20:48:45

Modified files:
	.              : screenshots.php 

Log message:
	Chris Morgan <cmorgan at>
	Require that users be logged in to submit screenshots. Display a login link on the screenshots
	page for users that aren't logged in so they know that if they login they'll be able to submit


Old revision  New revision  Changes     Path
 1.48          1.49          +7 -2       appdb/screenshots.php

Index: appdb/screenshots.php
diff -u -p appdb/screenshots.php:1.48 appdb/screenshots.php:1.49
--- appdb/screenshots.php:1.48	23 Aug 2007  1:48:45 -0000
+++ appdb/screenshots.php	23 Aug 2007  1:48:45 -0000
@@ -125,8 +125,9 @@ if($hResult && query_num_rows($hResult))
  echo "<br />Please consider submitting a screenshot for the selected version yourself.</p>";
-// let's show the screenshot uploading box
+// let's show the screenshot uploading box, but only
+// if the user is logged in
+if($aClean['iVersionId'] && $_SESSION['current']->isLoggedIn())
     echo "<p align=\"center\">When submitting screenshots please ensure that the focus is on the application running inside Wine.";
     echo "<br />This means if the application is running in a window then please crop the image so that only the application is shown and not your desktop.</p>";
@@ -144,6 +145,10 @@ if($aClean['iVersionId'])
     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
+  echo '<div align="center"><a href="'.login_url().'">';
+  echo "Log in</a> to submit screenshots</div>\n";
 echo html_back_link(1);

More information about the wine-cvs mailing list