diff --git a/admin/adminTestResults.php b/admin/adminTestResults.php index 186029c..0c00253 100644 --- a/admin/adminTestResults.php +++ b/admin/adminTestResults.php @@ -15,8 +15,8 @@ require_once(BASE."include/distributions.php"); if ($_REQUEST['sub']) { - if (!($_SESSION['current']->hasPriv("admin")) && - !($_SESSION['current']->hasAppVersionModifyPermission($_REQUEST['iVersionId']))) + $oTest = new testData($_REQUEST['iTestingId']); + if (!($_SESSION['current']->hasAppVersionModifyPermission($oTest->iVersionId))) { errorpage("Insufficient privileges."); exit; @@ -54,36 +54,51 @@ if ($_REQUEST['sub']) { $oTest = new testData($_REQUEST['iTestingId']); } + $oVersion = new Version($oTest->iVersionId); + $oApp = new application($oVersion->iAppId); + $sVersionInfo = $oApp->sName." ".$oVersion->sName; if ($_REQUEST['sub'] == 'view') { switch($oTest->sQueued) { - case "new": - apidb_header("Submit new testing results"); - $_REQUEST['sTestedDate'] = date('Y-m-d H:i:s'); - break; case "true": - case "rejected": - apidb_header("Edit new testing results"); + apidb_header("Edit new testing results for ".$sVersionInfo); break; - case "False": - apidb_header("Edit testing results"); + case "rejected": + apidb_header("Edit rejected testing results for ".$sVersionInfo); + break; + case "false": + apidb_header("Edit testing results for ".$sVersionInfo); break; } echo '