From: Adam Magness Date: Tue, 6 Nov 2018 14:52:10 +0000 (-0500) Subject: Update function calls X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=352da9bcf393e4be886cda3bfe7db7d80365fef2;p=friendica.git Update function calls update function calls for moved functions --- diff --git a/include/items.php b/include/items.php index 961a20b240..f28f8f5718 100644 --- a/include/items.php +++ b/include/items.php @@ -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] = []; diff --git a/mod/poke.php b/mod/poke.php index 60ed5c402e..e8c43213a7 100644 --- a/mod/poke.php +++ b/mod/poke.php @@ -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) { diff --git a/src/Model/Event.php b/src/Model/Event.php index f4df6ac9f6..7356382871 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -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) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 81a7630bbd..95a6bd35bc 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -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) diff --git a/src/Util/Temporal.php b/src/Util/Temporal.php index 670c273c04..140d3db37a 100644 --- a/src/Util/Temporal.php +++ b/src/Util/Temporal.php @@ -463,11 +463,11 @@ class Temporal $tddate = intval(DateTimeFormat::localNow('j')); } - $str_month = day_translate($mtab[$m]); + $str_month = L10n::getDay($mtab[$m]); $o = ''; $o .= ""; for ($a = 0; $a < 7; $a ++) { - $o .= ''; + $o .= ''; } $o .= '';
$str_month $y
' . mb_substr(day_translate($dn[$a]), 0, 3, 'UTF-8') . '' . mb_substr(L10n::getDay($dn[$a]), 0, 3, 'UTF-8') . '