[Slashdotjp-dev 1164] [691] * Change "sitename.(rss|ref|xml|atom)" to including all stories even if

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 7月 9日 (水) 18:34:48 JST


Revision: 691
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=691
Author:   tach
Date:     2008-07-09 18:34:48 +0900 (Wed, 09 Jul 2008)

Log Message:
-----------
 * Change "sitename.(rss|ref|xml|atom)" to including all stories even if
   section local

Modified Paths:
--------------
    slashjp/branches/2.5.0.192/Slash/DB/Static/MySQL/MySQL.pm
    slashjp/branches/2.5.0.192/debian/changelog


-------------- next part --------------
Modified: slashjp/branches/2.5.0.192/Slash/DB/Static/MySQL/MySQL.pm
===================================================================
--- slashjp/branches/2.5.0.192/Slash/DB/Static/MySQL/MySQL.pm	2008-07-09 07:54:35 UTC (rev 690)
+++ slashjp/branches/2.5.0.192/Slash/DB/Static/MySQL/MySQL.pm	2008-07-09 09:34:48 UTC (rev 691)
@@ -83,7 +83,7 @@
 	my $constants = getCurrentStatic();
 
 	my $limit = $options->{limit} || 10;
-	my $topic = $options->{topic} || getCurrentStatic('mainpage_nexus_tid');
+	my $topic = $options->{topic};
 
 	my $select = "stories.stoid AS stoid, sid, title, stories.tid AS tid, primaryskid, time,
 		dept, stories.uid AS uid, commentcount, hitparade, introtext, bodytext, stories.qid as qid";
@@ -92,10 +92,12 @@
 
 	my $where = "stories.stoid = story_text.stoid
 		AND time < NOW() AND in_trash = 'no'
-		AND stories.stoid = story_topics_rendered.stoid
-		AND story_topics_rendered.tid=$topic";
+		AND stories.stoid = story_topics_rendered.stoid";
+	if ($topic) {
+		$where .= " AND story_topics_rendered.tid=$topic";
+	}
 
-	my $other = "ORDER BY time DESC LIMIT $limit";
+	my $other = "GROUP BY sid ORDER BY time DESC LIMIT $limit";
 
 	my $returnable = $self->sqlSelectAllHashrefArray($select, $from, $where, $other);
 

Modified: slashjp/branches/2.5.0.192/debian/changelog
===================================================================
--- slashjp/branches/2.5.0.192/debian/changelog	2008-07-09 07:54:35 UTC (rev 690)
+++ slashjp/branches/2.5.0.192/debian/changelog	2008-07-09 09:34:48 UTC (rev 691)
@@ -4,8 +4,10 @@
     - Use reason_id as key instead of name
   * Add workaround for unicode WAVE DASH problem
   * Add "dc:source" and "dc:relation" to RSS output
+  * Change "sitename.(rss|ref|xml|atom)" to including all stories even if
+    section local
 
- -- Taku YASUI <tach****@osdn*****>  Wed,  9 Jul 2008 07:53:55 +0000
+ -- Taku YASUI <tach****@osdn*****>  Wed,  9 Jul 2008 09:33:04 +0000
 
 slash (2.5.0.192-15) unstable; urgency=low
 


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