Fixes:
- used empty() instead of x() - removed superflous count() Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
d0c7ba5257
commit
f34d72c143
|
@ -391,8 +391,8 @@ function visible_activity($item) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @TODO such things are unneccessary code-complexibilities and should be avoided
|
// @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 && !(x($item, 'self') && ($item['uid'] == local_user()))) {
|
if (activity_match($item['verb'], ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE && empty($item['self']) && $item['uid'] == local_user()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -254,6 +254,7 @@ function can_write_wall($owner)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @TODO $groups should be array
|
||||||
function permissions_sql($owner_id, $remote_verified = false, $groups = null)
|
function permissions_sql($owner_id, $remote_verified = false, $groups = null)
|
||||||
{
|
{
|
||||||
$local_user = local_user();
|
$local_user = local_user();
|
||||||
|
@ -305,7 +306,7 @@ function permissions_sql($owner_id, $remote_verified = false, $groups = null)
|
||||||
if ($remote_verified) {
|
if ($remote_verified) {
|
||||||
$gs = '<<>>'; // should be impossible to match
|
$gs = '<<>>'; // should be impossible to match
|
||||||
|
|
||||||
if (is_array($groups) && count($groups)) {
|
if (is_array($groups)) {
|
||||||
foreach ($groups as $g) {
|
foreach ($groups as $g) {
|
||||||
$gs .= '|<' . intval($g) . '>';
|
$gs .= '|<' . intval($g) . '>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue