[Affelio-cvs 933] CVS update: affelio/lib/Affelio/SNS

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 12月 19日 (月) 14:54:17 JST


Index: affelio/lib/Affelio/SNS/Handshaker_s.pm
diff -u affelio/lib/Affelio/SNS/Handshaker_s.pm:1.30 affelio/lib/Affelio/SNS/Handshaker_s.pm:1.31
--- affelio/lib/Affelio/SNS/Handshaker_s.pm:1.30	Mon Dec 19 14:16:19 2005
+++ affelio/lib/Affelio/SNS/Handshaker_s.pm	Mon Dec 19 14:54:16 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: Handshaker_s.pm,v 1.30 2005/12/19 05:16:19 slash5234 Exp $
+# $Id: Handshaker_s.pm,v 1.31 2005/12/19 05:54:16 slash5234 Exp $
 
 ########################################################################
 #package Affelio::SNS::Handshaker_s::Util;
@@ -101,6 +101,7 @@
 	debug_print("S::get_news passAB = [$passAB]");
 
 	#WSSE authentication
+	require Affelio::misc::WSSE;
 	if(Affelio::misc::WSSE::authenticate($xwsse_mesg,
 					     $visitor_afid, $passAB)){
 	    debug_print("S::get_news WSSE authentication OK.");
@@ -120,17 +121,17 @@
 	my $tmp_name;
 	while ( ($tmp_name, $this_app_ref) = each( %{$af->getAM->{apps}} ) ){
 	    my %this_app = %$this_app_ref;
-
+	    
 	    my $perm_to_tab=0;
 	    $perm_to_tab
-		= $self->getAM->get_summed_app_perm($visitor_afid,
+		= $af->getAM->get_summed_app_perm($visitor_afid,
 						    "f1",
 						    $this_app{'install_name'},
 						    "DF_access");
 	    if($perm_to_tab ==1 ){
 		push(@app_list, $this_app{'install_name'});
 	    }	
-
+	    debug_print("S::get_news: [$tmp_name]");
 	}
 	#while
 	debug_print("S::get_news: app_list = @app_list");	
@@ -143,13 +144,15 @@
 							"last_news_out");
 	debug_print("S::get_news last_news_out=[$last_news_out]");
 
-	my $news = $af->getMyNews()->retrieve_news(laterthan =>$last_news_out);
+	my $news = $af->getMyNews()->retrieve_news(app_list => @app_list,
+						   laterthan =>$last_news_out);
 
 	my @row=();
 	my $ret="";
 	while(@row = $news->fetchrow_array){
 	    $ret .= "$row[1]\n$row[2]\n$row[3]\n$row[4]\n$row[5]\n$row[6]\n";
 	}
+	debug_print("S::get_news NEWS=[$ret]");
 
 	#################################
 	#update last_news_out
@@ -157,10 +160,12 @@
 	my $uid = $af->getFM()->get_attribute_by_afid($visitor_afid, "uid");
 	$af->getFM()->set_attribute_by_id($uid, "last_news_out", 
 				  Affelio::misc::Time::get_timestamp());
+	debug_print("S::get_news updated last_news_out.");
 
 	#################################
 	#send back return message
 	#################################
+	debug_print("S::get_news  done.");
 	return {
 	    flerror => XMLRPC::Data->type('boolean', 0),
 	    message => $ret


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