appdb/include version.php
WineHQ
wineowner at wine.codeweavers.com
Sun Jun 10 17:15:35 CDT 2007
ChangeSet ID: 31175
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner at winehq.org 2007/06/10 17:15:35
Modified files:
include : version.php
Log message:
Chris Morgan <cmorgan at alum.wpi.edu>
Version::Version() was using $this->iVersionId before the value was set
Patch: http://cvs.winehq.org/patch.py?id=31175
Old revision New revision Changes Path
1.129 1.130 +20 -21 appdb/include/version.php
Index: appdb/include/version.php
diff -u -p appdb/include/version.php:1.129 appdb/include/version.php:1.130
--- appdb/include/version.php:1.129 10 Jun 2007 22:15:35 -0000
+++ appdb/include/version.php 10 Jun 2007 22:15:35 -0000
@@ -50,31 +50,28 @@ class Version {
/*
* We fetch the data related to this version.
*/
- if(!$this->iVersionId)
+ if(!$oRow)
{
- if(!$oRow)
- {
- $sQuery = "SELECT *
+ $sQuery = "SELECT *
FROM appVersion
WHERE versionId = '?'";
- if($hResult = query_parameters($sQuery, $iVersionId))
- $oRow = mysql_fetch_object($hResult);
- }
+ if($hResult = query_parameters($sQuery, $iVersionId))
+ $oRow = mysql_fetch_object($hResult);
+ }
- if($oRow)
- {
- $this->iVersionId = $oRow->versionId;
- $this->iAppId = $oRow->appId;
- $this->iSubmitterId = $oRow->submitterId;
- $this->sSubmitTime = $oRow->submitTime;
- $this->sDate = $oRow->submitTime;
- $this->sName = $oRow->versionName;
- $this->sDescription = $oRow->description;
- $this->sTestedRelease = $oRow->maintainer_release;
- $this->sTestedRating = $oRow->maintainer_rating;
- $this->sQueued = $oRow->queued;
- $this->sLicense = $oRow->license;
- }
+ if($oRow)
+ {
+ $this->iVersionId = $oRow->versionId;
+ $this->iAppId = $oRow->appId;
+ $this->iSubmitterId = $oRow->submitterId;
+ $this->sSubmitTime = $oRow->submitTime;
+ $this->sDate = $oRow->submitTime;
+ $this->sName = $oRow->versionName;
+ $this->sDescription = $oRow->description;
+ $this->sTestedRelease = $oRow->maintainer_release;
+ $this->sTestedRating = $oRow->maintainer_rating;
+ $this->sQueued = $oRow->queued;
+ $this->sLicense = $oRow->license;
}
}
@@ -736,7 +733,9 @@ class Version {
// URLs
if($sUrls = url::display($this->iVersionId))
+ {
echo $sUrls;
+ }
// rating Area
echo "<tr class=\"$sMaintainerColor\" valign=\"top\"><td><b>Maintainer’s Rating</b></td><td>".$this->sTestedRating."</td></tr>\n";
More information about the wine-cvs
mailing list