$body_html = Item::prepareBody($item, true, $preview);
- list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item);
+ list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item, local_user());
if (!empty($item['content-warning']) && DI::pConfig()->get(local_user(), 'system', 'disable_cw', false)) {
$title = ucfirst($item['content-warning']);
function status_editor(App $a, array $x = [], $notes_cid = 0, $popup = false)
{
+ $user = User::getById($a->getLoggedInUserId(), ['uid', 'nickname', 'allow_location', 'default-location']);
+ if (empty($user['uid'])) {
+ return '';
+ }
+
DI::profiler()->startRecording('rendering');
$o = '';
- $user = User::getById($a->getUserId(), ['uid', 'nickname', 'allow_location', 'default-location']);
-
$x['allow_location'] = $x['allow_location'] ?? $user['allow_location'];
$x['default_location'] = $x['default_location'] ?? $user['default-location'];
$x['nickname'] = $x['nickname'] ?? $user['nickname'];