Add override option to disable immediate posting per section.
This commit is contained in:
parent
5c8eea5d78
commit
2729aa98ce
|
@ -1097,8 +1097,18 @@ function get_list($mode, $ngroup, $msgsock)
|
||||||
*/
|
*/
|
||||||
function insert_article($section, $nntp_group, $filename, $subject_i, $from_i, $article_date, $date_i, $mid_i, $references_i, $bytes_i, $lines_i, $xref_i, $body)
|
function insert_article($section, $nntp_group, $filename, $subject_i, $from_i, $article_date, $date_i, $mid_i, $references_i, $bytes_i, $lines_i, $xref_i, $body)
|
||||||
{
|
{
|
||||||
global $enable_rslight, $spooldir, $CONFIG, $logdir, $lockdir, $logfile;
|
global $enable_rslight, $spooldir, $CONFIG, $OVERRIDES, $logdir, $lockdir, $logfile;
|
||||||
|
|
||||||
|
if (isset($OVERRIDES['insert_disable']) && $OVERRIDES['insert_disable'] != '') {
|
||||||
|
$insert_disable = explode(',', $OVERRIDES['insert_disable']);
|
||||||
|
foreach ($insert_disable as $disable) {
|
||||||
|
if ($section == trim($disable)) {
|
||||||
|
file_put_contents($logfile, "\n" . format_log_date() . " " . $section . " Insert Disabled... Queuing local post: " . $nntp_group, FILE_APPEND);
|
||||||
|
$return_val = "240 Article received OK (queued)\r\n";
|
||||||
|
return ($return_val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$return_val = "441 Posting failed\r\n";
|
$return_val = "441 Posting failed\r\n";
|
||||||
if ($CONFIG['remote_server'] !== '') {
|
if ($CONFIG['remote_server'] !== '') {
|
||||||
$sn_lockfile = $lockdir . '/' . $section . '-spoolnews.lock';
|
$sn_lockfile = $lockdir . '/' . $section . '-spoolnews.lock';
|
||||||
|
|
Loading…
Reference in New Issue