index 489f3954e1adbd2ebe3c9d45f75087d2c53905ad..642908017b553e236a8ca00710cc2dc60961ec5f 100644 (file)
/* Bail out, if we've nothing to do... */
if ($ocname == ""){
- msg_dialog::display(_("Internal error"), sprintf(_("Cannot automatically create subtrees with RDN '%s': no object class found"),$type), ERROR_DIALOG);
- display_error_page();
+ msg_dialog::display(_("Internal error"), sprintf(_("Cannot automatically create subtrees with RDN '%s': no object class found"),$type), FATAL_ERROR_DIALOG);
+ exit();
}
/* Assemble_entry */
$na["dc"]= $param;
break;
default:
- msg_dialog::display(_("Internal error"), sprintf(_("Cannot automatically create subtrees with RDN '%s': not supported"),$type), ERROR_DIALOG);
- display_error_page();
+ msg_dialog::display(_("Internal error"), sprintf(_("Cannot automatically create subtrees with RDN '%s': not supported"),$type), FATAL_ERROR_DIALOG);
+ exit();
}
}
return($objectclasses);
}
}
+
+ /* Return the cached results. */
+ if(class_available('session') && session::is_set("LDAP_CACHE::get_objectclasses")){
+ $objectclasses = session::get("LDAP_CACHE::get_objectclasses");
+ return($objectclasses);
+ }
# Get base to look for schema
$sr = @ldap_read ($this->cid, NULL, "objectClass=*", array("subschemaSubentry"));
}
}
+ if(class_available("session")){
+ session::set("LDAP_CACHE::get_objectclasses",$objectclasses);
+ }
return $objectclasses;
}