Changeset 9116

Show
Ignore:
Timestamp:
03/10/10 12:19:54 (2 years ago)
Author:
p_lindheimer
Message:

fixes #3994 current context on extension page not sticking

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • contributed_modules/modules/customcontexts/functions.inc.php

    r5617 r9116  
    426426global $currentcomponent; 
    427427//should get current context if possible 
    428   $curcontext = ''; 
     428  $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null; 
     429  $query="SELECT `data` FROM `sip` WHERE `keyword`='context' AND `id`='".$extdisplay."'"; 
     430  $curcontext = mysql_result(mysql_query($query), 0); 
    429431  $currentcomponent->addguielem('Device Options', new gui_selectbox('customcontext', $currentcomponent->getoptlist('contextssel'), $curcontext, 'Custom Context', 'You have the '.customcontexts_getmodulevalue('moduledisplayname').' Module installed! You can select a custom context from this list to limit this user to portions of the dialplan you defined in the '.customcontexts_getmodulevalue('moduledisplayname').' module.',true, "javascript:if (document.frm_devices.customcontext.value) {document.frm_devices.devinfo_context.value = document.frm_devices.customcontext.value} else {document.frm_devices.devinfo_context.value = 'from-internal'}")); 
    430432} 
     
    434436global $currentcomponent; 
    435437//should get current context if possible 
    436   $curcontext = ''; 
     438  $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null; 
     439  $query="SELECT `data` FROM `sip` WHERE `keyword`='context' AND `id`='".$extdisplay."'"; 
     440  $curcontext = mysql_result(mysql_query($query), 0); 
    437441  $currentcomponent->addguielem('Device Options', new gui_selectbox('customcontext', $currentcomponent->getoptlist('contextssel'), $curcontext, 'Custom Context', 'You have the '.customcontexts_getmodulevalue('moduledisplayname').' Module installed! You can select a custom context from this list to limit this user to portions of the dialplan you defined in the '.customcontexts_getmodulevalue('moduledisplayname').' module.',true, "javascript:if (document.frm_extensions.customcontext.value) {document.frm_extensions.devinfo_context.value = document.frm_extensions.customcontext.value} else {document.frm_extensions.devinfo_context.value = 'from-internal'}")); 
    438442} 
  • contributed_modules/modules/customcontexts/module.xml

    r7499 r9116  
    22  <rawname>customcontexts</rawname> 
    33  <name>Custom Contexts</name> 
    4   <version>0.3.4</version> 
     4  <version>0.3.5</version> 
    55  <type>setup</type> 
    66  <category>Third Party Addon</category> 
     
    2424        </depends> 
    2525        <changelog> 
     26                *0.3.5* #3994 current context on extension page not sticking 
    2627                *0.3.4* see http://freepbx.org/forum/freepbx/users/custom-contexts-broken-in-freepbx-2-3-1-3 
    2728                *0.3.3* Added Set All option to quickly allow/deny all.