Ticket #3994: functions.inc.php.patch
| File functions.inc.php.patch, 2.2 kB (added by IgorG, 2 years ago) |
|---|
-
functions.inc.php
old new 425 425 function customcontexts_devices_configpageload() { 426 426 global $currentcomponent; 427 427 //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); 429 431 $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'}")); 430 432 } 431 433 … … 433 435 function customcontexts_extensions_configpageload() { 434 436 global $currentcomponent; 435 437 //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); 437 441 $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'}")); 438 442 } 439 443
