Allow moving test results to a different version

This commit is contained in:
Alexander Nicolaysen Sørnes
2009-04-24 21:24:30 +02:00
committed by Alexander Nicolaysen Sørnes
parent 1e1f1c971b
commit 5560eaaba3
2 changed files with 50 additions and 20 deletions

View File

@@ -621,6 +621,7 @@ class testData{
$oTableRow->AddTextCell('<a href="'.$oObject->makeUrl('edit', $this->iTestingId,
'Edit Test Results').'&amp;sReturnTo='.urlencode($_SERVER['REQUEST_URI']).'">'.
'Edit</a> &nbsp; '."\n".
'<a href="'.$oObject->makeUrl('showChangeParent', $this->iTestingId, 'Move test report to another version').'&amp;sReturnTo='.urlencode($_SERVER['REQUEST_URI']).'">Move</a>'."\n".
'<a href="'.$oObject->makeUrl('delete', $this->iTestingId, 'Delete+Test+Results').
'&amp;sReturnTo='.urlencode($_SERVER['REQUEST_URI']).'">Delete</a></td>'."\n");
}
@@ -1400,8 +1401,8 @@ class testData{
function objectMakeLink()
{
/* STUB */
return TRUE;
$oObject = new objectManager("testData", "Edit Test Results", $this->iTestingId);
return '<a href="'.$oObject->makeUrl("edit", $this->iTestingId).'">test report</a>';
}
public function isOld()
@@ -1413,6 +1414,11 @@ class testData{
return ((mktime() - mysqltimestamp_to_unixtimestamp($this->sSubmitTime)) > (60 * 60 * 24 * 175));
}
public function objectSetParent($iNewId, $sClass = 'version')
{
$this->iVersionId = $iNewId;
}
function objectGetParent()
{
return new version($this->iVersionId);