aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/hidden_configs.bb2
-rw-r--r--include/ItemObject.php2
-rw-r--r--include/notifier.php2
-rw-r--r--include/zot.php3
4 files changed, 7 insertions, 2 deletions
diff --git a/doc/hidden_configs.bb b/doc/hidden_configs.bb
index 8376187d1..b3ad91aa9 100644
--- a/doc/hidden_configs.bb
+++ b/doc/hidden_configs.bb
@@ -60,6 +60,8 @@ This document assumes you're an administrator.
Allow the @mention tagging of anyone whether you are connected or not.
[b]system > directorytags[/b]
Set the number of keyword tags displayed on the directory page.
+ [b]system > disable_dreport[/b]
+ If '1', don't store or link to delivery reports
[b]system > startpage[/b]
Set the default page to be taken to after a login for all channels at
this website. Can be overwritten by user settings.
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 8be99d91e..1b7b2ce78 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -264,7 +264,7 @@ class Item extends BaseObject {
if($keep_reports === 0)
$keep_reports = 30;
- if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0)
+ if((! get_config('system','disable_dreport')) && strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0)
$dreport = t('Delivery Report');
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
diff --git a/include/notifier.php b/include/notifier.php
index 32d702cb5..5260e629f 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -578,7 +578,7 @@ function notifier_run($argv, $argc){
));
// only create delivery reports for normal undeleted items
- if(is_array($target_item) && array_key_exists('postopts',$target_item) && (! $target_item['item_deleted'])) {
+ if(is_array($target_item) && array_key_exists('postopts',$target_item) && (! $target_item['item_deleted']) && (! get_config('system','disable_dreport'))) {
q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan, dreport_queue ) values ( '%s','%s','%s','%s','%s','%s','%s' ) ",
dbesc($target_item['mid']),
dbesc($hub['hubloc_host']),
diff --git a/include/zot.php b/include/zot.php
index a644bbd06..beaa54126 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -3924,6 +3924,9 @@ function check_zotinfo($channel,$locations,&$ret) {
function delivery_report_is_storable($dr) {
+ if(get_config('system','disable_dreport'))
+ return false;
+
call_hooks('dreport_is_storable',$dr);
// let plugins accept or reject - if neither, continue on