Code

Added default winstation ou to avoid errors if not set in config.
[gosa.git] / gosa-core / include / class_config.inc
index 225f647cf34a0fe83e65e542f565c9ec76eacf25..8d839877c5eec731614953a4f46417164195eea7 100644 (file)
@@ -70,6 +70,22 @@ class config  {
   
   function check_and_reload()
   {
+    global $ui;
+
+    /* Check if class_location.inc has changed, this is the case 
+        if we have installed or removed plugins. 
+     */
+    if(session::is_set("class_location.inc:timestamp")){
+      $tmp = stat("../include/class_location.inc");
+      if($tmp['mtime'] != session::get("class_location.inc:timestamp")){
+        session::un_set("plist");
+      }
+    }
+    $tmp = stat("../include/class_location.inc");
+    session::set("class_location.inc:timestamp",$tmp['mtime']);
+
+
+
     if($this->filename != "" && filemtime($this->filename) != $this->last_modified){
 
       $this->config_found= FALSE;
@@ -400,6 +416,7 @@ class config  {
         
         $this->data['SERVERS']['IMAP'][$imap_server]= 
             array( 
+            "server_dn"   => $attrs['dn'],
             "connect"     => $imap_connect,
             "admin"       => $imap_admin,
             "password"    => $pwd,
@@ -760,7 +777,7 @@ class config  {
       }
 
       /* Fix name, if it contains a replace tag */
-      $name= @LDAP::fix($name);
+      $name= preg_replace('/\\\\,/', ',', @LDAP::fix($name));
 
       /* Check if current name is too long, then cut it */
       if(mb_strlen($name, 'UTF-8')> $max_size){