Functions moved to Strings class

implement functions from Strings class
This commit is contained in:
Adam Magness 2018-11-08 11:45:19 -05:00
parent 1746d0814d
commit 1ac32c622e
22 changed files with 80 additions and 58 deletions

View file

@ -11,6 +11,7 @@ use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Strings;
function blockem_install()
{
@ -100,7 +101,7 @@ function blockem_enotify_store(App $a, array &$b)
continue;
}
if (link_compare($b['url'], $word)) {
if (Strings::compareLink($b['url'], $word)) {
$found = true;
break;
}
@ -133,7 +134,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data)
$found = false;
foreach ($profiles_array as $word) {
if (link_compare($hook_data['item']['author-link'], trim($word))) {
if (Strings::compareLink($hook_data['item']['author-link'], trim($word))) {
$found = true;
break;
}
@ -192,7 +193,7 @@ function blockem_item_photo_menu(App $a, array &$b)
if (!empty($a->data['blockem'])) {
foreach($a->data['blockem'] as $bloke) {
if (link_compare($bloke,$author)) {
if (Strings::compareLink($bloke,$author)) {
$blocked = true;
break;
}
@ -231,7 +232,7 @@ function blockem_init(App $a)
if (count($arr)) {
foreach ($arr as $x) {
if (!link_compare(trim($x), trim($_GET['unblock']))) {
if (!Strings::compareLink(trim($x), trim($_GET['unblock']))) {
$newarr[] = $x;
}
}