0) { if(!detatch_files($to_remove, $_POST['id'])) { // could not remove attachments // var_dump($to_remove); } } } $result = db_update((int) $_POST['id'], $_POST['content']); if(!$result) { $error = 'Post could not be updated!'; } else { rebuild_feeds(); if($config['activitypub']) { // todo: send UPDATE activity to followers // https://www.w3.org/TR/activitypub/#update-activity-inbox activitypub_update_post($_POST['id']); } header('Location: '.$config['url'].'/'.$_POST['id']); die(); } } } // load the actual post $post = db_select_post($id); if(is_numeric($post['post_deleted'])) { if(!$config['logged_in']) { header('Location: '.$config['url']); } } if($action == 'json') { $json = activitypub_activity_from_post($post, true); header('Content-Type: application/ld+json'); echo($json); die(); } $title_suffix = 'entry #' . $id; require(ROOT.DS.'snippets'.DS.'header.snippet.php'); ?>