Code

Set pager number for voicemail table
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Jan 2007 04:17:11 +0000 (04:17 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Jan 2007 04:17:11 +0000 (04:17 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5496 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/phoneaccount/class_phoneAccount.inc

index 56347c7032c1533f3b9b7ec08f93b2cda2585ab3..7b1d6517b72f08a98e9c50af434c5b90fcfbe167 100644 (file)
@@ -610,6 +610,11 @@ class phoneAccount extends plugin
           "fullname"    => $CNname,
           "email"       => $s_mail);
 
+      /* Set pager number if available */
+      if(isset($this->parent->by_object['user']->pager)){
+        $voice_data_array['pager']   = $this->parent->by_object['user']->pager;
+      }
+
       /* Check if there is already an entry in sip_users for this uid */
       $rid = mysql_query("SELECT * FROM ".$a_New['VOICE_TABLE']." WHERE customer_id='".$customer_id."';\n",$new_connection);
       if(mysql_affected_rows($new_connection)){
@@ -641,7 +646,6 @@ class phoneAccount extends plugin
          * Insert Voice mail entry  
          **********************/
         $voice_data_array['context'] = "default";
-        $voice_data_array['pager']   = "";
   
         /* There is currently no voice mail entry for this user. 
          * We should create one