Tatsuki SUGIURA
sugi****@users*****
2006年 11月 1日 (水) 12:21:08 JST
Index: slashjp/plugins/Stats/adminmail.pl diff -u slashjp/plugins/Stats/adminmail.pl:1.5 slashjp/plugins/Stats/adminmail.pl:1.6 --- slashjp/plugins/Stats/adminmail.pl:1.5 Wed Oct 4 17:15:30 2006 +++ slashjp/plugins/Stats/adminmail.pl Wed Nov 1 12:21:08 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: adminmail.pl,v 1.5 2006/10/04 08:15:30 sugi Exp $ +# $Id: adminmail.pl,v 1.6 2006/11/01 03:21:08 sugi Exp $ use strict; use Slash::Constants qw( :messages :slashd ); @@ -375,7 +375,7 @@ $statsSave->createStatDaily("${op}_ipids", $uniq); $statsSave->createStatDaily("${op}_bytes", $bytes); $statsSave->createStatDaily("${op}_page", $pages); - if ($op eq "article") { + if ($op =~ m|^(?:[^/]+/)?article$|) { my $avg = $stats->getAverageHitsPerStoryOnDay($yesterday, $pages); $statsSave->createStatDaily("avg_hits_per_story", $avg); } @@ -478,7 +478,7 @@ $statsSave->createStatDaily("${op}_page", $pages, { skid => $skid}); $statsSave->createStatDaily("${op}_user", $users, { skid => $skid}); - if ($op eq "article") { + if ($op =~ m|^(?:[^/]+/)?article$|) { my $avg = $stats->getAverageHitsPerStoryOnDay($yesterday, $pages, { skid => $skid }); $statsSave->createStatDaily("avg_hits_per_story", $avg, { skid => $skid }); }