[Slashdotjp-dev 574] CVS update: slashjp/plugins/Search

アーカイブの一覧に戻る

Tatsuki SUGIURA sugi****@users*****
2006年 7月 14日 (金) 10:54:26 JST


Index: slashjp/plugins/Search/Search.pm
diff -u slashjp/plugins/Search/Search.pm:1.4 slashjp/plugins/Search/Search.pm:1.5
--- slashjp/plugins/Search/Search.pm:1.4	Wed Jul 12 20:41:56 2006
+++ slashjp/plugins/Search/Search.pm	Fri Jul 14 10:54:26 2006
@@ -1,7 +1,7 @@
 # This code is a part of Slash, and is released under the GPL.
 # Copyright 1997-2005 by Open Source Technology Group. See README
 # and COPYING for more information, or see http://slashcode.com/.
-# $Id: Search.pm,v 1.4 2006/07/12 11:41:56 sugi Exp $
+# $Id: Search.pm,v 1.5 2006/07/14 01:54:26 sugi Exp $
 
 package Slash::Search;
 
@@ -11,7 +11,7 @@
 use vars qw($VERSION);
 use base 'Slash::DB::Utility';
 
-($VERSION) = ' $Revision: 1.4 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.5 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 # FRY: And where would a giant nerd be? THE LIBRARY!
 
@@ -239,15 +239,15 @@
 			# XXX I haven't looked closely at this but at first
 			# glance I'm not sure why this is a LEFT JOIN and
 			# not an ordinary inner join. - Jamie 2005/12/16
-			$tables .= " LEFT JOIN story_topics_rendered ON stories.stoid = story_topics_rendered.stoid";
-			$where .= " AND story_topics_rendered.tid IN ($string)";
+			$tables .= " LEFT JOIN story_topics_chosen ON stories.stoid = story_topics_chosen.stoid";
+			$where .= " AND story_topics_chosen.tid IN ($string)";
 			$other = "GROUP by stoid $other";
 		} else {
 			my $topic_search_sid_limit = $constants->{topic_search_sid_limit} || 1000;
 			my $sids = $self->sqlSelectColArrayref(
-				'story_topics_rendered.stoid',
-				'story_topics_rendered, stories', 
-				"story_topics_rendered.stoid = stories.stoid AND story_topics_rendered.tid IN ($string)",
+				'story_topics_chosen.stoid',
+				'story_topics_chosen, stories', 
+				"story_topics_chosen.stoid = stories.stoid AND story_topics_chosen.tid IN ($string)",
 				"ORDER BY time DESC LIMIT $topic_search_sid_limit");
 			if ($sids && @$sids) {
 				$string = join(',', @{$self->sqlQuote($sids)});
Index: slashjp/plugins/Search/search.pl
diff -u slashjp/plugins/Search/search.pl:1.5 slashjp/plugins/Search/search.pl:1.6
--- slashjp/plugins/Search/search.pl:1.5	Wed Jul 12 20:41:56 2006
+++ slashjp/plugins/Search/search.pl	Fri Jul 14 10:54:26 2006
@@ -2,7 +2,7 @@
 # This code is a part of Slash, and is released under the GPL.
 # Copyright 1997-2005 by Open Source Technology Group. See README
 # and COPYING for more information, or see http://slashcode.com/.
-# $Id: search.pl,v 1.5 2006/07/12 11:41:56 sugi Exp $
+# $Id: search.pl,v 1.6 2006/07/14 01:54:26 sugi Exp $
 
 use strict;
 use Slash;
@@ -766,8 +766,7 @@
 	my($text) = @_;
 	my $length = getCurrentStatic('search_text_length');
 	return $text if length($text) <= $length;
-	$text = chopEntity($text, $length);
-	$text =~ s/(.*) .*$/$1.../g;
+	$text = chopEntity($text, $length) . '...';
 	return $text;
 }
 


Slashdotjp-dev メーリングリストの案内
アーカイブの一覧に戻る