downloadurl: Fix moving to a new version
This commit is contained in:
@@ -71,8 +71,10 @@ class downloadurl
|
|||||||
|
|
||||||
public function objectSetParent($iNewId, $sClass = '')
|
public function objectSetParent($iNewId, $sClass = '')
|
||||||
{
|
{
|
||||||
$oAppData = new appData($this->iId, null, $this);
|
if($this->iVersionId)
|
||||||
return $oAppData->objectSetParent($iNewId, $sClass);
|
$this->iVersionId = $iNewId;
|
||||||
|
else
|
||||||
|
$this->iAppId = $iNewId;
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetChildren($bIncludeDeleted = false)
|
function objectGetChildren($bIncludeDeleted = false)
|
||||||
@@ -365,8 +367,8 @@ class downloadurl
|
|||||||
}
|
}
|
||||||
|
|
||||||
$hResult = query_parameters("UPDATE appData SET
|
$hResult = query_parameters("UPDATE appData SET
|
||||||
description = '?', url = '?' WHERE id = '?'",
|
description = '?', url = '?', versionId = '?' WHERE id = '?'",
|
||||||
$this->sDescription, $this->sUrl, $this->iId);
|
$this->sDescription, $this->sUrl, $this->iVersionId, $this->iId);
|
||||||
|
|
||||||
if(!$hResult)
|
if(!$hResult)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
Reference in New Issue
Block a user