mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 08:15:13 +00:00
26 lines
414 B
PHP
26 lines
414 B
PHP
<?php
|
|
|
|
namespace Code\Daemon;
|
|
|
|
use Code\Extend\Hook;
|
|
|
|
class Deliver_hooks implements DaemonInterface
|
|
{
|
|
|
|
public function run(int $argc, array $argv): void
|
|
{
|
|
|
|
if ($argc < 2) {
|
|
return;
|
|
}
|
|
|
|
|
|
$r = q(
|
|
"select * from item where id = '%d'",
|
|
intval($argv[1])
|
|
);
|
|
if ($r) {
|
|
Hook::call('notifier_normal', $r[0]);
|
|
}
|
|
}
|
|
}
|