Code

Allow to use conmtexts and some other attrbiutes in macro parameters
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 Apr 2010 15:11:38 +0000 (15:11 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 Apr 2010 15:11:38 +0000 (15:11 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17488 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 7d5ad29e616bb607626b19269d8096ec2ceef2b9..28ea37717eea02c685a1dcee95d34262a9e4c371 100644 (file)
@@ -32,9 +32,9 @@ class phoneAccount extends plugin
   var $goFonHomeServers       = array();        // Contains all available server configurations 
 
   var $context                = "default";
-  var $sip_contexts           = "default";
+  var $sip_contexts           = array();
   var $voice_context          = "default";
-  var $voicemail_contexts     = "default";
+  var $voicemail_contexts     = array();
 
   /* attribute list for save action */
   var $CopyPasteVars          = array("phoneNumbers","macroarray","macrostillavailable"/*"phoneNumbers" -Reset- */,
@@ -1144,6 +1144,9 @@ class phoneAccount extends plugin
           $string = $paras['default'];
 
           $string=preg_replace("/%uid/i",$this->uid,$string);
+          $string=preg_replace("/%pager/i",$this->pager,$string);
+          $string=preg_replace("/%context/i",$this->context,$string);
+          $string=preg_replace("/%voicemailcontext/i",$this->voice_context,$string);
 
           if(isset($this->cn)){
             $string=preg_replace("/%cn/i",$this->cn,$string);