]> git.mxchange.org Git - friendica.git/commitdiff
Changes:
authorRoland Häder <roland@mxchange.org>
Mon, 24 Oct 2022 00:42:19 +0000 (02:42 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 17 Jan 2024 00:03:01 +0000 (01:03 +0100)
- converted many `$array['foo'] = $foo;` to a single $array = ['foo' => $foo];
  statement
- changed more double-quotes to single
- added spaces for better readability
- added missing type-hints (both parameters and returned value) if possible
- added/removed empty lines for better readability
- added missing documentation

src/Database/Database.php
src/Model/GServer.php

index a1685d4272ef7b210ac629ce2a85d81f87650368..7e0d56e0929038e15992c470d1dab339a600bccd 100644 (file)
@@ -339,8 +339,8 @@ class Database
                        return;
                }
 
-               $watchlist = explode(',', $this->config->get('system', 'db_log_index_watch'));
-               $blacklist = explode(',', $this->config->get('system', 'db_log_index_blacklist'));
+               $watchlist = explode(',', $this->configCache->get('system', 'db_log_index_watch'));
+               $blacklist = explode(',', $this->configCache->get('system', 'db_log_index_blacklist'));
 
                while ($row = $this->fetch($r)) {
                        if ((intval($this->config->get('system', 'db_loglimit_index')) > 0)) {
@@ -725,6 +725,7 @@ class Database
                                $duration  = round($duration, 3);
                                $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
 
+<<<<<<< HEAD
                                @file_put_contents(
                                        $this->config->get('system', 'db_log'),
                                        DateTimeFormat::utcNow() . "\t" . $duration . "\t" .
@@ -733,6 +734,12 @@ class Database
                                        substr($this->replaceParameters($sql, $args), 0, 4000) . "\n",
                                        FILE_APPEND
                                );
+=======
+                               @file_put_contents($this->configCache->get('system', 'db_log'), DateTimeFormat::utcNow() . "\t" . $duration . "\t" .
+                                                                                               basename($backtrace[1]['file']) . "\t" .
+                                                                                               $backtrace[1]['line'] . "\t" . $backtrace[2]['function'] . "\t" .
+                                                                                               substr($this->replaceParameters($sql, $args), 0, 4000) . "\n", FILE_APPEND);
+>>>>>>> 82391ca61 (Changes:)
                        }
                }
                return $retval;
index a3f0c26077ecfd5718dc655f751d428988aa0ed6..af7722b8b7ac48af065b4a53eecb7c5bc26e2b73 100644 (file)
@@ -781,6 +781,9 @@ class GServer
                        $serverdata = self::fetchWeeklyUsage($url, $serverdata);
                }
 
+               $serverdata['next_contact']     = self::getNextUpdateDate(true, '', '', in_array($serverdata['network'], [Protocol::PHANTOM, Protocol::FEED]));
+               $serverdata['last_contact']     = DateTimeFormat::utcNow();
+               $serverdata['failed']           = false;
                $serverdata['registered-users'] = $serverdata['registered-users'] ?? 0;
                $serverdata['next_contact'] = self::getNextUpdateDate(true, '', '', in_array($serverdata['network'], [Protocol::PHANTOM, Protocol::FEED]));
                $serverdata['last_contact'] = DateTimeFormat::utcNow();