From: Michael Date: Fri, 20 May 2022 15:49:59 +0000 (+0000) Subject: Renamed variable X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9ded39eff66b4adc6a8a08a7f086c7a4900c5819;p=friendica.git Renamed variable --- diff --git a/src/Core/Worker/Daemon.php b/src/Core/Worker/Daemon.php index 02c37d3b0d..6fd64e4f59 100644 --- a/src/Core/Worker/Daemon.php +++ b/src/Core/Worker/Daemon.php @@ -30,7 +30,7 @@ use Friendica\DI; */ class Daemon { - private static $daemon_mode = null; + private static $mode = null; /** * Checks if the worker is running in the daemon mode. @@ -39,8 +39,8 @@ class Daemon */ public static function isMode() { - if (!is_null(self::$daemon_mode)) { - return self::$daemon_mode; + if (!is_null(self::$mode)) { + return self::$mode; } if (DI::mode()->getExecutor() == Mode::DAEMON) { @@ -53,27 +53,27 @@ class Daemon } if (!function_exists('pcntl_fork')) { - self::$daemon_mode = false; + self::$mode = false; return false; } $pidfile = DI::config()->get('system', 'pidfile'); if (empty($pidfile)) { // No pid file, no daemon - self::$daemon_mode = false; + self::$mode = false; return false; } if (!is_readable($pidfile)) { // No pid file. We assume that the daemon had been intentionally stopped. - self::$daemon_mode = false; + self::$mode = false; return false; } $pid = intval(file_get_contents($pidfile)); $running = posix_kill($pid, 0); - self::$daemon_mode = $running; + self::$mode = $running; return $running; }