mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 12:08:47 +02:00
N°8796 - Add PHP code style validation in iTop and extensions - format whole code base
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__,
|
||||
'itop-tickets/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Tickets Management',
|
||||
@@ -12,24 +11,24 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-structure/2.7.1',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
'installer' => 'TicketsInstaller',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'main.itop-tickets.php',
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'data.struct' => [
|
||||
// 'data.struct.ta-actions.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
),
|
||||
|
||||
],
|
||||
'data.sample' => [
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
@@ -37,9 +36,9 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
),
|
||||
)
|
||||
'settings' => [
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Module installation handler
|
||||
@@ -52,17 +51,12 @@ class TicketsInstaller extends ModuleInstallerAPI
|
||||
CMDBObject::SetTrackInfo('Uninstallation');
|
||||
$oSearch = new DBObjectSearch('TriggerOnObject');
|
||||
$oSet = new DBObjectSet($oSearch);
|
||||
while($oTrigger = $oSet->Fetch())
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MetaModel::IsValidClass($oTrigger->Get('target_class')))
|
||||
{
|
||||
while ($oTrigger = $oSet->Fetch()) {
|
||||
try {
|
||||
if (!MetaModel::IsValidClass($oTrigger->Get('target_class'))) {
|
||||
$oTrigger->DBDelete();
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
utils::EnrichRaisedException($oTrigger, $e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user