Works on capability to hook a thirdparty module.
This commit is contained in:
parent
f149c1044f
commit
db0f278702
@ -1411,24 +1411,26 @@ if ($id > 0 || ! empty($ref))
|
|||||||
*/
|
*/
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
// Milestone module
|
// Hook of thirdparty module
|
||||||
if ($conf->milestone->enabled)
|
if (! empty($hooks->objModules))
|
||||||
{
|
{
|
||||||
$lines = $propal->getLinesArray(1);
|
foreach($hooks->objModules as $module)
|
||||||
|
|
||||||
$milestone = new Milestone($db);
|
|
||||||
$milestone->getObjectMilestones($propal);
|
|
||||||
$sublines = $propal->getLinesArray(2);
|
|
||||||
|
|
||||||
if (! empty($milestone->lines))
|
|
||||||
{
|
{
|
||||||
print_title_list();
|
$lines = $propal->getLinesArray(1);
|
||||||
print_milestone_list($milestone, $sublines, $propal, $lines);
|
|
||||||
}
|
$module->getObjectList($propal);
|
||||||
else if (! empty($lines) )
|
$sublines = $propal->getLinesArray(2);
|
||||||
{
|
|
||||||
print_title_list();
|
if (! empty($module->lines))
|
||||||
print_lines_list($propal, $lines);
|
{
|
||||||
|
print_title_list();
|
||||||
|
$module->printObjectList($module, $sublines, $propal, $lines);
|
||||||
|
}
|
||||||
|
else if (! empty($lines) )
|
||||||
|
{
|
||||||
|
print_title_list();
|
||||||
|
print_lines_list($propal, $lines);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1461,11 +1463,14 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$propal->showAddPredefinedProductForm();
|
$propal->showAddPredefinedProductForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add hook of other modules
|
// Hook of thirdparty module
|
||||||
if ($conf->milestone->enabled)
|
if (! empty($hooks->objModules))
|
||||||
{
|
{
|
||||||
$var=!$var;
|
foreach($hooks->objModules as $module)
|
||||||
formAddMilestone($propal);
|
{
|
||||||
|
$var=!$var;
|
||||||
|
$module->formAddObject($propal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1161,10 +1161,12 @@ class CommonObject
|
|||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/'.$module.'/class/'.$module.'.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/'.$module.'/class/'.$module.'.class.php');
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (file_exists(DOL_DOCUMENT_ROOT.'/'.$module.'/lib/'.$module.'.lib.php'))
|
if (file_exists(DOL_DOCUMENT_ROOT.'/'.$module.'/lib/'.$module.'.lib.php'))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/'.$module.'/lib/'.$module.'.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/'.$module.'/lib/'.$module.'.lib.php');
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
$classname = ucfirst($module);
|
$classname = ucfirst($module);
|
||||||
$this->objModules[] = new $classname($this->db);
|
$this->objModules[] = new $classname($this->db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user