本文整理汇总了PHP中FreePBX::Ucp方法的典型用法代码示例。如果您正苦于以下问题:PHP FreePBX::Ucp方法的具体用法?PHP FreePBX::Ucp怎么用?PHP FreePBX::Ucp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FreePBX
的用法示例。
在下文中一共展示了FreePBX::Ucp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$set['defaultval'] = false;
$set['readonly'] = 0;
$set['hidden'] = 0;
$set['level'] = 3;
$set['module'] = 'cdr';
$set['category'] = 'CDR Report Module';
$set['emptyok'] = 0;
$set['sortorder'] = 10;
$set['name'] = 'Enable CEL Reporting';
$set['description'] = 'Setting this true will enable the CDR module to drill down on CEL data for each CDR. Although the CDR module will assure there is a CEL table available, the reporting functionality in Asterisk and associated ODBC database and CEL configuration must be done outside of FreePBX either by the user or at the Distro level.';
$set['type'] = CONF_TYPE_BOOL;
$freepbx_conf->define_conf_setting('CEL_ENABLED', $set, true);
}
$info = FreePBX::Modules()->getInfo("cdr");
if (version_compare_freepbx($info['cdr']['dbversion'], "12.0.13", "<=")) {
if (FreePBX::Modules()->checkStatus('ucp') && FreePBX::Modules()->checkStatus('userman')) {
$users = FreePBX::Userman()->getAllUsers();
foreach ($users as $user) {
$exts = FreePBX::Ucp()->getSetting($user['username'], 'Settings', 'assigned');
if (!empty($exts)) {
FreePBX::Ucp()->setSetting($user['username'], 'Cdr', 'assigned', $exts);
}
}
} elseif (FreePBX::Modules()->checkStatus('ucp', MODULE_STATUS_NEEDUPGRADE)) {
out(_("Please upgrade UCP before this module so that settings can be properly migrated"));
return false;
} elseif (FreePBX::Modules()->checkStatus('userman', MODULE_STATUS_NEEDUPGRADE)) {
out(_("Please upgrade Usermanager before this module so that settings can be properly migrated"));
return false;
}
}