]> git.mxchange.org Git - friendica.git/commitdiff
Fix: Undefined array key "content-warning"
authorMichael <heluecht@pirati.ca>
Sat, 18 May 2024 11:15:47 +0000 (11:15 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 18 May 2024 11:15:47 +0000 (11:15 +0000)
mod/item.php

index 1f826a42d0f5fd28c305f61e7c7122f9b20a7dd4..d6bcd3902952bc304cb013c5418fee9af6470e55 100644 (file)
@@ -234,13 +234,15 @@ function item_insert(int $uid, array $request, bool $preview, string $return_pat
 
 function item_process(array $post, array $request, bool $preview, string $return_path): array
 {
-       $post['self']       = true;
-       $post['api_source'] = false;
-       $post['attach']     = '';
-       $post['title']      = trim($request['title'] ?? '');
-       $post['body']       = $request['body'] ?? '';
-       $post['location']   = trim($request['location'] ?? '');
-       $post['coord']      = trim($request['coord'] ?? '');
+       $post['self']            = true;
+       $post['api_source']      = false;
+       $post['attach']          = '';
+       $post['title']           = trim($request['title'] ?? '');
+       $post['content-warning'] = trim($request['summary'] ?? '');
+       $post['sensitive']       = !empty($request['sensitive'] ?? false);
+       $post['body']            = $request['body'] ?? '';
+       $post['location']        = trim($request['location'] ?? '');
+       $post['coord']           = trim($request['coord'] ?? '');
 
        $post = DI::contentItem()->addCategories($post, $request['category'] ?? '');