[AppDB] Refactor screenshots.php to use get_thumbnail()
Tony Lambregts
tony.lambregts at gmail.com
Sat Jul 23 16:49:28 CDT 2005
This patch should be applied after the "Make admin/adminScreenshots.php display
Screenshots" patches.
Change Log: Refactor screenshots.php to use get_thumbnail()
Files Changed: admin/adminScreenshots.php
-------------- next part --------------
Index: screenshots.php
===================================================================
RCS file: /home/wine/appdb/screenshots.php,v
retrieving revision 1.29
diff -u -r1.29 screenshots.php
--- screenshots.php 14 Jul 2005 01:32:26 -0000 1.29
+++ screenshots.php 23 Jul 2005 21:43:53 -0000
@@ -71,22 +71,7 @@
echo html_frame_start("Version ".lookup_version_name($currentVersionId));
echo "<div align=center><table><tr>\n";
}
- $oScreenshot = new Screenshot($oRow->id);
- // generate random tag for popup window
- $randName = generate_passwd(5);
- // set img tag
- $imgSRC = '<img src="appimage.php?thumbnail=true&id='.$oRow->id.'" alt="'.$oScreenshot->description.'" width="'.$oScreenshot->oThumnailImage->width.'" height="'.$oScreenshot->oThumnailImage->height.'">';
-
- // set image link based on user pref
- $img = '<a href="appimage.php?id='.$oRow->id.'" onclick="javascript:openWin(\'appimage.php?id='.$oRow->id.'\',\''.$randName.'\','.$oScreenshot->oScreenshotImage->width.','.($oScreenshot->oScreenshotImage->height+4).');return false;">'.$imgSRC.'</a>';
- if ($_SESSION['current']->isLoggedIn())
- {
- if ($_SESSION['current']->getpref("window:screenshot") == "no")
- {
- $img = '<a href="appimage.php?imageId='.$oRow->id.'">'.$imgSRC.'</a>';
- }
- }
-
+ $img = get_thumbnail($oRow->id);
// display image
echo "<td>\n";
echo $img;
More information about the wine-patches
mailing list