X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fevents.php;h=1b5dfdf31c03618f2ed091dd72ac59be28473281;hb=0c9cc29a51941eb572bf16fd5489d0947d47d033;hp=617627ac4c5d92cba8ab3b2ccf0e854789b83629;hpb=7495a34b32fdf1ea08bd2eaa378b216345077f7f;p=friendica.git diff --git a/mod/events.php b/mod/events.php index 617627ac4c..1b5dfdf31c 100644 --- a/mod/events.php +++ b/mod/events.php @@ -8,6 +8,27 @@ require_once('include/datetime.php'); require_once('include/event.php'); require_once('include/items.php'); +function events_init(&$a) { + if(! local_user()) + return; + + if($a->argc == 1) { + // if it's a json request abort here becaus we don't + // need the widget data + if($a->argv[1] === 'json') + return; + + $cal_widget = widget_events(); + + if(! x($a->page,'aside')) + $a->page['aside'] = ''; + + $a->page['aside'] .= $cal_widget; + } + + return; +} + function events_post(&$a) { logger('post: ' . print_r($_REQUEST,true)); @@ -156,7 +177,7 @@ function events_post(&$a) { $item_id = event_store($datarray); if(! $cid) - proc_run('php',"include/notifier.php","event","$item_id"); + proc_run(PRIORITY_HIGH, "include/notifier.php", "event", $item_id); goaway($_SESSION['return_url']); } @@ -485,7 +506,8 @@ function events_content(&$a) { '$acl' => $acl, '$submit' => t('Submit'), '$basic' => t("Basic"), - '$advanced' => t("Advanced") + '$advanced' => t("Advanced"), + '$permissions' => t('Permissions'), ));