Rename to the switch_settings class.

This commit is contained in:
markjcrane
2016-04-02 20:11:51 -06:00
parent 3fff96ee68
commit 2156d17da8
2 changed files with 7 additions and 5 deletions

View File

@@ -28,7 +28,7 @@
if ($domains_processed == 1) {
//add missing switch directories in default settings
$obj = new freeswitch;
$obj = new switch_settings;
$obj->settings();
unset($obj);

View File

@@ -1,11 +1,11 @@
<?php
/**
* freeswitch class provides access methods related to FreeSWITCH
* switch_settings class provides access methods related to FreeSWITCH
*
* @method settings will add missing switch directories to default settings
*/
class freeswitch {
class switch_settings {
public $db;
public $event_socket_ip_address;
@@ -232,8 +232,10 @@ class freeswitch {
//set the default settings
foreach ($array as $row) {
if (!isset($_SESSION['switch'][$row['default_setting_subcategory']] && $row['default_setting_enabled'] != "false")) {
$_SESSION['switch'][$row['default_setting_subcategory']] = $row['default_setting_value'];
if (!isset($_SESSION['switch'][$row['default_setting_subcategory']])) {
if ($row['default_setting_enabled'] != "false") {
$_SESSION['switch'][$row['default_setting_subcategory']] = $row['default_setting_value'];
}
}
}