[Slashdotjp-dev 1566] [1097] * Remove needless variable 'rdfitem_content'

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 4月 2日 (木) 16:54:30 JST


Revision: 1097
          http://svn.sourceforge.jp/view?root=slashdotjp&view=rev&rev=1097
Author:   tach
Date:     2009-04-02 16:54:30 +0900 (Thu, 02 Apr 2009)

Log Message:
-----------
 * Remove needless variable 'rdfitem_content'
 * Fix to add 'description' on rss_story()

Modified Paths:
--------------
    slashjp/trunk/Slash/XML/RSS/RSS.pm


-------------- next part --------------
Modified: slashjp/trunk/Slash/XML/RSS/RSS.pm
===================================================================
--- slashjp/trunk/Slash/XML/RSS/RSS.pm	2009-04-02 06:54:37 UTC (rev 1096)
+++ slashjp/trunk/Slash/XML/RSS/RSS.pm	2009-04-02 07:54:30 UTC (rev 1097)
@@ -160,9 +160,6 @@
 	$self->{rdfitemdesc_html} = defined $param->{rdfitemdesc_html}
 		? $param->{rdfitemdesc_html}
 		: $constants->{rdfitemdesc_html};
-	$self->{rdfitem_content} = defined $param->{rdfitem_content}
-		? $param->{rdfitem_content}
-		: $constants->{rdfitem_content};
 	$self->{rdfitem_content_encoded} = defined $param->{rdfitem_content_encoded}
 		? $param->{rdfitem_content_encoded}
 		: $constants->{rdfitem_content_encoded};
@@ -339,7 +336,7 @@
 						my $desc = $self->rss_item_description($item->{$key});
 						$encoded_item->{$key} = $desc if $desc;
 					}
-				} elsif ($key eq 'content:encoded' && $self->{rdfitem_content} && $self->{rdfitem_content_encoded}) {
+				} elsif ($self->{rdfitem_content_encoded} && $key eq 'content:encoded') {
 					if ($version == 1) {
 						my $rdfitemdesc_html_bak = $self->{rdfitemdesc_html};
 						$self->{rdfitemdesc_html} = 1;
@@ -457,6 +454,7 @@
 	if ($version >= 1.0) {
 		my $desc = $self->rss_item_description($item->{description} || $story->{introtext});
 		if ($desc) {
+			$encoded_item->{description} = $desc;
 
 			my $extra = '';
 			# disabled on slashdot.jp (2008-09-09, tach)



Slashdotjp-dev メーリングリストの案内
Back to archive index