[Affelio-cvs 761] CVS update: affelio/lib/Affelio/Managing

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 11月 8日 (火) 16:01:44 JST


Index: affelio/lib/Affelio/Managing/AccessLogManager.pm
diff -u affelio/lib/Affelio/Managing/AccessLogManager.pm:1.8 affelio/lib/Affelio/Managing/AccessLogManager.pm:1.9
--- affelio/lib/Affelio/Managing/AccessLogManager.pm:1.8	Thu Oct 27 20:15:01 2005
+++ affelio/lib/Affelio/Managing/AccessLogManager.pm	Tue Nov  8 16:01:44 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: AccessLogManager.pm,v 1.8 2005/10/27 11:15:01 slash5234 Exp $
+# $Id: AccessLogManager.pm,v 1.9 2005/11/08 07:01:44 slash5234 Exp $
 
 package Affelio::Managing::AccessLogManager;
 {
@@ -168,11 +168,16 @@
     #######################################################################
     sub get_log{
 	my $self=shift;
-	my $from=shift;
-	my $to=shift;
+
+	my %param = @_;
+
 	my $af = $self->{af};
 
-	debug_print("AccessLog::get_log: $from -> $to");
+	my $from = $param{t_begin};
+	my $to = $param{t_end};
+	my $type = $param{view};
+
+	debug_print("AccessLog::get_log: $from -> $to  [$type]");
 
 	################################
 	#Check the table
@@ -186,9 +191,17 @@
 	    debug_print("AccessLog:save: Table created.");
 	}
 
+
+	my $TYPE="";
+	if($type eq "affelio"){
+	    $TYPE=" and type != 'pb' ";
+	}elsif(($type eq "f1") || ($type eq "f2") || ($type eq "pb")){
+	    $TYPE=" and type = '$type' ";
+	}
+
 	##############################
 	#retrieve all friend records from DB
-	my $query = "SELECT * FROM AFuser_CORE_accesslog WHERE timestamp > $from AND timestamp < $to order by id desc";
+	my $query = "SELECT * FROM AFuser_CORE_accesslog WHERE timestamp > $from AND timestamp < $to " . $TYPE . " order by id desc";
 	my $sth;
 	eval{
 	    $sth = $af->getDB()->prepare($query); 


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