From acdef4d1e841fc02cda8c4cfcb0b50209a25cace Mon Sep 17 00:00:00 2001 From: takezoe Date: Sun, 28 Aug 2011 17:32:43 +0000 Subject: [PATCH] =?utf8?q?editlog=E3=81=AE=E6=97=A5=E6=99=82=E3=81=8C?= =?utf8?q?=E3=82=BA=E3=83=AC=E3=82=8B=E3=81=93=E3=81=A8=E3=81=8C=E3=81=82?= =?utf8?q?=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A71=E7=A7=92=E4=BB=A5=E5=86=85?= =?utf8?q?=E3=81=AE=E3=83=AD=E3=82=B0=E3=81=AF=E5=90=8C=E3=81=98=E5=B1=A5?= =?utf8?q?=E6=AD=B4=E3=81=A8=E3=81=BF=E3=81=AA=E3=81=99=E3=82=88=E3=81=86?= =?utf8?q?=E3=81=AB=E3=81=97=E3=81=A6=E3=81=84=E3=81=BE=E3=81=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- plugin/core/Diff.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugin/core/Diff.pm b/plugin/core/Diff.pm index 960acde..bb49de3 100644 --- a/plugin/core/Diff.pm +++ b/plugin/core/Diff.pm @@ -85,6 +85,7 @@ sub show_history { } # editlog¥×¥é¥°¥¤¥ó¤Î¥í¥°¤«¤éÊÔ½¸¼Ô¤Î¥æ¡¼¥¶Ì¾¤ò¼èÆÀ + # ¡Êeditlog¤ÎÆüÉÕ¤¬¥º¥ì¤ë¤³¤È¤¬¤¢¤Ã¤¿¤Î¤Ç1ÉðÊÆâ¤Î¹¹¿·¤ÏƱ¤¸ÍúÎò¤È¤ß¤Ê¤¹¤è¤¦¤Ë¤·¤Æ¤Þ¤¹¡Ë my $editlog = {}; if($wiki->config('log_dir') ne "" && -e $wiki->config('log_dir')."/useredit.log"){ open(DATA,$wiki->config('log_dir')."/useredit.log") or die $!; @@ -92,9 +93,9 @@ sub show_history { my($date, $time, $unixtime, $action, $subject, $id) = split(" ",$_); if($subject eq $page){ if($id eq ''){ - $editlog->{$unixtime} = 'anonymous'; + $editlog->{substr($unixtime, 0, length($unixtime) - 4)} = 'anonymous'; } else { - $editlog->{$unixtime} = $id; + $editlog->{substr($unixtime, 0, length($unixtime) - 4)} = $id; } } } @@ -113,8 +114,8 @@ sub show_history { $buf .= "create_url({ action=>"DIFF",page=>$page,generation=>($#list-$count) })."\">".&Util::format_date($time). " create_url({ action=>"SOURCE",page=>$page,generation=>($#list-$count) })."\">¥½¡¼¥¹"; - if(defined($editlog->{$time})){ - $buf .= " by ".$editlog->{$time}; + if(defined($editlog->{substr($time, 0, length($time) - 4)})){ + $buf .= " by ".$editlog->{substr($time, 0, length($time) - 4)}; } $buf .= "\n"; -- 2.11.0