Code

Voicemail wasn't updated to current settings (fullname)
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 Aug 2005 06:31:18 +0000 (06:31 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 Aug 2005 06:31:18 +0000 (06:31 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1268 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/phoneaccount/class_phoneAccount.inc

index dde34df58f5d077ba39a2da6e836dd36c39cfcec..534de790f8e9c42588426b5209bd56a30987affc 100644 (file)
@@ -207,6 +207,10 @@ class phoneAccount extends plugin
     $this->hardware_list["automatic"]= _("automatic");
     ksort($this->hardware_list);
     $this->a_old_telenums = $this->phoneNumbers;
+
+    if($this->is_account){
+      $this->is_modified = true;
+    }
   }
 
 
@@ -406,6 +410,15 @@ class phoneAccount extends plugin
         $this->goFonPINVoice = $this->goFonPIN;
       } 
 
+      /* If deletion starts from userslist, cn uid are not set */
+      if((isset($this->parent->by_object['user']->uid))&&(!empty($this->parent->by_object['user']->uid))){
+        $this->uid = $this->parent->by_object['user']->uid;
+      }
+
+      if((isset($this->parent->by_object['user']->cn))&&(!empty($this->parent->by_object['user']->cn))){
+        $this->cn  = $this->parent->by_object['user']->cn;
+      }
+
       if((!isset($this->cn))||(empty($this->cn))){
         $CNname= $this->uid;
       }else{
@@ -553,7 +566,10 @@ class phoneAccount extends plugin
           $string = $paras['default'];
 
           $string=preg_replace("/%uid/i",$this->uid,$string);
-          $string=preg_replace("/%cn/i",$this->cn,$string);
+          
+          if(isset($this->cn)){
+            $string=preg_replace("/%cn/i",$this->cn,$string);
+          }
 
           for($i = 0 ; $i < 10; $i++){
             if(isset($tmp[$i])){