aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <redmatrix@redmatrix.me>2015-04-30 18:16:54 -0700
committerfriendica <redmatrix@redmatrix.me>2015-04-30 18:16:54 -0700
commite4fe068ed51c3d92cdb416492c3cc0ad26c28c1c (patch)
tree5342e3861ca99263f27641131df76a3e59840ebe
parent9fc87d43c9a38b3ba1079412fde81ef0f5190fed (diff)
downloadvolse-hubzilla-e4fe068ed51c3d92cdb416492c3cc0ad26c28c1c.tar.gz
volse-hubzilla-e4fe068ed51c3d92cdb416492c3cc0ad26c28c1c.tar.bz2
volse-hubzilla-e4fe068ed51c3d92cdb416492c3cc0ad26c28c1c.zip
more performance work
-rw-r--r--include/text.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php
index 05251c580..deb5a4c90 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1185,6 +1185,14 @@ function unobscure(&$item) {
$item['title'] = crypto_unencapsulate(json_decode_plus($item['title']),$key);
if($item['body'])
$item['body'] = crypto_unencapsulate(json_decode_plus($item['body']),$key);
+ if(get_config('system','item_cache')) {
+ q("update item set title = '%s', body = '%s', item_flags = %d where id = %d",
+ dbesc($item['title']),
+ dbesc($item['body']),
+ intval($item['item_flags'] - ITEM_OBSCURED),
+ intval($item['id'])
+ );
+ }
}
}
@@ -1371,7 +1379,7 @@ function generate_named_map($location) {
function prepare_body(&$item,$attach = false) {
- if(get_config('system','item_cache') && $item['body'])
+ if(get_config('system','item_cache') && $item['html'])
return $item['html'];
call_hooks('prepare_body_init', $item);