function languages_getdestinfo($dest) { global $active_modules; if (substr(trim($dest), 0, 14) == 'app-languages,') { $exten = explode(',', $dest); $exten = $exten[1]; $thisexten = languages_get($exten); if (empty($thisexten)) { return array(); } else { $type = isset($active_modules['languages']['type']) ? $active_modules['languages']['type'] : 'setup'; return array('description' => sprintf(_("Language: %s"), $thisexten['description']), 'edit_url' => 'config.php?display=languages&type=' . $type . '&extdisplay=' . urlencode($exten)); } } else { return false; } }
<?php // License for all code of this FreePBX module can be found in the license file inside the module directory // Copyright 2015 Sangoma Technologies. // extract($request); if ($extdisplay) { // load $row = languages_get($extdisplay); $description = $row['description']; $lang_code = $row['lang_code']; $dest = $row['dest']; $deleteurl = '?display=languages&action=delete&language_id=' . $row['language_id']; $subhead = "<h2>" . _("Edit: ") . "{$description} ({$lang_code})" . "</h2>"; $usage_list = framework_display_destination_usage(languages_getdest($extdisplay)); if (!empty($usage_list)) { $inusehtml = '<div class="well">'; $inusehtml .= '<h3>' . $usage_list['text'] . '</h3>'; $inusehtml .= '<p>' . $usage_list['tooltip'] . '</p>'; $inusehtml .= '</div>'; } } else { if (FreePBX::Modules()->moduleHasMethod('Soundlang', 'getLanguage')) { $lang_code = FreePBX::Soundlang()->getLanguage(); } } ?> <?php echo $subhead; echo $inusehtml;
if ($demo) { return true; } sensor_price_add($_REQUEST); break; case 'global_settings_get': global_settings_get(); break; case 'global_settings_set': if ($demo) { return true; } global_settings_set($_REQUEST); break; case 'languages_get': languages_get(); break; case 'update_information_get': update_information_get(); break; case 'grabber_restart_init': if ($demo) { return true; } grabber_restart_init(); break; case 'grabber_status_get': if ($demo) { return true; } grabber_status_get();