diff --git a/include/testData.php b/include/testData.php index 1c9147f..7c36004 100644 --- a/include/testData.php +++ b/include/testData.php @@ -170,6 +170,8 @@ class testData{ if($this->iSubmitterId && ($this->iSubmitterId != $_SESSION['current']->iUserId)) $this->mailSubmitter("delete"); + + return TRUE; } @@ -455,7 +457,9 @@ class testData{ echo ' '.$sStatus.' ',"\n"; if ($_SESSION['current']->hasAppVersionModifyPermission($oVersion)) { - echo '',"\n"; + $oObject = new objectManager("testData"); + echo 'iTestingId, + "Edit Test Results").'">',"\n"; echo 'Edit',"\n"; } echo '',"\n"; @@ -545,6 +549,7 @@ class testData{ echo ''; echo ''; + echo ''; echo "\n"; @@ -751,9 +756,10 @@ class testData{ function objectGetEntriesCount($bQueued) { - if($bQueued && !testData::canEdit()) + $oTest = new testData(); + if($bQueued && !$oTest->canEdit()) { - if(testData::canEditSome()) + if($oTest->canEditSome()) { $sQuery = "SELECT COUNT(testingId) AS count FROM testResults, appVersion, appMaintainers WHERE @@ -796,9 +802,10 @@ class testData{ function objectGetEntries($bQueued) { - if($bQueued && !testData::canEdit()) + $oTest = new testData(); + if($bQueued && !$oTest->canEdit()) { - if(testData::canEditSome()) + if($oTest->canEditSome()) { $sQuery = "SELECT testResults.* FROM testResults, appVersion, appMaintainers WHERE @@ -865,16 +872,16 @@ class testData{ $this->sTestedRelease, $this->sTestedRating); - if(testData::canEditSome()) - $aCells[] = "[ iTestingId\">$sEditLinkLabel ]"; + if($this->canEditSome()) + $aCells[] = "[ makeUrl("edit", + $this->iTestingId)."\">$sEditLinkLabel ]"; echo html_tr($aCells, $this->sTestedRating); } function canEditSome() { - if(testData::canEdit() || maintainer::isUserMaintainer($_SESSION['current'])) + if($this->canEdit() || maintainer::isUserMaintainer($_SESSION['current'])) return TRUE; else return FALSE; @@ -884,7 +891,14 @@ class testData{ { if($_SESSION['current']->hasPriv("admin")) return TRUE; - else + else if($this->iTestingId) + { + $oVersion = new version($this->iVersionId); + if($_SESSION['current']->hasAppVersionModifyPermission($oVersion)) + return TRUE; + else + return FALSE; + } else return FALSE; }