mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 03:58:45 +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__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-config-mgmt/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Configuration Management (CMDB)',
|
||||
@@ -12,25 +11,25 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-structure/2.7.1',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
'installer' => 'ConfigMgmtInstaller',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'model.itop-config-mgmt.php',
|
||||
'main.itop-config-mgmt.php',
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'data.struct' => [
|
||||
'data/en_us.data.itop-brand.xml',
|
||||
'data/en_us.data.itop-osfamily.xml',
|
||||
'data/en_us.data.itop-osversion.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
'data.sample.model.xml',
|
||||
'data.sample.networkdevicetype.xml',
|
||||
'data.sample.servers.xml',
|
||||
@@ -42,8 +41,8 @@ SetupWebPage::AddModule(
|
||||
'data.sample.webapp.xml',
|
||||
'data.sample.applications.xml',
|
||||
'data.sample.applicationsolutionci.xml',
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
@@ -51,13 +50,12 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
),
|
||||
)
|
||||
'settings' => [
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
if (!class_exists('ConfigMgmtInstaller'))
|
||||
{
|
||||
if (!class_exists('ConfigMgmtInstaller')) {
|
||||
// Module installation handler
|
||||
//
|
||||
class ConfigMgmtInstaller extends ModuleInstallerAPI
|
||||
@@ -76,8 +74,7 @@ if (!class_exists('ConfigMgmtInstaller'))
|
||||
*/
|
||||
public static function BeforeDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
||||
{
|
||||
if (strlen($sPreviousVersion) > 0)
|
||||
{
|
||||
if (strlen($sPreviousVersion) > 0) {
|
||||
// If you want to migrate data from one format to another, do it here
|
||||
self::RenameEnumValueInDB('Software', 'type', 'DBserver', 'DBServer');
|
||||
self::RenameEnumValueInDB('Software', 'type', 'Webserver', 'WebServer');
|
||||
@@ -95,7 +92,7 @@ if (!class_exists('ConfigMgmtInstaller'))
|
||||
self::RenameClassInDB('IPinterface', 'IPInterface');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handler called after the creation/update of the database schema
|
||||
* @param $oConfiguration Config The new configuration of the application
|
||||
|
||||
Reference in New Issue
Block a user