From 4972d7ef6ee740f6eb09d8c7efa9a76ee40973c1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Mar 2012 20:46:37 -0700 Subject: more work on filer, comment level and file tag removal --- include/text.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index c44b4d178..199460d2c 100644 --- a/include/text.php +++ b/include/text.php @@ -874,6 +874,7 @@ function link_compare($a,$b) { if(! function_exists('prepare_body')) { function prepare_body($item,$attach = false) { + $a = get_app(); call_hooks('prepare_body_init', $item); $s = prepare_text($item['body']); @@ -916,7 +917,7 @@ function prepare_body($item,$attach = false) { $matches = false; $cnt = preg_match_all('/<(.*?)>/',$item['file'],$matches,PREG_SET_ORDER); if($cnt) { - logger('prepare_text: categories: ' . print_r($matches,true), LOGGER_DEBUG); +// logger('prepare_text: categories: ' . print_r($matches,true), LOGGER_DEBUG); foreach($matches as $mtch) { if(strlen($x)) $x .= ','; @@ -931,11 +932,11 @@ function prepare_body($item,$attach = false) { $x = ''; $cnt = preg_match_all('/\[(.*?)\]/',$item['file'],$matches,PREG_SET_ORDER); if($cnt) { - logger('prepare_text: filed_under: ' . print_r($matches,true), LOGGER_DEBUG); +// logger('prepare_text: filed_under: ' . print_r($matches,true), LOGGER_DEBUG); foreach($matches as $mtch) { if(strlen($x)) - $x .= ','; - $x .= file_tag_decode($mtch[1]); + $x .= '   '; + $x .= file_tag_decode($mtch[1]). ' ' . t('[remove]') . ''; } if(strlen($x) && (local_user() == $item['uid'])) $s .= '
' . t('Filed under:') . ' ' . $x . '
'; -- cgit v1.2.3