Skip to content

Commit

Permalink
Combine some of the default settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
markjcrane committed Apr 15, 2016
1 parent 7fc9e44 commit 5ca4307
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 247 deletions.
160 changes: 160 additions & 0 deletions core/default_settings/app_defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,166 @@
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = '';
$x++;
$array[$x]['default_setting_category'] = 'login';
$array[$x]['default_setting_subcategory'] = 'password_reset_key';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = generate_password('20', '4');
$array[$x]['default_setting_enabled'] = 'false';
$array[$x]['default_setting_description'] = 'Display a Reset Password link on the login box (requires smtp_host be defined).';
$x++;
$array[$x]['default_setting_category'] = 'login';
$array[$x]['default_setting_subcategory'] = 'domain_name_visible';
$array[$x]['default_setting_name'] = 'boolean';
$array[$x]['default_setting_value'] = 'true';
$array[$x]['default_setting_enabled'] = 'false';
$array[$x]['default_setting_description'] = 'Displays a domain input or select box (if domain_name array defined) on the login box.';
$x++;
$array[$x]['default_setting_category'] = 'login';
$array[$x]['default_setting_subcategory'] = 'domain_name';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'pbx1.yourdomain.com';
$array[$x]['default_setting_enabled'] = 'false';
$array[$x]['default_setting_description'] = 'Domain select option displayed on the login box.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'admin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'voicemail';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Voicemail block for users in the admin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'admin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'missed';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Missed Calls block for users in the admin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'admin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'recent';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Recent Calls block for users in the admin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'admin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'limits';
$array[$x]['default_setting_enabled'] = 'false';
$array[$x]['default_setting_description'] = 'Enable Dashboard Domain Limits block for users in the admin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'admin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'counts';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Domain Counts block for users in the admin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'admin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'call_routing';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Call Routing controls for users in the admin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'admin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'ring_groups';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Ring Group Forwarding controls for users in the admin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'superadmin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'voicemail';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Voicemail block for users in the superadmin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'superadmin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'missed';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Missed Calls block for users in the superadmin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'superadmin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'recent';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Recent Calls block for users in the superadmin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'superadmin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'limits';
$array[$x]['default_setting_enabled'] = 'false';
$array[$x]['default_setting_description'] = 'Enable Dashboard Domain Limits block for users in the superadmin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'superadmin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'counts';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard System Counts block for users in the superadmin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'superadmin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'system';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard System Status block for users in the superadmin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'superadmin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'call_routing';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Call Routing controls for users in the superadmin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'superadmin';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'ring_groups';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Ring Group Forwarding controls for users in the superadmin group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'user';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'voicemail';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Voicemail block for users in the users group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'user';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'missed';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Missed Calls block for users in the users group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'user';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'recent';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Recent Calls block for users in the users group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'user';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'call_routing';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Call Routing controls for users in the users group.';
$x++;
$array[$x]['default_setting_category'] = 'dashboard';
$array[$x]['default_setting_subcategory'] = 'user';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = 'ring_groups';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Enable Dashboard Ring Group Forwarding controls for users in the users group.';

//get an array of the default settings
$sql = "select * from v_default_settings ";
Expand Down
10 changes: 0 additions & 10 deletions core/domain_settings/app_defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@
Mark J Crane <[email protected]>
*/

//remove external from the end of the gateway path
if (substr($v_gateways_dir, -8) == "external") {
//$v_gateways_dir = substr($v_gateways_dir, 0, (strlen($v_gateways_dir)-9));
//$sql = "update v_domain_settings set ";
//$sql .= "v_gateways_dir = '$v_gateways_dir' ";
//$sql .= "where domain_uuid = '$domain_uuid'";
//$db->exec($sql);
//unset($sql);
}

//proccess this only one time
if ($domains_processed == 1) {
//set domains with enabled status of empty or null to true
Expand Down
2 changes: 1 addition & 1 deletion core/menu/app_defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
$o = new menu;
$o->db = $db;
$o->menu_default();
unset($menu);
unset($o);
} //if

?>
Loading

0 comments on commit 5ca4307

Please sign in to comment.