url: Fix moving to a new version
This commit is contained in:
@@ -138,6 +138,10 @@ class Url {
|
|||||||
if(!$this->iUrlId)
|
if(!$this->iUrlId)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
$oUrl = new url($this->iUrlId);
|
||||||
|
|
||||||
|
if($this->iVersionId && !$iVersionId)
|
||||||
|
$iVersionId = $this->iVersionId;
|
||||||
|
|
||||||
$sWhatChanged = "";
|
$sWhatChanged = "";
|
||||||
|
|
||||||
@@ -159,7 +163,7 @@ class Url {
|
|||||||
$this->sUrl = $sUrl;
|
$this->sUrl = $sUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($iVersionId && $iVersionId!=$this->iVersionId)
|
if ($iVersionId && $iVersionId!=$oUrl->iVersionId)
|
||||||
{
|
{
|
||||||
if (!query_parameters("UPDATE appData SET versionId = '?' WHERE id = '?'",
|
if (!query_parameters("UPDATE appData SET versionId = '?' WHERE id = '?'",
|
||||||
$iVersionId, $this->iUrlId))
|
$iVersionId, $this->iUrlId))
|
||||||
@@ -519,8 +523,10 @@ class Url {
|
|||||||
|
|
||||||
public function objectSetParent($iNewId, $sClass = '')
|
public function objectSetParent($iNewId, $sClass = '')
|
||||||
{
|
{
|
||||||
$oAppData = new appData($this->iUrlId, 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)
|
||||||
|
|||||||
Reference in New Issue
Block a user