index 9e37537908a55f50b88926496d340188a1009eb3..2b97322a69201a1ddd57eaeb527dc309d720ebc3 100644 (file)
xml_set_object($this->parser, $this);
xml_set_element_handler($this->parser, "tag_open", "tag_close");
$this->parse($this->filename);
- if(isset($_SESSION['plist'])){
- unset($_SESSION['plist']);
+ if(session::is_set('plist')){
+ session::un_set('plist');
}
- if(isset($_SESSION['plug'])){
- unset($_SESSION['plug']);
+ if(session::is_set('plug')){
+ session::un_set('plug');
}
if(isset($_GET['plug'])){
unset($_GET['plug']);
/* 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();
}
- if (!isset($_SESSION['size_limit'])){
- $_SESSION['size_limit']= $this->current['SIZELIMIT'];
- $_SESSION['size_ignore']= $this->current['SIZEIGNORE'];
+ if (!session::is_set('size_limit')){
+ session::set('size_limit',$this->current['SIZELIMIT']);
+ session::set('size_ignore',$this->current['SIZEIGNORE']);
}
if ($sizelimit){
- $this->ldap->set_size_limit($_SESSION['size_limit']);
+ $this->ldap->set_size_limit(session::get('size_limit'));
} else {
$this->ldap->set_size_limit(0);
}
}
if (isset($this->current['INITIAL_BASE'])){
- $_SESSION['CurrentMainBase']= $this->current['INITIAL_BASE'];
+ session::set('CurrentMainBase',$this->current['INITIAL_BASE']);
}
/* Remove possibly added ',' from end of group and people ou */
/* Load Terminalservers */
$ldap->cd ($this->current['BASE']);
- $ldap->search ("(objectClass=goTerminalServer)");
+ $ldap->search ("(objectClass=goTerminalServer)",array("cn","gotoSessionType"));
$this->data['SERVERS']['TERMINAL']= array();
$this->data['SERVERS']['TERMINAL'][]= "default";
+ $this->data['SERVERS']['TERMINAL_SESSION_TYPES'] = array();
+
- $this->data['SERVERS']['FONT']= array();
- $this->data['SERVERS']['FONT'][]= "default";
while ($attrs= $ldap->fetch()){
$this->data['SERVERS']['TERMINAL'][]= $attrs["cn"][0];
- for ($i= 0; $i<$attrs["goFontPath"]["count"]; $i++){
- $this->data['SERVERS']['FONT'][]= $attrs["goFontPath"][$i];
+ if(isset( $attrs["gotoSessionType"]['count'])){
+ for($i =0 ; $i < $attrs["gotoSessionType"]['count'] ; $i++){
+ $this->data['SERVERS']['TERMINAL_SESSION_TYPES'][$attrs["cn"][0]][] = $attrs["gotoSessionType"][$i];
+ }
}
}
$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;
}
}