Replace objectOutputTableRow() with objectGetTableRow(). Redesign the table output mechanism so
that we fetch a table row from a class instead of letting the class display it. Move adding of edit/delete links from the classes to the objectManager. Fix a hole in the distribution class where an uninitialized variable could have been used in the constructor.
This commit is contained in:
committed by
WineHQ
parent
46f4f20ce6
commit
cd198f44d7
@@ -488,8 +488,7 @@ class appData
|
||||
}
|
||||
}
|
||||
|
||||
/* arg1 = OM object, arg2 = CSS style, arg3 = text for edit link */
|
||||
function objectOutputTableRow($oObject, $sClass, $sEditLinkLabel)
|
||||
function objectGetTableRow()
|
||||
{
|
||||
$oVersion = new Version($this->iVersionId);
|
||||
|
||||
@@ -504,11 +503,7 @@ class appData
|
||||
$oApp->objectMakeLink(),
|
||||
$this->iVersionId ? $oVersion->objectMakeLink() : "N/A");
|
||||
|
||||
if(appData::canEdit($oObject->sClass))
|
||||
$aCells[] = "[ <a href=\"".$oObject->makeUrl("edit",
|
||||
$this->iId)."\">$sEditLinkLabel</a> ]";
|
||||
|
||||
echo html_tr($aCells, $sClass);
|
||||
return array($aCells, null, false, null);
|
||||
}
|
||||
|
||||
function objectDisplayQueueProcessingHelp()
|
||||
@@ -555,6 +550,11 @@ class appData
|
||||
" submitted application data here";
|
||||
return $sReplyText;
|
||||
}
|
||||
|
||||
function objectGetId()
|
||||
{
|
||||
return $this->iId;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user