Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
db0f2787
Commit
db0f2787
authored
14 years ago
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Works on capability to hook a thirdparty module.
parent
f149c104
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/comm/propal.php
+25
-20
25 additions, 20 deletions
htdocs/comm/propal.php
htdocs/core/class/commonobject.class.php
+2
-0
2 additions, 0 deletions
htdocs/core/class/commonobject.class.php
with
27 additions
and
20 deletions
htdocs/comm/propal.php
+
25
−
20
View file @
db0f2787
...
...
@@ -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
(
$m
ileston
e
->
lines
))
if
(
!
empty
(
$m
odul
e
->
lines
))
{
print_title_list
();
print_milestone_list
(
$mileston
e
,
$sublines
,
$propal
,
$lines
);
$module
->
printObjectList
(
$modul
e
,
$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
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/core/class/commonobject.class.php
+
2
−
0
View file @
db0f2787
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment