diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-24 22:51:47 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-24 22:51:47 -0700 |
commit | 98f656cfcbaf81c001802dacd593ff9548345014 (patch) | |
tree | 96b8c7a565cde9691b2936b31a728644918ea33b /include/deliver_hooks.php | |
parent | e558ddae3f0e9cae8800caf878a07f5530d2e31f (diff) | |
download | volse-hubzilla-98f656cfcbaf81c001802dacd593ff9548345014.tar.gz volse-hubzilla-98f656cfcbaf81c001802dacd593ff9548345014.tar.bz2 volse-hubzilla-98f656cfcbaf81c001802dacd593ff9548345014.zip |
delivery optimisations
Diffstat (limited to 'include/deliver_hooks.php')
-rw-r--r-- | include/deliver_hooks.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/deliver_hooks.php b/include/deliver_hooks.php new file mode 100644 index 000000000..f0d6ba1b1 --- /dev/null +++ b/include/deliver_hooks.php @@ -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(); +} |