delivery optimisations

This commit is contained in:
redmatrix
2015-09-24 22:51:47 -07:00
parent e558ddae3f
commit 98f656cfcb
2 changed files with 54 additions and 8 deletions

29
include/deliver_hooks.php Normal file
View File

@@ -0,0 +1,29 @@
<?php
require_once('include/cli_startup.php');
require_once('include/zot.php');
function deliver_hooks_run($argv, $argc) {
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($argv,$argc);
killme();
}