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
049a81ef
Commit
049a81ef
authored
Jan 05, 2016
by
Côme Chilliet
Browse files
Fixes
#4378
handling moving errors better
parent
0030e4f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/class_plugin.inc
View file @
049a81ef
...
...
@@ -1137,8 +1137,7 @@ class plugin
$ldap
->
add
(
$new
);
if
(
!
$ldap
->
success
())
{
trigger_error
(
"Trying to save
$dst_dn
failed."
,
E_USER_WARNING
);
trigger_error
(
'Trying to save '
.
$dst_dn
.
' failed: '
.
$ldap
->
error
(),
E_USER_WARNING
);
return
FALSE
;
}
return
TRUE
;
...
...
@@ -1241,7 +1240,7 @@ class plugin
$ldap
=
$this
->
config
->
get_ldap_link
();
$ldap
->
rmdir_recursive
(
$src_dn
);
if
(
!
$ldap
->
success
())
{
trigger_error
(
"
Trying to delete
$src_dn
failed
."
,
E_USER_WARNING
);
trigger_error
(
'
Trying to delete
'
.
$src_dn
.
'
failed
: '
.
$ldap
->
get_error
()
,
E_USER_WARNING
);
return
FALSE
;
}
}
...
...
include/simpleplugin/class_simpleTabs.inc
View file @
049a81ef
...
...
@@ -89,7 +89,7 @@ class simpleTabs
$data
[]
=
array
(
"CLASS"
=>
'plugin'
,
"NAME"
=>
'Error'
);
msg_dialog
::
display
(
_
(
"Error"
),
sprintf
(
_
(
"No plugin definitions found to initialize '%s', please check your configuration file."
),
get_class
(
$this
)),
"
ERROR_DIALOG
"
);
ERROR_DIALOG
);
}
$baseobject
=
NULL
;
...
...
@@ -399,10 +399,15 @@ class simpleTabs
if
(
$this
->
dn
!=
$new_dn
)
{
/* Write entry on new 'dn' */
if
(
$this
->
dn
!=
'new'
)
{
$baseobject
->
move
(
$this
->
dn
,
$new_dn
);
if
(
$baseobject
->
move
(
$this
->
dn
,
$new_dn
))
{
$this
->
dn
=
$new_dn
;
}
else
{
msg_dialog
::
display
(
_
(
'Error'
),
sprintf
(
_
(
'Move from "%s" to "%s" failed'
),
$this
->
dn
,
$new_dn
),
ERROR_DIALOG
);
}
}
else
{
/* use the new one */
$this
->
dn
=
$new_dn
;
}
/* Happen to use the new one */
$this
->
dn
=
$new_dn
;
}
/* Save all plugins */
...
...
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