From eae33275840495d27717f95f9647cf96c1c1d6cd Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 28 Nov 2013 18:10:04 -0800 Subject: item store hooks --- include/items.php | 15 +++++++++++++++ include/zot.php | 9 +++++++++ 2 files changed, 24 insertions(+) (limited to 'include') diff --git a/include/items.php b/include/items.php index 45c5f5ac9..e380be488 100755 --- a/include/items.php +++ b/include/items.php @@ -1432,6 +1432,12 @@ function encode_rel_links($links) { function item_store($arr,$allow_exec = false) { + $d = array('item' => $arr, 'allow_exec' => $allow_exec); + call_hooks('item_store', $d ); + $arr = $d['item']; + $allow_exec = $d['allow_exec']; + + $ret = array('result' => false, 'item_id' => 0); if(! $arr['uid']) { @@ -1808,6 +1814,15 @@ function item_store($arr,$allow_exec = false) { function item_store_update($arr,$allow_exec = false) { + + + $d = array('item' => $arr, 'allow_exec' => $allow_exec); + call_hooks('item_store_update', $d ); + $arr = $d['item']; + $allow_exec = $d['allow_exec']; + + + $ret = array('result' => false, 'item_id' => 0); if(! intval($arr['uid'])) { logger('item_store_update: no uid'); diff --git a/include/zot.php b/include/zot.php index 57c3d3601..725dc58e3 100644 --- a/include/zot.php +++ b/include/zot.php @@ -3,6 +3,15 @@ require_once('include/crypto.php'); require_once('include/items.php'); +/** + * Red implementation of zot protocol. + * + * https://github.com/friendica/red/wiki/zot + * https://github.com/friendica/red/wiki/Zot---A-High-Level-Overview + * + */ + + /** * * @function zot_new_uid($channel_nick) -- cgit v1.2.3