Alexander Nicolaysen Sørnes : screenshot : Add ability to specify Wine version

Alexander Nicolaysen Sørnes asornes at winehq.org
Mon Oct 26 19:40:21 CDT 2009


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

Author: Alexander Nicolaysen Sørnes <alexander at linux-xqqm.(none)>
Date:   Mon Oct 26 17:25:22 2009 +0100

screenshot: Add ability to specify Wine version

---

 include/screenshot.php  |    8 +++++---
 screenshots.php         |    2 ++
 tables/appdb_tables.sql |    1 +
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/include/screenshot.php b/include/screenshot.php
index a48b375..886682a 100644
--- a/include/screenshot.php
+++ b/include/screenshot.php
@@ -21,6 +21,7 @@ class screenshot
     var $iVersionId;
     var $hFile;
     var $sDescription;
+    var $sTestedVersion;
 
     var $oScreenshotImage;
     var $oThumbnailImage;
@@ -54,6 +55,7 @@ class screenshot
         {
             $this->iScreenshotId = $oRow->id;
             $this->sDescription = $oRow->description;
+            $this->sTestedVersion = $oRow->testedVersion;
             $this->iAppId = $oRow->appId;
             $this->iVersionId = $oRow->versionId;
             $this->sUrl = $oRow->url;
@@ -71,10 +73,10 @@ class screenshot
     function create()
     {
         $hResult = query_parameters("INSERT INTO appData
-                (versionId, type, description, state, submitTime, submitterId)
-                                    VALUES('?', '?', '?', '?', ?, '?')",
+                (versionId, type, description, testedVersion, state, submitTime, submitterId)
+                                    VALUES('?', '?', '?', '?', '?', ?, '?')",
                                     $this->iVersionId, "screenshot", 
-                                    $this->sDescription,
+                                    $this->sDescription, $this->sTestedVersion,
                                     $this->mustBeQueued() ? 'queued' : 'accepted',
                                     "NOW()",
                                     $_SESSION['current']->iUserId);
diff --git a/screenshots.php b/screenshots.php
index fdb1d0b..920c50e 100644
--- a/screenshots.php
+++ b/screenshots.php
@@ -40,6 +40,7 @@ if($aClean['sCmd'])
             $oScreenshot = new Screenshot();
             $oScreenshot->iVersionId = $aClean['iVersionId'];
             $oScreenshot->sDescription = $aClean['sScreenshotDesc'];
+            $oScreenshot->sTestedVersion = $aClean['sTestedVersion'];
             $oScreenshot->hFile = $_FILES['sImageFile'];
             $oScreenshot->create();
             $oScreenshot->free();
@@ -149,6 +150,7 @@ if($aClean['iVersionId'] && $_SESSION['current']->isLoggedIn())
       
     echo '<tr><td class=color1>Image</td><td class=color0><input name="sImageFile" type="file" size="24"></td></tr>',"\n";
     echo '<tr><td class="color1">Description</td><td class="color0"><input type="text" name="sScreenshotDesc" maxlength="20" size="24"></td></tr>',"\n";
+    echo '<tr><td class="color1">Wine version</td><td class="color0">'.make_bugzilla_version_list('sTestedVersion').'</td></tr>',"\n";
        
     echo '<tr><td colspan=2 align=center class=color3><input type="submit" value="Send File"></td></tr>',"\n";
     echo '</table>',"\n";
diff --git a/tables/appdb_tables.sql b/tables/appdb_tables.sql
index 701fb62..f41c5fd 100644
--- a/tables/appdb_tables.sql
+++ b/tables/appdb_tables.sql
@@ -140,6 +140,7 @@ create table appData (
 	submitTime      datetime NOT NULL,
 	submitterId     int(11) NOT NULL default '0',
 	state           enum('accepted','queued','rejected') NOT NULL default 'accepted',
+	testedVersion	text NOT NULL
 	KEY id (id),
 	KEY versionId (versionId)
 );




More information about the wine-cvs mailing list