Only create new distributions if the user didn't pick one from the dropdown menu. Previous behavior would create a new distribution if any text was present in the 'distribution' textbox, even if a distribution is picked from the dropdown menu.
This commit is contained in:
@@ -181,14 +181,16 @@ if ($_REQUEST['sub'])
|
||||
{
|
||||
$oVersion->create();
|
||||
}
|
||||
|
||||
$sDistribution = trim($_REQUEST['sDistribution']);
|
||||
if(!empty($sDistribution))
|
||||
if(!$_REQUEST['iDistributionId'])
|
||||
{
|
||||
$oDistribution = new distribution();
|
||||
$oDistribution->sName = $sDistribution;
|
||||
$oDistribution->create();
|
||||
$oTest->iDistributionId = $oDistribution->iDistributionId;
|
||||
$sDistribution = trim($_REQUEST['sDistribution']);
|
||||
if(!empty($sDistribution))
|
||||
{
|
||||
$oDistribution = new distribution();
|
||||
$oDistribution->sName = $sDistribution;
|
||||
$oDistribution->create();
|
||||
$oTest->iDistributionId = $oDistribution->iDistributionId;
|
||||
}
|
||||
}
|
||||
$oTest->iVersionId = $oVersion->iVersionId;
|
||||
if(is_numeric($oTest->iTestingId))
|
||||
|
||||
Reference in New Issue
Block a user