[Affelio-cvs 509] CVS update: affelio/lib/Affelio/App/Admin

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 7月 3日 (日) 18:15:31 JST


Index: affelio/lib/Affelio/App/Admin/AccessLog.pm
diff -u affelio/lib/Affelio/App/Admin/AccessLog.pm:1.8 affelio/lib/Affelio/App/Admin/AccessLog.pm:1.9
--- affelio/lib/Affelio/App/Admin/AccessLog.pm:1.8	Sun Jul  3 06:52:56 2005
+++ affelio/lib/Affelio/App/Admin/AccessLog.pm	Sun Jul  3 18:15:30 2005
@@ -14,7 +14,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
-# $Id: AccessLog.pm,v 1.8 2005/07/02 21:52:56 slash5234 Exp $
+# $Id: AccessLog.pm,v 1.9 2005/07/03 09:15:30 slash5234 Exp $
 
 package Affelio::App::Admin::AccessLog;
 {
@@ -72,11 +72,24 @@
 	#Parse result
 	###############################
 	while( my ($id, $id2, $time, $nickname, $afid, $type) = $result->fetchrow_array ){
+
 	    my $true_name;
-	    if($afid =~ /http/){
+	    if($afid =~ /^http:\/\//){
+		##########
+		#Friend!
+		##########
 		$true_name = '<A HREF="' . $af->{site__web_root} . "/outgoing.cgi?dest_url=" . $afid . '" target="_blank">' . $nickname . '</A>';
 	    }else{
-		$true_name = $afid;
+		##########
+		#Anonymous
+		#afid = remote host
+		##########
+		my $len = length($afid);
+		if($len > 20){
+		    $true_name = '<SPAN TITLE="' . $afid . '">...' . substr($afid, $len-20, 20) . '</SPAN>';
+		}else{
+		    $true_name = $afid;
+		}
 	    }
 
 	    if($id2 ==0 ){ $id2="";} 


Affelio-cvs メーリングリストの案内
Back to archive index