use Friendica\Util\Temporal;
use Friendica\Util\XML;
-require_once "include/acl_selectors.php";
-
function item_extract_images($body) {
$saved_image = [];
return "`item`.`author-id`, `item`.`author-link`, `item`.`author-name`, `item`.`author-avatar`,
`item`.`owner-id`, `item`.`owner-link`, `item`.`owner-name`, `item`.`owner-avatar`,
`item`.`contact-id`, `item`.`uid`, `item`.`id`, `item`.`parent`,
- `item`.`uri`, `item`.`thr-parent`, `item`.`parent-uri`,
+ `item`.`uri`, `item`.`thr-parent`, `item`.`parent-uri`, `item`.`content-warning`,
`item`.`commented`, `item`.`created`, `item`.`edited`, `item`.`received`,
`item`.`verb`, `item`.`object-type`, `item`.`postopts`, `item`.`plink`,
`item`.`guid`, `item`.`wall`, `item`.`private`, `item`.`starred`,
list($categories, $folders) = get_cats_and_terms($item);
$profile_name_e = $profile_name;
- $item['title_e'] = $item['title'];
+
+ if (!empty($item['content-warning']) && PConfig::get(local_user(), 'system', 'disable_cw', false)) {
+ $title_e = ucfirst($item['content-warning']);
+ } else {
+ $title_e = $item['title'];
+ }
+
$body_e = $body;
$tags_e = $tags;
$hashtags_e = $hashtags;
'sparkle' => $sparkle,
'lock' => $lock,
'thumb' => System::removedBaseUrl(proxy_url($item['author-thumb'], false, PROXY_SIZE_THUMB)),
- 'title' => $item['title_e'],
+ 'title' => $title_e,
'body' => $body_e,
'tags' => $tags_e,
'hashtags' => $hashtags_e,
$tpl = get_markup_template("jot.tpl");
$o .= replace_macros($tpl,[
+ '$new_post' => L10n::t('New Post'),
'$return_path' => $query_str,
'$action' => 'item',
'$share' => defaults($x, 'button', L10n::t('Share')),