diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-07-08 17:49:41 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-07-08 17:49:41 -0700 |
commit | bec3d15c525ff12ba0de53c0b21e03cc9a3a7f39 (patch) | |
tree | 95d9760bf08424eede588935e177900f38b087d7 /include/notifier.php | |
parent | d81365c1238171b1068df7a2b2001b88646bdd98 (diff) | |
download | volse-hubzilla-bec3d15c525ff12ba0de53c0b21e03cc9a3a7f39.tar.gz volse-hubzilla-bec3d15c525ff12ba0de53c0b21e03cc9a3a7f39.tar.bz2 volse-hubzilla-bec3d15c525ff12ba0de53c0b21e03cc9a3a7f39.zip |
more work
Diffstat (limited to 'include/notifier.php')
-rw-r--r-- | include/notifier.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/notifier.php b/include/notifier.php index e67ef06e3..89b0964b4 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -15,17 +15,29 @@ require_once("datetime.php"); // FIXME - generalise for other content, probably create a notify queue in // the db with type and recipient list -if(($argc != 3) || (! intval($argv[2]))) +if($argc < 3) exit; - $baseurl = trim(pack("H*" , $argv[1])); + $baseurl = trim(hex2bin($argv[1])); + + $cmd = $argv[2]; + + switch($cmd) { + + default: + $item_id = intval($argv[3]); + if(! $item_id) + killme(); + break; + } - $item_id = $argv[2]; $is_parent = false; $recipients = array(); + // fetch requested item + $r = q("SELECT `item`.*, `contact`.*,`item`.`id` AS `item_id` FROM `item` LEFT JOIN `contact` ON `item`.`contact-id` = `contact`.`id` WHERE `item`.`id` = %d LIMIT 1", intval($item_id) |