Quellcode durchsuchen

! Death to a feature that no-one ever saw anyway. Fixes #1288

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer vor 10 Jahren
Ursprung
Commit
2c6ead9a43

+ 2 - 37
Sources/News.php

@@ -168,7 +168,7 @@ function ShowXmlFeed()
 	}
 
 	// Show in rss or proprietary format?
-	$xml_format = isset($_GET['type']) && in_array($_GET['type'], array('smf', 'rss', 'rss2', 'atom', 'rdf', 'webslice')) ? $_GET['type'] : 'smf';
+	$xml_format = isset($_GET['type']) && in_array($_GET['type'], array('smf', 'rss', 'rss2', 'atom', 'rdf')) ? $_GET['type'] : 'smf';
 
 	// @todo Birthdays?
 
@@ -186,17 +186,6 @@ function ShowXmlFeed()
 	if (empty($_GET['sa']) || !isset($subActions[$_GET['sa']]))
 		$_GET['sa'] = 'recent';
 
-	// @todo Temp - webslices doesn't do everything yet.
-	if ($xml_format == 'webslice' && $_GET['sa'] != 'recent')
-		$xml_format = 'rss2';
-	// If this is webslices we kinda cheat - we allow a template that we call direct for the HTML, and we override the CDATA.
-	elseif ($xml_format == 'webslice')
-	{
-		$context['user'] += $user_info;
-		$cdata_override = true;
-		loadTemplate('Xml');
-	}
-
 	// We only want some information, not all of it.
 	$cachekey = array($xml_format, $_GET['action'], $_GET['limit'], $_GET['sa']);
 	foreach (array('board', 'boards', 'c') as $var)
@@ -228,7 +217,7 @@ function ShowXmlFeed()
 
 	if ($xml_format == 'smf' || isset($_REQUEST['debug']))
 		header('Content-Type: text/xml; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
-	elseif ($xml_format == 'rss' || $xml_format == 'rss2' || $xml_format == 'webslice')
+	elseif ($xml_format == 'rss' || $xml_format == 'rss2')
 		header('Content-Type: application/rss+xml; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
 	elseif ($xml_format == 'atom')
 		header('Content-Type: application/atom+xml; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
@@ -255,30 +244,6 @@ function ShowXmlFeed()
 		// Output the footer of the xml.
 		echo '
 	</channel>
-</rss>';
-	}
-	elseif ($xml_format == 'webslice')
-	{
-		$context['recent_posts_data'] = $xml;
-		$context['can_pm_read'] = allowedTo('pm_read');
-
-		// This always has RSS 2
-		echo '
-<rss version="2.0" xmlns:mon="http://www.microsoft.com/schemas/rss/monitoring/2007" xml:lang="', strtr($txt['lang_locale'], '_', '-'), '">
-	<channel>
-		<title>', $feed_title, ' - ', $txt['recent_posts'], '</title>
-		<link>', $scripturl, '?action=recent</link>
-		<description><![CDATA[', strip_tags($txt['xml_rss_desc']), ']]></description>
-		<item>
-			<title>', $feed_title, ' - ', $txt['recent_posts'], '</title>
-			<link>', $scripturl, '?action=recent</link>
-			<description><![CDATA[
-				', template_webslice_header_above(), '
-				', template_webslice_recent_posts(), '
-				', template_webslice_header_below(), '
-			]]></description>
-		</item>
-	</channel>
 </rss>';
 	}
 	elseif ($xml_format == 'atom')

+ 1 - 5
Themes/default/BoardIndex.template.php

@@ -298,11 +298,7 @@ function template_ic_block_recent()
 					<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.png" alt="">', $txt['recent_posts'], '</a>
 				</h4>
 			</div>
-			<div class="hslice" id="recent_posts_content">
-				<div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['recent_posts'], '</div>
-				<div class="entry-content" style="display: none;">
-					<a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a>
-				</div>';
+			<div id="recent_posts_content">';
 
 	// Only show one post.
 	if ($settings['number_recent_posts'] == 1)

+ 0 - 49
Themes/default/Xml.template.php

@@ -397,53 +397,4 @@ function template_generic_xml_recursive($xml_data, $parent_ident, $child_ident,
 	echo "\n", str_repeat("\t", $level), '</', $parent_ident, '>';
 }
 
-function template_webslice_header_above()
-{
-	global $settings;
-
-	echo '
-	<link rel="stylesheet" href="', $settings['default_theme_url'], '/css/wireless.css" type="text/css" />';
-}
-
-function template_webslice_header_below()
-{
-}
-
-// This shows a webslice of the recent posts.
-function template_webslice_recent_posts()
-{
-	global $context, $scripturl, $txt;
-
-	echo '
-	<div style="width: 100%; height: 100%; border: 1px solid black; padding: 0; margin: 0 0 0 0; font: 100.01%/100% Verdana, Helvetica, sans-serif;">
-		<div style="background-color: #080436; color: #ffffff; padding: 4px;">
-			', cleanXml($txt['recent_posts']), '
-		</div>';
-
-	$alternate = 0;
-	foreach ($context['recent_posts_data'] as $item)
-	{
-		echo '
-		<div style="background-color: ', $alternate ? '#ECEDF3' : '#F6F6F6', '; font-size: 90%; padding: 2px;">
-			<strong><a href="', $item['link'], '">', cleanXml(sprintf($txt['post_by_member'], $item['subject'], !empty($item['poster']['link']) ? '<a href="' . $item['poster']['link'] . '">' . $item['poster']['name'] . '</a>' : $item['poster']['name'])), '
-		</div>';
-		$alternate = !$alternate;
-	}
-
-	echo '
-	</div>
-	<div style="width: 100%; height: 100%; border: 0; padding: 0; margin: 0 0 0 0; font: 100.01%/100% Verdana, Helvetica, sans-serif;">
-		<div style="font-size: xx-small;" class="righttext">';
-
-	if ($context['user']['is_guest'])
-		echo '
-			<a href="', $scripturl, '?action=login">', $txt['login'], '</a>';
-	else
-		echo '
-			', cleanXml($context['user']['name']), cleanXml(!empty($context['can_pm_read']) ? ', ' . (empty($context['user']['messages']) ? $txt['msg_alert_no_messages'] : (($context['user']['messages'] == 1 ? sprintf($txt['msg_alert_one_message'], $scripturl . '?action=pm') : sprintf($txt['msg_alert_many_message'], $scripturl . '?action=pm', $context['user']['messages'])) . ', ' . ($context['user']['unread_messages'] == 1 ? $txt['msg_alert_one_new'] : sprintf($txt['msg_alert_many_new'], $context['user']['unread_messages'])))) : '');
-	echo '
-		</div>
-	</div>';
-}
-
 ?>

+ 0 - 1
Themes/default/languages/index.english.php

@@ -777,7 +777,6 @@ $txt['openid'] = 'OpenID';
 
 $txt['downloads'] = 'Downloads';
 $txt['filesize'] = 'Filesize';
-$txt['subscribe_webslice'] = 'Subscribe to Webslice';
 
 // Restore topic
 $txt['restore_topic'] = 'Restore Topic';