From d6bf700f0093d9dddc2f95ef57c0eeef57230cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Tue, 24 Apr 2007 00:37:36 +0000 Subject: [PATCH] Remove testResults.php, the file is unused --- testResults.php | 164 ------------------------------------------------ 1 file changed, 164 deletions(-) delete mode 100644 testResults.php diff --git a/testResults.php b/testResults.php deleted file mode 100644 index 5d5b768..0000000 --- a/testResults.php +++ /dev/null @@ -1,164 +0,0 @@ -isLoggedIn()) - util_show_error_page_and_exit("Insufficient privileges to create test results. Are you sure you are logged in?"); - - -if ($aClean['sSub']) -{ - $oTest = new testData($aClean['iTestingId']); - if($aClean['iVersionId']) - $oTest->iVersionId = $aClean['iVersionId']; - $errors = ""; - - // Submit or Resubmit the new test results - if (($aClean['sSub'] == 'Submit') || ($aClean['sSub'] == 'Resubmit')) - { - $errors = $oTest->CheckOutputEditorInput($aClean); - $oTest->GetOutputEditorValues($aClean); // retrieve the values from the current $aClean - if(empty($errors)) - { - if(!$aClean['iDistributionId']) - { - if(!empty($aClean['sDistribution']) ) - { - $oDistribution = new distribution(); - $oDistribution->sName = $aClean['sDistribution']; - $oDistribution->create(); - $oTest->iDistributionId = $oDistribution->iDistributionId; - } - } - if($aClean['sSub'] == 'Submit') - { - $oTest->create(); - } else if($aClean['sSub'] == 'Resubmit') - { - $oTest->update(true); - $oTest->ReQueue(); - } - util_redirect_and_exit($_SERVER['PHP_SELF']); - } else - { - $aClean['sSub'] = 'view'; - } - } - - // Delete test results - if ($aClean['sSub'] == 'Delete') - { - if($aClean['iTestingId']) - { - $oTest = new testData($aClean['iTestingId']); - $oTest->delete(); - } - - util_redirect_and_exit($_SERVER['PHP_SELF']); - } - - // is this an old test? - if($aClean['iTestingId']) - { - // make sure the user has permission to view this test result - $oVersion = new Version($oTest->iVersionId); - if(!$_SESSION['current']->hasPriv("admin") && - !$_SESSION['current']->hasAppVersionModifyPermission($oVersion)&& - !(($_SESSION['current']->iUserId == $oTest->iSubmitterId) && !($oTest->sQueued == 'false'))) - { - util_show_error_page_and_exit("Insufficient privileges."); - } else - { - $oVersion = new Version($oTest->iVersionId); - } - } else - { - $oTest->iVersionId = $aClean['iVersionId']; - $oVersion = new Version($aClean['iVersionId']); - $oTest->sQueued = "new"; - } - if ($aClean['sSub'] == 'view') - { - $sVersionInfo = version::fullName($oVersion->iVersionId); - - switch($oTest->sQueued) - { - case "new": - apidb_header("Submit new test results for ".$sVersionInfo); - $oTest->sTestedDate = date('Y-m-d H:i:s'); - break; - case "true": - apidb_header("Edit new test results for ".$sVersionInfo); - break; - case "rejected": - apidb_header("Resubmit test results for ".$sVersionInfo); - break; - case "False": - apidb_header("Edit test results for ".$sVersionInfo); - break; - default: - util_show_error_page_and_exit('$oTest->sQueued of \''.$oTest->sQueued."'is invalid"); - break; - } - echo '
',"\n"; - - - //help - $oTest->objectDisplayAddItemHelp(); - - if(!empty($errors)) - { - echo '',"\n"; - echo '

We found the following errors:

    '.$errors.'
Please correct them.'; - echo '

',"\n"; - echo '

',"\n"; - } - - // View Test Details - $oTest->outputEditor($aClean['sDistribution'],true); - - echo 'Back to Version'; - - echo '',"\n"; - - - // Submit Buttons - switch($oTest->sQueued) - { - case "new": - echo ' ',"\n"; - break; - case "true": - case "rejected": - case "False": - echo ' ',"\n"; - echo '',"\n"; - break; - } - echo '',"\n"; - echo "
"; - - echo html_frame_end(" "); - } - else - { - // error no sub! - addmsg("Internal Routine Not Found!!", "red"); - util_redirect_and_exit($_SERVER['PHP_SELF']); - } -} -else // if ($aClean['sSub']) is not defined, display the Testing results queue page -{ - util_show_error_page_and_exit("No test id defined!"); -} -apidb_footer(); -?>