aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-09 16:52:00 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-09 16:52:00 -0700
commit03357481f73d506ae36be9858dc757842408c6a9 (patch)
treea69772d6caf71f4986a26eb80d00ac4e8750b995 /include
parentec1dcb8f2eccfd1a0dfc9c7eccea788a4b385e41 (diff)
parent805e2a28ee81febee2742587a1640b5fae1387a2 (diff)
downloadvolse-hubzilla-03357481f73d506ae36be9858dc757842408c6a9.tar.gz
volse-hubzilla-03357481f73d506ae36be9858dc757842408c6a9.tar.bz2
volse-hubzilla-03357481f73d506ae36be9858dc757842408c6a9.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: install/schema_mysql.sql mod/home.php mod/page.php view/nl/messages.po view/nl/strings.php
Diffstat (limited to 'include')
-rw-r--r--include/deliver.php25
1 files changed, 17 insertions, 8 deletions
diff --git a/include/deliver.php b/include/deliver.php
index 0fb7a4aeb..5ab44a620 100644
--- a/include/deliver.php
+++ b/include/deliver.php
@@ -30,16 +30,25 @@ function deliver_run($argv, $argc) {
if($h) {
$base = $h['scheme'] . '://' . $h['host'] . (($h['port']) ? ':' . $h['port'] : '');
if($base !== z_root()) {
- $y = q("select site_update from site where site_url = '%s' ",
+ $y = q("select site_update, site_dead from site where site_url = '%s' ",
dbesc($base)
);
- if($y && $y[0]['site_update'] < datetime_convert('UTC','UTC','now - 1 month')) {
- q("update outq set outq_priority = %d where outq_hash = '%s'",
- intval($r[0]['outq_priority'] + 10),
- dbesc($r[0]['outq_hash'])
- );
- logger('immediate delivery deferred for site ' . $base);
- continue;
+ if($y) {
+ if(intval($y[0]['site_dead'])) {
+ q("delete from outq where outq_posturl = '%s'",
+ dbesc($r[0]['outq_posturl'])
+ );
+ logger('dead site ignored ' . $base);
+ continue;
+ }
+ if($y[0]['site_update'] < datetime_convert('UTC','UTC','now - 1 month')) {
+ q("update outq set outq_priority = %d where outq_hash = '%s'",
+ intval($r[0]['outq_priority'] + 10),
+ dbesc($r[0]['outq_hash'])
+ );
+ logger('immediate delivery deferred for site ' . $base);
+ continue;
+ }
}
}
}