]> git.mxchange.org Git - friendica.git/commitdiff
Update function calls
authorAdam Magness <adam.magness@gmail.com>
Tue, 6 Nov 2018 14:52:10 +0000 (09:52 -0500)
committerAdam Magness <adam.magness@gmail.com>
Tue, 6 Nov 2018 14:52:58 +0000 (09:52 -0500)
update function calls for moved functions

include/items.php
mod/poke.php
src/Model/Event.php
src/Model/Profile.php
src/Util/Temporal.php

index 961a20b240e01548879faad46ffeb5630e16202c..f28f8f57189ba321a12633c54d563f18e83226f6 100644 (file)
@@ -451,7 +451,7 @@ function list_post_dates($uid, $wall)
                $dend = substr($dnow, 0, 8) . Temporal::getDaysInMonth(intval($dnow), intval(substr($dnow, 5)));
                $start_month = DateTimeFormat::utc($dstart, 'Y-m-d');
                $end_month = DateTimeFormat::utc($dend, 'Y-m-d');
-               $str = day_translate(DateTimeFormat::utc($dnow, 'F'));
+               $str = L10n::getDay(DateTimeFormat::utc($dnow, 'F'));
 
                if (empty($ret[$dyear])) {
                        $ret[$dyear] = [];
index 60ed5c402e701ed42533f57aa460b2913444b0f8..e8c43213a799c536e2b92b7243739f2783d00c1a 100644 (file)
@@ -40,7 +40,7 @@ function poke_init(App $a)
 
        $verb = notags(trim($_GET['verb']));
 
-       $verbs = get_poke_verbs();
+       $verbs = L10n::getPokeVerbs();
 
        if (!array_key_exists($verb, $verbs)) {
                return;
@@ -171,7 +171,7 @@ function poke_content(App $a)
        $parent = (x($_GET,'parent') ? intval($_GET['parent']) : '0');
 
 
-       $verbs = get_poke_verbs();
+       $verbs = L10n::getPokeVerbs();
 
        $shortlist = [];
        foreach ($verbs as $k => $v) {
index f4df6ac9f64496aa0f103f98db5ab5812efd3684..735638287144e6b83454b55b53bdbe9be25919b8 100644 (file)
@@ -37,13 +37,13 @@ class Event extends BaseObject
 
                $bd_format = L10n::t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8 AM.
 
-               $event_start = day_translate(
+               $event_start = L10n::getDay(
                        !empty($event['adjust']) ?
                        DateTimeFormat::local($event['start'], $bd_format) : DateTimeFormat::utc($event['start'], $bd_format)
                );
 
                if (!empty($event['finish'])) {
-                       $event_end = day_translate(
+                       $event_end = L10n::getDay(
                                !empty($event['adjust']) ?
                                DateTimeFormat::local($event['finish'], $bd_format) : DateTimeFormat::utc($event['finish'], $bd_format)
                        );
@@ -564,7 +564,7 @@ class Event extends BaseObject
                        $start = $event['adjust'] ? DateTimeFormat::local($event['start'], 'c')  : DateTimeFormat::utc($event['start'], 'c');
                        $j     = $event['adjust'] ? DateTimeFormat::local($event['start'], 'j')  : DateTimeFormat::utc($event['start'], 'j');
                        $day   = $event['adjust'] ? DateTimeFormat::local($event['start'], $fmt) : DateTimeFormat::utc($event['start'], $fmt);
-                       $day   = day_translate($day);
+                       $day   = L10n::getDay($day);
 
                        if ($event['nofinish']) {
                                $end = null;
@@ -841,14 +841,14 @@ class Event extends BaseObject
                $tformat       = L10n::t('g:i A'); // 8:01 AM.
 
                // Convert the time to different formats.
-               $dtstart_dt = day_translate(
+               $dtstart_dt = L10n::getDay(
                        $item['event-adjust'] ?
                                DateTimeFormat::local($item['event-start'], $dformat)
                                : DateTimeFormat::utc($item['event-start'], $dformat)
                );
                $dtstart_title = DateTimeFormat::utc($item['event-start'], $item['event-adjust'] ? DateTimeFormat::ATOM : 'Y-m-d\TH:i:s');
                // Format: Jan till Dec.
-               $month_short = day_short_translate(
+               $month_short = L10n::getDayShort(
                        $item['event-adjust'] ?
                                DateTimeFormat::local($item['event-start'], 'M')
                                : DateTimeFormat::utc($item['event-start'], 'M')
@@ -860,7 +860,7 @@ class Event extends BaseObject
                $start_time = $item['event-adjust'] ?
                        DateTimeFormat::local($item['event-start'], $tformat)
                        : DateTimeFormat::utc($item['event-start'], $tformat);
-               $start_short = day_short_translate(
+               $start_short = L10n::getDayShort(
                        $item['event-adjust'] ?
                                DateTimeFormat::local($item['event-start'], $dformat_short)
                                : DateTimeFormat::utc($item['event-start'], $dformat_short)
@@ -869,13 +869,13 @@ class Event extends BaseObject
                // If the option 'nofinisch' isn't set, we need to format the finish date/time.
                if (!$item['event-nofinish']) {
                        $finish = true;
-                       $dtend_dt  = day_translate(
+                       $dtend_dt  = L10n::getDay(
                                $item['event-adjust'] ?
                                        DateTimeFormat::local($item['event-finish'], $dformat)
                                        : DateTimeFormat::utc($item['event-finish'], $dformat)
                        );
                        $dtend_title = DateTimeFormat::utc($item['event-finish'], $item['event-adjust'] ? DateTimeFormat::ATOM : 'Y-m-d\TH:i:s');
-                       $end_short = day_short_translate(
+                       $end_short = L10n::getDayShort(
                                $item['event-adjust'] ?
                                        DateTimeFormat::local($item['event-finish'], $dformat_short)
                                        : DateTimeFormat::utc($item['event-finish'], $dformat_short)
index 81a7630bbdda6027222d28a4bf04f2ee99f1af5a..95a6bd35bcf74c96ff4e587bb36b56b13db381c4 100644 (file)
@@ -617,7 +617,7 @@ class Profile
 
                                        $rr['link'] = Contact::magicLink($rr['url']);
                                        $rr['title'] = $rr['name'];
-                                       $rr['date'] = day_translate(DateTimeFormat::convert($rr['start'], $a->timezone, 'UTC', $rr['adjust'] ? $bd_format : $bd_short)) . (($today) ? ' ' . L10n::t('[today]') : '');
+                                       $rr['date'] = L10n::getDay(DateTimeFormat::convert($rr['start'], $a->timezone, 'UTC', $rr['adjust'] ? $bd_format : $bd_short)) . (($today) ? ' ' . L10n::t('[today]') : '');
                                        $rr['startime'] = null;
                                        $rr['today'] = $today;
                                }
@@ -703,7 +703,7 @@ class Profile
 
                                $rr['title'] = $title;
                                $rr['description'] = $description;
-                               $rr['date'] = day_translate(DateTimeFormat::convert($rr['start'], $rr['adjust'] ? $a->timezone : 'UTC', 'UTC', $bd_format)) . (($today) ? ' ' . L10n::t('[today]') : '');
+                               $rr['date'] = L10n::getDay(DateTimeFormat::convert($rr['start'], $rr['adjust'] ? $a->timezone : 'UTC', 'UTC', $bd_format)) . (($today) ? ' ' . L10n::t('[today]') : '');
                                $rr['startime'] = $strt;
                                $rr['today'] = $today;
 
@@ -752,7 +752,7 @@ class Profile
                                $year_bd_format = L10n::t('j F, Y');
                                $short_bd_format = L10n::t('j F');
 
-                               $val = day_translate(
+                               $val = L10n::getDay(
                                        intval($a->profile['dob']) ?
                                                DateTimeFormat::utc($a->profile['dob'] . ' 00:00 +00:00', $year_bd_format)
                                                : DateTimeFormat::utc('2001-' . substr($a->profile['dob'], 5) . ' 00:00 +00:00', $short_bd_format)
index 670c273c045cbb6a8f99e5fa79a4d2ca03eb200b..140d3db37a38c7353ef17faa6d2ce31a8ca17ba4 100644 (file)
@@ -463,11 +463,11 @@ class Temporal
                        $tddate = intval(DateTimeFormat::localNow('j'));
                }
 
-               $str_month = day_translate($mtab[$m]);
+               $str_month = L10n::getDay($mtab[$m]);
                $o = '<table class="calendar' . $class . '">';
                $o .= "<caption>$str_month $y</caption><tr>";
                for ($a = 0; $a < 7; $a ++) {
-                       $o .= '<th>' . mb_substr(day_translate($dn[$a]), 0, 3, 'UTF-8') . '</th>';
+                       $o .= '<th>' . mb_substr(L10n::getDay($dn[$a]), 0, 3, 'UTF-8') . '</th>';
                }
 
                $o .= '</tr><tr>';