Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
3ef6dbfa
Commit
3ef6dbfa
authored
Aug 25, 2014
by
Côme Bernigaud
Committed by
Benoit Mortier
Aug 25, 2014
Browse files
Fixes
#3290
Fixed hook placeholder from other tabs
parent
29ed642a
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/class_plugin.inc
View file @
3ef6dbfa
...
...
@@ -1510,25 +1510,19 @@ class plugin
$addAttrs
[
'dn'
]
=
$plugin
->
dn
;
$addAttrs
[
'location'
]
=
$config
->
current
[
'NAME'
];
$command
=
self
::
tpl_parse_string
(
$command
,
$addAttrs
);
// If there are still some %.. in our command, try to fill these with some other tab vars
if
(
preg_match
(
"/%/"
,
$command
))
{
$addAttrs
=
array
();
if
(
isset
(
$plugin
->
parent
->
by_object
))
{
foreach
(
$plugin
->
parent
->
by_object
as
$object
)
{
foreach
(
$object
->
attributes
as
$attr
)
{
if
(
!
isset
(
$addAttrs
[
$attr
]))
{
$addAttrs
[
$attr
]
=
$object
->
$attr
;
}
if
(
isset
(
$plugin
->
parent
->
by_object
))
{
foreach
(
$plugin
->
parent
->
by_object
as
$object
)
{
foreach
(
$object
->
attributes
as
$attr
)
{
if
(
!
isset
(
$addAttrs
[
$attr
]))
{
$addAttrs
[
$attr
]
=
$object
->
$attr
;
}
}
}
$command
=
self
::
tpl_parse_string
(
$command
,
$addAttrs
);
}
// If there are still some %.. in our command, try to fill these with some other class vars
$command
=
self
::
tpl_parse_string
(
$command
,
$addAttrs
);
// If there are still some %.. in our command, try to fill these with some other class vars (FIXME: useless)
if
(
preg_match
(
"/%/"
,
$command
))
{
$addAttrs
=
array
();
$attrs
=
get_object_vars
(
$plugin
);
...
...
agallavardin
@agallavardin
mentioned in issue #1102
·
Sep 02, 2017
mentioned in issue #1102
mentioned in issue #1102
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment