mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 06:15:11 +00:00
bugfixes after php8 fixes
This commit is contained in:
parent
2b289594db
commit
2f3a618eb5
2 changed files with 15 additions and 4 deletions
|
@ -721,7 +721,13 @@ class Activity {
|
|||
}
|
||||
|
||||
if (! (isset($cnv) && $cnv)) {
|
||||
$cnv = get_iconfig($i,'ostatus','conversation');
|
||||
// This method may be called before the item is actually saved - in which case there is no id and IConfig cannot be used
|
||||
if ($i['id']) {
|
||||
$cnv = get_iconfig($i,'ostatus','conversation');
|
||||
}
|
||||
else {
|
||||
$cnv = $i['parent_mid'];
|
||||
}
|
||||
}
|
||||
if (isset($cnv) && $cnv) {
|
||||
$ret['conversation'] = $cnv;
|
||||
|
@ -981,7 +987,12 @@ class Activity {
|
|||
}
|
||||
}
|
||||
if (! isset($cnv)) {
|
||||
$cnv = get_iconfig($i,'ostatus','conversation');
|
||||
if ($i['id']) {
|
||||
$cnv = get_iconfig($i,'ostatus','conversation');
|
||||
}
|
||||
else {
|
||||
$cnv = $i['parent_mid'];
|
||||
}
|
||||
}
|
||||
if ($cnv) {
|
||||
$ret['conversation'] = $cnv;
|
||||
|
|
|
@ -379,7 +379,7 @@ class Item extends Controller {
|
|||
$channel_comments_closed = NULL_DATE;
|
||||
}
|
||||
|
||||
$comments_closed = ((isset($_REQUEST['comments_closed'])) ? datetime_convert(date_default_timezone_get(),'UTC',$_REQUEST['comments_closed']) : $channel_comments_closed);
|
||||
$comments_closed = ((isset($_REQUEST['comments_closed']) && $_REQUEST['comments_closed']) ? datetime_convert(date_default_timezone_get(),'UTC',$_REQUEST['comments_closed']) : $channel_comments_closed);
|
||||
|
||||
$is_poll = ((trim($_REQUEST['poll_answers'][0]) != '' && trim($_REQUEST['poll_answers'][1]) != '') ? true : false);
|
||||
|
||||
|
@ -693,7 +693,7 @@ class Item extends Controller {
|
|||
$acl = new AccessControl($channel);
|
||||
|
||||
$view_policy = PermissionLimits::Get($channel['channel_id'],'view_stream');
|
||||
$comment_policy = ((isset($_REQUEST['comments_from'])) ? intval($_REQUEST['comments_from']) : PermissionLimits::Get($channel['channel_id'],'post_comments'));
|
||||
$comment_policy = ((isset($_REQUEST['comments_from']) && intval($_REQUEST['comments_from'])) ? intval($_REQUEST['comments_from']) : PermissionLimits::Get($channel['channel_id'],'post_comments'));
|
||||
|
||||
$public_policy = ((x($_REQUEST,'public_policy')) ? escape_tags($_REQUEST['public_policy']) : map_scope($view_policy,true));
|
||||
if($webpage)
|
||||
|
|
Loading…
Reference in a new issue