diff options
author | Mario <mario@mariovavti.com> | 2021-01-18 13:29:48 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-01-18 13:29:48 +0000 |
commit | 2c8e12200821dfbb052ad738880ac9d1575b9c45 (patch) | |
tree | 61889e103565cd7ece84350d85e363191b3a23b7 | |
parent | 2729f466d5450576c620b5b7844b57aca434ce45 (diff) | |
download | volse-hubzilla-2c8e12200821dfbb052ad738880ac9d1575b9c45.tar.gz volse-hubzilla-2c8e12200821dfbb052ad738880ac9d1575b9c45.tar.bz2 volse-hubzilla-2c8e12200821dfbb052ad738880ac9d1575b9c45.zip |
cleanup daemon/checksites
-rw-r--r-- | Zotlabs/Daemon/Cache_embeds.php | 1 | ||||
-rw-r--r-- | Zotlabs/Daemon/Checksites.php | 23 |
2 files changed, 12 insertions, 12 deletions
diff --git a/Zotlabs/Daemon/Cache_embeds.php b/Zotlabs/Daemon/Cache_embeds.php index 08088abd6..9e5b8d2bb 100644 --- a/Zotlabs/Daemon/Cache_embeds.php +++ b/Zotlabs/Daemon/Cache_embeds.php @@ -2,7 +2,6 @@ namespace Zotlabs\Daemon; - class Cache_embeds { static public function run($argc,$argv) { diff --git a/Zotlabs/Daemon/Checksites.php b/Zotlabs/Daemon/Checksites.php index 3bcfdd7cf..7227e96e4 100644 --- a/Zotlabs/Daemon/Checksites.php +++ b/Zotlabs/Daemon/Checksites.php @@ -6,34 +6,35 @@ require_once('include/hubloc.php'); class Checksites { - static public function run($argc,$argv) { + static public function run($argc, $argv) { logger('checksites: start'); - - if(($argc > 1) && ($argv[1])) + + if (($argc > 1) && ($argv[1])) $site_id = $argv[1]; - if($site_id) + if ($site_id) $sql_options = " and site_url = '" . dbesc($argv[1]) . "' "; - $days = intval(get_config('system','sitecheckdays')); - if($days < 1) + $days = intval(get_config('system', 'sitecheckdays')); + if ($days < 1) $days = 30; $r = q("select * from site where site_dead = 0 and site_update < %s - INTERVAL %s and site_type = %d $sql_options ", - db_utcnow(), db_quoteinterval($days . ' DAY'), + db_utcnow(), + db_quoteinterval($days . ' DAY'), intval(SITE_TYPE_ZOT) ); - if(! $r) + if (!$r) return; - foreach($r as $rr) { - if(! strcasecmp($rr['site_url'],z_root())) + foreach ($r as $rr) { + if (!strcasecmp($rr['site_url'], z_root())) continue; $x = ping_site($rr['site_url']); - if($x['success']) { + if ($x['success']) { logger('checksites: ' . $rr['site_url']); q("update site set site_update = '%s' where site_url = '%s' ", dbesc(datetime_convert()), |