Skip to content
Browse files

Prevent notices when multiple RSS blocks

  • Loading branch information...
1 parent 97e6ecf commit abf11d900f50c2dc61e6e62a56282e15f10776b4 moodler committed May 4, 2005
Showing with 8 additions and 1 deletion.
  1. +3 −0 blocks/rss_client/block_rss_client.php
  2. +5 −1 blocks/rss_client/block_rss_client_action.php
View
3 blocks/rss_client/block_rss_client.php
@@ -129,6 +129,9 @@ function get_rss_by_id($rssid, $display_description, $shownumentries, $showtitle
$now = time();
require_once($CFG->libdir .'/rsslib.php');
require_once(MAGPIE_DIR .'rss_fetch.inc');
+ if (!defined('MAGPIE_OUTPUT_ENCODING')) {
+ define('MAGPIE_OUTPUT_ENCODING', get_string('thischarset')); // see bug 3107
+ }
// Check if there is a cached string which has not timed out.
if (BLOCK_RSS_SECONDARY_CACHE_ENABLED &&
View
6 blocks/rss_client/block_rss_client_action.php
@@ -22,6 +22,10 @@
optional_variable($url);
optional_variable($preferredtitle, '');
optional_variable($item);
+
+ if (!defined('MAGPIE_OUTPUT_ENCODING')) {
+ define('MAGPIE_OUTPUT_ENCODING', get_string('thischarset')); // see bug 3107
+ }
$straddedit = get_string('block_rss_feeds_add_edit', 'block_rss_client');
if ( isadmin() ) {
@@ -275,4 +279,4 @@ function rss_get_form($act, $url, $rssid, $preferredtitle, $printnow=true) {
}
return $returnstring;
}
-?>
+?>

0 comments on commit abf11d9

Please sign in to comment.
Something went wrong with that request. Please try again.