aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-01-18 14:13:58 +0000
committerMario <mario@mariovavti.com>2021-01-18 14:13:58 +0000
commit6e7a2d0d96da54dfbceb5873ed4a5c40adc51d5f (patch)
tree6e987399663f3a3a378a99c2f901af70a8322edc /Zotlabs
parent101005f3d23b2a12c017293ef6df2f8875339949 (diff)
downloadvolse-hubzilla-6e7a2d0d96da54dfbceb5873ed4a5c40adc51d5f.tar.gz
volse-hubzilla-6e7a2d0d96da54dfbceb5873ed4a5c40adc51d5f.tar.bz2
volse-hubzilla-6e7a2d0d96da54dfbceb5873ed4a5c40adc51d5f.zip
more cleanup daemon/master
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Daemon/Master.php37
1 files changed, 18 insertions, 19 deletions
diff --git a/Zotlabs/Daemon/Master.php b/Zotlabs/Daemon/Master.php
index 8c3a7e570..6fa656be5 100644
--- a/Zotlabs/Daemon/Master.php
+++ b/Zotlabs/Daemon/Master.php
@@ -2,58 +2,57 @@
namespace Zotlabs\Daemon;
-if(array_search( __file__ , get_included_files()) === 0) {
+if (array_search(__file__, get_included_files()) === 0) {
require_once('include/cli_startup.php');
array_shift($argv);
$argc = count($argv);
- if($argc)
- Master::Release($argc,$argv);
+ if ($argc)
+ Master::Release($argc, $argv);
return;
}
-
class Master {
static public function Summon($arr) {
$hookinfo = [
- 'argv'=>$arr
+ 'argv' => $arr
];
- call_hooks ('daemon_master_summon',$hookinfo);
+ call_hooks('daemon_master_summon', $hookinfo);
- $arr = $hookinfo['argv'];
+ $arr = $hookinfo['argv'];
$argc = count($arr);
- if ((!is_array($arr) || (count($arr) < 1))) {
- logger("Summon handled by hook.",LOGGER_DEBUG);
+ if ((!is_array($arr) || ($argc < 1))) {
+ logger("Summon handled by hook.", LOGGER_DEBUG);
return;
}
- $phpbin = get_config('system','phpbin','php');
- proc_run($phpbin,'Zotlabs/Daemon/Master.php',$arr);
+ $phpbin = get_config('system', 'phpbin', 'php');
+ proc_run($phpbin, 'Zotlabs/Daemon/Master.php', $arr);
}
- static public function Release($argc,$argv) {
+ static public function Release($argc, $argv) {
cli_startup();
$hookinfo = [
- 'argv'=>$argv
+ 'argv' => $argv
];
- call_hooks ('daemon_master_release',$hookinfo);
+ call_hooks('daemon_master_release', $hookinfo);
$argv = $hookinfo['argv'];
$argc = count($argv);
- if ((!is_array($argv) || (count($argv) < 1))) {
- logger("Release handled by hook.",LOGGER_DEBUG);
+ if ((!is_array($argv) || ($argc < 1))) {
+ logger("Release handled by hook.", LOGGER_DEBUG);
return;
}
- logger('Master: release: ' . json_encode($argv), LOGGER_ALL,LOG_DEBUG);
- $cls = '\\Zotlabs\\Daemon\\' . $argv[0];
- $cls::run($argc,$argv);
+ logger('Master: release: ' . json_encode($argv), LOGGER_ALL, LOG_DEBUG);
+ $cls = '\\Zotlabs\\Daemon\\' . $argv[0];
+ $cls::run($argc, $argv);
}
}