From e28020c68ab6bfadffd87eec3bff9e1f2e0fe439 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 15 Mar 2018 01:32:04 -0400 Subject: [PATCH] Fix for CW: Items weren't cached --- include/text.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/text.php b/include/text.php index 0aeaa7203b..00d401cfb3 100644 --- a/include/text.php +++ b/include/text.php @@ -1171,6 +1171,11 @@ function redir_private_images($a, &$item) function put_item_in_cache(&$item, $update = false) { + // Add the content warning + if (!empty($item['content-warning'])) { + $item["body"] = $item['content-warning'] . '[spoiler]' . $item["body"] . '[/spoiler]'; + } + $rendered_hash = defaults($item, 'rendered-hash', ''); if ($rendered_hash == '' @@ -1182,11 +1187,6 @@ function put_item_in_cache(&$item, $update = false) // I'm not sure if we should store it permanently, so we save the old value. $body = $item["body"]; - // Add the content warning - if (!empty($item['content-warning'])) { - $item["body"] = $item['content-warning'] . '[spoiler]' . $item["body"] . '[/spoiler]'; - } - $a = get_app(); redir_private_images($a, $item);