Verified Commit ae351f2b authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(ldapmanager) Adapt code to core changes

issue #6061
parent 533ee388
......@@ -160,13 +160,17 @@ class ldifManager extends simplePlugin
ERROR_DIALOG);
} else {
$ldap = $config->get_ldap_link();
$data = $ldap->generateLdif($dn, $this->export_filter, $scope);
if ($data === NULL) {
msg_dialog::display(_('Error'),
sprintf(_('Failed to generate ldap export, error was "%s"!'), $ldap->get_error()),
ERROR_DIALOG);
} else {
try {
$data = $ldap->generateLdif($dn, $this->export_filter, $scope);
send_binary_content($data, $name);
} catch (LDIFExportException $e) {
$error = new FusionDirectoryError(
htmlescape(sprintf(
_('Failed to generate ldap export, error was "%s"!'),
$e->getMessage()
))
);
$error->display();
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment