1
1
Fork 0

Fix for CW: Items weren't cached

This commit is contained in:
Hypolite Petovan 2018-03-15 01:32:04 -04:00
parent d376ed6f61
commit e28020c68a

View file

@ -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);