- improve application and related classes

- use application/version/vendor class in scripts
- don't use a full table for queued appication but only one field in the application and version tables
- simplify the code in many places
This commit is contained in:
Jonathan Ernst
2005-02-07 23:21:33 +00:00
committed by WineHQ
parent fa98124783
commit 7b12f89abf
13 changed files with 467 additions and 796 deletions

View File

@@ -13,7 +13,9 @@ class Version {
var $sDescription;
var $sTestedRelease;
var $sTestedRating;
var $sSubmitTime;
var $iSubmitterId;
var $sDate;
var $aNotesIds; // an array that contains the noteId of every note linked to this version
var $aScreenshotsIds; // an array that contains the screenshotId of every screenshot linked to this version
var $aUrlsIds; // an array that contains the screenshotId of every url linked to this version
@@ -42,6 +44,7 @@ class Version {
$this->iVendorId = $oRow->vendorId;
$this->iCatId = $oRow->catId;
$this->iSubmitterId = $oRow->submitterId;
$this->sSubmitTime = $oRow->submitTime;
$this->sDate = $oRow->submitTime;
$this->sName = $oRow->versionName;
$this->sKeywords = $oRow->keywords;
@@ -206,8 +209,8 @@ class Version {
if(!$this->bQueued)
return false;
$sUpdate = compile_insert_string(array('queued' => "false"));
if(query_appdb("UPDATE appVersion ".$sUpdate))
$sUpdate = compile_update_string(array('queued' => "false"));
if(query_appdb("UPDATE appVersion SET ".$sUpdate." WHERE versionId = ".$this->iVersionId))
{
// we send an e-mail to intersted people
$this->mailSubmitter();