Module: appdb Branch: master Commit: a2cedc2edcf178e18053f690df685ff37450ba88 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=a2cedc2edcf178e18053f690d...
Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Thu Jul 23 15:31:11 2009 +0200
downloadurl: Fix moving to a new version
---
include/downloadurl.php | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/include/downloadurl.php b/include/downloadurl.php index 152fbc4..9883fc0 100644 --- a/include/downloadurl.php +++ b/include/downloadurl.php @@ -71,8 +71,10 @@ class downloadurl
public function objectSetParent($iNewId, $sClass = '') { - $oAppData = new appData($this->iId, null, $this); - return $oAppData->objectSetParent($iNewId, $sClass); + if($this->iVersionId) + $this->iVersionId = $iNewId; + else + $this->iAppId = $iNewId; }
function objectGetChildren($bIncludeDeleted = false) @@ -365,8 +367,8 @@ class downloadurl }
$hResult = query_parameters("UPDATE appData SET - description = '?', url = '?' WHERE id = '?'", - $this->sDescription, $this->sUrl, $this->iId); + description = '?', url = '?', versionId = '?' WHERE id = '?'", + $this->sDescription, $this->sUrl, $this->iVersionId, $this->iId);
if(!$hResult) return FALSE;