Setup based on either compiled modules or xml datamodel files (or both).

SetupWebPage is an alias for ModuleDiscovery and the module files should be updated progressively to invoke ModuleDiscovery::AddModule() instead.
The implementation of the module still assumes they are in the directory 'modules'... this has to be changed later to ensure the distinction between the source modules and the executed modules

SVN:trunk[1758]
This commit is contained in:
Romain Quetiez
2012-01-11 15:04:15 +00:00
parent f29d673ffb
commit 6a9ea25b27
18 changed files with 447 additions and 450 deletions

View File

@@ -98,12 +98,12 @@ class AttachmentInstaller extends ModuleInstallerAPI
// get the org_id from the container object
//
// Prerequisite: change null into 0 (workaround to the fact that we cannot use IS NULL in OQL)
SetupWebPage::log_info("Initializing attachment/item_org_id - null to zero");
SetupPage::log_info("Initializing attachment/item_org_id - null to zero");
$sTableName = MetaModel::DBGetTable('Attachment');
$sRepair = "UPDATE `$sTableName` SET `item_org_id` = 0 WHERE `item_org_id` IS NULL";
CMDBSource::Query($sRepair);
SetupWebPage::log_info("Initializing attachment/item_org_id - zero to the container");
SetupPage::log_info("Initializing attachment/item_org_id - zero to the container");
$oSearch = DBObjectSearch::FromOQL("SELECT Attachment WHERE item_org_id = 0");
$oSet = new DBObjectSet($oSearch);
$iUpdated = 0;
@@ -117,7 +117,7 @@ class AttachmentInstaller extends ModuleInstallerAPI
}
}
SetupWebPage::log_info("Initializing attachment/item_org_id - $iUpdated records have been adjusted");
SetupPage::log_info("Initializing attachment/item_org_id - $iUpdated records have been adjusted");
}
}

View File

@@ -85,7 +85,7 @@ class ChangeManagementInstaller extends ModuleInstallerAPI
if (CMDBSource::IsField($sSourceTable, $sField) && CMDBSource::IsField($sTargetTable, $sField) && CMDBSource::IsField($sSourceTable, $sSourceKeyField) && CMDBSource::IsField($sTargetTable, $sTargetKeyField))
{
SetupWebPage::log_info("Issue #464 - Copying change/start_date into ticket/start_date");
SetupPage::log_info("Issue #464 - Copying change/start_date into ticket/start_date");
$sRepair = "UPDATE `$sTargetTable`, `$sSourceTable` SET `$sTargetTable`.`$sField` = `$sSourceTable`.`$sField` WHERE `$sTargetTable`.`$sField` IS NULL AND`$sTargetTable`.`$sTargetKeyField` = `$sSourceTable`.`$sSourceKeyField`";
CMDBSource::Query($sRepair);
}

View File

@@ -1599,14 +1599,6 @@ class lnkProcessToSolution extends cmdbAbstractObject
// Create the top-level group. fRank = 1, means it will be inserted after the group '0', which is usually 'Welcome'
// Note (RQ) :
// After 1.0.1, the welcome page and menus have been removed from the application
// and put into a separate module "itop-welcome-itil"
// Until we develop a migration utility, and as would like to preserve the
// capability to upgrade iTop without any manual operation, we have decided to
// implement this dirty workaround that makes it...
require_once(APPROOT.'modules/itop-welcome-itil/model.itop-welcome-itil.php');
// Starting with iTop 1.2 you can restrict the list of organizations displayed in the drop-down list
// by specifying a query as shown below. Note that this is NOT a security settings, since the
// choice 'All Organizations' will always be available in the menu