]> git.mxchange.org Git - friendica.git/blobdiff - mod/cal.php
Merge pull request #8044 from annando/contact-adding
[friendica.git] / mod / cal.php
index 5a4f0a9c51731ba275fa639aa82286ff6b0af063..c388e9521552cef8fa1aa4a86612ecda7439970b 100644 (file)
@@ -13,7 +13,6 @@ use Friendica\Content\Widget;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
-use Friendica\Core\System;
 use Friendica\Core\Session;
 use Friendica\Database\DBA;
 use Friendica\DI;
@@ -67,12 +66,12 @@ function cal_init(App $a)
 
        $cal_widget = Widget\CalendarExport::getHTML();
 
-       if (empty($a->page['aside'])) {
-               $a->page['aside'] = '';
+       if (empty(DI::page()['aside'])) {
+               DI::page()['aside'] = '';
        }
 
-       $a->page['aside'] .= $vcard_widget;
-       $a->page['aside'] .= $cal_widget;
+       DI::page()['aside'] .= $vcard_widget;
+       DI::page()['aside'] .= $cal_widget;
 
        return;
 }
@@ -85,7 +84,7 @@ function cal_content(App $a)
        $i18n = Event::getStrings();
 
        $htpl = Renderer::getMarkupTemplate('event_head.tpl');
-       $a->page['htmlhead'] .= Renderer::replaceMacros($htpl, [
+       DI::page()['htmlhead'] .= Renderer::replaceMacros($htpl, [
                '$module_url' => '/cal/' . $a->data['user']['nickname'],
                '$modparams' => 2,
                '$i18n' => $i18n,
@@ -221,7 +220,7 @@ function cal_content(App $a)
                        foreach ($r as $rr) {
                                $j = $rr['adjust'] ? DateTimeFormat::local($rr['start'], 'j') : DateTimeFormat::utc($rr['start'], 'j');
                                if (empty($links[$j])) {
-                                       $links[$j] = System::baseUrl() . '/' . $a->cmd . '#link-' . $j;
+                                       $links[$j] = DI::baseUrl() . '/' . DI::args()->getCommand() . '#link-' . $j;
                                }
                        }
                }
@@ -259,8 +258,8 @@ function cal_content(App $a)
                        '$tabs' => $tabs,
                        '$title' => L10n::t('Events'),
                        '$view' => L10n::t('View'),
-                       '$previous' => [System::baseUrl() . "/events/$prevyear/$prevmonth", L10n::t('Previous'), '', ''],
-                       '$next' => [System::baseUrl() . "/events/$nextyear/$nextmonth", L10n::t('Next'), '', ''],
+                       '$previous' => [DI::baseUrl() . "/events/$prevyear/$prevmonth", L10n::t('Previous'), '', ''],
+                       '$next' => [DI::baseUrl() . "/events/$nextyear/$nextmonth", L10n::t('Next'), '', ''],
                        '$calendar' => Temporal::getCalendarTable($y, $m, $links, ' eventcal'),
                        '$events' => $events,
                        "today" => L10n::t("today"),