From 6164fc908023af6eea37be53d15046853339d26c Mon Sep 17 00:00:00 2001 From: poltawski Date: Mon, 3 Sep 2007 10:18:59 +0000 Subject: [PATCH] MDL-9851 - RSS block links previously used to open in new window. Restoring this behaviour. Had to tweak the cleaning to ensure the JS hack for XHTML complaint new window gets through. --- blocks/rss_client/block_rss_client.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/blocks/rss_client/block_rss_client.php b/blocks/rss_client/block_rss_client.php index 5ff215808a5..38e93656b5b 100644 --- a/blocks/rss_client/block_rss_client.php +++ b/blocks/rss_client/block_rss_client.php @@ -130,7 +130,7 @@ $numids = count($rssidarray); $count = 0; foreach ($rssidarray as $rssid) { - $output .= clean_text($this->get_rss_by_id($rssid, $display_description, $shownumentries, ($numids > 1) ? true : false), FORMAT_HTML); + $output .= $this->get_rss_by_id($rssid, $display_description, $shownumentries, ($numids > 1) ? true : false); if ($numids > 1 && $count != $numids -1 && !empty($rssfeedstring)) { $output .= '
'; } @@ -197,11 +197,14 @@ } else { $feedtitle = $this->format_title($rss_record->preferredtitle); } -// print_object($rss); + if (isset($this->config) && isset($this->config->block_rss_client_show_channel_image) && $this->config->block_rss_client_show_channel_image && isset($rss->image) && isset($rss->image['link']) && isset($rss->image['title']) && isset($rss->image['url']) ) { + + $rss->image['title'] = s($rss->image['title']); + $returnstring .= "\n".'
'. $rss->image['title'] .'
'; } @@ -235,7 +238,7 @@ $item['link'] = str_replace('&', '&', $item['link']); - $returnstring .= '
  • \n"; + $returnstring .= '
  • \n"; if ($display_description && !empty($item['description'])) { $item['description'] = break_up_long_words($item['description'], 30);