Fix hard-coded dir for 'banned_names.conf'.

This commit is contained in:
Retro_Guy 2023-07-17 11:08:14 -07:00
parent 3fdae1cf95
commit f54bfb656a
2 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,7 @@ $CONFIG = include($config_file);
$logdir=$spooldir.'/log';
$lockdir=$spooldir.'/lock';
$ssldir=$spooldir.'/ssl/';
$user_ban_file=$config_dir.'/banned_names.conf';
/* Permanent configuration changes */
@mkdir($logdir,0755,'recursive');

4
Rocksolid_Light/rslight/scripts/spoolnews.php Executable file → Normal file
View File

@ -131,7 +131,7 @@ unlink($lockfile);
echo "\nSpoolnews Done\n";
function get_articles($ns, $group) {
global $enable_rslight, $spooldir, $CONFIG, $maxarticles_per_run, $maxfirstrequest, $workpath, $path, $remote_groupfile, $local_groupfile, $local, $logdir, $config_name, $logfile;
global $enable_rslight, $spooldir, $CONFIG, $user_ban_file, $maxarticles_per_run, $maxfirstrequest, $workpath, $path, $remote_groupfile, $local_groupfile, $local, $logdir, $config_name, $logfile;
if($ns == false) {
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Lost connection to ".$CONFIG['remote_server'].":".$CONFIG['remote_port'], FILE_APPEND);
@ -139,7 +139,7 @@ function get_articles($ns, $group) {
}
$grouppath = $path.preg_replace('/\./', '/', $group);
$banned_names = file("/etc/rslight/banned_names.conf", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$banned_names = file($user_ban_file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$nocem_check="@@NCM";