$this->errorExit($this->t('Permission denied.'), HTTPException\UnauthorizedException::class);
}
- $postId = $this->parameters['post_id'];
+ $postId = $this->parameters['post_id'] ?? 0;
if (empty($postId)) {
$this->errorExit($this->t('Post not found.'), HTTPException\BadRequestException::class);
}
- $fields = ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid',
- 'body', 'title', 'uri-id', 'wall', 'post-type', 'guid'];
+ $fields = [
+ 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid',
+ 'body', 'title', 'uri-id', 'wall', 'post-type', 'guid'
+ ];
$item = Post::selectFirstForUser($this->session->getLocalUserId(), $fields, [
'id' => $postId,
$this->errorExit($this->t('Post not found.'), HTTPException\BadRequestException::class);
}
- $user = User::getById($this->session->getLocalUserId());
- $geoTag = '';
+ $user = User::getById($this->session->getLocalUserId());
$output = Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'), [
'$title' => $this->t('Edit post'),
]);
$this->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('jot-header.tpl'), [
- '$ispublic' => ' ', // $this->t('Visible to <strong>everybody</strong>'),
- '$geotag' => $geoTag,
+ '$ispublic' => ' ',
+ '$geotag' => '',
'$nickname' => $this->app->getLoggedInUserNickname(),
'$is_mobile' => $this->mode->isMobile(),
]);
}
$jotplugins = '';
- $jotnets = '';
Hook::callAll('jot_tool', $jotplugins);
'$pvisit' => 'none',
'$emailcc' => $this->t('CC: email addresses'),
'$public' => $this->t('Public post'),
- '$jotnets' => $jotnets,
'$title' => $item['title'],
'$placeholdertitle' => $this->t('Set title'),
'$category' => Post\Category::getCSVByURIId($item['uri-id'], $this->session->getLocalUserId(), Post\Category::CATEGORY),
'$placeholdercategory' => (Feature::isEnabled($this->session->getLocalUserId(), 'categories') ? $this->t("Categories \x28comma-separated list\x29") : ''),
'$emtitle' => $this->t('Example: bob@example.com, mary@example.com'),
'$lockstate' => $lockstate,
- '$acl' => '', // populate_acl((($group) ? $group_acl : $a->user)),
+ '$acl' => '',
'$bang' => ($lockstate === 'lock' ? '!' : ''),
- '$profile_uid' => $_SESSION['uid'],
+ '$profile_uid' => $this->session->getLocalUserId(),
'$preview' => $this->t('Preview'),
'$jotplugins' => $jotplugins,
'$cancel' => $this->t('Cancel'),
'$rand_num' => Crypto::randomDigits(12),
// Formatting button labels
- '$edbold' => $this->t('Bold'),
- '$editalic' => $this->t('Italic'),
- '$eduline' => $this->t('Underline'),
- '$edquote' => $this->t('Quote'),
- '$edcode' => $this->t('Code'),
- '$edurl' => $this->t('Link'),
- '$edattach' => $this->t('Link or Media'),
+ '$edbold' => $this->t('Bold'),
+ '$editalic' => $this->t('Italic'),
+ '$eduline' => $this->t('Underline'),
+ '$edquote' => $this->t('Quote'),
+ '$edcode' => $this->t('Code'),
+ '$edurl' => $this->t('Link'),
+ '$edattach' => $this->t('Link or Media'),
//jot nav tab (used in some themes)
- '$message' => $this->t('Message'),
- '$browser' => $this->t('Browser'),
- '$shortpermset' => $this->t('Permissions'),
+ '$message' => $this->t('Message'),
+ '$browser' => $this->t('Browser'),
+ '$shortpermset' => $this->t('Permissions'),
'$compose_link_title' => $this->t('Open Compose page'),
]);