version: Rename 'queued' to 'state'

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-12-12 20:56:04 +01:00
committed by Chris Morgan
parent 06f693859f
commit aee69c1735
12 changed files with 77 additions and 60 deletions

View File

@@ -27,7 +27,7 @@ $sQuery = "SELECT DISTINCT appFamily.appName,
appVersion.versionName, appVersion.versionId, appFamily.description appVersion.versionName, appVersion.versionId, appFamily.description
FROM appFamily, appVersion, appData FROM appFamily, appVersion, appData
WHERE appData.type = '?' AND appData.versionId = appVersion.versionId WHERE appData.type = '?' AND appData.versionId = appVersion.versionId
AND appFamily.appId = appVersion.appId AND appVersion.queued = 'false'"; AND appFamily.appId = appVersion.appId AND appVersion.state = 'accepted'";
if(!$sLicense) if(!$sLicense)
$hResult = query_parameters($sQuery, "downloadurl"); $hResult = query_parameters($sQuery, "downloadurl");
@@ -93,7 +93,7 @@ $sQuery = "SELECT DISTINCT appFamily.appName,
FROM appFamily, appVersion, appData FROM appFamily, appVersion, appData
WHERE appData.type = '?' AND appData.versionId = appVersion.versionId WHERE appData.type = '?' AND appData.versionId = appVersion.versionId
AND appFamily.appId = appVersion.appId AND appFamily.appId = appVersion.appId
AND appVersion.queued = 'false' "; AND appVersion.state = 'accepted' ";
if(!$sLicense) if(!$sLicense)
{ {

View File

@@ -252,7 +252,7 @@ class appData
) )
) )
AND AND
appVersion.queued = 'false' appVersion.state = 'accepted'
AND AND
appFamily.queued = 'false'"; appFamily.queued = 'false'";
@@ -296,7 +296,7 @@ class appData
appData.versionId = appVersion.versionId appData.versionId = appVersion.versionId
) )
AND AND
appVersion.queued = 'false' appVersion.state = 'accepted'
AND AND
appFamily.queued = 'false'$sAppDataQueued$sSelectType)"; appFamily.queued = 'false'$sAppDataQueued$sSelectType)";
@@ -372,7 +372,7 @@ class appData
) )
) )
AND AND
appVersion.queued = 'false' appVersion.state = 'accepted'
AND AND
appFamily.queued = 'false' appFamily.queued = 'false'
AND AND
@@ -425,7 +425,7 @@ class appData
appData.versionId = appVersion.versionId appData.versionId = appVersion.versionId
) )
AND AND
appVersion.queued = 'false' appVersion.state = 'accepted'
AND AND
appFamily.queued = 'false' appFamily.queued = 'false'
AND AND
@@ -492,7 +492,7 @@ class appData
if($this->iVersionId) if($this->iVersionId)
{ {
$oVersion = new version($this->iVersionId); $oVersion = new version($this->iVersionId);
if($oVersion->canEdit() && $oVersion->sQueued == "false") if($oVersion->canEdit() && $oVersion->objectGetState() == 'accepted')
return FALSE; return FALSE;
else else
return TRUE; return TRUE;

View File

@@ -116,7 +116,7 @@ class Application {
private function _internal_retrieve_unqueued_versions() private function _internal_retrieve_unqueued_versions()
{ {
$sQuery = "SELECT versionId FROM appVersion WHERE $sQuery = "SELECT versionId FROM appVersion WHERE
queued = 'false' AND state = 'accepted' AND
appId = '?'"; appId = '?'";
$hResult = query_parameters($sQuery, $this->iAppId); $hResult = query_parameters($sQuery, $this->iAppId);
return $hResult; return $hResult;
@@ -1108,7 +1108,7 @@ class Application {
$sMsg = "<select name=\"$sVarName\">\n"; $sMsg = "<select name=\"$sVarName\">\n";
foreach($this->getVersions() as $oVersion) foreach($this->getVersions() as $oVersion)
{ {
if($oVersion->sQueued != "false" || $oVersion->iVersionId == $iExclude || if($oVersion->objectGetState() != 'accepted' || $oVersion->iVersionId == $iExclude ||
(!$bIncludeObsolete && $oVersion->iObsoleteBy)) (!$bIncludeObsolete && $oVersion->iObsoleteBy))
continue; continue;

View File

@@ -63,7 +63,7 @@ class distribution {
testResults.versionId = appVersion.versionId AND testResults.versionId = appVersion.versionId AND
appFamily.appId = appVersion.appId AND appFamily.appId = appVersion.appId AND
appFamily.queued = 'false' AND appFamily.queued = 'false' AND
appVersion.queued = 'false' AND appVersion.state = 'accepted' AND
distributionId = '?' distributionId = '?'
ORDER BY testedRating;"; ORDER BY testedRating;";
} }

View File

@@ -70,7 +70,7 @@ class queuedEntries
print_r($oVersion); print_r($oVersion);
} }
if($oVersion->sQueued == "true") if($oVersion->objectGetState() == 'queued')
{ {
$this->aVersions[] = $oVersion->objectGetId(); $this->aVersions[] = $oVersion->objectGetId();
} else // version isn't queued } else // version isn't queued
@@ -214,7 +214,7 @@ class maintainer
$oVersion = new version($this->iVersionId); $oVersion = new version($this->iVersionId);
if($oApp->sQueued != "false" || if($oApp->sQueued != "false" ||
(!$this->bSuperMaintainer && $oVersion->sQueued != "false")) (!$this->bSuperMaintainer && $oVersion->objectGetState() != 'accepted'))
$this->sQueued = "pending"; $this->sQueued = "pending";
else else
$this->sQueued = $this->mustBeQueued() ? "true" : "false"; $this->sQueued = $this->mustBeQueued() ? "true" : "false";

View File

@@ -64,7 +64,7 @@ class testData{
function create() function create()
{ {
$oVersion = new version($this->iVersionId); $oVersion = new version($this->iVersionId);
if($oVersion->sQueued != "false") if($oVersion->objectGetState() != 'accepted')
$this->sState = 'pending'; $this->sState = 'pending';
else else
$this->sState = $this->mustBeQueued() ? 'queued' : 'accepted'; $this->sState = $this->mustBeQueued() ? 'queued' : 'accepted';
@@ -876,7 +876,7 @@ class testData{
/* List test data submitted by a given user. Ignore test results for queued applications/versions */ /* List test data submitted by a given user. Ignore test results for queued applications/versions */
function listSubmittedBy($iUserId, $bQueued = true) function listSubmittedBy($iUserId, $bQueued = true)
{ {
$hResult = query_parameters("SELECT testResults.versionId, testResults.testedDate, testResults.testedRelease, testResults.testedRating, testResults.submitTime, appFamily.appName, appVersion.versionName from testResults, appFamily, appVersion WHERE testResults.versionId = appVersion.versionId AND appVersion.appId = appFamily.appId AND (appFamily.queued = '?' OR appVersion.queued = '?') AND testResults.submitterId = '?' AND testResults.state = '?' ORDER BY testResults.testingId", "false", "false", $iUserId, $bQueued ? 'queued' : 'accepted'); $hResult = query_parameters("SELECT testResults.versionId, testResults.testedDate, testResults.testedRelease, testResults.testedRating, testResults.submitTime, appFamily.appName, appVersion.versionName from testResults, appFamily, appVersion WHERE testResults.versionId = appVersion.versionId AND appVersion.appId = appFamily.appId AND (appFamily.queued = '?' OR appVersion.state = '?') AND testResults.submitterId = '?' AND testResults.state = '?' ORDER BY testResults.testingId", "false", 'accepted', $iUserId, $bQueued ? 'queued' : 'accepted');
if(!$hResult || !query_num_rows($hResult)) if(!$hResult || !query_num_rows($hResult))
return false; return false;
@@ -1188,7 +1188,7 @@ class testData{
// they can also submit test results without them being queued // they can also submit test results without them being queued
// this is the case where they maintain the version and the version isn't queued // this is the case where they maintain the version and the version isn't queued
$oVersion = new version($this->iVersionId); $oVersion = new version($this->iVersionId);
if($oVersion->canEdit() && $oVersion->sQueued == "false") if($oVersion->canEdit() && $oVersion->objectGetState() == 'accepted')
return FALSE; return FALSE;
else else
return TRUE; return TRUE;

View File

@@ -722,7 +722,7 @@ class User {
function canViewVersion($oVersion) function canViewVersion($oVersion)
{ {
/* if the version isn't queued */ /* if the version isn't queued */
if($oVersion->sQueued == 'false') if($oVersion->objectGetState() == 'accepted')
return true; return true;
if($this->hasPriv("admin")) if($this->hasPriv("admin"))
@@ -730,7 +730,7 @@ class User {
/* if the user is the submitter and the version is still queued */ /* if the user is the submitter and the version is still queued */
if(($this->iUserId == $oVersion->iSubmitterId) && if(($this->iUserId == $oVersion->iSubmitterId) &&
($oVersion->sQueued != 'false')) ($oVersion->objectGetState() != 'accepted'))
return true; return true;
/* if this user supermaintains the application this version belongs to */ /* if this user supermaintains the application this version belongs to */
@@ -758,7 +758,7 @@ class User {
return true; return true;
/* the version is queued and the user is the submitter */ /* the version is queued and the user is the submitter */
if(($oVersion->sQueued != 'false') && ($this->iUserId == $oVersion->iSubmitterId)) if(($oVersion->objectGetState() != 'accepted') && ($this->iUserId == $oVersion->iSubmitterId))
return true; return true;
return false; return false;
@@ -783,7 +783,7 @@ class User {
/* if the app is anything other than not queued and if the user is the submitter */ /* if the app is anything other than not queued and if the user is the submitter */
/* then allow the user to delete the app */ /* then allow the user to delete the app */
if(($oVersion->sQueued != 'false') && ($oVersion->iSubmitterId == $this->iUserId)) if(($oVersion->objectGetState() != 'accepted') && ($oVersion->iSubmitterId == $this->iUserId))
return true; return true;
/* is this user a supermaintainer of the application this version is under? */ /* is this user a supermaintainer of the application this version is under? */
@@ -833,7 +833,7 @@ class User {
return true; return true;
if(($this->iUserId == $oVersion->iSubmitterId) && if(($this->iUserId == $oVersion->iSubmitterId) &&
($oVersion->sQueued != 'false')) ($oVersion->objectGetState() != 'accepted'))
return true; return true;
return false; return false;

View File

@@ -524,7 +524,7 @@ function outputSearchTableForhResult($search_words, $hResult)
$bgcolor = ($c % 2) ? 'color0' : 'color1'; $bgcolor = ($c % 2) ? 'color0' : 'color1';
//count versions //count versions
$hResult2 = query_parameters("SELECT count(*) as versions FROM appVersion WHERE appId = '?' AND versionName != 'NONAME' and queued = 'false'", $hResult2 = query_parameters("SELECT count(*) as versions FROM appVersion WHERE appId = '?' AND versionName != 'NONAME' and state = 'accepted'",
$oRow->appId); $oRow->appId);
$y = query_fetch_object($hResult2); $y = query_fetch_object($hResult2);

View File

@@ -33,7 +33,7 @@ class version {
var $sTestedRating; var $sTestedRating;
var $sSubmitTime; var $sSubmitTime;
var $iSubmitterId; var $iSubmitterId;
var $sQueued; private $sState;
var $sLicense; var $sLicense;
var $aTestResults; /* Array of test result objects. Especially useful when var $aTestResults; /* Array of test result objects. Especially useful when
we want to preview a version before submitting it; we want to preview a version before submitting it;
@@ -77,7 +77,7 @@ class version {
$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->sState = $oRow->state;
$this->sLicense = $oRow->license; $this->sLicense = $oRow->license;
$this->iObsoleteBy = $oRow->obsoleteBy; $this->iObsoleteBy = $oRow->obsoleteBy;
} }
@@ -94,18 +94,18 @@ class version {
$oApp = new application($this->iAppId); $oApp = new application($this->iAppId);
if($oApp->sQueued != "false") if($oApp->sQueued != "false")
$this->sQueued = "pending"; $this->sState = 'pending';
else else
$this->sQueued = $this->mustBeQueued() ? "true" : "false"; $this->sState = $this->mustBeQueued() ? 'queued' : 'accepted';
$hResult = query_parameters("INSERT INTO appVersion $hResult = query_parameters("INSERT INTO appVersion
(versionName, description, maintainer_release, (versionName, description, maintainer_release,
maintainer_rating, appId, submitTime, submitterId, maintainer_rating, appId, submitTime, submitterId,
queued, license) state, license)
VALUES ('?', '?', '?', '?', '?', ?, '?', '?', '?')", VALUES ('?', '?', '?', '?', '?', ?, '?', '?', '?')",
$this->sName, $this->sDescription, $this->sTestedRelease, $this->sName, $this->sDescription, $this->sTestedRelease,
$this->sTestedRating, $this->iAppId, "NOW()", $this->sTestedRating, $this->iAppId, "NOW()",
$_SESSION['current']->iUserId, $this->sQueued, $_SESSION['current']->iUserId, $this->sState,
$this->sLicense); $this->sLicense);
if($hResult) if($hResult)
@@ -288,13 +288,13 @@ class version {
return; return;
// If we are not in the queue, we can't move the version out of the queue. // If we are not in the queue, we can't move the version out of the queue.
if($this->sQueued == 'false') if($this->sState == 'accepted')
return false; return false;
if(query_parameters("UPDATE appVersion SET queued = '?' WHERE versionId = '?'", if(query_parameters("UPDATE appVersion SET state = '?' WHERE versionId = '?'",
"false", $this->iVersionId)) 'accepted', $this->iVersionId))
{ {
$this->sQueued = 'false'; $this->sState = 'accepted';
// we send an e-mail to interested people // we send an e-mail to interested people
$this->mailSubmitter("add"); $this->mailSubmitter("add");
$this->SendNotificationMail(); $this->SendNotificationMail();
@@ -319,13 +319,13 @@ class version {
return; return;
// If we are not in the queue, we can't move the version out of the queue. // If we are not in the queue, we can't move the version out of the queue.
if(!$this->sQueued == 'true') if($this->sState != 'queued')
return false; return false;
if(query_parameters("UPDATE appVersion SET queued = '?' WHERE versionId = '?'", if(query_parameters("UPDATE appVersion SET state = '?' WHERE versionId = '?'",
"rejected", $this->iVersionId)) 'rejected', $this->iVersionId))
{ {
$this->sQueued = 'rejected'; $this->sState = 'rejected';
// we send an e-mail to interested people // we send an e-mail to interested people
if(!$bSilent) if(!$bSilent)
{ {
@@ -342,10 +342,10 @@ class version {
if(!$_SESSION['current']->canRequeueVersion($this)) if(!$_SESSION['current']->canRequeueVersion($this))
return; return;
if(query_parameters("UPDATE appVersion SET queued = '?' WHERE versionId = '?'", if(query_parameters("UPDATE appVersion SET state = '?' WHERE versionId = '?'",
"true", $this->iVersionId)) 'queued', $this->iVersionId))
{ {
$this->sQueued = 'true'; $this->sState = 'queued';
// we send an e-mail to interested people // we send an e-mail to interested people
$this->SendNotificationMail(); $this->SendNotificationMail();
@@ -443,7 +443,7 @@ class version {
switch($sAction) switch($sAction)
{ {
case "add": case "add":
if($this->sQueued == "false") if($this->sState == 'accepted')
{ {
$sSubject = "Version ".$this->sName." of ".$oApp->sName." added by ".$_SESSION['current']->sRealname; $sSubject = "Version ".$this->sName." of ".$oApp->sName." added by ".$_SESSION['current']->sRealname;
$sMsg = $this->objectMakeUrl()."\n"; $sMsg = $this->objectMakeUrl()."\n";
@@ -569,7 +569,7 @@ class version {
if(!$this->iAppId) if(!$this->iAppId)
$this->iAppId = $aClean['iAppId']; $this->iAppId = $aClean['iAppId'];
if($this->sQueued == "false" && $this->iVersionId) if($this->sState == 'accepted' && $this->iVersionId)
{ {
// app parent // app parent
$x = new TableVE("view"); $x = new TableVE("view");
@@ -636,7 +636,7 @@ class version {
echo html_frame_end(); echo html_frame_end();
if($this->sQueued == "false" && $this->iVersionId) if($this->sState == 'accepted' && $this->iVersionId)
{ {
echo html_frame_start("Info", "90%", "", 0); echo html_frame_start("Info", "90%", "", 0);
@@ -1188,7 +1188,14 @@ class version {
foreach($aVersions as $oVersion) foreach($aVersions as $oVersion)
{ {
$oApp = new application($oVersion->iAppId); $oApp = new application($oVersion->iAppId);
if ($oVersion->sQueued == $oApp->sQueued)
/* Temporary workaround */
$sAppState = $oApp->sQueued;
if($sAppState == 'true')
$sAppState = 'queued';
else if($sAppState == 'false')
$sAppState = 'accepted';
if ($oVersion->sState == $sAppState)
{ {
// set row color // set row color
$bgcolor = ($c % 2 == 0) ? "color0" : "color1"; $bgcolor = ($c % 2 == 0) ? "color0" : "color1";
@@ -1277,7 +1284,7 @@ class version {
/* List the versions submitted by a user. Ignore versions for queued applications */ /* List the versions submitted by a user. Ignore versions for queued applications */
public static function listSubmittedBy($iUserId, $bQueued = true) public static function listSubmittedBy($iUserId, $bQueued = true)
{ {
$hResult = query_parameters("SELECT appFamily.appName, appVersion.versionName, appVersion.description, appVersion.versionId, appVersion.submitTime FROM appFamily, appVersion WHERE appFamily.appId = appVersion.appId AND appVersion.submitterId = '?' AND appVersion.queued = '?' AND appFamily.queued = '?'", $iUserId, $bQueued ? "true" : "false", "false"); $hResult = query_parameters("SELECT appFamily.appName, appVersion.versionName, appVersion.description, appVersion.versionId, appVersion.submitTime FROM appFamily, appVersion WHERE appFamily.appId = appVersion.appId AND appVersion.submitterId = '?' AND appVersion.state = '?' AND appFamily.queued = '?'", $iUserId, $bQueued ? 'queued' : 'accepted', 'false');
if(!$hResult || !query_num_rows($hResult)) if(!$hResult || !query_num_rows($hResult))
return false; return false;
@@ -1365,7 +1372,7 @@ class version {
public static function objectGetEntriesCount($bQueued, $bRejected) public static function objectGetEntriesCount($bQueued, $bRejected)
{ {
$sQueued = objectManager::getQueueString($bQueued, $bRejected); $sState = objectManager::getStateString($bQueued, $bRejected);
$oVersion = new version(); $oVersion = new version();
if($bQueued && !$oVersion->canEdit()) if($bQueued && !$oVersion->canEdit())
@@ -1377,7 +1384,7 @@ class version {
appVersion WHERE appVersion WHERE
appVersion.submitterId = '?' appVersion.submitterId = '?'
AND AND
appVersion.queued = '?'"; appVersion.state = '?'";
else else
$sQuery = "SELECT COUNT(DISTINCT appVersion.versionId) as count FROM $sQuery = "SELECT COUNT(DISTINCT appVersion.versionId) as count FROM
appVersion, appMaintainers WHERE appVersion, appMaintainers WHERE
@@ -1389,15 +1396,15 @@ class version {
AND AND
appMaintainers.queued = 'false' appMaintainers.queued = 'false'
AND AND
appVersion.queued = '?'"; appVersion.state = '?'";
$hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, $sQueued); $hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, $sState);
} else } else
{ {
$sQuery = "SELECT COUNT(DISTINCT versionId) as count $sQuery = "SELECT COUNT(DISTINCT versionId) as count
FROM appVersion WHERE FROM appVersion WHERE
appVersion.queued = '?'"; appVersion.state = '?'";
$hResult = query_parameters($sQuery, $sQueued); $hResult = query_parameters($sQuery, $sState);
} }
if(!$hResult) if(!$hResult)
@@ -1409,6 +1416,16 @@ class version {
return $oRow->count; return $oRow->count;
} }
public function objectGetState()
{
return $this->sState;
}
public function objectSetState($sState)
{
$this->sState = $sState;
}
public function canEdit() public function canEdit()
{ {
if($_SESSION['current']->hasPriv("admin")) if($_SESSION['current']->hasPriv("admin"))
@@ -1480,7 +1497,7 @@ class version {
public static function objectGetEntries($bQueued, $bRejected, $iRows = 0, $iStart = 0, $sOrderBy = "versionId") public static function objectGetEntries($bQueued, $bRejected, $iRows = 0, $iStart = 0, $sOrderBy = "versionId")
{ {
$sQueued = objectManager::getQueueString($bQueued, $bRejected); $sState = objectManager::getStateString($bQueued, $bRejected);
$sLimit = ""; $sLimit = "";
@@ -1503,7 +1520,7 @@ class version {
$sQuery = "SELECT * FROM appVersion WHERE $sQuery = "SELECT * FROM appVersion WHERE
appVersion.submitterId = '?' appVersion.submitterId = '?'
AND AND
appVersion.queued = '?' ORDER BY ?$sLimit"; appVersion.state = '?' ORDER BY ?$sLimit";
else else
$sQuery = "SELECT appVersion.* FROM $sQuery = "SELECT appVersion.* FROM
appVersion, appMaintainers WHERE appVersion, appMaintainers WHERE
@@ -1515,29 +1532,29 @@ class version {
AND AND
appMaintainers.queued = 'false' appMaintainers.queued = 'false'
AND AND
appVersion.queued = '?' ORDER BY ?$sLimit"; appVersion.state = '?' ORDER BY ?$sLimit";
if($sLimit) if($sLimit)
{ {
$hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, $hResult = query_parameters($sQuery, $_SESSION['current']->iUserId,
$sQueued, $sOrderBy, $iStart, $iRows); $sState, $sOrderBy, $iStart, $iRows);
} else } else
{ {
$hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, $hResult = query_parameters($sQuery, $_SESSION['current']->iUserId,
$sQueued, $sOrderBy); $sState, $sOrderBy);
} }
} else } else
{ {
$sQuery = "SELECT * FROM appVersion WHERE $sQuery = "SELECT * FROM appVersion WHERE
appVersion.queued = '?' ORDER BY ?$sLimit"; appVersion.state = '?' ORDER BY ?$sLimit";
if($sLimit) if($sLimit)
{ {
$hResult = query_parameters($sQuery, $sQueued, $sOrderBy, $hResult = query_parameters($sQuery, $sState, $sOrderBy,
$iStart, $iRows); $iStart, $iRows);
} else } else
{ {
$hResult = query_parameters($sQuery, $sQueued, $sOrderBy); $hResult = query_parameters($sQuery, $sState, $sOrderBy);
} }
} }

View File

@@ -268,7 +268,7 @@ class version_queue
foreach($oApp->aVersionsIds as $iVersionId) foreach($oApp->aVersionsIds as $iVersionId)
{ {
$oVersion = new Version($iVersionId); $oVersion = new Version($iVersionId);
if ($oVersion->sQueued == 'false') if ($oVersion->objectGetState() == 'accepted')
{ {
//display row //display row
echo html_tr(array( echo html_tr(array(

View File

@@ -58,9 +58,9 @@ create table appVersion (
maintainer_release text, maintainer_release text,
submitTime datetime NOT NULL, submitTime datetime NOT NULL,
submitterId int(11) NOT NULL default '0', submitterId int(11) NOT NULL default '0',
queued enum('true','false','rejected','pending') NOT NULL default 'false',
license enum('Retail','Open Source','Freeware','Demo','Shareware'), license enum('Retail','Open Source','Freeware','Demo','Shareware'),
obsoleteBy int(11) NOT NULL default '0', obsoleteBy int(11) NOT NULL default '0',
state enum('accepted','queued','rejected','pending') NOT NULL default 'accepted',
key(versionId), key(versionId),
index(appId) index(appId)
); );

View File

@@ -183,7 +183,7 @@ function test_application_getWithRating()
$oVersion->description = "Some Version description".$iVersionIdIndex; $oVersion->description = "Some Version description".$iVersionIdIndex;
$oVersion->iAppId = $oApp->iAppId; $oVersion->iAppId = $oApp->iAppId;
$oVersion->sTestedRating = "Bronze"; $oVersion->sTestedRating = "Bronze";
$oVersion->sQueued = "True"; $oVersion->objectSetState('queued');
if(!$oVersion->create()) if(!$oVersion->create())
{ {