Skip to content
Snippets Groups Projects
Commit db0f2787 authored by Regis Houssin's avatar Regis Houssin
Browse files

Works on capability to hook a thirdparty module.

parent f149c104
Branches
Tags
No related merge requests found
......@@ -1411,19 +1411,20 @@ if ($id > 0 || ! empty($ref))
*/
print '<table class="noborder" width="100%">';
// Milestone module
if ($conf->milestone->enabled)
// Hook of thirdparty module
if (! empty($hooks->objModules))
{
foreach($hooks->objModules as $module)
{
$lines = $propal->getLinesArray(1);
$milestone = new Milestone($db);
$milestone->getObjectMilestones($propal);
$module->getObjectList($propal);
$sublines = $propal->getLinesArray(2);
if (! empty($milestone->lines))
if (! empty($module->lines))
{
print_title_list();
print_milestone_list($milestone, $sublines, $propal, $lines);
$module->printObjectList($module, $sublines, $propal, $lines);
}
else if (! empty($lines) )
{
......@@ -1431,6 +1432,7 @@ if ($id > 0 || ! empty($ref))
print_lines_list($propal, $lines);
}
}
}
else
{
$lines = $propal->getLinesArray(0);
......@@ -1461,11 +1463,14 @@ if ($id > 0 || ! empty($ref))
$propal->showAddPredefinedProductForm();
}
// Add hook of other modules
if ($conf->milestone->enabled)
// Hook of thirdparty module
if (! empty($hooks->objModules))
{
foreach($hooks->objModules as $module)
{
$var=!$var;
formAddMilestone($propal);
$module->formAddObject($propal);
}
}
}
}
......
......@@ -1161,10 +1161,12 @@ class CommonObject
{
require_once(DOL_DOCUMENT_ROOT.'/'.$module.'/class/'.$module.'.class.php');
}
/*
if (file_exists(DOL_DOCUMENT_ROOT.'/'.$module.'/lib/'.$module.'.lib.php'))
{
require_once(DOL_DOCUMENT_ROOT.'/'.$module.'/lib/'.$module.'.lib.php');
}
*/
$classname = ucfirst($module);
$this->objModules[] = new $classname($this->db);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment