aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Checksites.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-01-20 13:15:40 +0100
committerMax Kostikov <max@kostikov.co>2021-01-20 13:15:40 +0100
commit9612a69a6448331ae3296503e97ef6ce204d9be1 (patch)
treeafae1ea1fa8c63db4c23836e0ebfe57b56b808ec /Zotlabs/Daemon/Checksites.php
parent308e94ea799b7851287fbc7635480ac13bfe3c61 (diff)
parent08264f8d11d349bbda92233d984ad52c16c6b2d6 (diff)
downloadvolse-hubzilla-9612a69a6448331ae3296503e97ef6ce204d9be1.tar.gz
volse-hubzilla-9612a69a6448331ae3296503e97ef6ce204d9be1.tar.bz2
volse-hubzilla-9612a69a6448331ae3296503e97ef6ce204d9be1.zip
Merge branch 'dev' into 'dev'
Dev sync See merge request kostikov/core!1
Diffstat (limited to 'Zotlabs/Daemon/Checksites.php')
-rw-r--r--Zotlabs/Daemon/Checksites.php23
1 files changed, 12 insertions, 11 deletions
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()),