X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fconversation.php;h=8a2887d6b742f6f9d9aed74677469e69446ea102;hb=abd7b2666c1ba79d44db0e71b369433cf8c8e678;hp=dc99a831968dfb214c3b0ffdefde45416232460d;hpb=c9d403bcb5a68e79f0ac4facc82661123a9eb595;p=friendica.git diff --git a/include/conversation.php b/include/conversation.php index dc99a83196..8a2887d6b7 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -21,8 +21,6 @@ use Friendica\Util\DateTimeFormat; use Friendica\Util\Temporal; use Friendica\Util\XML; -require_once "include/acl_selectors.php"; - function item_extract_images($body) { $saved_image = []; @@ -445,7 +443,7 @@ These Fields are not added below (yet). They are here to for bug search. 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`, @@ -758,7 +756,13 @@ function conversation(App $a, $items, $mode, $update, $preview = false, $order = 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; @@ -783,7 +787,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false, $order = '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, @@ -1331,6 +1335,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) $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')),