Standardize objectGetEntries parameters
This commit is contained in:
committed by
Chris Morgan
parent
5afa1598df
commit
ed64f049d7
@@ -326,7 +326,7 @@ class appData
|
|||||||
return $oTableRow;
|
return $oTableRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sType)
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = '', $bAscending = true, $sType = null)
|
||||||
{
|
{
|
||||||
/* Not implemented for appData */
|
/* Not implemented for appData */
|
||||||
if($sState == 'rejected')
|
if($sState == 'rejected')
|
||||||
|
|||||||
@@ -934,6 +934,11 @@ class Application {
|
|||||||
return $sLink;
|
return $sLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function objectGetDefaultSort()
|
||||||
|
{
|
||||||
|
return 'appId';
|
||||||
|
}
|
||||||
|
|
||||||
public static function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "appId", $bAscending = TRUE)
|
public static function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "appId", $bAscending = TRUE)
|
||||||
{
|
{
|
||||||
$sLimit = "";
|
$sLimit = "";
|
||||||
|
|||||||
@@ -384,6 +384,11 @@ class application_queue
|
|||||||
return $this->oApp->objectGetEntriesCount($sState);
|
return $this->oApp->objectGetEntriesCount($sState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function objectGetDefaultSort()
|
||||||
|
{
|
||||||
|
return application::objectGetDefaultSort();
|
||||||
|
}
|
||||||
|
|
||||||
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "appId", $bAscending = TRUE)
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "appId", $bAscending = TRUE)
|
||||||
{
|
{
|
||||||
return $this->oApp->objectGetEntries($sState, $iRows, $iStart,
|
return $this->oApp->objectGetEntries($sState, $iRows, $iStart,
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ class Bug
|
|||||||
return $this->iLinkId;
|
return $this->iLinkId;
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetEntries($sState, $iRows = 0, $iStart = 0)
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = '', $bAscending = true)
|
||||||
{
|
{
|
||||||
$sLimit = "";
|
$sLimit = "";
|
||||||
|
|
||||||
|
|||||||
@@ -555,6 +555,11 @@ class distribution {
|
|||||||
return array('name');
|
return array('name');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function objectGetDefaultSort()
|
||||||
|
{
|
||||||
|
return 'name';
|
||||||
|
}
|
||||||
|
|
||||||
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "name", $bAscending = TRUE)
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "name", $bAscending = TRUE)
|
||||||
{
|
{
|
||||||
/* Not implemented */
|
/* Not implemented */
|
||||||
|
|||||||
@@ -432,9 +432,9 @@ class downloadurl
|
|||||||
return $oAppData->reject();
|
return $oAppData->reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetEntries($sState, $iRows = 0, $iStart = 0)
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = '', $bAscending = true)
|
||||||
{
|
{
|
||||||
return appData::objectGetEntries($sState, $iRows, $iStart, 'downloadurl');
|
return appData::objectGetEntries($sState, $iRows, $iStart, $sOrderBy, $bAscending, 'downloadurl');
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetEntriesCount($sState)
|
function objectGetEntriesCount($sState)
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ class maintainer
|
|||||||
return $hResult;
|
return $hResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ObjectGetEntries($sState, $iRows = 0, $iStart = 0)
|
function ObjectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = '', $bAscending = true)
|
||||||
{
|
{
|
||||||
/* Not implemented */
|
/* Not implemented */
|
||||||
if($sState == 'rejected')
|
if($sState == 'rejected')
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ class Monitor {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetEntries($sState)
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = '', $bAscending = true)
|
||||||
{
|
{
|
||||||
$hResult = query_parameters("SELECT * FROM appMonitors");
|
$hResult = query_parameters("SELECT * FROM appMonitors");
|
||||||
|
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ class Note {
|
|||||||
// do not support queuing at this point
|
// do not support queuing at this point
|
||||||
// TODO: we have no permissions scope on retrieving entries
|
// TODO: we have no permissions scope on retrieving entries
|
||||||
// as notes are typically only added to unqueued versions
|
// as notes are typically only added to unqueued versions
|
||||||
function objectGetEntries($sState)
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = '', $bAscending = true)
|
||||||
{
|
{
|
||||||
$sQuery = "select * from appNotes";
|
$sQuery = "select * from appNotes";
|
||||||
$hResult = query_parameters($sQuery);
|
$hResult = query_parameters($sQuery);
|
||||||
|
|||||||
@@ -271,39 +271,18 @@ class ObjectManager
|
|||||||
/* Set the sort info */
|
/* Set the sort info */
|
||||||
$this->setSortInfo($aClean);
|
$this->setSortInfo($aClean);
|
||||||
|
|
||||||
|
if(!$this->oSortInfo->sCurrentSort)
|
||||||
|
$this->oSortInfo->sCurrentSort = $this->getOptionalSetting('objectGetDefaultSort', '');
|
||||||
|
|
||||||
/* query the class for its entries */
|
/* query the class for its entries */
|
||||||
/* We pass in queue states to tell the object */
|
/* We pass in queue states to tell the object */
|
||||||
/* if we are requesting a list of its queued objects or */
|
/* if we are requesting a list of its queued objects or */
|
||||||
/* all of its objects */
|
/* all of its objects */
|
||||||
if($this->oMultiPage->bEnabled)
|
|
||||||
{
|
|
||||||
/* Has the user chosen a particular field to sort by? If not we want to use the default */
|
|
||||||
if($this->oSortInfo->sCurrentSort)
|
|
||||||
{
|
|
||||||
$hResult = $oObject->objectGetEntries($this->sState,
|
$hResult = $oObject->objectGetEntries($this->sState,
|
||||||
$this->oMultiPage->iItemsPerPage,
|
$this->oMultiPage->iItemsPerPage,
|
||||||
$this->oMultiPage->iLowerLimit,
|
$this->oMultiPage->iLowerLimit,
|
||||||
$this->oSortInfo->sCurrentSort,
|
$this->oSortInfo->sCurrentSort,
|
||||||
$this->oSortInfo->bAscending);
|
$this->oSortInfo->bAscending);
|
||||||
} else
|
|
||||||
{
|
|
||||||
$hResult = $oObject->objectGetEntries($this->sState,
|
|
||||||
$this->oMultiPage->iItemsPerPage,
|
|
||||||
$this->oMultiPage->iLowerLimit);
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
/* Has the user chosen a particular field to sort by? If not we want to use the default */
|
|
||||||
if($this->oSortInfo->sCurrentSort)
|
|
||||||
{
|
|
||||||
$hResult = $oObject->objectGetEntries($this->sState,
|
|
||||||
$this->oSortInfo->sCurrentSort,
|
|
||||||
$this->oSortInfo->bAscending);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
$hResult = $oObject->objectGetEntries($this->sState);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* did we get any entries? */
|
/* did we get any entries? */
|
||||||
if(!$hResult || query_num_rows($hResult) == 0)
|
if(!$hResult || query_num_rows($hResult) == 0)
|
||||||
|
|||||||
@@ -649,9 +649,9 @@ class screenshot
|
|||||||
echo "</tr></table></div><br>\n";
|
echo "</tr></table></div><br>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetEntries($sState, $iRows = 0, $iStart = 0)
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = '', $bAscending = true)
|
||||||
{
|
{
|
||||||
return appData::objectGetEntries($sState, $iRows, $iStart,
|
return appData::objectGetEntries($sState, $iRows, $iStart, $sOrderBy, $bAscending,
|
||||||
'screenshot');
|
'screenshot');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1202,7 +1202,12 @@ class testData{
|
|||||||
return $oRow->count;
|
return $oRow->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "testingId")
|
public static function objectGetDefaultSort()
|
||||||
|
{
|
||||||
|
return 'testingId';
|
||||||
|
}
|
||||||
|
|
||||||
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "testingId", $bAscending = true)
|
||||||
{
|
{
|
||||||
$oTest = new testData();
|
$oTest = new testData();
|
||||||
|
|
||||||
|
|||||||
@@ -142,9 +142,14 @@ class testData_queue
|
|||||||
$this->oTestData->objectDisplayAddItemHelp();
|
$this->oTestData->objectDisplayAddItemHelp();
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "testingId")
|
public static function objectGetDefaultSort()
|
||||||
{
|
{
|
||||||
return $this->oTestData->objectGetEntries($sState, $iRows, $iStart, $sOrderBy);
|
return testData::objectGetDefaultSort();
|
||||||
|
}
|
||||||
|
|
||||||
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "testingId", $bAscending = true)
|
||||||
|
{
|
||||||
|
return $this->oTestData->objectGetEntries($sState, $iRows, $iStart, $sOrderBy, $bAscending);
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetEntriesCount($sState)
|
function objectGetEntriesCount($sState)
|
||||||
|
|||||||
@@ -242,6 +242,11 @@ class Vendor {
|
|||||||
return array('vendorName');
|
return array('vendorName');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function objectGetDefaultSort()
|
||||||
|
{
|
||||||
|
return 'vendorName';
|
||||||
|
}
|
||||||
|
|
||||||
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = 'vendorName', $bAscending = TRUE)
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = 'vendorName', $bAscending = TRUE)
|
||||||
{
|
{
|
||||||
/* Not implemented */
|
/* Not implemented */
|
||||||
|
|||||||
@@ -1544,7 +1544,12 @@ class version {
|
|||||||
return array($aItemsPerPage, $iDefaultPerPage);
|
return array($aItemsPerPage, $iDefaultPerPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "versionId")
|
public static function objectGetDefaultSort()
|
||||||
|
{
|
||||||
|
return 'versionId';
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "versionId", $bAscending = true)
|
||||||
{
|
{
|
||||||
$sLimit = "";
|
$sLimit = "";
|
||||||
|
|
||||||
|
|||||||
@@ -235,10 +235,15 @@ class version_queue
|
|||||||
return $this->oVersion->objectGetEntriesCount($sState);
|
return $this->oVersion->objectGetEntriesCount($sState);
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "versionId")
|
public static function objectGetDefaultSort()
|
||||||
|
{
|
||||||
|
return version::objectGetDefaultSort();
|
||||||
|
}
|
||||||
|
|
||||||
|
function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "versionId", $bAscending = true)
|
||||||
{
|
{
|
||||||
return $this->oVersion->objectGetEntries($sState, $iRows, $iStart,
|
return $this->oVersion->objectGetEntries($sState, $iRows, $iStart,
|
||||||
$sOrderBy);
|
$sOrderBy, $bAscending);
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetHeader()
|
function objectGetHeader()
|
||||||
|
|||||||
Reference in New Issue
Block a user