[Slashdotjp-dev 573] CVS update: slashjp/plugins/Admin

Back to archive index

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


Index: slashjp/plugins/Admin/Admin.pm
diff -u slashjp/plugins/Admin/Admin.pm:1.3 slashjp/plugins/Admin/Admin.pm:1.4
--- slashjp/plugins/Admin/Admin.pm:1.3	Wed Jul 12 20:41:43 2006
+++ slashjp/plugins/Admin/Admin.pm	Fri Jul 14 10:54:25 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: Admin.pm,v 1.3 2006/07/12 11:41:43 sugi Exp $
+# $Id: Admin.pm,v 1.4 2006/07/14 01:54:25 sugi Exp $
 
 package Slash::Admin;
 
@@ -16,7 +16,7 @@
 use base 'Slash::DB::Utility';
 use base 'Slash::DB::MySQL';
 
-($VERSION) = ' $Revision: 1.3 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.4 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 # On a side note, I am not sure if I liked the way I named the methods either.
 # -Brian
@@ -131,6 +131,7 @@
 
 	my $slashdb = getCurrentDB();
 	my $user    = getCurrentUser();
+	my $constants = getCurrentStatic();
 
 	my $rl = $slashdb->getRelatedLinks;
 	my @related_text = ( );
@@ -184,7 +185,7 @@
 
 		$label = strip_notags($label);
 		next if $label !~ /\S/;
-		$label =~ s/(\S{30})/$1 /g;
+		$label =~ s/(\S{30})/$1 /g unless $constants->{tweak_japanese};
 		# Instead of hard-coding the HTML here, we should
 		# do something a little more flexible.
 		my $str;
@@ -275,8 +276,8 @@
 ##################################################################
 sub relatedLinks {
 	my($self, $story_content, $tids, $nick, $uid) = @_;
-	my $relatedtext = $self->getRelated($story_content, $tids) .
-		$self->otherLinks($nick, $tids, $uid);
+	my $relatedtext = $self->getRelated($story_content, $tids);
+	$relatedtext .= $self->otherLinks($nick, $tids, $uid) if $nick;
 
 	# If getRelated and otherLinks seem to be putting <li>
 	# tags around each item, they probably want a <ul></ul>


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