]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Profile.php
Rename removeTags to escapeTags
[friendica.git] / src / Model / Profile.php
index 81a7630bbdda6027222d28a4bf04f2ee99f1af5a..c45bcdb84bd6fa75e6322386724cc5225310d8fa 100644 (file)
@@ -25,6 +25,7 @@ use Friendica\Protocol\Diaspora;
 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';
@@ -296,7 +297,7 @@ class Profile
                $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'] = '';
                }
@@ -326,9 +327,9 @@ class Profile
                // 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])) {
@@ -370,7 +371,7 @@ class Profile
                                $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)
                                );
                        }
@@ -617,7 +618,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 +704,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 +753,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)
@@ -881,7 +882,7 @@ class Profile
 
                $tab = false;
                if (x($_GET, 'tab')) {
-                       $tab = notags(trim($_GET['tab']));
+                       $tab = Strings::escapeTags(trim($_GET['tab']));
                }
 
                $url = System::baseUrl() . '/profile/' . $nickname;
@@ -1140,7 +1141,7 @@ class Profile
                }
                $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;