mirror of
https://github.com/friendica/friendica
synced 2025-04-29 23:44:22 +02:00
link_compare calls
implement compareLink function.
This commit is contained in:
parent
6fc9c6de3b
commit
5276c28a78
19 changed files with 32 additions and 30 deletions
|
@ -2403,7 +2403,7 @@ class Item extends BaseObject
|
|||
public static function setHashtags(&$item)
|
||||
{
|
||||
|
||||
$tags = get_tags($item["body"]);
|
||||
$tags = Strings::getTags($item["body"]);
|
||||
|
||||
// No hashtags?
|
||||
if (!count($tags)) {
|
||||
|
@ -2556,7 +2556,7 @@ class Item extends BaseObject
|
|||
$cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches, PREG_SET_ORDER);
|
||||
if ($cnt) {
|
||||
foreach ($matches as $mtch) {
|
||||
if (link_compare($link, $mtch[1]) || link_compare($dlink, $mtch[1])) {
|
||||
if (Strings::compareLink($link, $mtch[1]) || Strings::compareLink($dlink, $mtch[1])) {
|
||||
$mention = true;
|
||||
Logger::log('mention found: ' . $mtch[2]);
|
||||
}
|
||||
|
|
|
@ -1141,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;
|
||||
|
|
|
@ -499,7 +499,7 @@ class User
|
|||
throw new Exception(L10n::t('Your email domain is not among those allowed on this site.'));
|
||||
}
|
||||
|
||||
if (!valid_email($email) || !Network::isEmailDomainValid($email)) {
|
||||
if (!Strings::isValidEmail($email) || !Network::isEmailDomainValid($email)) {
|
||||
throw new Exception(L10n::t('Not a valid email address.'));
|
||||
}
|
||||
if (self::isNicknameBlocked($nickname)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue