Allow appData constructor to import appData derived objects
This commit is contained in:
committed by
WineHQ
parent
7e4a084fd3
commit
fc6e645d1a
@@ -15,11 +15,25 @@ class appData
|
||||
var $sSubmitTime;
|
||||
var $sDescription;
|
||||
|
||||
function appData($iId = null, $oRow = null)
|
||||
function appData($iId = null, $oRow = null, $oObject = null)
|
||||
{
|
||||
if(!$iId && !$oRow)
|
||||
return;
|
||||
|
||||
/* Since all objects stored in the appData table have a number of common
|
||||
members, we can import such an object into an appData one without
|
||||
making an SQL query */
|
||||
if($oObject && $iId)
|
||||
{
|
||||
$this->iSubmitterId = $oObject->iSubmitterId;
|
||||
$this->sDescription = $oObject->sDescription;
|
||||
$this->iAppId = $oObject->iAppId;
|
||||
$this->iVersionId = $oObject->iVersionId;
|
||||
$this->sSubmitTime = $oObject->sSubmitTime;
|
||||
$this->iId = $iId;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!$oRow)
|
||||
{
|
||||
$hResult = query_parameters("SELECT * FROM appData WHERE id = '?'", $iId);
|
||||
|
||||
Reference in New Issue
Block a user