From 8dccabedaee3450642c58c75101ff52c38508112 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 1 Aug 2008 04:38:17 +0100 Subject: merge two patches: STRIP_IMAGES and ENABLE_FLASH_PLAYER from Sten (bump schema) --- functions.php | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index 8e2acb222..e00faf6b6 100644 --- a/functions.php +++ b/functions.php @@ -3522,6 +3522,12 @@ // $res = strip_tags_long($res, "


"); } + if (get_pref($link, "STRIP_IMAGES")) { + + $res = preg_replace('/]+>/is', '', $res); + + } + return $res; } @@ -4704,7 +4710,16 @@ $filename = substr($url, strrpos($url, "/")+1); - $entry = "" . + $entry = ""; + + if (($ctype = __("audio/mpeg")) && + (get_pref($link, "ENABLE_FLASH_PLAYER")) ) { + + $entry .= " "; + + } + + $entry .= "" . $filename . " (" . $ctype . ")" . ""; array_push($entries, $entry); @@ -5139,7 +5154,7 @@ // print "
"; - print $line["content_preview"]; + print sanitize_rss($line["content_preview"]); $e_result = db_query($link, "SELECT * FROM ttrss_enclosures WHERE post_id = '$id' AND content_url != ''"); @@ -5163,7 +5178,16 @@ $filename = substr($url, strrpos($url, "/")+1); - $entry = "" . + $entry = ""; + + if (($ctype = __("audio/mpeg")) && + (get_pref($link, "ENABLE_FLASH_PLAYER")) ) { + + $entry .= " "; + + } + + $entry .= "" . $filename . " (" . $ctype . ")" . ""; array_push($entries, $entry); -- cgit v1.2.3