mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 05:58:46 +02:00
Previous commit : 24eb82d1
Use \CMDBObject::SetTrackInfo
Move \CMDBObject::SetCurrentChange calls at the top most level of the stacks
Restore old behaviors that were removed in previous commit
65 lines
1.2 KiB
PHP
Executable File
65 lines
1.2 KiB
PHP
Executable File
<?php
|
|
|
|
|
|
SetupWebPage::AddModule(
|
|
__FILE__,
|
|
'itop-tickets/2.6.2',
|
|
array(
|
|
// Identification
|
|
//
|
|
'label' => 'Tickets Management',
|
|
'category' => 'business',
|
|
|
|
// Setup
|
|
//
|
|
'dependencies' => array(
|
|
'itop-config-mgmt/2.4.0',
|
|
),
|
|
'mandatory' => true,
|
|
'visible' => false,
|
|
'installer' => 'TicketsInstaller',
|
|
|
|
// Components
|
|
//
|
|
'datamodel' => array(
|
|
'main.itop-tickets.php',
|
|
'model.itop-tickets.php',
|
|
),
|
|
'data.struct' => array(
|
|
// 'data.struct.ta-actions.xml',
|
|
),
|
|
'data.sample' => array(
|
|
),
|
|
|
|
// Documentation
|
|
//
|
|
'doc.manual_setup' => '/documentation/itop-tickets.htm',
|
|
'doc.more_information' => '',
|
|
|
|
// Default settings
|
|
//
|
|
'settings' => array(
|
|
),
|
|
)
|
|
);
|
|
|
|
// Module installation handler
|
|
//
|
|
class TicketsInstaller extends ModuleInstallerAPI
|
|
{
|
|
public static function AfterDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
|
{
|
|
// Delete all Triggers corresponding to a no more valid class
|
|
CMDBObject::SetTrackInfo('Uninstallation');
|
|
$oSearch = new DBObjectSearch('TriggerOnObject');
|
|
$oSet = new DBObjectSet($oSearch);
|
|
while($oTrigger = $oSet->Fetch())
|
|
{
|
|
if (!MetaModel::IsValidClass($oTrigger->Get('target_class')))
|
|
{
|
|
$oTrigger->DBDelete();
|
|
}
|
|
}
|
|
}
|
|
}
|