X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fevents.php;h=1b8a509b7015f9c7b9417734494de8350401886e;hb=a9bb53b021b97ded78c2656186755e61befa4dd4;hp=6ce322a4df4894ee767e5310c4ad460072986b74;hpb=9935e8e71180f99d57e52f0e3c0ca99c0836219a;p=friendica.git diff --git a/mod/events.php b/mod/events.php index 6ce322a4df..1b8a509b70 100644 --- a/mod/events.php +++ b/mod/events.php @@ -49,12 +49,6 @@ function events_init(App $a) return; } - // If it's a json request abort here because we don't - // need the widget data - if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] === 'json') { - return; - } - if (empty(DI::page()['aside'])) { DI::page()['aside'] = ''; } @@ -321,19 +315,6 @@ function events_content(App $a) $start = sprintf('%d-%d-%d %d:%d:%d', $y, $m, 1, 0, 0, 0); $finish = sprintf('%d-%d-%d %d:%d:%d', $y, $m, $dim, 23, 59, 59); - if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] === 'json') { - if (!empty($_GET['start'])) { - $start = $_GET['start']; - } - if (!empty($_GET['end'])) { - $finish = $_GET['end']; - } - } - - $start = DateTimeFormat::utc($start); - $finish = DateTimeFormat::utc($finish); - - // put the event parametes in an array so we can better transmit them $event_params = [ 'event_id' => intval($_GET['id'] ?? 0), @@ -369,12 +350,6 @@ function events_content(App $a) $events = Event::prepareListForTemplate($r); } - if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] === 'json') { - header('Content-Type: application/json'); - echo json_encode($events); - exit(); - } - if (!empty($_GET['id'])) { $tpl = Renderer::getMarkupTemplate("event.tpl"); } else {