[blockem]:

- changed checking condition (CR request)
- added/removed more spaces
This commit is contained in:
Roland Häder 2018-07-20 23:25:50 +02:00
parent e54c99b313
commit 9b5ab3b373
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78

View file

@ -107,6 +107,7 @@ function blockem_enotify_store(App $a, array &$b)
}
}
}
if ($found) {
$b['abort'] = true;
}
@ -119,6 +120,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data)
}
$profiles_string = null;
if (local_user()) {
$profiles_string = PConfig::get(local_user(), 'blockem', 'words');
}
@ -130,6 +132,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))) {
$found = true;
@ -144,7 +147,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data)
function blockem_display_item(App $a, array &$b = null)
{
if (isset($b['output']) && strstr($b['output']['body'], 'id="blockem-wrap-')) {
if (!empty($b['output']['body']) && strstr($b['output']['body'], 'id="blockem-wrap-')) {
$b['output']['thumb'] = $a->get_baseurl() . "/images/person-80.jpg";
}
}