normalise_link calls

implement normaliseLink function
This commit is contained in:
Adam Magness 2018-11-08 11:28:29 -05:00
parent 5276c28a78
commit ffc406d819
54 changed files with 248 additions and 222 deletions

View file

@ -327,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])) {
@ -371,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)
);
}