some small changes
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Aug 2005 12:33:04 +0000 (12:33 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Aug 2005 12:33:04 +0000 (12:33 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1612 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Open-ILS/src/perlmods/OpenILS/Application/Auth.pm
Open-ILS/src/perlmods/OpenILS/Application/Circ/Rules.pm

index 4a819ff..5e68149 100644 (file)
@@ -125,6 +125,8 @@ sub user_retrieve_fleshed_by_id {
        my( $self, $client, $user_session, $user_id ) = @_;
        my $user_obj = $apputils->check_user_session( $user_session ); 
 
+       if(!defined($user_id)) { $user_id = $user_obj->id; }
+
        if( $user_obj->id ne $user_id ) {
                if($apputils->check_user_perms($user_obj->id, $user_obj->home_ou, "VIEW_USER")) {
                        return OpenILS::Perm->new("VIEW_USER");
index 0adbf27..88eaf7b 100644 (file)
@@ -149,6 +149,7 @@ sub complete_authenticate {
                # password is correct... do they have permission to login here?
 
                my $timeout = 28800; #staff login timeout - different for opac?
+               my $opactimeout = 604800; # 14 days
 
                if($type eq "opac") {
                        # 1 is the top level org unit (we should probably load the tree and get id from it)
index ca5258a..e9f55d6 100644 (file)
@@ -161,8 +161,7 @@ sub _grab_copy_by_barcode {
        my($session, $barcode) = @_;
        warn "Searching for copy with barcode $barcode\n";
        my $copy_req    = $session->request(
-               "open-ils.storage.fleshed.asset.copy.search.barcode", 
-               $barcode );
+               "open-ils.storage.fleshed.asset.copy.search.barcode", $barcode );
        return $copy_req->gather(1);
 }
 
@@ -186,15 +185,15 @@ sub gather_hold_objects {
 
 
        # flesh me
-       $copy = _grab_copy_by_barcode($session, $copy->barcode);
+       $copy = _grab_copy_by_barcode($session, $copy->barcode) unless ref($copy->circ_lib);
 
        my $hold_objects = {};
        $hold_objects->{standings} = $patron_standings;
        $hold_objects->{copy}           = $copy;
        $hold_objects->{hold}           = $hold;
        $hold_objects->{title}          = $$args{title} || _grab_title_by_copy($session, $copy->id);
-       $hold_objects->{requestor} = _grab_user($session, $hold->requestor);
-       my $patron                                              = _grab_user($session, $hold->usr);
+       $hold_objects->{requestor} = $$args{requestor} || _grab_user($session, $hold->requestor);
+       my $patron                                              = $$args{usr} || _grab_user($session, $hold->usr);
 
        $copy->status( $copy->status->name );
        $patron->standing($patron_standings->{$patron->standing()});