X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcal.php;h=5baffec8a8f423cbfaf30d45739ecbf9f9bcc180;hb=41663c7592abe55a958632c3a48265e0a8544d2b;hp=29095082db65f0ff4e41efd006b5350ce3e227c0;hpb=7d5494dd67f58e1fc63c6571946e26290092321c;p=friendica.git diff --git a/mod/cal.php b/mod/cal.php index 29095082db..5baffec8a8 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -23,7 +23,6 @@ use Friendica\Model\Profile; use Friendica\Protocol\DFRN; use Friendica\Util\DateTimeFormat; use Friendica\Util\Temporal; -use Friendica\Util\Security; function cal_init(App $a) { @@ -72,7 +71,7 @@ function cal_init(App $a) $cal_widget = Widget\CalendarExport::getHTML(); - if (!x($a->page, 'aside')) { + if (empty($a->page['aside'])) { $a->page['aside'] = ''; } @@ -100,7 +99,7 @@ function cal_content(App $a) $mode = 'view'; $y = 0; $m = 0; - $ignored = (x($_REQUEST, 'ignored') ? intval($_REQUEST['ignored']) : 0); + $ignored = (!empty($_REQUEST['ignored']) ? intval($_REQUEST['ignored']) : 0); $format = 'ical'; if ($a->argc == 4 && $a->argv[2] == 'export') { @@ -115,7 +114,7 @@ function cal_content(App $a) $owner_uid = $a->data['user']['uid']; $nick = $a->data['user']['nickname']; - if (x($_SESSION, 'remote') && is_array($_SESSION['remote'])) { + if (!empty($_SESSION['remote']) && is_array($_SESSION['remote'])) { foreach ($_SESSION['remote'] as $v) { if ($v['uid'] == $a->profile['profile_uid']) { $contact_id = $v['cid']; @@ -195,11 +194,11 @@ function cal_content(App $a) if (!empty($a->argv[2]) && ($a->argv[2] === 'json')) { - if (x($_GET, 'start')) { + if (!empty($_GET['start'])) { $start = $_GET['start']; } - if (x($_GET, 'end')) { + if (!empty($_GET['end'])) { $finish = $_GET['end']; } } @@ -233,7 +232,7 @@ function cal_content(App $a) $r = Event::sortByDate($r); foreach ($r as $rr) { $j = $rr['adjust'] ? DateTimeFormat::local($rr['start'], 'j') : DateTimeFormat::utc($rr['start'], 'j'); - if (!x($links, $j)) { + if (empty($links[$j])) { $links[$j] = System::baseUrl() . '/' . $a->cmd . '#link-' . $j; } } @@ -244,11 +243,11 @@ function cal_content(App $a) if (!empty($a->argv[2]) && ($a->argv[2] === 'json')) { echo json_encode($events); - killme(); + exit(); } // links: array('href', 'text', 'extra css classes', 'title') - if (x($_GET, 'id')) { + if (!empty($_GET['id'])) { $tpl = Renderer::getMarkupTemplate("event.tpl"); } else { // if (Config::get('experimentals','new_calendar')==1){ @@ -284,9 +283,9 @@ function cal_content(App $a) "list" => L10n::t("list"), ]); - if (x($_GET, 'id')) { + if (!empty($_GET['id'])) { echo $o; - killme(); + exit(); } return $o; @@ -331,7 +330,7 @@ function cal_content(App $a) header('Content-type: text/calendar'); header('content-disposition: attachment; filename="' . L10n::t('calendar') . '-' . $nick . '.' . $evexport["extension"] . '"'); echo $evexport["content"]; - killme(); + exit(); } return;