When selecting 'Move Child Objects' for versions, only show versions of parent app

This commit is contained in:
Alexander Nicolaysen Sørnes
2009-04-16 00:26:20 +02:00
committed by Alexander Nicolaysen Sørnes
parent 3df5e22800
commit f84c811569
3 changed files with 57 additions and 19 deletions

View File

@@ -1329,16 +1329,25 @@ class Application {
}
public function objectGetChildren($bIncludeDeleted = false)
{
return $this->objectGetChildrenClassSpecific('', $IncludeDeleted);
}
public function objectGetChildrenClassSpecific($sClass = '', $bIncludeDeleted = false)
{
$aChildren = array();
/* Get versions */
foreach($this->getVersions(false, true, $bIncludeDeleted) as $oVersion)
foreach($this->getVersions(false, true, $bIncludeDeleted) as $oVersion)
{
$aChildren += $oVersion->objectGetChildren($bIncludeDeleted);
if($sClass != 'version')
$aChildren += $oVersion->objectGetChildren($bIncludeDeleted);
$aChildren[] = $oVersion;
}
if($sClass == 'version')
return $aChildren;
/* Get urls */
$sQuery = "SELECT * FROM appData WHERE type = '?' AND appId = '?'";
$hResult = query_parameters($sQuery, "url", $this->iAppId);