ChangeSet ID: 31336
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner(a)winehq.org 2007/08/22 21:33:57
Modified files:
. : screenshots.php
Log message:
Chris Morgan <cmorgan(a)alum.wpi.edu>
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.
Patch: http://cvs.winehq.org/patch.py?id=31336
Old revision New revision Changes Path
1.49 1.50 +6 -4 appdb/screenshots.php
Index: appdb/screenshots.php
diff -u -p appdb/screenshots.php:1.49 appdb/screenshots.php:1.50
--- appdb/screenshots.php:1.49 23 Aug 2007 2:33:57 -0000
+++ appdb/screenshots.php 23 Aug 2007 2:33:57 -0000
@@ -62,7 +62,7 @@ $oVersion = new Version($aClean['iVersio
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 "<div align=center><table><tr>\n";
}
$oScreenshot = new Screenshot($oRow->id);
$img = $oScreenshot->get_thumbnail_img();
+
// display image
echo "<td>\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 "<p align=\"center\">There are currently no screenshots for the selected version of this application.";
echo "<br />Please consider submitting a screenshot for the selected version yourself.</p>";
}
ChangeSet ID: 31335
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner(a)winehq.org 2007/08/22 20:48:45
Modified files:
. : screenshots.php
Log message:
Chris Morgan <cmorgan(a)alum.wpi.edu>
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
screenshots.
Patch: http://cvs.winehq.org/patch.py?id=31335
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
-if($aClean['iVersionId'])
+// 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);