index ea33f2c39705b1f509607bd12a75cb17c925c097..bf5d0ab755b01c9744661b661355bc50f4177e63 100644 (file)
/* Check for connection */
if (is_null($this->ldap) || (is_int($this->ldap) && $this->ldap == 0)){
$smarty= get_smarty();
- print_red (_("Can't bind to LDAP. Please contact the system administrator."));
+ msg_dialog::display(_("LDAP error"), _("Can't bind to LDAP. Please contact the system administrator."), ERROR_DIALOG);
display_error_page();
}
$ldap->cd ($this->current['BASE']);
$ldap->search ("(objectClass=sambaDomain)");
while ($attrs= $ldap->fetch()){
- $this->data['SERVERS']['SAMBA'][$attrs['sambaDomainName'][0]]= array(
- "SID" => $attrs["sambaSID"][0],
- "RIDBASE" => $attrs["sambaAlgorithmicRidBase"][0]);
+ $this->data['SERVERS']['SAMBA'][$attrs['sambaDomainName'][0]]= array( "SID" =>"","RIDBASE" =>"");
+ if(isset($attrs["sambaSID"][0])){
+ $this->data['SERVERS']['SAMBA'][$attrs['sambaDomainName'][0]]["SID"] = $attrs["sambaSID"][0];
+ }
+ if(isset($attrs["sambaAlgorithmicRidBase"][0])){
+ $this->data['SERVERS']['SAMBA'][$attrs['sambaDomainName'][0]]["RIDBASE"] = $attrs["sambaAlgorithmicRidBase"][0];
+ }
}
/* If no samba servers are found, look for configured sid/ridbase */
if (count($this->data['SERVERS']['SAMBA']) == 0){
if (!isset($this->current["SID"]) || !isset($this->current["RIDBASE"])){
- print_red(_("SID and/or RIDBASE missing in your configuration!"));
+ msg_dialog::display(_("Configuration error"), _("SID and/or RIDBASE missing in the configuration!"), ERROR_DIALOG);
display_error_page();
} else {
$this->data['SERVERS']['SAMBA']['DEFAULT']= array(
if (isset($config->current['STRICT_UNITS']) && preg_match('/true/i', $config->current['STRICT_UNITS'])){
if ($ui->gosaUnitTag != "" && isset($this->tdepartments[$val]) &&
$this->tdepartments[$val] != $ui->gosaUnitTag){
- continue;
+# continue;
}
}