diff options
author | M. Dent <dentm42@gmail.com> | 2019-09-23 10:11:27 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-09-23 10:11:27 +0200 |
commit | 7c5cfe66973a8e529c01c3a214e9f8b791c89c23 (patch) | |
tree | 6ef8f96a07a0bbff51b1712dbaf4cda9e3e9b623 /include/items.php | |
parent | d1fd69337fa87ec10264919ffcb0bbe57f8873d2 (diff) | |
download | volse-hubzilla-7c5cfe66973a8e529c01c3a214e9f8b791c89c23.tar.gz volse-hubzilla-7c5cfe66973a8e529c01c3a214e9f8b791c89c23.tar.bz2 volse-hubzilla-7c5cfe66973a8e529c01c3a214e9f8b791c89c23.zip |
Notify on custom items - rework hooks
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/include/items.php b/include/items.php index 84bfc263b..6786b8b05 100755 --- a/include/items.php +++ b/include/items.php @@ -1640,20 +1640,14 @@ function item_store($arr, $allow_exec = false, $deliver = true) { 'allow_exec' => $allow_exec ]; - if ($arr['item_type']==ITEM_TYPE_CUSTOM) { - /* Custom items are not stored by default - because they require an addon to process. */ - $d['item']['cancel']=true; - - call_hooks('item_custom',$d); - } /** * @hooks item_store * Called when item_store() stores a record of type item. * * \e array \b item * * \e boolean \b allow_exec */ - call_hooks('item_store', $d); + call_hooks('item_store_before', $d); + $arr = $d['item']; $allow_exec = $d['allow_exec']; @@ -1961,6 +1955,7 @@ function item_store($arr, $allow_exec = false, $deliver = true) { */ call_hooks('item_store', $arr); + /** * @hooks post_remote * Called when an activity arrives from another site. @@ -2129,14 +2124,6 @@ function item_store_update($arr, $allow_exec = false, $deliver = true) { 'allow_exec' => $allow_exec ]; - if ($arr['item_type']==ITEM_TYPE_CUSTOM) { - /* Custom items are not stored by default - because they require an addon to process. */ - $d['item']['cancel']=true; - - call_hooks('item_custom_update',$d); - } - /** * @hooks item_store_update * Called when item_store_update() is called to update a stored item. It @@ -2144,7 +2131,7 @@ function item_store_update($arr, $allow_exec = false, $deliver = true) { * * \e array \b item * * \e boolean \b allow_exec */ - call_hooks('item_store_update', $d); + call_hooks('item_store_update_before', $d); $arr = $d['item']; $allow_exec = $d['allow_exec']; |