diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-05-06 21:43:15 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-05-06 21:43:15 -0700 |
commit | e85593e97057eaf041e6e63ec11b12b6beb2e0ce (patch) | |
tree | 2975846c893f64c35f50c449a6c1aa65000f0c5f /include/text.php | |
parent | c186e6ed96a535c2bc94f36702ef0ee6fc0343c2 (diff) | |
download | volse-hubzilla-e85593e97057eaf041e6e63ec11b12b6beb2e0ce.tar.gz volse-hubzilla-e85593e97057eaf041e6e63ec11b12b6beb2e0ce.tar.bz2 volse-hubzilla-e85593e97057eaf041e6e63ec11b12b6beb2e0ce.zip |
Hopefully this will make item_cache the default
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/text.php b/include/text.php index 71db0ec30..c7b662879 100644 --- a/include/text.php +++ b/include/text.php @@ -1379,15 +1379,15 @@ function generate_named_map($location) { function prepare_body(&$item,$attach = false) { - if(get_config('system','item_cache') && $item['html']) - return $item['html']; + if($item['html']) + return bb_observer($item['html']); call_hooks('prepare_body_init', $item); unobscure($item); - $s = prepare_text($item['body'],$item['mimetype']); + $s = prepare_text($item['body'],$item['mimetype'], true); $prep_arr = array('item' => $item, 'html' => $s); call_hooks('prepare_body', $prep_arr); @@ -1452,11 +1452,11 @@ function prepare_body(&$item,$attach = false) { $prep_arr = array('item' => $item, 'html' => $s); call_hooks('prepare_body_final', $prep_arr); - if(get_config('system','item_cache')) - q("update item set html = '%s' where id = %d", - dbesc($prep_arr['html']), - intval($item['id']) - ); + + q("update item set html = '%s' where id = %d", + dbesc($prep_arr['html']), + intval($item['id']) + ); return $prep_arr['html']; } @@ -1468,7 +1468,7 @@ function prepare_body(&$item,$attach = false) { * @param sting $content_type * @return string */ -function prepare_text($text, $content_type = 'text/bbcode') { +function prepare_text($text, $content_type = 'text/bbcode', $cache = false) { switch($content_type) { case 'text/plain': @@ -1506,9 +1506,9 @@ function prepare_text($text, $content_type = 'text/bbcode') { require_once('include/bbcode.php'); if(stristr($text,'[nosmile]')) - $s = bbcode($text); + $s = bbcode($text,false,true,$cache); else - $s = smilies(bbcode($text)); + $s = smilies(bbcode($text,false,true,$cache)); $s = zidify_links($s); break; } |