mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Integration of the "bridge" module and new mechanism for auto_select modules.
SVN:trunk[2544]
This commit is contained in:
@@ -15,7 +15,7 @@ SetupWebPage::AddModule(
|
||||
'dependencies' => array(
|
||||
),
|
||||
'mandatory' => false,
|
||||
'visible' => false,
|
||||
'visible' => true, // To prevent auto-install but shall not be listed in the install wizard
|
||||
'auto_select' => 'SetupInfo::ModuleIsSelected("itop-storage-mgmt") && SetupInfo::ModuleIsSelected("itop-virtualization-mgmt")',
|
||||
|
||||
// Components
|
||||
|
||||
@@ -48,7 +48,31 @@
|
||||
<duplicates/>
|
||||
</field>
|
||||
</fields>
|
||||
<methods/>
|
||||
<methods>
|
||||
<method id="GetRelationQueries">
|
||||
<static>true</static>
|
||||
<access>public</access>
|
||||
<type>Overload-DBObject</type>
|
||||
<code><![CDATA[ public static function GetRelationQueries($sRelCode)
|
||||
{
|
||||
switch ($sRelCode)
|
||||
{
|
||||
case 'depends on':
|
||||
$aRels = array(
|
||||
);
|
||||
if (class_exists('LogicalVolume'))
|
||||
{
|
||||
$aRels["logicalvolume"] = array("sQuery"=>"SELECT LogicalVolume AS lv JOIN lnkVirtualDeviceToVolume AS l1 ON l1.volume_id=lv.id WHERE l1.virtualdevice_id = :this->id", "bPropagate"=>true, "iDistance"=>5);
|
||||
}
|
||||
return array_merge($aRels, parent::GetRelationQueries($sRelCode));
|
||||
break;
|
||||
|
||||
default:
|
||||
return parent::GetRelationQueries($sRelCode);
|
||||
}
|
||||
}]]></code>
|
||||
</method>
|
||||
</methods>
|
||||
<presentation>
|
||||
<details>
|
||||
<items>
|
||||
@@ -174,16 +198,6 @@
|
||||
return array_merge($aRels, parent::GetRelationQueries($sRelCode));
|
||||
break;
|
||||
|
||||
case 'depends on':
|
||||
$aRels = array(
|
||||
);
|
||||
if (class_exists('LogicalVolume'))
|
||||
{
|
||||
$aRels["logicalvolume"] = array("sQuery"=>"SELECT LogicalVolume AS lv JOIN lnkVirtualDeviceToVolume AS l1 ON l1.volume_id=lv.id WHERE l1.virtualdevice_id = :this->id", "bPropagate"=>true, "iDistance"=>5);
|
||||
}
|
||||
return array_merge($aRels, parent::GetRelationQueries($sRelCode));
|
||||
break;
|
||||
|
||||
default:
|
||||
return parent::GetRelationQueries($sRelCode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user