From 35ba2894408d154de409fbb2e054edcb7d9b0330 Mon Sep 17 00:00:00 2001 From: dhawes Date: Thu, 10 Nov 2005 23:34:28 +0000 Subject: [PATCH] bug 4244. Replaced rss_edit with rssedit keyword everywhere. Also added string replace for any feed:// or rss:// url strings with http:// --- blocks/rss_client/block_rss_client_action.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/blocks/rss_client/block_rss_client_action.php b/blocks/rss_client/block_rss_client_action.php index 895178c8e7c..55b8e231378 100644 --- a/blocks/rss_client/block_rss_client_action.php +++ b/blocks/rss_client/block_rss_client_action.php @@ -74,7 +74,7 @@ if ( isset($rssid) ) { //assign categories to other uses than personal if (isset($rss_record) && !( isadmin() || $submitters == SUBMITTERS_ALL_ACCOUNT_HOLDERS || ($submitters == SUBMITTERS_ADMIN_AND_TEACHER && $isteacher) || - ( ($act == 'rss_edit' || $act == 'delfeed' || $act == 'updfeed') && $USER->id == $rss_record->userid) ) ) { + ( ($act == 'rssedit' || $act == 'delfeed' || $act == 'updfeed') && $USER->id == $rss_record->userid) ) ) { error(get_string('noguestpost', 'forum').' You are not allowed to make modifications to this RSS feed at this time.', $referrer); } @@ -121,6 +121,14 @@ if ($act == 'updfeed') { $dataobject->userid = $USER->id; $dataobject->description = ''; $dataobject->title = ''; + + // attempting to replace feed and rss url types with http + // it appears that the rss feed validator will validate these url types but magpie will not load them + $url = str_replace ("feed://", "http://", "$url"); + $url = str_replace ("FEED://", "http://", "$url"); + $url = str_replace ("rss://", "http://", "$url"); + $url = str_replace ("RSS://", "http://", "$url"); + $dataobject->url = addslashes($url); $dataobject->preferredtitle = addslashes($preferredtitle); @@ -161,7 +169,7 @@ if ($act == 'updfeed') { rss_display_feeds($id); rss_print_form($act, $dataobject->url, $dataobject->id, $dataobject->preferredtitle, $id); */ -} else if ( isset($rss_record) && $act == 'rss_edit' ) { +} else if ( isset($rss_record) && $act == 'rssedit' ) { $preferredtitle = stripslashes_safe($rss_record->preferredtitle); if (empty($preferredtitle)) {