diff --git a/include/appData.php b/include/appData.php
index b09a053..efb0f2d 100644
--- a/include/appData.php
+++ b/include/appData.php
@@ -503,7 +503,8 @@ class appData
$oApp->objectMakeLink(),
$this->iVersionId ? $oVersion->objectMakeLink() : "N/A");
- return array($aCells, null, false, null);
+ $oTableRow = new TableRow($aCells);
+ return $oTableRow;
}
function objectDisplayQueueProcessingHelp()
diff --git a/include/application.php b/include/application.php
index 4da7219..ca2c5ae 100644
--- a/include/application.php
+++ b/include/application.php
@@ -864,7 +864,8 @@ class Application {
$sVendor,
$this->sName);
- return array($aCells, null, false, null);
+ $oTableRow = new TableRow($aCells);
+ return $oTableRow;
}
function canEdit()
diff --git a/include/distribution.php b/include/distribution.php
index b0dd115..78aff70 100644
--- a/include/distribution.php
+++ b/include/distribution.php
@@ -460,10 +460,12 @@ class distribution {
"sUrl\">$this->sUrl",
array(sizeof($this->aTestingIds), "align=\"right\""));
- // enable the 'delete' action if this distribution has no testing results
- $bDeleteLink = sizeof($this->aTestingIds) ? FALSE : TRUE;
+ // enable the 'delete' action if this distribution has no testing results
+ $bDeleteLink = sizeof($this->aTestingIds) ? FALSE : TRUE;
- return array($aCells, null, $bDeleteLink, null);
+ $oTableRow = new TableRow($aCells);
+ $oTableRow->SetRowHasDeleteLink($bDeleteLink);
+ return $oTableRow;
}
// Whether the user has permission to edit distributions
diff --git a/include/maintainer.php b/include/maintainer.php
index 776a7e2..84af1e9 100644
--- a/include/maintainer.php
+++ b/include/maintainer.php
@@ -474,7 +474,8 @@ class maintainer
($this->bSuperMaintainer) ? "Yes" : "No",
$oUser->objectMakeLink());
- return array($aCells, null, false, null);
+ $oTableRow = new TableRow($aCells);
+ return $oTableRow;
}
function ObjectDisplayQueueProcessingHelp()
diff --git a/include/objectManager.php b/include/objectManager.php
index 92aad90..29cb2aa 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -133,7 +133,7 @@ class ObjectManager
{
$oObject = new $this->sClass(null, $oRow);
- $this->oTableRow->TableRow($oObject->objectGetTableRow());
+ $this->oTableRow = $oObject->objectGetTableRow();
if(!$this->oTableRow->sStyle)
$this->oTableRow->sStyle = ($iCount % 2) ? "color0" : "color1";
@@ -144,7 +144,7 @@ class ObjectManager
if($oObject->canEdit())
{
$shDeleteLink = "";
- if($this->oTableRow->bDeleteLink)
+ if($this->oTableRow->bHasDeleteLink)
{
$shDeleteLink = ' [ objectGetid()).
'">delete ]';
@@ -763,30 +763,38 @@ class MultiPage
class TableRow
{
- var $aCells;
- var $sStyle;
- var $sEditLinkLabel;
- var $bDeleteLink;
- var $aRowClickable;
+ var $aCells; // array that contains the columns for a table row
+ var $sStyle; // CSS style to be used
+ var $bHasDeleteLink;
+ var $aRowClickable; //FIXME: we should describe the entries required here by creating a class for a clickable row entry or something
var $bCanEdit;
- var $iId;
- function TableRow($aInput)
+ function TableRow($aCells)
{
- if(!$aInput)
+ if(!$aCells)
return;
- /* aInput is returned from objectGetTableRow(); an array with the following members
- 0: an array with the contents of the table row
- 1: CSS style to be used. If it is null we use the default
- 2: Is TRUE if we should display a delete link with the edit link
- 3: Contains an array with info if we should make the entrie table row clickable,
- null otherwise */
+ $this->aCells = $aCells;
- $this->aCells = $aInput[0];
- $this->sStyle = $aInput[1];
- $this->bDeleteLink = $aInput[2];
- $this->aRowClickable = $aInput[3];
+ // initialize the rest of the variables
+ $this->sStyle = null;
+ $this->bHasDeleteLink = false;
+ $this->aRowClickable = null;
+ }
+
+ function SetStyle($sStyle)
+ {
+ $this->sStyle = $sStyle;
+ }
+
+ function SetRowHasDeleteLink($bHasDeleteLink)
+ {
+ $this->bHasDeleteLink = $bHasDeleteLink;
+ }
+
+ function SetRowClickable($aRowClickableInfo)
+ {
+ $this->aRowClickable = $aRowClickableInfo;
}
}
diff --git a/include/screenshot.php b/include/screenshot.php
index 143ecc1..32cb50c 100644
--- a/include/screenshot.php
+++ b/include/screenshot.php
@@ -12,7 +12,8 @@ $watermark = new Image("/images/watermark.png");
/**
* Screenshot class for handling screenshots and thumbnails
*/
-class screenshot {
+class screenshot
+{
var $iScreenshotId;
// parameters necessary for creating a new screenshot with
diff --git a/include/testData.php b/include/testData.php
index 18b1462..348dad6 100644
--- a/include/testData.php
+++ b/include/testData.php
@@ -957,7 +957,11 @@ class testData{
($bHasMaintainer ? "YES" : "no"),
$this->sTestedRating);
- return array($aCells, $this->sTestedRating, true, null);
+ $oTableRow = new TableRow($aCells);
+ $oTableRow->SetStyle($this->sTestedRating);
+ $oTableRow->SetRowHasDeleteLink(true);
+
+ return $oTableRow;
}
function canEdit()
diff --git a/include/vendor.php b/include/vendor.php
index 95f7367..7e37fac 100644
--- a/include/vendor.php
+++ b/include/vendor.php
@@ -231,7 +231,10 @@ class Vendor {
$bDeleteLink = sizeof($this->aApplicationsIds) ? FALSE : TRUE;
- return array($aCells, null, $bDeleteLink, null);
+ $oTableRow = new TableRow($aCells);
+ $oTableRow->SetRowHasDeleteLink($bDeleteLink);
+
+ return $oTableRow;
}
function canEdit()
diff --git a/include/version.php b/include/version.php
index e32562e..fa8be0d 100644
--- a/include/version.php
+++ b/include/version.php
@@ -1350,7 +1350,8 @@ class version {
$oApp->objectMakeLink(),
$this->sName);
- return array($aCells, null, false, null);
+ $oTableRow = new TableRow($aCells);
+ return $oTableRow;
}
function objectDisplayQueueProcessingHelp()