diff options
author | zotlabs <mike@macgirvin.com> | 2018-12-17 18:45:42 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-12-17 18:45:42 -0800 |
commit | 15ce8bc79b219e10f709796c09c739649a8df53b (patch) | |
tree | edd456a39ad0daf12d6cc4409a99477f4fb38d82 /include | |
parent | 8d70b919551f6f6462e639f7cfffda9825344e43 (diff) | |
parent | d190b1995b0886b430beb5dac1a1e72582b9ad2b (diff) | |
download | volse-hubzilla-15ce8bc79b219e10f709796c09c739649a8df53b.tar.gz volse-hubzilla-15ce8bc79b219e10f709796c09c739649a8df53b.tar.bz2 volse-hubzilla-15ce8bc79b219e10f709796c09c739649a8df53b.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'include')
-rwxr-xr-x | include/items.php | 30 | ||||
-rwxr-xr-x | include/plugin.php | 4 |
2 files changed, 32 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php index 0cbca23fc..02d31fcb5 100755 --- a/include/items.php +++ b/include/items.php @@ -1591,6 +1591,14 @@ function item_store($arr, $allow_exec = false, $deliver = true) { 'item' => $arr, '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. @@ -2016,6 +2024,13 @@ function item_store($arr, $allow_exec = false, $deliver = true) { */ call_hooks('post_remote_end', $arr); + /** + * @hooks item_stored + * Called after new item is stored in the database. + * (By this time we have an item_id and other frequently needed info.) + */ + call_hooks('item_stored',$arr); + item_update_parent_commented($arr); // If _creating_ a deleted item, don't propagate it further or send out notifications. @@ -2049,6 +2064,15 @@ function item_store_update($arr, $allow_exec = false, $deliver = true) { 'item' => $arr, '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 @@ -2339,6 +2363,12 @@ function item_store_update($arr, $allow_exec = false, $deliver = true) { */ call_hooks('post_remote_update_end', $arr); + /** + * @hooks item_stored_update + * Called after updated item is stored in the database. + */ + call_hooks('item_stored_update',$arr); + if($deliver) { send_status_notifications($orig_post_id,$arr); tag_deliver($uid,$orig_post_id); diff --git a/include/plugin.php b/include/plugin.php index 8ceb6417e..7eeb39ce8 100755 --- a/include/plugin.php +++ b/include/plugin.php @@ -736,8 +736,8 @@ function get_theme_info($theme){ 'description' => '', 'author' => array(), 'version' => '', - 'minversion' => '', - 'maxversion' => '', + 'minversion' => STD_VERSION, + 'maxversion' => STD_VERSION, 'compat' => '', 'credits' => '', 'maintainer' => array(), |