Update function calls

update function calls for moved functions
This commit is contained in:
Adam Magness 2018-11-06 09:52:10 -05:00
parent 1d571a527b
commit 352da9bcf3
5 changed files with 16 additions and 16 deletions

View file

@ -451,7 +451,7 @@ function list_post_dates($uid, $wall)
$dend = substr($dnow, 0, 8) . Temporal::getDaysInMonth(intval($dnow), intval(substr($dnow, 5))); $dend = substr($dnow, 0, 8) . Temporal::getDaysInMonth(intval($dnow), intval(substr($dnow, 5)));
$start_month = DateTimeFormat::utc($dstart, 'Y-m-d'); $start_month = DateTimeFormat::utc($dstart, 'Y-m-d');
$end_month = DateTimeFormat::utc($dend, '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])) { if (empty($ret[$dyear])) {
$ret[$dyear] = []; $ret[$dyear] = [];

View file

@ -40,7 +40,7 @@ function poke_init(App $a)
$verb = notags(trim($_GET['verb'])); $verb = notags(trim($_GET['verb']));
$verbs = get_poke_verbs(); $verbs = L10n::getPokeVerbs();
if (!array_key_exists($verb, $verbs)) { if (!array_key_exists($verb, $verbs)) {
return; return;
@ -171,7 +171,7 @@ function poke_content(App $a)
$parent = (x($_GET,'parent') ? intval($_GET['parent']) : '0'); $parent = (x($_GET,'parent') ? intval($_GET['parent']) : '0');
$verbs = get_poke_verbs(); $verbs = L10n::getPokeVerbs();
$shortlist = []; $shortlist = [];
foreach ($verbs as $k => $v) { foreach ($verbs as $k => $v) {

View 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. $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']) ? !empty($event['adjust']) ?
DateTimeFormat::local($event['start'], $bd_format) : DateTimeFormat::utc($event['start'], $bd_format) DateTimeFormat::local($event['start'], $bd_format) : DateTimeFormat::utc($event['start'], $bd_format)
); );
if (!empty($event['finish'])) { if (!empty($event['finish'])) {
$event_end = day_translate( $event_end = L10n::getDay(
!empty($event['adjust']) ? !empty($event['adjust']) ?
DateTimeFormat::local($event['finish'], $bd_format) : DateTimeFormat::utc($event['finish'], $bd_format) 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'); $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'); $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 = $event['adjust'] ? DateTimeFormat::local($event['start'], $fmt) : DateTimeFormat::utc($event['start'], $fmt);
$day = day_translate($day); $day = L10n::getDay($day);
if ($event['nofinish']) { if ($event['nofinish']) {
$end = null; $end = null;
@ -841,14 +841,14 @@ class Event extends BaseObject
$tformat = L10n::t('g:i A'); // 8:01 AM. $tformat = L10n::t('g:i A'); // 8:01 AM.
// Convert the time to different formats. // Convert the time to different formats.
$dtstart_dt = day_translate( $dtstart_dt = L10n::getDay(
$item['event-adjust'] ? $item['event-adjust'] ?
DateTimeFormat::local($item['event-start'], $dformat) DateTimeFormat::local($item['event-start'], $dformat)
: DateTimeFormat::utc($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'); $dtstart_title = DateTimeFormat::utc($item['event-start'], $item['event-adjust'] ? DateTimeFormat::ATOM : 'Y-m-d\TH:i:s');
// Format: Jan till Dec. // Format: Jan till Dec.
$month_short = day_short_translate( $month_short = L10n::getDayShort(
$item['event-adjust'] ? $item['event-adjust'] ?
DateTimeFormat::local($item['event-start'], 'M') DateTimeFormat::local($item['event-start'], 'M')
: DateTimeFormat::utc($item['event-start'], 'M') : DateTimeFormat::utc($item['event-start'], 'M')
@ -860,7 +860,7 @@ class Event extends BaseObject
$start_time = $item['event-adjust'] ? $start_time = $item['event-adjust'] ?
DateTimeFormat::local($item['event-start'], $tformat) DateTimeFormat::local($item['event-start'], $tformat)
: DateTimeFormat::utc($item['event-start'], $tformat); : DateTimeFormat::utc($item['event-start'], $tformat);
$start_short = day_short_translate( $start_short = L10n::getDayShort(
$item['event-adjust'] ? $item['event-adjust'] ?
DateTimeFormat::local($item['event-start'], $dformat_short) DateTimeFormat::local($item['event-start'], $dformat_short)
: DateTimeFormat::utc($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 the option 'nofinisch' isn't set, we need to format the finish date/time.
if (!$item['event-nofinish']) { if (!$item['event-nofinish']) {
$finish = true; $finish = true;
$dtend_dt = day_translate( $dtend_dt = L10n::getDay(
$item['event-adjust'] ? $item['event-adjust'] ?
DateTimeFormat::local($item['event-finish'], $dformat) DateTimeFormat::local($item['event-finish'], $dformat)
: DateTimeFormat::utc($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'); $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'] ? $item['event-adjust'] ?
DateTimeFormat::local($item['event-finish'], $dformat_short) DateTimeFormat::local($item['event-finish'], $dformat_short)
: DateTimeFormat::utc($item['event-finish'], $dformat_short) : DateTimeFormat::utc($item['event-finish'], $dformat_short)

View file

@ -617,7 +617,7 @@ class Profile
$rr['link'] = Contact::magicLink($rr['url']); $rr['link'] = Contact::magicLink($rr['url']);
$rr['title'] = $rr['name']; $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['startime'] = null;
$rr['today'] = $today; $rr['today'] = $today;
} }
@ -703,7 +703,7 @@ class Profile
$rr['title'] = $title; $rr['title'] = $title;
$rr['description'] = $description; $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['startime'] = $strt;
$rr['today'] = $today; $rr['today'] = $today;
@ -752,7 +752,7 @@ class Profile
$year_bd_format = L10n::t('j F, Y'); $year_bd_format = L10n::t('j F, Y');
$short_bd_format = L10n::t('j F'); $short_bd_format = L10n::t('j F');
$val = day_translate( $val = L10n::getDay(
intval($a->profile['dob']) ? intval($a->profile['dob']) ?
DateTimeFormat::utc($a->profile['dob'] . ' 00:00 +00:00', $year_bd_format) 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) : DateTimeFormat::utc('2001-' . substr($a->profile['dob'], 5) . ' 00:00 +00:00', $short_bd_format)

View file

@ -463,11 +463,11 @@ class Temporal
$tddate = intval(DateTimeFormat::localNow('j')); $tddate = intval(DateTimeFormat::localNow('j'));
} }
$str_month = day_translate($mtab[$m]); $str_month = L10n::getDay($mtab[$m]);
$o = '<table class="calendar' . $class . '">'; $o = '<table class="calendar' . $class . '">';
$o .= "<caption>$str_month $y</caption><tr>"; $o .= "<caption>$str_month $y</caption><tr>";
for ($a = 0; $a < 7; $a ++) { 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>'; $o .= '</tr><tr>';