Version::Version() was using $this->iVersionId before the value was set

This commit is contained in:
Chris Morgan
2007-06-10 22:15:35 +00:00
committed by WineHQ
parent 0a5725f6d6
commit 7e4a084fd3

View File

@@ -50,31 +50,28 @@ class Version {
/* /*
* We fetch the data related to this version. * We fetch the data related to this version.
*/ */
if(!$this->iVersionId) if(!$oRow)
{ {
if(!$oRow) $sQuery = "SELECT *
{
$sQuery = "SELECT *
FROM appVersion FROM appVersion
WHERE versionId = '?'"; WHERE versionId = '?'";
if($hResult = query_parameters($sQuery, $iVersionId)) if($hResult = query_parameters($sQuery, $iVersionId))
$oRow = mysql_fetch_object($hResult); $oRow = mysql_fetch_object($hResult);
} }
if($oRow) if($oRow)
{ {
$this->iVersionId = $oRow->versionId; $this->iVersionId = $oRow->versionId;
$this->iAppId = $oRow->appId; $this->iAppId = $oRow->appId;
$this->iSubmitterId = $oRow->submitterId; $this->iSubmitterId = $oRow->submitterId;
$this->sSubmitTime = $oRow->submitTime; $this->sSubmitTime = $oRow->submitTime;
$this->sDate = $oRow->submitTime; $this->sDate = $oRow->submitTime;
$this->sName = $oRow->versionName; $this->sName = $oRow->versionName;
$this->sDescription = $oRow->description; $this->sDescription = $oRow->description;
$this->sTestedRelease = $oRow->maintainer_release; $this->sTestedRelease = $oRow->maintainer_release;
$this->sTestedRating = $oRow->maintainer_rating; $this->sTestedRating = $oRow->maintainer_rating;
$this->sQueued = $oRow->queued; $this->sQueued = $oRow->queued;
$this->sLicense = $oRow->license; $this->sLicense = $oRow->license;
}
} }
} }
@@ -736,7 +733,9 @@ class Version {
// URLs // URLs
if($sUrls = url::display($this->iVersionId)) if($sUrls = url::display($this->iVersionId))
{
echo $sUrls; echo $sUrls;
}
// rating Area // rating Area
echo "<tr class=\"$sMaintainerColor\" valign=\"top\"><td><b>Maintainer&#8217;s Rating</b></td><td>".$this->sTestedRating."</td></tr>\n"; echo "<tr class=\"$sMaintainerColor\" valign=\"top\"><td><b>Maintainer&#8217;s Rating</b></td><td>".$this->sTestedRating."</td></tr>\n";