summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0ed162e)
raw | patch | inline | side by side (parent: 0ed162e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Oct 2010 08:55:45 +0000 (08:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Oct 2010 08:55:45 +0000 (08:55 +0000) |
-Once the generateLdif method failed, we just received an empty file.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@20095 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@20095 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc | patch | blob | history |
diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc
index 466ff2239996e54111cc6c89eac10152d5b3e66c..8f1262b40bc3c2ddc36f978fbcbb2a5de510d405 100644 (file)
}
if(!empty($dn)){
+
// Check permissions before sending the output
if(!preg_match("/r/",$acls)){
msg_dialog::display(_("Permission error"),
sprintf(_("You have no permission to export %s!"), bold(LDAP::fix($dn))),
ERROR_DIALOG);
}else{
- $data = $ldap->generateLdif(LDAP::fix($dn), 'objectClass=*',array(),$scope);
- send_binary_content($data,$name);
+ $data = $ldap->generateLdif(LDAP::fix($dn), 'objectClass=*',array(),$scope, $limit=0);
+ if($data === NULL){
+ msg_dialog::display(_("Error"),
+ sprintf(_("Failed to generate ldap export, error was '%s'!"), $ldap->get_error()),
+ ERROR_DIALOG);
+ }else{
+ send_binary_content($data,$name);
+ }
}
}