summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ae1a200)
raw | patch | inline | side by side (parent: ae1a200)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 13 May 2008 12:28:36 +0000 (12:28 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 13 May 2008 12:28:36 +0000 (12:28 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10881 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history | |
gosa-plugins/gofon/gofon/phoneaccount/generic.tpl | patch | blob | history |
diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc
index e665c36c0a7b7808b5c0c8c8c6ab24ad1450a2ef..e89cc3f69990200f63b8c687d6ca1ac980e741d0 100644 (file)
var $goFonHomeServers = array(); // Contains all available server configurations
var $context = "default";
+ var $voice_context = "default";
/* attribute list for save action */
var $CopyPasteVars = array("phoneNumbers","macroarray","macrostillavailable"/*"phoneNumbers" -Reset- */,
if($r_con){
$r_db = @mysql_select_db($cur_cfg['DB'],$r_con);
- $query_tmp = "SELECT ".$cur_cfg['SIP_TABLE'].".context,".$cur_cfg['VOICE_TABLE'].".password FROM ".$cur_cfg['VOICE_TABLE'].", ".
- $cur_cfg['SIP_TABLE']." WHERE customer_id = sip_users.mailbox AND name='".$this->uid."'";
+ $query_tmp = "SELECT ".$cur_cfg['VOICE_TABLE'].".context as 'v_context',
+ ".$cur_cfg['SIP_TABLE'].".context,
+ ".$cur_cfg['VOICE_TABLE'].".password
+ FROM ".$cur_cfg['VOICE_TABLE'].",
+ ".$cur_cfg['SIP_TABLE']."
+ WHERE customer_id = sip_users.mailbox AND name='".$this->uid."'";
+
$res = mysql_query($query_tmp);
$vp = mysql_fetch_assoc($res);
+
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query_tmp, "Database query");
if((isset($vp['password']))&&(!empty($vp['password']))){
$this->goFonPINVoice = $vp['password'];
if((isset($vp['context']))&&(!empty($vp['context']))){
$this->context = $vp['context'];
}
+ if((isset($vp['v_context']))&&(!empty($vp['v_context']))){
+ $this->voice_context = $vp['v_context'];
+ }
}
}
$this->lastmacro=$this->macro;
"mailbox" => $customer_id,
"password" => $this->goFonVoicemailPIN,
"fullname" => $CNname,
+ "context" => $this->voice_context,
"email" => $s_mail);
/* Set pager number if available */
/**********************
* Insert Voice mail entry
**********************/
- $voice_data_array['context'] = "default";
+ $voice_data_array['context'] = $this->voice_context;
/* There is currently no voice mail entry for this user.
* We should create one
/* Assign contexts */
$smarty->assign("contexts",$this->get_asterisk_contexts());
$smarty->assign("context" ,$this->context);
+ $smarty->assign("voice_context" ,$this->voice_context);
$smarty->assign("goFonContextACL", $this->getacl("context"));
/* check if there is a FON server created */
$this->context= $_POST['context'];
}
+ /* Save voice context */
+ if(isset($_POST['voice_context'])){
+ if($this->voice_context != $_POST['voice_context']){
+ $this->is_modified= TRUE;
+ }
+ $this->voice_context= $_POST['voice_context'];
+ }
+
if(is_array($this->phoneNumbers)){
foreach($this->phoneNumbers as $telenumms) {
$nummsinorder[]=$telenumms;
diff --git a/gosa-plugins/gofon/gofon/phoneaccount/generic.tpl b/gosa-plugins/gofon/gofon/phoneaccount/generic.tpl
index 1a61ba1af98e900c5814e3116191772757e2ff2b..6162872d895dba1547f8597a62503883979b0175 100644 (file)
</select>
</td>
</tr>
+ <tr>
+ <td>{t}Voicemail context{/t}
+ </td>
+ <td>
+ <select name='voice_context' title='{t}Select the accounts context{/t}' {$goFonContextACL}>
+ {html_options values=$contexts output=$contexts selected=$voice_context}
+ </select>
+ </td>
+ </tr>
<tr>
<td>