mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 21:30:14 +02:00
core: Define path to whitelist.txt in rssbridge.php
This commit is contained in:
@@ -28,9 +28,6 @@ if(file_exists('DEBUG')) {
|
||||
|
||||
require_once __DIR__ . '/lib/rssbridge.php';
|
||||
|
||||
// Specify path for whitelist file
|
||||
define('WHITELIST_FILE', __DIR__ . '/whitelist.txt');
|
||||
|
||||
Configuration::verifyInstallation();
|
||||
Configuration::loadConfiguration();
|
||||
|
||||
@@ -80,13 +77,13 @@ $whitelist_default = array(
|
||||
|
||||
try {
|
||||
|
||||
if(!file_exists(WHITELIST_FILE)) {
|
||||
if(!file_exists(WHITELIST)) {
|
||||
$whitelist_selection = $whitelist_default;
|
||||
$whitelist_write = implode("\n", $whitelist_default);
|
||||
file_put_contents(WHITELIST_FILE, $whitelist_write);
|
||||
file_put_contents(WHITELIST, $whitelist_write);
|
||||
} else {
|
||||
|
||||
$whitelist_file_content = file_get_contents(WHITELIST_FILE);
|
||||
$whitelist_file_content = file_get_contents(WHITELIST);
|
||||
if($whitelist_file_content != "*\n") {
|
||||
$whitelist_selection = explode("\n", $whitelist_file_content);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user