[Slashdotjp-dev 1136] [663] * Fix next_prev_stories selection code

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 6月 18日 (水) 21:03:31 JST


Revision: 663
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=663
Author:   tach
Date:     2008-06-18 21:03:31 +0900 (Wed, 18 Jun 2008)

Log Message:
-----------
 * Fix next_prev_stories selection code
   - Make same as mainpage story list
-- こ行以はe無視されます --

M    debian/changelog
M    Slash/DB/MySQL/MySQL.pm

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


-------------- next part --------------
Modified: slashjp/branches/2.5.0.192/Slash/DB/MySQL/MySQL.pm
===================================================================
--- slashjp/branches/2.5.0.192/Slash/DB/MySQL/MySQL.pm	2008-06-16 10:53:14 UTC (rev 662)
+++ slashjp/branches/2.5.0.192/Slash/DB/MySQL/MySQL.pm	2008-06-18 12:03:31 UTC (rev 663)
@@ -5859,6 +5859,16 @@
 		my $nexus_clause = join ',', @$nexuses, $mp_tid;
 		$where .= " AND story_topics_rendered.tid IN ($nexus_clause)";
 		$key .= '|>=';
+	} elsif (!$section && !$topic) {
+		# suppress stories never seen
+		$where .= " AND story_topics_rendered.stoid NOT IN (SELECT stoid FROM story_topics_rendered WHERE tid IN ($user->{story_never_nexus}))"
+			if ($user->{story_never_nexus});
+		my $nexuses = [];
+		push @$nexuses, $user->{story_full_best_nexus} if ($user->{story_full_best_nexus});
+		push @$nexuses, $user->{story_brief_best_nexus} if ($user->{story_brief_best_nexus});
+		my $nexus_clause .= join ',', @$nexuses;
+		$where .= " AND (story_topics_rendered.stoid NOT IN (SELECT stoid FROM story_topics_rendered WHERE tid IN ($nexus_clause)) OR story_topics_rendered.tid = $mp_tid)"
+			if ($nexus_clause);
 	} else {
 		$where .= " AND story_topics_rendered.tid = $mp_tid";
 		$key .= '|=';
@@ -5878,6 +5888,8 @@
 		$key = $user->{story_never_topic}
 			|| $user->{story_never_author}
 			|| $user->{story_never_nexus}
+			|| $user->{story_full_best_nexus}
+			|| $user->{story_brief_best_nexus}
 			? ''
 			: "$key|";
 	} elsif ($topic) {

Modified: slashjp/branches/2.5.0.192/debian/changelog
===================================================================
--- slashjp/branches/2.5.0.192/debian/changelog	2008-06-16 10:53:14 UTC (rev 662)
+++ slashjp/branches/2.5.0.192/debian/changelog	2008-06-18 12:03:31 UTC (rev 663)
@@ -24,8 +24,10 @@
     - Select enable/disable to add related comments using variable
       "related_cid_disabled"
   * Add to killing orphaned slashd child process when keepalive
+  * Fix next_prev_stories selection code
+    - Make same as mainpage story list
 
- -- Taku YASUI <tach****@osdn*****>  Mon, 16 Jun 2008 10:52:31 +0000
+ -- Taku YASUI <tach****@osdn*****>  Wed, 18 Jun 2008 12:00:34 +0000
 
 slash (2.5.0.192-12) unstable; urgency=low
 


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