Make dxped-url configurable

pull/3026/head
DJ3CE 2024-03-27 11:33:16 +01:00
rodzic 40dc26c120
commit 07ba06d104
3 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -32,6 +32,7 @@ $config['datadir'] = null; // default to install directory
$config['table_name'] = "TABLE_HRD_CONTACTS_V01";
$config['locator'] = "";
$config['display_freq'] = true;
$config['dxped_list'] = "https://cdn.cloudlog.org/read_ng3k_dxped_list.php";
/*
|--------------------------------------------------------------------------

Wyświetl plik

@ -30,7 +30,7 @@ class Workabledxcc extends CI_Controller
public function dxcclist()
{
$json = file_get_contents('https://cdn.cloudlog.org/read_ng3k_dxped_list.php');
$json = file_get_contents($this->config->item('dxped_list') ?? 'https://cdn.cloudlog.org/read_ng3k_dxped_list.php');
// Decode the JSON data into a PHP array
$dataResult = json_decode($json, true);

Wyświetl plik

@ -5,7 +5,7 @@ class Workabledxcc_model extends CI_Model
public function GetThisWeek()
{
$json = file_get_contents('https://cdn.cloudlog.org/read_ng3k_dxped_list.php');
$json = file_get_contents($this->config->item('dxped_list') ?? 'https://cdn.cloudlog.org/read_ng3k_dxped_list.php');
// Step 2: Convert the JSON data to an array.
$data = json_decode($json, true);