Skip to content
GitLab
Menu
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
fb140ff0
Commit
fb140ff0
authored
Apr 26, 2017
by
Côme Chilliet
Browse files
Fixes
#5487
Fixed template apply on multiple objects
parent
4a12d993
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/class_template.inc
View file @
fb140ff0
...
...
@@ -193,6 +193,11 @@ class template
* Cannot be called twice! If you need to, call reset between calls */
function
apply
(
$targetdn
=
NULL
)
{
if
(
$this
->
applied
)
{
trigger_error
(
'Templates can’t be applied twice without calling reset before'
);
return
;
}
if
(
$targetdn
!==
NULL
)
{
$this
->
tabObject
=
objects
::
open
(
$targetdn
,
$this
->
type
);
unset
(
$this
->
attrs
[
'objectClass'
][
'count'
]);
...
...
@@ -201,9 +206,6 @@ class template
$this
->
attrs
[
'objectClass'
]
=
$plugin
->
mergeObjectClasses
(
$this
->
attrs
[
'objectClass'
]);
}
}
}
elseif
(
$this
->
applied
)
{
trigger_error
(
'Templates can’t be applied twice without calling reset before'
);
return
;
}
foreach
(
$this
->
tabObject
->
by_object
as
$class
=>
&
$plugin
)
{
...
...
include/simpleplugin/class_simpleManagement.inc
View file @
fb140ff0
...
...
@@ -85,6 +85,7 @@ class templateDialog
function
setNextTarget
(
$target
)
{
$this
->
target
=
$target
;
$this
->
template
->
reset
();
}
function
execute
()
...
...
nobbs
@nobbs
mentioned in issue
#1752 (closed)
·
Sep 02, 2017
mentioned in issue
#1752 (closed)
mentioned in issue #1752
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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