Committer: afedorov
LJSUP-10900: Implement MessagePack protocol driver to access to Relation Service.
U trunk/cgi-bin/ljrelation.pl
Modified: trunk/cgi-bin/ljrelation.pl
===================================================================
--- trunk/cgi-bin/ljrelation.pl 2012-11-27 03:28:41 UTC (rev 23365)
+++ trunk/cgi-bin/ljrelation.pl 2012-11-27 03:47:32 UTC (rev 23366)
@@ -269,7 +269,12 @@
my ($userid, $targetid, $type) = @_;
return undef unless $type && $userid && $targetid;
- my $result = LJ::RelationService->is_relation_to($userid, $targetid, $type);
+ my $result;
+ if ( ref $type eq 'ARRAY' ) {
+ $result = LJ::RelationService->is_relation_type_to($userid, $targetid, $type);
+ } else {
+ $result = LJ::RelationService->is_relation_to($userid, $targetid, $type);
+ }
return $result;
}