mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 03:55:18 +00:00
fixing nits
This commit is contained in:
parent
52805a5ac6
commit
084438bffd
2 changed files with 7 additions and 6 deletions
|
@ -2829,13 +2829,18 @@ function tgroup_check($uid, $item) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$u = channelx_by_n($uid);
|
||||||
|
if (! $u) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// post to group via DM
|
// post to group via DM
|
||||||
|
|
||||||
if ($is_group) {
|
if ($is_group) {
|
||||||
if (intval($item['item_private']) === 2 && $item['mid'] === $item['parent_mid']) {
|
if (intval($item['item_private']) === 2 && $item['mid'] === $item['parent_mid']) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (get_pconfig($uid,'system','post_via_mentions',in_array($role, ['forum','forum_moderated']))) {
|
if (get_pconfig($uid,'system','post_via_mentions',in_array($role, ['forum','forum_moderated'])) && i_am_mentioned($u,$item)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2851,10 +2856,6 @@ function tgroup_check($uid, $item) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$u = channelx_by_n($uid);
|
|
||||||
if (! $u) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (($is_collection) && (perm_is_allowed($uid,$item['author_xchan'],'write_collection') || $item['author_xchan'] === $u['channel_parent'])) {
|
if (($is_collection) && (perm_is_allowed($uid,$item['author_xchan'],'write_collection') || $item['author_xchan'] === $u['channel_parent'])) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -371,7 +371,7 @@ function import_remote_xchan_photo($photo, $xchan, $thing = false) {
|
||||||
@file_put_contents('cache/' . $hash, $result['body']);
|
@file_put_contents('cache/' . $hash, $result['body']);
|
||||||
$info = getimagesize('cache/' . $hash);
|
$info = getimagesize('cache/' . $hash);
|
||||||
@unlink('cache/' . $hash);
|
@unlink('cache/' . $hash);
|
||||||
if (isset($info) && array_key_exists('mime',$info)) {
|
if (isset($info) && is_array($info) && array_key_exists('mime',$info)) {
|
||||||
$type = $info['mime'];
|
$type = $info['mime'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue