Let objectmanager handle testData queue
This commit is contained in:
committed by
WineHQ
parent
eb98fde3c9
commit
18bb33902e
@@ -170,6 +170,8 @@ class testData{
|
|||||||
|
|
||||||
if($this->iSubmitterId && ($this->iSubmitterId != $_SESSION['current']->iUserId))
|
if($this->iSubmitterId && ($this->iSubmitterId != $_SESSION['current']->iUserId))
|
||||||
$this->mailSubmitter("delete");
|
$this->mailSubmitter("delete");
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -455,7 +457,9 @@ class testData{
|
|||||||
echo ' <td>'.$sStatus.' </td>',"\n";
|
echo ' <td>'.$sStatus.' </td>',"\n";
|
||||||
if ($_SESSION['current']->hasAppVersionModifyPermission($oVersion))
|
if ($_SESSION['current']->hasAppVersionModifyPermission($oVersion))
|
||||||
{
|
{
|
||||||
echo '<td><a href="'.BASE.'admin/adminTestResults.php?sSub=view&iTestingId='.$oTest->iTestingId.'">',"\n";
|
$oObject = new objectManager("testData");
|
||||||
|
echo '<td><a href="'.$oObject->makeUrl("edit", $oTest->iTestingId,
|
||||||
|
"Edit Test Results").'">',"\n";
|
||||||
echo 'Edit</a></td>',"\n";
|
echo 'Edit</a></td>',"\n";
|
||||||
}
|
}
|
||||||
echo '</tr>',"\n";
|
echo '</tr>',"\n";
|
||||||
@@ -545,6 +549,7 @@ class testData{
|
|||||||
|
|
||||||
echo '<input type="hidden" name="iVersionId" value="'.$this->iVersionId.'" >';
|
echo '<input type="hidden" name="iVersionId" value="'.$this->iVersionId.'" >';
|
||||||
echo '<input type="hidden" name="iTestingId" value="'.$this->iTestingId.'" >';
|
echo '<input type="hidden" name="iTestingId" value="'.$this->iTestingId.'" >';
|
||||||
|
echo '<input type="hidden" name="iTestDataId" value="'.$this->iTestingId.'" >';
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
@@ -751,9 +756,10 @@ class testData{
|
|||||||
|
|
||||||
function objectGetEntriesCount($bQueued)
|
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
|
$sQuery = "SELECT COUNT(testingId) AS count FROM
|
||||||
testResults, appVersion, appMaintainers WHERE
|
testResults, appVersion, appMaintainers WHERE
|
||||||
@@ -796,9 +802,10 @@ class testData{
|
|||||||
|
|
||||||
function objectGetEntries($bQueued)
|
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,
|
$sQuery = "SELECT testResults.* FROM testResults, appVersion,
|
||||||
appMaintainers WHERE
|
appMaintainers WHERE
|
||||||
@@ -865,16 +872,16 @@ class testData{
|
|||||||
$this->sTestedRelease,
|
$this->sTestedRelease,
|
||||||
$this->sTestedRating);
|
$this->sTestedRating);
|
||||||
|
|
||||||
if(testData::canEditSome())
|
if($this->canEditSome())
|
||||||
$aCells[] = "[ <a href=\"".BASE."admin/adminTestResults.php?sSub=view&".
|
$aCells[] = "[ <a href=\"".$oObject->makeUrl("edit",
|
||||||
"iTestingId=$this->iTestingId\">$sEditLinkLabel</a> ]";
|
$this->iTestingId)."\">$sEditLinkLabel</a> ]";
|
||||||
|
|
||||||
echo html_tr($aCells, $this->sTestedRating);
|
echo html_tr($aCells, $this->sTestedRating);
|
||||||
}
|
}
|
||||||
|
|
||||||
function canEditSome()
|
function canEditSome()
|
||||||
{
|
{
|
||||||
if(testData::canEdit() || maintainer::isUserMaintainer($_SESSION['current']))
|
if($this->canEdit() || maintainer::isUserMaintainer($_SESSION['current']))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -884,8 +891,15 @@ class testData{
|
|||||||
{
|
{
|
||||||
if($_SESSION['current']->hasPriv("admin"))
|
if($_SESSION['current']->hasPriv("admin"))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
else if($this->iTestingId)
|
||||||
|
{
|
||||||
|
$oVersion = new version($this->iVersionId);
|
||||||
|
if($_SESSION['current']->hasAppVersionModifyPermission($oVersion))
|
||||||
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
} else
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectDisplayQueueProcessingHelp()
|
function objectDisplayQueueProcessingHelp()
|
||||||
|
|||||||
Reference in New Issue
Block a user