diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-09-17 11:36:25 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-09-17 11:36:25 +0200 |
commit | 1455fa6bc3298ecfae4210410441bd072fd359eb (patch) | |
tree | 0e11f6f89de5d5dccd16ae9f3d3dd147fc156331 | |
parent | a9853e6033ed6a9af639606fa73bb5b40d2fbbcb (diff) | |
parent | eefa47776b90e1d91140633f73fbbddb973db0b4 (diff) | |
download | volse-hubzilla-1455fa6bc3298ecfae4210410441bd072fd359eb.tar.gz volse-hubzilla-1455fa6bc3298ecfae4210410441bd072fd359eb.tar.bz2 volse-hubzilla-1455fa6bc3298ecfae4210410441bd072fd359eb.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
-rw-r--r-- | Zotlabs/Lib/Apps.php | 3 | ||||
-rw-r--r-- | include/attach.php | 5 | ||||
-rw-r--r-- | include/text.php | 8 |
3 files changed, 15 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 6b87ac6cb..aa7e2282d 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -722,6 +722,9 @@ class Apps { ); if($r) { + $hookinfo = Array('uid'=>$uid,'deleted'=>$deleted,'cats'=>$cats,'apps'=>$r); + call_hooks('app_list',$hookinfo); + $r = $hookinfo['apps']; for($x = 0; $x < count($r); $x ++) { if(! $r[$x]['app_system']) $r[$x]['type'] = 'personal'; diff --git a/include/attach.php b/include/attach.php index 202412263..4db5bc435 100644 --- a/include/attach.php +++ b/include/attach.php @@ -1428,6 +1428,8 @@ function attach_delete($channel_id, $resource, $is_photo = 0) { if(! $r) { attach_drop_photo($channel_id,$resource); + $arr = ['channel_id' => $channel_id, 'resource' => $resource, 'is_photo'=>$is_photo]; + call_hooks("attach_delete",$arr); return; } @@ -1486,6 +1488,9 @@ function attach_delete($channel_id, $resource, $is_photo = 0) { intval($channel_id) ); + $arr = ['channel_id' => $channel_id, 'resource' => $resource, 'is_photo'=>$is_photo]; + call_hooks("attach_delete",$arr); + file_activity($channel_id, $object, $object['allow_cid'], $object['allow_gid'], $object['deny_cid'], $object['deny_gid'], 'update', true); return; diff --git a/include/text.php b/include/text.php index 8a07dc113..4b5442985 100644 --- a/include/text.php +++ b/include/text.php @@ -37,7 +37,13 @@ function replace_macros($s, $r) { call_hooks('replace_macros', $arr); $t = App::template_engine(); - $output = $t->replace_macros($arr['template'], $arr['params']); + + try { + $output = $t->replace_macros($arr['template'], $arr['params']); + } catch (Exception $e) { + logger("Unable to render template: ",$e->getMessage()); + $output = "<h3>ERROR: there was an error creating the output.</h3>"; + } return $output; } |