- used empty() instead of x()
- removed superflous count()

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2018-05-14 22:25:39 +02:00
parent d0c7ba5257
commit f34d72c143
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
2 changed files with 4 additions and 3 deletions

View file

@ -391,8 +391,8 @@ function visible_activity($item) {
}
}
/// @TODO such things are unneccessary code-complexibilities and should be avoided
if (activity_match($item['verb'], ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE && !(x($item, 'self') && ($item['uid'] == local_user()))) {
// @TODO below if() block can be rewritten to a single line: $isVisible = allConditionsHere;
if (activity_match($item['verb'], ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE && empty($item['self']) && $item['uid'] == local_user()) {
return false;
}