Code

Fixed ldap error if new created conference was created without pin
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 15 Sep 2005 08:36:53 +0000 (08:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 15 Sep 2005 08:36:53 +0000 (08:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1372 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/conference/class_phoneConferenceGeneric.inc

index 783649b22c41b88f0953bf27c8d0658445715f22..4a79d946fd8fe8c0e3e1cb36c107c75cf44ae1d2 100644 (file)
@@ -403,13 +403,24 @@ class conference extends plugin
   /* Save to LDAP */
   function save()
   {
+
+    if((!isset($this->attrs['goFonPIN']))){
+      $pin_use = false;
+    }else{
+      $pin_use = true;
+    }
+
     plugin::save();
 
     $this->SQL_remove_me(true);
     $this->SQL_add_me(true);
 
     if(empty($this->goFonConferenceOption_P)){
-      $this->attrs['goFonPIN']=array();
+      if($pin_use){
+        $this->attrs['goFonPIN']=array();
+      }else{
+        unset($this->attrs['goFonPIN']);
+      }
     }
     $this->attrs['goFonConferenceOption']="";
     foreach(array("goFonConferenceOption_P","goFonConferenceOption_r","goFonConferenceOption_M","goFonConferenceOption_s",