svnno****@sourc*****
svnno****@sourc*****
2008年 2月 1日 (金) 23:07:43 JST
Revision: 487 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=487 Author: tach Date: 2008-02-01 23:07:43 +0900 (Fri, 01 Feb 2008) Log Message: ----------- Change bookmark_feed createdtime from NOW() to date of RSS items Modified Paths: -------------- slashjp/trunk/debian/changelog slashjp/trunk/plugins/Bookmark/fetch_rss_bookmarks.pl slashjp/trunk/plugins/FireHose/FireHose.pm -------------- next part -------------- Modified: slashjp/trunk/debian/changelog =================================================================== --- slashjp/trunk/debian/changelog 2008-02-01 13:31:48 UTC (rev 486) +++ slashjp/trunk/debian/changelog 2008-02-01 14:07:43 UTC (rev 487) @@ -1,8 +1,9 @@ slash (2.5.0.192-1) unstable; urgency=low * New upstream CVS release + * Change bookmark_feed createdtime from NOW() to date of RSS items - -- Taku YASUI <tach****@osdn*****> Fri, 01 Feb 2008 20:53:00 +0900 + -- Taku YASUI <tach****@osdn*****> Fri, 01 Feb 2008 23:06:29 +0900 slash (2.5.0.189-3) unstable; urgency=low Modified: slashjp/trunk/plugins/Bookmark/fetch_rss_bookmarks.pl =================================================================== --- slashjp/trunk/plugins/Bookmark/fetch_rss_bookmarks.pl 2008-02-01 13:31:48 UTC (rev 486) +++ slashjp/trunk/plugins/Bookmark/fetch_rss_bookmarks.pl 2008-02-01 14:07:43 UTC (rev 487) @@ -10,6 +10,7 @@ use Slash::Constants qw(:slashd :strip); use XML::RSS; use LWP::UserAgent; +use HTTP::Date; use vars qw( %task $me ); @@ -59,11 +60,12 @@ url_id => $url_id, uid => $feed->{uid}, title => $title, + -createdtime => $item->{dc}->{date} ? "FROM_UNIXTIME(" . HTTP::Date::str2time($item->{dc}->{date}, 'UTC') . ")" : undef, }; my $user_bookmark = $bookmark->getUserBookmarkByUrlId($feed->{uid}, $url_id); if (!$user_bookmark) { - $bookmark_data->{"-createdtime"} = 'NOW()'; + $bookmark_data->{"-createdtime"} ||= 'NOW()'; slashdLog("creating feed bookmark $url_id"); slashdLog("$url_id $link $title"); slashdLog("after creating bookmark"); Modified: slashjp/trunk/plugins/FireHose/FireHose.pm =================================================================== --- slashjp/trunk/plugins/FireHose/FireHose.pm 2008-02-01 13:31:48 UTC (rev 486) +++ slashjp/trunk/plugins/FireHose/FireHose.pm 2008-02-01 14:07:43 UTC (rev 487) @@ -206,6 +206,7 @@ activity => $activity, public => "yes", type => $type, + createtime => $bookmark->{createdtime}, srcid => $id }; $data->{introtext} = $options->{introtext} if $options->{introtext};