Whitespace cleanup on aisle 9. user/dyrcona/friends_impl
authorJason Stephenson <jstephenson@mvlc.org>
Tue, 18 Oct 2011 14:38:19 +0000 (10:38 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Tue, 18 Oct 2011 14:38:19 +0000 (10:38 -0400)
Cleanup trailing and other whitespace in Actor::Friends before beginning the
actual work.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/Friends.pm

index 629c3cd..84a5c43 100644 (file)
@@ -14,37 +14,37 @@ my $U = "OpenILS::Application::AppUtils";
 my @expose_user_fields = qw/id usrname first_given_name second_given_name family_name alias/;
 
 my $out_links_query = {
-    select => {cubi => ['target_user']}, 
+    select => {cubi => ['target_user']},
     from => {
         cub => {
             cubi => {field => 'bucket', fkey => 'id'}
         }
-    }, 
+    },
     where => {
         '+cub' => {btype => 'folks', owner => undef}
     }
 };
 
-my $in_links_query = { 
-    select => {cub =>  ['owner'] }, 
+my $in_links_query = {
+    select => {cub =>  ['owner'] },
     from => {
         cub => {
             cubi => {field => 'bucket', fkey => 'id'}
         }
-    }, 
+    },
     where => {
-        '+cubi' => {target_user => undef}, 
+        '+cubi' => {target_user => undef},
         '+cub' => {btype => 'folks'}
     }
 };
 
-my $perm_check_query = { 
-    select => {cub =>  ['btype'] }, 
+my $perm_check_query = {
+    select => {cub =>  ['btype'] },
     from => {
         cub => {
             cubi => {field => 'bucket', fkey => 'id'}
         }
-    }, 
+    },
 };
 
 sub retrieve_friends {
@@ -59,7 +59,7 @@ sub retrieve_friends {
     $in_links_query->{where}->{'+cubi'}->{target_user} = $user_id;
     my @in_linked = map {$_->{owner}} @{$e->json_query($in_links_query)};
 
-    # determine which users are confirmed, pending outbound 
+    # determine which users are confirmed, pending outbound
     # requests, and pending inbound requests
     my @confirmed;
     my @pending_out;
@@ -98,29 +98,29 @@ sub load_linked_user_perms {
     my $items = [];
 
     # use this query to retrieve trimmed linked user objects
-    my $user_select = 
+    my $user_select =
         {select => {au => \@expose_user_fields}, from => 'au', where => undef};
 
     for my $d_user (@users) {
 
-        # fetch all of the bucket items linked from base user to 
+        # fetch all of the bucket items linked from base user to
         # delegate user with the folks: prefix on the bucket type
         $perm_check_query->{where} = {
             '+cubi' => {target_user => $d_user},
             '+cub' => {btype => {like => 'folks:%'}, owner => $user_id}
         };
 
-        my $perms_granted = [ 
+        my $perms_granted = [
             map {substr($_->{btype}, 6)} @{$e->json_query($perm_check_query)}];
 
-        # fetch all of the bucket items linked from the delegate user 
+        # fetch all of the bucket items linked from the delegate user
         # to the base user with the folks: prefix on the bucket type
         $perm_check_query->{where} = {
             '+cubi' => {target_user => $user_id},
             '+cub' => {btype => {like => 'folks:%'}, owner => $d_user}
         };
 
-        my $perms_received = [ 
+        my $perms_received = [
             map {substr($_->{btype}, 6)} @{$e->json_query($perm_check_query)}];
 
         $user_select->{where} = {id => $d_user};
@@ -135,15 +135,15 @@ sub load_linked_user_perms {
 }
 
 
-my $direct_links_query = { 
-    select => {cub =>  ['id'] }, 
+my $direct_links_query = {
+    select => {cub =>  ['id'] },
     from => {
         cub => {
             cubi => {field => 'bucket', fkey => 'id'}
         }
-    }, 
+    },
     where => {
-        '+cubi' => {target_user => undef}, 
+        '+cubi' => {target_user => undef},
         '+cub' => {btype => 'folks', owner => undef}
     },
     limit => 1
@@ -156,7 +156,6 @@ sub confirmed_friends {
     $direct_links_query->{where}->{'+cubi'}->{target_user} = $user2_id;
 
     if($e->json_query($direct_links_query)->[0]) {
-        
         $direct_links_query->{where}->{'+cub'}->{owner} = $user2_id;
         $direct_links_query->{where}->{'+cubi'}->{target_user} = $user1_id;
         return 1 if $e->json_query($direct_links_query)->[0];