Code

Read contexts only once.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 Oct 2009 13:32:33 +0000 (13:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 Oct 2009 13:32:33 +0000 (13:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14520 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc

index 5d8c6f2b219c9a7e67e7cc4949bbcb4318000109..bf60b36686940807c26697e6650913a036d1619d 100644 (file)
@@ -32,7 +32,9 @@ class phoneAccount extends plugin
   var $goFonHomeServers       = array();        // Contains all available server configurations 
 
   var $context                = "default";
+  var $sip_contexts           = "default";
   var $voice_context          = "default";
+  var $voicemail_contexts     = "default";
 
   /* attribute list for save action */
   var $CopyPasteVars          = array("phoneNumbers","macroarray","macrostillavailable"/*"phoneNumbers" -Reset- */,
@@ -63,6 +65,9 @@ class phoneAccount extends plugin
       }
     }
 
+    $this->sip_contexts = $this->get_asterisk_sip_contexts();
+    $this->voicemail_contexts = $this->get_asterisk_voicemail_contexts();
+
     /* Set parent object to tab object */
     if(is_object($parent)){
       $this->parent = $parent->parent;
@@ -1094,8 +1099,8 @@ class phoneAccount extends plugin
     $smarty->assign("macro", $this->macro);   
 
     /* Assign contexts */
-    $smarty->assign("voicemail_contexts",$this->get_asterisk_voicemail_contexts());
-    $smarty->assign("sip_contexts",$this->get_asterisk_sip_contexts());
+    $smarty->assign("voicemail_contexts",$this->voicemail_contexts);
+    $smarty->assign("sip_contexts",$this->sip_contexts);
     $smarty->assign("context" ,$this->context);
     $smarty->assign("voice_context" ,$this->voice_context);