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
@@ -849,7 +849,7 @@ class Application {
|
||||
return $aCells;
|
||||
}
|
||||
|
||||
function objectOutputTableRow($oObject, $sClass, $sEditLinkLabel)
|
||||
function objectGetTableRow()
|
||||
{
|
||||
$oUser = new user($this->iSubmitterId);
|
||||
$oVendor = new vendor($this->iVendorId);
|
||||
@@ -864,14 +864,7 @@ class Application {
|
||||
$sVendor,
|
||||
$this->sName);
|
||||
|
||||
/* Display an edit link if the user has proper permissions */
|
||||
if($this->canEdit())
|
||||
{
|
||||
$aCells[] = "[ <a href=\"".$oObject->makeUrl("edit", $this->iAppId,
|
||||
"Edit Application")."\">$sEditLinkLabel</a> ]";
|
||||
}
|
||||
|
||||
echo html_tr($aCells, $sClass);
|
||||
return array($aCells, null, false, null);
|
||||
}
|
||||
|
||||
function canEdit()
|
||||
@@ -1002,6 +995,11 @@ class Application {
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function objectGetId()
|
||||
{
|
||||
return $this->iAppId;
|
||||
}
|
||||
}
|
||||
|
||||
function get_vendor_from_keywords($sKeywords)
|
||||
|
||||
Reference in New Issue
Block a user