Changeset 7723

Show
Ignore:
Timestamp:
05/13/09 19:59:06 (4 years ago)
Author:
xrobau
Message:

Added support for IMAP storage of Voicemail, ref #1957 - thanks drmessano!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.6/voicemail/functions.inc.php

    r7457 r7723  
    291291    document.getElementById('delete0').disabled=dval; 
    292292    document.getElementById('delete1').disabled=dval; 
     293    document.getElementById('imapuser').disabled=dval;  
     294    document.getElementById('imappassword').disabled=dval;  
    293295    document.getElementById('options').disabled=dval; 
    294296    document.getElementById('vmcontext').disabled=dval; 
     
    450452      if (isset($alloptions)) { 
    451453        foreach ($alloptions as $option) { 
    452           if ( ($option!="attach") && ($option!="envelope") && ($option!="saycid") && ($option!="delete") && ($option!='') ) 
     454          if ( ($option!="attach") && ($option!="envelope") && ($option!="saycid") && ($option!="delete") && ($option!="imapuser") && ($option!="imappassword") && ($option!='') ) 
    453455              $options .= $option.'='.$vmoptions[$option].'|'; 
    454456        } 
     
    464466      $vmops_envelope = 'no'; 
    465467      $vmops_delete = 'no'; 
     468      $vmops_imapuser = null; 
     469      $vmops_imappassword = null; 
    466470    } 
    467471 
     
    494498    $currentcomponent->addguielem($section, new gui_radio('envelope', $currentcomponent->getoptlist('vmyn'), $vmops_envelope, _('Play Envelope'), _("Envelope controls whether or not the voicemail system will play the message envelope (date/time) before playing the voicemail message. This setting does not affect the operation of the envelope option in the advanced voicemail menu."), $disable)); 
    495499    $currentcomponent->addguielem($section, new gui_radio('delete', $currentcomponent->getoptlist('vmyn'), $vmops_delete, _('Delete Voicemail'), _("If set to \"yes\" the message will be deleted from the voicemailbox (after having been emailed). Provides functionality that allows a user to receive their voicemail via email alone, rather than having the voicemail able to be retrieved from the Webinterface or the Extension handset.  CAUTION: MUST HAVE attach voicemail to email SET TO YES OTHERWISE YOUR MESSAGES WILL BE LOST FOREVER."), $disable)); 
     500    $currentcomponent->addguielem($section, new gui_textbox('imapuser', $vmops_imapuser, _('IMAP Username'), sprintf(_("This is the IMAP username, if using IMAP storage"),"<br /><br />"),'','',true,0,$disable)); 
     501    $currentcomponent->addguielem($section, new gui_textbox('imappassword', $vmops_imappassword, _('IMAP Password'), sprintf(_("This is the IMAP password, if using IMAP storage"),"<br /><br />"),'','',true,0,$disable)); 
    496502    $currentcomponent->addguielem($section, new gui_textbox('options', $options, _('VM Options'), sprintf(_("Separate options with pipe ( | )%sie: review=yes|maxmessage=60"),"<br /><br />"),'','',true,0,$disable)); 
    497503    $currentcomponent->addguielem($section, new gui_textbox('vmcontext', $vmcontext, _('VM Context'), _("This is the Voicemail Context which is normally set to default. Do not change unless you understand the implications."), "frm_${display}_isVoiceMailEnabled() && isEmpty()", $msgInvalidVMContext, false,0,$disable)); 
     
    754760      } 
    755761    } 
     762    if ($imapuser!='' && $imapuser!='') {  
     763      $vmoptions['imapuser'] = $imapuser;  
     764      $vmoptions['imappassword'] = $imappassword;  
     765    }  
    756766    $vmoption = explode("=",$attach); 
    757767      $vmoptions[$vmoption[0]] = $vmoption[1];