From 1fbd1a79c7a19ff51b9e8ab4bad67ec0bf687839 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 6 Nov 2014 17:27:28 -0800 Subject: Provide a way to mark photos as adult and hide them from the default album view. Still need a button or setting to enable "unsafe viewing". This has no effect anywhere but in the album views. They can still be viewed by flipping through the individual photos with 'prev' and 'next'. We probably need a comprehensive strategy for how to deal with n-s-f-w photos in albums so consider this a band-aid which requires additional work and integration with other facilities which access these photos. It is entirely optional. --- include/poller.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include/poller.php') diff --git a/include/poller.php b/include/poller.php index f11618d37..1734af7d9 100644 --- a/include/poller.php +++ b/include/poller.php @@ -123,8 +123,8 @@ function poller_run($argv, $argc){ if(($d2 != $d1) && ($h1 == $h2)) { - require_once('include/dir_fns.php'); - check_upstream_directory(); + require_once('include/dir_fns.php'); + check_upstream_directory(); call_hooks('cron_daily',datetime_convert()); @@ -263,7 +263,7 @@ function poller_run($argv, $argc){ ); - $contacts = q("SELECT abook_id, abook_flags, abook_updated, abook_connected, abook_closeness, abook_xchan, abook_channel + $contacts = q("SELECT abook_id, abook_flags, abook_network, abook_updated, abook_connected, abook_closeness, abook_xchan, abook_channel FROM abook LEFT JOIN account on abook_account = account_id where 1 $sql_extra AND (( abook_flags & %d ) OR ( abook_flags = %d )) @@ -305,6 +305,7 @@ function poller_run($argv, $argc){ $update = true; } else { + // if we've never connected with them, start the mark for death countdown from now if($c == NULL_DATE) { @@ -351,12 +352,17 @@ function poller_run($argv, $argc){ $update = true; } - } if((! $update) && (! $force)) continue; + // we handled feed contacts earlier - now filter out anything else that + // doesn't require polling to keep the process count down. + + if($contact['abook_network'] !== 'zot') + continue; + proc_run('php','include/onepoll.php',$contact['abook_id']); if($interval) @time_sleep_until(microtime(true) + (float) $interval); -- cgit v1.2.3