/** * Returns a list of plugin Config files */ function retrievePluginList() { global $settings; $config_files = read_directory_files($settings['configDirectory'], false); $plugin_names = array(); //find the plugin configs foreach ($config_files as $fname => $fdata) { if (stripos(strtolower($fname), "plugin") !== false && stripos(strtolower($fname), ".json") == false) { //split the string to get jsut the plugin name $plugin_name = explode(".", $fname); $plugin_name = $plugin_name[1]; $plugin_names[$plugin_name] = array('type' => 'file', 'location' => $settings['configDirectory'] . "/" . $fname); //array('name' => $plugin_name, 'config' => $fname); } } return $plugin_names; }
//special treatment for email settings as they are inside the general settings file //collect them together here $email_settings = array('emailenable' => $settings['emailenable'], 'emailguser' => $settings['emailguser'], 'emailgpass' => $emailgpass, 'emailfromtext' => $settings['emailfromtext'], 'emailtoemail' => $settings['emailtoemail']); $tmp_settings_data['email'] = $email_settings; } else { //All other backup areas for individual selections $setting_file = $tmp_config_areas[$area]['file']; //if setting file value is an array then there are one or more setting files related to this backup if (is_array($setting_file)) { // if (array_key_exists('special', $tmp_config_areas[$area]['file'])) { // $special = $tmp_config_areas[$area]['file']['special']; // } //loop over the array foreach ($setting_file as $sfi => $sfd) { if ($sfd['type'] == "dir") { $file_data = read_directory_files($sfd['location']); } else { if ($sfd['type'] == "file") { $file_data = array($sfi => explode("\n", file_get_contents($sfd['location']))); } } $tmp_settings_data[$area][$sfi] = $file_data; } } else { if ($setting_file !== false && file_exists($setting_file)) { if ($area == "settings") { $file_data = parse_ini_string(file_get_contents($setting_file)); } else { if ($area == "channelOutputsJSON") { $file_data = json_decode(file_get_contents($setting_file), true); } else {