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");
}
}