diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/items.php | 5 | ||||
-rw-r--r-- | include/text.php | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index 8c6134f94..047dd4442 100644 --- a/include/items.php +++ b/include/items.php @@ -995,6 +995,11 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_fee require_once('library/simplepie/simplepie.inc'); + if(! strlen($xml)) { + logger('consume_feed: empty input'); + return; + } + $feed = new SimplePie(); $feed->set_raw_data($xml); if($datedir) diff --git a/include/text.php b/include/text.php index a568b7a94..d53a2ceb9 100644 --- a/include/text.php +++ b/include/text.php @@ -732,6 +732,9 @@ function link_compare($a,$b) { return false; }} +// Given an item array, convert the body element from bbcode to html and add smilie icons. +// If attach is true, also add icons for item attachments + if(! function_exists('prepare_body')) { function prepare_body($item,$attach = false) { @@ -771,6 +774,9 @@ function prepare_body($item,$attach = false) { return $s; }} + +// Given a text string, convert from bbcode to html and add smilie icons. + if(! function_exists('prepare_text')) { function prepare_text($text) { |