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

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 11月 1日 (火) 13:03:58 JST


Index: affelio/lib/Affelio/SNS/FriendManager.pm
diff -u affelio/lib/Affelio/SNS/FriendManager.pm:1.10 affelio/lib/Affelio/SNS/FriendManager.pm:1.11
--- affelio/lib/Affelio/SNS/FriendManager.pm:1.10	Thu Oct 27 20:15:02 2005
+++ affelio/lib/Affelio/SNS/FriendManager.pm	Tue Nov  1 13:03:57 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: FriendManager.pm,v 1.10 2005/10/27 11:15:02 slash5234 Exp $
+# $Id: FriendManager.pm,v 1.11 2005/11/01 04:03:57 slash5234 Exp $
 
 package Affelio::SNS::FriendManager;
 {
@@ -578,11 +578,17 @@
     ########################################################################
     sub get_all_friend_list{          #return SQL_result
 	my $self = shift;
+	my %param = @_;
+
 	my $af = $self->{af};
+	my $sort = $param{sort};
+	if($sort eq ""){ $sort = "uid";}
+	my $order = $param{order};
+	if($order eq ""){ $order = "asc";}
 
 	##############################
 	#retrieve all friend records from DB
-	my $query = 'SELECT * FROM AFuser_CORE_friends order by uid desc';
+	my $query = "SELECT * FROM AFuser_CORE_friends order by $sort $order";
 	my $sth;
 	eval{
 	    $sth = $af->getDB->prepare($query);


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