aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-20 20:28:16 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-20 20:28:16 -0700
commitc10a4ca9c7422e2d68b3222e5c1a605ff6f456d6 (patch)
tree6978541be98954ee569bd48630d8c0ac6231e5a0 /include
parente68a00d381925887009830b61bad03bba5fe0868 (diff)
downloadvolse-hubzilla-c10a4ca9c7422e2d68b3222e5c1a605ff6f456d6.tar.gz
volse-hubzilla-c10a4ca9c7422e2d68b3222e5c1a605ff6f456d6.tar.bz2
volse-hubzilla-c10a4ca9c7422e2d68b3222e5c1a605ff6f456d6.zip
re-arrange the html cache a bit
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php2
-rw-r--r--include/text.php26
-rw-r--r--include/zot.php3
3 files changed, 19 insertions, 12 deletions
diff --git a/include/items.php b/include/items.php
index ea98c1a6f..e4d16668a 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2491,6 +2491,8 @@ function item_store_update($arr,$allow_exec = false) {
$arr['title'] = ((array_key_exists('title',$arr) && strlen($arr['title'])) ? trim($arr['title']) : '');
$arr['body'] = ((array_key_exists('body',$arr) && strlen($arr['body'])) ? trim($arr['body']) : '');
+ $arr['html'] = ((array_key_exists('html',$arr) && strlen($arr['html'])) ? trim($arr['html']) : '');
+
$arr['attach'] = ((x($arr,'attach')) ? notags(trim($arr['attach'])) : $orig[0]['attach']);
$arr['app'] = ((x($arr,'app')) ? notags(trim($arr['app'])) : $orig[0]['app']);
// $arr['item_restrict'] = ((x($arr,'item_restrict')) ? intval($arr['item_restrict']) : $orig[0]['item_restrict'] );
diff --git a/include/text.php b/include/text.php
index f2d9f3e69..67410dfbc 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1378,20 +1378,26 @@ function generate_named_map($location) {
function prepare_body(&$item,$attach = false) {
- if($item['html'])
- return bb_observer($item['html']);
-
- call_hooks('prepare_body_init', $item);
-
-
- unobscure($item);
+ if($item['html']) {
+ $s = bb_observer($item['html']);
+ }
+ else {
+ call_hooks('prepare_body_init', $item);
+ unobscure($item);
- $s = prepare_text($item['body'],$item['mimetype'], true);
+ $s = prepare_text($item['body'],$item['mimetype'], true);
+ }
$prep_arr = array('item' => $item, 'html' => $s);
call_hooks('prepare_body', $prep_arr);
$s = $prep_arr['html'];
+
+ q("update item set html = '%s' where id = %d",
+ dbesc($prep_arr['html']),
+ intval($item['id'])
+ );
+
if(! $attach) {
return $s;
}
@@ -1452,10 +1458,6 @@ function prepare_body(&$item,$attach = false) {
call_hooks('prepare_body_final', $prep_arr);
- q("update item set html = '%s' where id = %d",
- dbesc($prep_arr['html']),
- intval($item['id'])
- );
return $prep_arr['html'];
}
diff --git a/include/zot.php b/include/zot.php
index b9a06cdee..22a324edd 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2966,6 +2966,9 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
. "' where abook_xchan = '" . dbesc($clean['abook_xchan']) . "' and abook_channel = " . intval($channel['channel_id']));
}
}
+
+
+
}
}