aboutsummaryrefslogtreecommitdiffstats
path: root/include/deliver_hooks.php
blob: f8f3bb19b4a9308bbe9c5822b282e354129d69cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php


require_once('include/cli_startup.php');
require_once('include/zot.php');


function deliver_hooks_run($argc,$argv) {

	cli_startup();

	$a = get_app();

	if($argc < 2)
		return;


	$r = q("select * from item where id = '%d'",
		intval($argv[1])
	);
	if($r)
		call_hooks('notifier_normal',$r[0]);

}

if (array_search(__file__,get_included_files())===0){
  deliver_hooks_run($argc,$argv);
  killme();
}