allow oils_logout to take a specific argument, optionally
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 18 Mar 2010 00:04:01 +0000 (00:04 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 18 Mar 2010 00:04:01 +0000 (00:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15890 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/support-scripts/oils_header.pl

index 56d80c3..6dc6be6 100755 (executable)
@@ -169,7 +169,7 @@ sub oils_login {
 
        oils_event_die($response);
 
-       $authtime = $response->{payload}->{authtime};
+       $authtime  = $response->{payload}->{authtime};
        $authtoken = $response->{payload}->{authtoken};
        return $authtoken;
 }
@@ -181,7 +181,7 @@ sub oils_login {
 sub oils_logout {
        $apputils->simplereq(
                'open-ils.auth',
-               'open-ils.auth.session.delete', $authtoken );
+               'open-ils.auth.session.delete', (@_ ? shift : $authtoken) );
 }
 
 #----------------------------------------------------------------
@@ -198,7 +198,7 @@ sub oils_fetch_session {
 #----------------------------------------------------------------
 # var $response = simplereq( $service, $method, @params );
 #----------------------------------------------------------------
-sub simplereq { return $apputils->simplereq(@_); }
+sub simplereq    { return $apputils->simplereq(@_); }
 sub osrf_request { return $apputils->simplereq(@_); }
 
 1;