use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\Proxy as ProxyUtils;
+use Friendica\Util\Strings;
use Friendica\Util\Temporal;
require_once 'include/dba.php';
$profile['picdate'] = urlencode(defaults($profile, 'picdate', ''));
if (($profile['network'] != '') && ($profile['network'] != Protocol::DFRN)) {
- $profile['network_name'] = format_network_name($profile['network'], $profile['url']);
+ $profile['network_name'] = Strings::formatNetworkName($profile['network'], $profile['url']);
} else {
$profile['network_name'] = '';
}
// Is the local user already connected to that user?
if ($connect && local_user()) {
if (isset($profile['url'])) {
- $profile_url = normalise_link($profile['url']);
+ $profile_url = Strings::normaliseLink($profile['url']);
} else {
- $profile_url = normalise_link(System::baseUrl() . '/profile/' . $profile['nickname']);
+ $profile_url = Strings::normaliseLink(System::baseUrl() . '/profile/' . $profile['nickname']);
}
if (DBA::exists('contact', ['pending' => false, 'uid' => local_user(), 'nurl' => $profile_url])) {
$r = q(
"SELECT `url` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `rel` = %d",
intval($profile['uid']),
- DBA::escape(normalise_link(self::getMyURL())),
+ DBA::escape(Strings::normaliseLink(self::getMyURL())),
intval(Contact::FRIEND)
);
}
$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;
}
$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;
$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)
$tab = false;
if (x($_GET, 'tab')) {
- $tab = notags(trim($_GET['tab']));
+ $tab = Strings::escapeTags(trim($_GET['tab']));
}
$url = System::baseUrl() . '/profile/' . $nickname;
}
$achar = strpos($s, '?') ? '&' : '?';
$mine = self::getMyURL();
- if ($mine && !link_compare($mine, $s)) {
+ if ($mine && !Strings::compareLink($mine, $s)) {
return $s . $achar . 'zrl=' . urlencode($mine);
}
return $s;